From 75d6a0bcd7c0fc2f1bee721c68c2bea4ff6c9cb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laura=20Rodr=C3=ADguez?= Date: Wed, 17 Apr 2024 17:14:23 -0400 Subject: [PATCH] Fix API Gaps - IDP Discovery Policy (#707) - Update OAS (policy.yaml) with latest version and regenerate - Add Obsolete folders and include deprecated Apis and methods - Add integration tests - Add obsolete warnings in deprecated models. --- .openapi-generator/FILES | 30 + API_README.md | 18 + docs/AccessPolicy.md | 16 +- docs/AccessPolicyConstraint.md | 9 +- docs/AccessPolicyRule.md | 12 +- ...InstanceConditionEvaluatorAppOrInstance.md | 4 +- docs/AuthenticationMethodObject.md | 11 + docs/AuthenticatorMethodConstraint.md | 2 +- docs/AuthorizationServerPolicy.md | 16 +- docs/AuthorizationServerPolicyRule.md | 12 +- docs/ClientPolicyCondition.md | 3 +- docs/DeviceAccessPolicyRuleCondition.md | 1 + docs/DevicePolicyRuleConditionAssurance.md | 10 + docs/GrantTypePolicyRuleCondition.md | 3 +- docs/GroupCondition.md | 5 +- docs/GroupPolicyRuleCondition.md | 5 +- docs/HrefObjectMappingsLink.md | 13 + docs/HrefObjectRulesLink.md | 13 + docs/IdentityProviderPolicy.md | 12 - docs/IdpDiscoveryPolicy.md | 21 + docs/IdpDiscoveryPolicyRule.md | 19 + docs/IdpDiscoveryPolicyRuleCondition.md | 13 + docs/IdpPolicyRuleAction.md | 2 +- docs/IdpPolicyRuleActionIdp.md | 12 + docs/IdpPolicyRuleActionMatchCriteria.md | 11 + docs/IdpPolicyRuleActionProvider.md | 5 +- docs/IdpSelectionType.md | 9 + docs/KnowledgeConstraint.md | 9 +- docs/MultifactorEnrollmentPolicy.md | 16 +- docs/OktaSignOnPolicy.md | 16 +- docs/OktaSignOnPolicyRule.md | 12 +- docs/PasswordPolicy.md | 16 +- docs/PasswordPolicyRule.md | 12 +- docs/Policy.md | 16 +- docs/PolicyApi.md | 22 +- docs/PolicyCanBeCreatedOrReplaced.md | 20 + docs/PolicyContext.md | 8 +- docs/PolicyContextGroups.md | 11 + docs/PolicyContextZones.md | 2 +- docs/PolicyLinks.md | 14 + docs/PolicyMappingLinks.md | 2 + docs/PolicyMappingLinksAllOfAuthenticator.md | 13 + docs/PolicyMappingLinksAllOfPolicy.md | 13 + docs/PolicyRule.md | 12 +- docs/PossessionConstraint.md | 18 +- docs/ProfileEnrollmentPolicy.md | 16 +- docs/ProfileEnrollmentPolicyRule.md | 12 +- docs/ProfileEnrollmentPolicyRuleAction.md | 2 +- docs/SimulatePolicyBody.md | 2 +- docs/SimulatePolicyEvaluations.md | 4 +- docs/SimulateResultPoliciesItems.md | 4 +- docs/SimulateResultRules.md | 2 +- docs/SsprPrimaryRequirement.md | 2 +- docs/UserCondition.md | 5 +- ...UserIdentifierConditionEvaluatorPattern.md | 3 +- docs/UserIdentifierMatchType.md | 1 + openapi3/config.json | 10 + openapi3/management.yaml | 549 +++++++++++++----- .../ObsoleteIdentityProviderPolicy.mustache | 30 + openapi3/templates/ObsoletePolicyApi.mustache | 280 +++++++++ .../templates/modelInnerEnum copy.mustache | 28 - .../PolicyScenarios.cs | 251 ++++++++ src/Okta.Sdk/Api/PolicyApi.cs | 48 +- src/Okta.Sdk/Model/AccessPolicy.cs | 2 +- src/Okta.Sdk/Model/AccessPolicyConstraint.cs | 240 +++++++- src/Okta.Sdk/Model/AccessPolicyRule.cs | 1 + ...InstanceConditionEvaluatorAppOrInstance.cs | 6 +- .../Model/AuthenticationMethodObject.cs | 132 +++++ .../Model/AuthenticatorMethodConstraint.cs | 18 +- .../Model/AuthorizationServerPolicy.cs | 2 +- .../Model/AuthorizationServerPolicyRule.cs | 1 + src/Okta.Sdk/Model/ClientPolicyCondition.cs | 5 +- .../Model/DeviceAccessPolicyRuleCondition.cs | 16 + .../DevicePolicyRuleConditionAssurance.cs | 115 ++++ .../Model/GrantTypePolicyRuleCondition.cs | 5 +- src/Okta.Sdk/Model/GroupCondition.cs | 8 +- .../Model/GroupPolicyRuleCondition.cs | 8 +- src/Okta.Sdk/Model/HrefObjectMappingsLink.cs | 170 ++++++ src/Okta.Sdk/Model/HrefObjectRulesLink.cs | 170 ++++++ src/Okta.Sdk/Model/IdentityProviderPolicy.cs | 43 +- src/Okta.Sdk/Model/IdpDiscoveryPolicy.cs | 123 ++++ src/Okta.Sdk/Model/IdpDiscoveryPolicyRule.cs | 139 +++++ .../Model/IdpDiscoveryPolicyRuleCondition.cs | 162 ++++++ src/Okta.Sdk/Model/IdpPolicyRuleAction.cs | 19 +- src/Okta.Sdk/Model/IdpPolicyRuleActionIdp.cs | 150 +++++ .../Model/IdpPolicyRuleActionMatchCriteria.cs | 132 +++++ .../Model/IdpPolicyRuleActionProvider.cs | 40 +- src/Okta.Sdk/Model/IdpSelectionType.cs | 60 ++ src/Okta.Sdk/Model/KnowledgeConstraint.cs | 240 +++++++- .../Model/MultifactorEnrollmentPolicy.cs | 2 +- src/Okta.Sdk/Model/OktaSignOnPolicy.cs | 2 +- src/Okta.Sdk/Model/OktaSignOnPolicyRule.cs | 1 + src/Okta.Sdk/Model/PasswordPolicy.cs | 2 +- src/Okta.Sdk/Model/PasswordPolicyRule.cs | 1 + src/Okta.Sdk/Model/Policy.cs | 27 +- .../Model/PolicyCanBeCreatedOrReplaced.cs | 313 ++++++++++ src/Okta.Sdk/Model/PolicyContext.cs | 75 ++- src/Okta.Sdk/Model/PolicyContextGroups.cs | 120 ++++ src/Okta.Sdk/Model/PolicyContextZones.cs | 7 +- src/Okta.Sdk/Model/PolicyLinks.cs | 178 ++++++ src/Okta.Sdk/Model/PolicyMappingLinks.cs | 32 + .../PolicyMappingLinksAllOfAuthenticator.cs | 170 ++++++ .../Model/PolicyMappingLinksAllOfPolicy.cs | 170 ++++++ src/Okta.Sdk/Model/PolicyRule.cs | 20 +- src/Okta.Sdk/Model/PossessionConstraint.cs | 477 ++++++++++++++- src/Okta.Sdk/Model/ProfileEnrollmentPolicy.cs | 2 +- .../Model/ProfileEnrollmentPolicyRule.cs | 1 + .../ProfileEnrollmentPolicyRuleAction.cs | 70 +-- src/Okta.Sdk/Model/SimulatePolicyBody.cs | 36 +- .../Model/SimulatePolicyEvaluations.cs | 42 +- .../Model/SimulateResultPoliciesItems.cs | 64 +- src/Okta.Sdk/Model/SimulateResultRules.cs | 32 +- src/Okta.Sdk/Model/SsprPrimaryRequirement.cs | 18 +- src/Okta.Sdk/Model/UserCondition.cs | 8 +- ...UserIdentifierConditionEvaluatorPattern.cs | 5 +- src/Okta.Sdk/Model/UserIdentifierMatchType.cs | 3 +- .../Obsolete/IdentityProviderPolicy.cs | 27 + src/Okta.Sdk/Obsolete/PolicyApi.cs | 288 +++++++++ 118 files changed, 5292 insertions(+), 676 deletions(-) create mode 100644 docs/AuthenticationMethodObject.md create mode 100644 docs/DevicePolicyRuleConditionAssurance.md create mode 100644 docs/HrefObjectMappingsLink.md create mode 100644 docs/HrefObjectRulesLink.md create mode 100644 docs/IdpDiscoveryPolicy.md create mode 100644 docs/IdpDiscoveryPolicyRule.md create mode 100644 docs/IdpDiscoveryPolicyRuleCondition.md create mode 100644 docs/IdpPolicyRuleActionIdp.md create mode 100644 docs/IdpPolicyRuleActionMatchCriteria.md create mode 100644 docs/IdpSelectionType.md create mode 100644 docs/PolicyCanBeCreatedOrReplaced.md create mode 100644 docs/PolicyContextGroups.md create mode 100644 docs/PolicyLinks.md create mode 100644 docs/PolicyMappingLinksAllOfAuthenticator.md create mode 100644 docs/PolicyMappingLinksAllOfPolicy.md create mode 100644 openapi3/templates/ObsoleteIdentityProviderPolicy.mustache create mode 100644 openapi3/templates/ObsoletePolicyApi.mustache delete mode 100644 openapi3/templates/modelInnerEnum copy.mustache create mode 100644 src/Okta.Sdk/Model/AuthenticationMethodObject.cs create mode 100644 src/Okta.Sdk/Model/DevicePolicyRuleConditionAssurance.cs create mode 100644 src/Okta.Sdk/Model/HrefObjectMappingsLink.cs create mode 100644 src/Okta.Sdk/Model/HrefObjectRulesLink.cs create mode 100644 src/Okta.Sdk/Model/IdpDiscoveryPolicy.cs create mode 100644 src/Okta.Sdk/Model/IdpDiscoveryPolicyRule.cs create mode 100644 src/Okta.Sdk/Model/IdpDiscoveryPolicyRuleCondition.cs create mode 100644 src/Okta.Sdk/Model/IdpPolicyRuleActionIdp.cs create mode 100644 src/Okta.Sdk/Model/IdpPolicyRuleActionMatchCriteria.cs create mode 100644 src/Okta.Sdk/Model/IdpSelectionType.cs create mode 100644 src/Okta.Sdk/Model/PolicyCanBeCreatedOrReplaced.cs create mode 100644 src/Okta.Sdk/Model/PolicyContextGroups.cs create mode 100644 src/Okta.Sdk/Model/PolicyLinks.cs create mode 100644 src/Okta.Sdk/Model/PolicyMappingLinksAllOfAuthenticator.cs create mode 100644 src/Okta.Sdk/Model/PolicyMappingLinksAllOfPolicy.cs create mode 100644 src/Okta.Sdk/Obsolete/IdentityProviderPolicy.cs create mode 100644 src/Okta.Sdk/Obsolete/PolicyApi.cs diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 0aa134bc6..a9941b6a0 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -80,6 +80,7 @@ docs/AssignGroupOwnerRequestBody.md docs/AssignRoleRequest.md docs/AssociatedServerMediated.md docs/AttackProtectionApi.md +docs/AuthenticationMethodObject.md docs/AuthenticationProvider.md docs/AuthenticationProviderType.md docs/Authenticator.md @@ -215,6 +216,7 @@ docs/DevicePlatform.md docs/DevicePolicyMDMFramework.md docs/DevicePolicyPlatformType.md docs/DevicePolicyRuleCondition.md +docs/DevicePolicyRuleConditionAssurance.md docs/DevicePolicyRuleConditionPlatform.md docs/DevicePolicyTrustLevel.md docs/DeviceProfile.md @@ -332,6 +334,8 @@ docs/HrefObjectDeactivateLink.md docs/HrefObjectDeleteLink.md docs/HrefObjectHints.md docs/HrefObjectLogoLink.md +docs/HrefObjectMappingsLink.md +docs/HrefObjectRulesLink.md docs/HrefObjectSelfLink.md docs/HrefObjectSuspendLink.md docs/HrefObjectUnsuspendLink.md @@ -358,8 +362,14 @@ docs/IdentitySourceSession.md docs/IdentitySourceSessionStatus.md docs/IdentitySourceUserProfileForDelete.md docs/IdentitySourceUserProfileForUpsert.md +docs/IdpDiscoveryPolicy.md +docs/IdpDiscoveryPolicyRule.md +docs/IdpDiscoveryPolicyRuleCondition.md docs/IdpPolicyRuleAction.md +docs/IdpPolicyRuleActionIdp.md +docs/IdpPolicyRuleActionMatchCriteria.md docs/IdpPolicyRuleActionProvider.md +docs/IdpSelectionType.md docs/IframeEmbedScopeAllowedApps.md docs/ImageUploadResponse.md docs/InactivityPolicyRuleCondition.md @@ -577,14 +587,19 @@ docs/PolicyAccountLinkAction.md docs/PolicyAccountLinkFilter.md docs/PolicyAccountLinkFilterGroups.md docs/PolicyApi.md +docs/PolicyCanBeCreatedOrReplaced.md docs/PolicyContext.md docs/PolicyContextDevice.md +docs/PolicyContextGroups.md docs/PolicyContextRisk.md docs/PolicyContextUser.md docs/PolicyContextZones.md +docs/PolicyLinks.md docs/PolicyMapping.md docs/PolicyMappingLinks.md docs/PolicyMappingLinksAllOfApplication.md +docs/PolicyMappingLinksAllOfAuthenticator.md +docs/PolicyMappingLinksAllOfPolicy.md docs/PolicyMappingRequest.md docs/PolicyMappingResourceType.md docs/PolicyNetworkCondition.md @@ -1013,6 +1028,7 @@ src/Okta.Sdk/Model/ApplicationVisibilityHide.cs src/Okta.Sdk/Model/AssignGroupOwnerRequestBody.cs src/Okta.Sdk/Model/AssignRoleRequest.cs src/Okta.Sdk/Model/AssociatedServerMediated.cs +src/Okta.Sdk/Model/AuthenticationMethodObject.cs src/Okta.Sdk/Model/AuthenticationProvider.cs src/Okta.Sdk/Model/AuthenticationProviderType.cs src/Okta.Sdk/Model/Authenticator.cs @@ -1140,6 +1156,7 @@ src/Okta.Sdk/Model/DevicePlatform.cs src/Okta.Sdk/Model/DevicePolicyMDMFramework.cs src/Okta.Sdk/Model/DevicePolicyPlatformType.cs src/Okta.Sdk/Model/DevicePolicyRuleCondition.cs +src/Okta.Sdk/Model/DevicePolicyRuleConditionAssurance.cs src/Okta.Sdk/Model/DevicePolicyRuleConditionPlatform.cs src/Okta.Sdk/Model/DevicePolicyTrustLevel.cs src/Okta.Sdk/Model/DeviceProfile.cs @@ -1251,6 +1268,8 @@ src/Okta.Sdk/Model/HrefObjectDeactivateLink.cs src/Okta.Sdk/Model/HrefObjectDeleteLink.cs src/Okta.Sdk/Model/HrefObjectHints.cs src/Okta.Sdk/Model/HrefObjectLogoLink.cs +src/Okta.Sdk/Model/HrefObjectMappingsLink.cs +src/Okta.Sdk/Model/HrefObjectRulesLink.cs src/Okta.Sdk/Model/HrefObjectSelfLink.cs src/Okta.Sdk/Model/HrefObjectSuspendLink.cs src/Okta.Sdk/Model/HrefObjectUnsuspendLink.cs @@ -1275,8 +1294,14 @@ src/Okta.Sdk/Model/IdentitySourceSession.cs src/Okta.Sdk/Model/IdentitySourceSessionStatus.cs src/Okta.Sdk/Model/IdentitySourceUserProfileForDelete.cs src/Okta.Sdk/Model/IdentitySourceUserProfileForUpsert.cs +src/Okta.Sdk/Model/IdpDiscoveryPolicy.cs +src/Okta.Sdk/Model/IdpDiscoveryPolicyRule.cs +src/Okta.Sdk/Model/IdpDiscoveryPolicyRuleCondition.cs src/Okta.Sdk/Model/IdpPolicyRuleAction.cs +src/Okta.Sdk/Model/IdpPolicyRuleActionIdp.cs +src/Okta.Sdk/Model/IdpPolicyRuleActionMatchCriteria.cs src/Okta.Sdk/Model/IdpPolicyRuleActionProvider.cs +src/Okta.Sdk/Model/IdpSelectionType.cs src/Okta.Sdk/Model/IframeEmbedScopeAllowedApps.cs src/Okta.Sdk/Model/ImageUploadResponse.cs src/Okta.Sdk/Model/InactivityPolicyRuleCondition.cs @@ -1488,14 +1513,19 @@ src/Okta.Sdk/Model/PolicyAccountLink.cs src/Okta.Sdk/Model/PolicyAccountLinkAction.cs src/Okta.Sdk/Model/PolicyAccountLinkFilter.cs src/Okta.Sdk/Model/PolicyAccountLinkFilterGroups.cs +src/Okta.Sdk/Model/PolicyCanBeCreatedOrReplaced.cs src/Okta.Sdk/Model/PolicyContext.cs src/Okta.Sdk/Model/PolicyContextDevice.cs +src/Okta.Sdk/Model/PolicyContextGroups.cs src/Okta.Sdk/Model/PolicyContextRisk.cs src/Okta.Sdk/Model/PolicyContextUser.cs src/Okta.Sdk/Model/PolicyContextZones.cs +src/Okta.Sdk/Model/PolicyLinks.cs src/Okta.Sdk/Model/PolicyMapping.cs src/Okta.Sdk/Model/PolicyMappingLinks.cs src/Okta.Sdk/Model/PolicyMappingLinksAllOfApplication.cs +src/Okta.Sdk/Model/PolicyMappingLinksAllOfAuthenticator.cs +src/Okta.Sdk/Model/PolicyMappingLinksAllOfPolicy.cs src/Okta.Sdk/Model/PolicyMappingRequest.cs src/Okta.Sdk/Model/PolicyMappingResourceType.cs src/Okta.Sdk/Model/PolicyNetworkCondition.cs diff --git a/API_README.md b/API_README.md index f42779251..839b41e20 100644 --- a/API_README.md +++ b/API_README.md @@ -651,6 +651,7 @@ Class | Method | HTTP request | Description - [Model.AssignGroupOwnerRequestBody](docs/AssignGroupOwnerRequestBody.md) - [Model.AssignRoleRequest](docs/AssignRoleRequest.md) - [Model.AssociatedServerMediated](docs/AssociatedServerMediated.md) + - [Model.AuthenticationMethodObject](docs/AuthenticationMethodObject.md) - [Model.AuthenticationProvider](docs/AuthenticationProvider.md) - [Model.AuthenticationProviderType](docs/AuthenticationProviderType.md) - [Model.Authenticator](docs/Authenticator.md) @@ -809,6 +810,7 @@ Class | Method | HTTP request | Description - [Model.DevicePolicyMDMFramework](docs/DevicePolicyMDMFramework.md) - [Model.DevicePolicyPlatformType](docs/DevicePolicyPlatformType.md) - [Model.DevicePolicyRuleCondition](docs/DevicePolicyRuleCondition.md) + - [Model.DevicePolicyRuleConditionAssurance](docs/DevicePolicyRuleConditionAssurance.md) - [Model.DevicePolicyRuleConditionPlatform](docs/DevicePolicyRuleConditionPlatform.md) - [Model.DevicePolicyTrustLevel](docs/DevicePolicyTrustLevel.md) - [Model.DeviceProfile](docs/DeviceProfile.md) @@ -932,6 +934,8 @@ Class | Method | HTTP request | Description - [Model.HrefObjectDeleteLink](docs/HrefObjectDeleteLink.md) - [Model.HrefObjectHints](docs/HrefObjectHints.md) - [Model.HrefObjectLogoLink](docs/HrefObjectLogoLink.md) + - [Model.HrefObjectMappingsLink](docs/HrefObjectMappingsLink.md) + - [Model.HrefObjectRulesLink](docs/HrefObjectRulesLink.md) - [Model.HrefObjectSelfLink](docs/HrefObjectSelfLink.md) - [Model.HrefObjectSuspendLink](docs/HrefObjectSuspendLink.md) - [Model.HrefObjectUnsuspendLink](docs/HrefObjectUnsuspendLink.md) @@ -958,8 +962,17 @@ Class | Method | HTTP request | Description - [Model.IdentitySourceSessionStatus](docs/IdentitySourceSessionStatus.md) - [Model.IdentitySourceUserProfileForDelete](docs/IdentitySourceUserProfileForDelete.md) - [Model.IdentitySourceUserProfileForUpsert](docs/IdentitySourceUserProfileForUpsert.md) + - [Model.IdpDiscoveryPolicy](docs/IdpDiscoveryPolicy.md) + - [Model.IdpDiscoveryPolicyAllOf](docs/IdpDiscoveryPolicyAllOf.md) + - [Model.IdpDiscoveryPolicyRule](docs/IdpDiscoveryPolicyRule.md) + - [Model.IdpDiscoveryPolicyRuleAllOf](docs/IdpDiscoveryPolicyRuleAllOf.md) + - [Model.IdpDiscoveryPolicyRuleCondition](docs/IdpDiscoveryPolicyRuleCondition.md) + - [Model.IdpDiscoveryPolicyRuleConditionAllOf](docs/IdpDiscoveryPolicyRuleConditionAllOf.md) - [Model.IdpPolicyRuleAction](docs/IdpPolicyRuleAction.md) + - [Model.IdpPolicyRuleActionIdp](docs/IdpPolicyRuleActionIdp.md) + - [Model.IdpPolicyRuleActionMatchCriteria](docs/IdpPolicyRuleActionMatchCriteria.md) - [Model.IdpPolicyRuleActionProvider](docs/IdpPolicyRuleActionProvider.md) + - [Model.IdpSelectionType](docs/IdpSelectionType.md) - [Model.IframeEmbedScopeAllowedApps](docs/IframeEmbedScopeAllowedApps.md) - [Model.ImageUploadResponse](docs/ImageUploadResponse.md) - [Model.InactivityPolicyRuleCondition](docs/InactivityPolicyRuleCondition.md) @@ -1197,15 +1210,20 @@ Class | Method | HTTP request | Description - [Model.PolicyAccountLinkAction](docs/PolicyAccountLinkAction.md) - [Model.PolicyAccountLinkFilter](docs/PolicyAccountLinkFilter.md) - [Model.PolicyAccountLinkFilterGroups](docs/PolicyAccountLinkFilterGroups.md) + - [Model.PolicyCanBeCreatedOrReplaced](docs/PolicyCanBeCreatedOrReplaced.md) - [Model.PolicyContext](docs/PolicyContext.md) - [Model.PolicyContextDevice](docs/PolicyContextDevice.md) + - [Model.PolicyContextGroups](docs/PolicyContextGroups.md) - [Model.PolicyContextRisk](docs/PolicyContextRisk.md) - [Model.PolicyContextUser](docs/PolicyContextUser.md) - [Model.PolicyContextZones](docs/PolicyContextZones.md) + - [Model.PolicyLinks](docs/PolicyLinks.md) - [Model.PolicyMapping](docs/PolicyMapping.md) - [Model.PolicyMappingLinks](docs/PolicyMappingLinks.md) - [Model.PolicyMappingLinksAllOf](docs/PolicyMappingLinksAllOf.md) - [Model.PolicyMappingLinksAllOfApplication](docs/PolicyMappingLinksAllOfApplication.md) + - [Model.PolicyMappingLinksAllOfAuthenticator](docs/PolicyMappingLinksAllOfAuthenticator.md) + - [Model.PolicyMappingLinksAllOfPolicy](docs/PolicyMappingLinksAllOfPolicy.md) - [Model.PolicyMappingRequest](docs/PolicyMappingRequest.md) - [Model.PolicyMappingResourceType](docs/PolicyMappingResourceType.md) - [Model.PolicyNetworkCondition](docs/PolicyNetworkCondition.md) diff --git a/docs/AccessPolicy.md b/docs/AccessPolicy.md index e716c5ec9..93b3f0087 100644 --- a/docs/AccessPolicy.md +++ b/docs/AccessPolicy.md @@ -4,17 +4,17 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Created** | **DateTimeOffset** | | [optional] [readonly] -**Description** | **string** | | [optional] -**Id** | **string** | | [optional] [readonly] -**LastUpdated** | **DateTimeOffset** | | [optional] [readonly] -**Name** | **string** | | [optional] -**Priority** | **int** | | [optional] +**Created** | **DateTimeOffset** | Timestamp when the Policy was created | [optional] [readonly] +**Description** | **string** | Policy description | [optional] +**Id** | **string** | Policy ID | [optional] [readonly] +**LastUpdated** | **DateTimeOffset** | Timestamp when the Policy was last updated | [optional] [readonly] +**Name** | **string** | Policy name | [optional] +**Priority** | **int** | Specifies the order in which this Policy is evaluated in relation to the other policies | [optional] **Status** | [**LifecycleStatus**](LifecycleStatus.md) | | [optional] -**System** | **bool** | | [optional] +**System** | **bool** | Specifies whether Okta created the Policy | [optional] **Type** | [**PolicyType**](PolicyType.md) | | [optional] **Embedded** | **Dictionary<string, Object>** | | [optional] [readonly] -**Links** | [**LinksSelf**](LinksSelf.md) | | [optional] +**Links** | [**PolicyLinks**](PolicyLinks.md) | | [optional] **Conditions** | [**PolicyRuleConditions**](PolicyRuleConditions.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AccessPolicyConstraint.md b/docs/AccessPolicyConstraint.md index 0848d1f79..5202ceb0c 100644 --- a/docs/AccessPolicyConstraint.md +++ b/docs/AccessPolicyConstraint.md @@ -4,9 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Methods** | **List<string>** | | [optional] -**ReauthenticateIn** | **string** | | [optional] -**Types** | **List<string>** | | [optional] +**Methods** | **List<string>** | The Authenticator methods that are permitted | [optional] +**ReauthenticateIn** | **string** | The duration after which the user must re-authenticate regardless of user activity. This re-authentication interval overrides the Verification Method object's `reauthenticateIn` interval. The supported values use ISO 8601 period format for recurring time intervals (for example, `PT1H`). | [optional] +**Types** | **List<string>** | The Authenticator types that are permitted | [optional] +**AuthenticationMethods** | [**List<AuthenticationMethodObject>**](AuthenticationMethodObject.md) | This property specifies the precise authenticator and method for authentication. | [optional] +**ExcludedAuthenticationMethods** | [**List<AuthenticationMethodObject>**](AuthenticationMethodObject.md) | This property specifies the precise authenticator and method to exclude from authentication. | [optional] +**Required** | **bool** | This property indicates whether the knowledge or possession factor is required by the assurance. It's optional in the request, but is always returned in the response. By default, this field is `true`. If the knowledge or possession constraint has values for`excludedAuthenticationMethods` the `required` value is false. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AccessPolicyRule.md b/docs/AccessPolicyRule.md index 550388016..0c1bec67d 100644 --- a/docs/AccessPolicyRule.md +++ b/docs/AccessPolicyRule.md @@ -4,13 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Created** | **DateTimeOffset?** | | [optional] [readonly] -**Id** | **string** | | [optional] -**LastUpdated** | **DateTimeOffset?** | | [optional] [readonly] -**Name** | **string** | | [optional] -**Priority** | **int** | | [optional] +**Created** | **DateTimeOffset?** | Timestamp when the rule was created | [optional] [readonly] +**Id** | **string** | Identifier for the rule | [optional] +**LastUpdated** | **DateTimeOffset?** | Timestamp when the rule was last modified | [optional] [readonly] +**Name** | **string** | Name of the rule | [optional] +**Priority** | **int** | Priority of the rule | [optional] **Status** | [**LifecycleStatus**](LifecycleStatus.md) | | [optional] -**System** | **bool** | | [optional] [default to false] +**System** | **bool** | Specifies whether Okta created the Policy Rule (`system=true`). You can't delete Policy Rules that have `system` set to `true`. | [optional] [default to false] **Type** | [**PolicyRuleType**](PolicyRuleType.md) | | [optional] **Actions** | [**AccessPolicyRuleActions**](AccessPolicyRuleActions.md) | | [optional] **Conditions** | [**AccessPolicyRuleConditions**](AccessPolicyRuleConditions.md) | | [optional] diff --git a/docs/AppAndInstanceConditionEvaluatorAppOrInstance.md b/docs/AppAndInstanceConditionEvaluatorAppOrInstance.md index 18717b05f..61717886e 100644 --- a/docs/AppAndInstanceConditionEvaluatorAppOrInstance.md +++ b/docs/AppAndInstanceConditionEvaluatorAppOrInstance.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **string** | | [optional] [readonly] -**Name** | **string** | | [optional] +**Id** | **string** | ID of the app | [optional] [readonly] +**Name** | **string** | Name of the app type | [optional] **Type** | **AppAndInstanceType** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AuthenticationMethodObject.md b/docs/AuthenticationMethodObject.md new file mode 100644 index 000000000..f7885f73b --- /dev/null +++ b/docs/AuthenticationMethodObject.md @@ -0,0 +1,11 @@ +# Okta.Sdk.Model.AuthenticationMethodObject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Key** | **string** | A label that identifies the authenticator | [optional] +**Method** | **string** | Specifies the method used for the authenticator | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/AuthenticatorMethodConstraint.md b/docs/AuthenticatorMethodConstraint.md index ec3f0cd60..15d664cf0 100644 --- a/docs/AuthenticatorMethodConstraint.md +++ b/docs/AuthenticatorMethodConstraint.md @@ -5,8 +5,8 @@ Limits the authenticators that can be used for a given method. Currently, only t Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**AllowedAuthenticators** | [**List<AuthenticatorIdentity>**](AuthenticatorIdentity.md) | | [optional] **Method** | **string** | | [optional] +**AllowedAuthenticators** | [**List<AuthenticatorIdentity>**](AuthenticatorIdentity.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AuthorizationServerPolicy.md b/docs/AuthorizationServerPolicy.md index 1463f27f2..d31ccba29 100644 --- a/docs/AuthorizationServerPolicy.md +++ b/docs/AuthorizationServerPolicy.md @@ -4,17 +4,17 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Created** | **DateTimeOffset** | | [optional] [readonly] -**Description** | **string** | | [optional] -**Id** | **string** | | [optional] [readonly] -**LastUpdated** | **DateTimeOffset** | | [optional] [readonly] -**Name** | **string** | | [optional] -**Priority** | **int** | | [optional] +**Created** | **DateTimeOffset** | Timestamp when the Policy was created | [optional] [readonly] +**Description** | **string** | Policy description | [optional] +**Id** | **string** | Policy ID | [optional] [readonly] +**LastUpdated** | **DateTimeOffset** | Timestamp when the Policy was last updated | [optional] [readonly] +**Name** | **string** | Policy name | [optional] +**Priority** | **int** | Specifies the order in which this Policy is evaluated in relation to the other policies | [optional] **Status** | [**LifecycleStatus**](LifecycleStatus.md) | | [optional] -**System** | **bool** | | [optional] +**System** | **bool** | Specifies whether Okta created the Policy | [optional] **Type** | [**PolicyType**](PolicyType.md) | | [optional] **Embedded** | **Dictionary<string, Object>** | | [optional] [readonly] -**Links** | [**LinksSelf**](LinksSelf.md) | | [optional] +**Links** | [**PolicyLinks**](PolicyLinks.md) | | [optional] **Conditions** | [**PolicyRuleConditions**](PolicyRuleConditions.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AuthorizationServerPolicyRule.md b/docs/AuthorizationServerPolicyRule.md index 5d3b4e44b..acf6be966 100644 --- a/docs/AuthorizationServerPolicyRule.md +++ b/docs/AuthorizationServerPolicyRule.md @@ -4,13 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Created** | **DateTimeOffset?** | | [optional] [readonly] -**Id** | **string** | | [optional] -**LastUpdated** | **DateTimeOffset?** | | [optional] [readonly] -**Name** | **string** | | [optional] -**Priority** | **int** | | [optional] +**Created** | **DateTimeOffset?** | Timestamp when the rule was created | [optional] [readonly] +**Id** | **string** | Identifier for the rule | [optional] +**LastUpdated** | **DateTimeOffset?** | Timestamp when the rule was last modified | [optional] [readonly] +**Name** | **string** | Name of the rule | [optional] +**Priority** | **int** | Priority of the rule | [optional] **Status** | [**LifecycleStatus**](LifecycleStatus.md) | | [optional] -**System** | **bool** | | [optional] [default to false] +**System** | **bool** | Specifies whether Okta created the Policy Rule (`system=true`). You can't delete Policy Rules that have `system` set to `true`. | [optional] [default to false] **Type** | [**PolicyRuleType**](PolicyRuleType.md) | | [optional] **Actions** | [**AuthorizationServerPolicyRuleActions**](AuthorizationServerPolicyRuleActions.md) | | [optional] **Conditions** | [**AuthorizationServerPolicyRuleConditions**](AuthorizationServerPolicyRuleConditions.md) | | [optional] diff --git a/docs/ClientPolicyCondition.md b/docs/ClientPolicyCondition.md index 0cf894047..499c8530b 100644 --- a/docs/ClientPolicyCondition.md +++ b/docs/ClientPolicyCondition.md @@ -1,10 +1,11 @@ # Okta.Sdk.Model.ClientPolicyCondition +Specifies which clients are included in the Policy ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Include** | **List<string>** | | [optional] +**Include** | **List<string>** | Which clients are included in the Policy | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DeviceAccessPolicyRuleCondition.md b/docs/DeviceAccessPolicyRuleCondition.md index 9766f2d96..b1e9760ba 100644 --- a/docs/DeviceAccessPolicyRuleCondition.md +++ b/docs/DeviceAccessPolicyRuleCondition.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes **TrustLevel** | **DevicePolicyTrustLevel** | | [optional] **Managed** | **bool** | | [optional] **Registered** | **bool** | | [optional] +**Assurance** | [**DevicePolicyRuleConditionAssurance**](DevicePolicyRuleConditionAssurance.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DevicePolicyRuleConditionAssurance.md b/docs/DevicePolicyRuleConditionAssurance.md new file mode 100644 index 000000000..285d372ec --- /dev/null +++ b/docs/DevicePolicyRuleConditionAssurance.md @@ -0,0 +1,10 @@ +# Okta.Sdk.Model.DevicePolicyRuleConditionAssurance + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Include** | **List<string>** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GrantTypePolicyRuleCondition.md b/docs/GrantTypePolicyRuleCondition.md index 3eb75b3ee..f2d1c1221 100644 --- a/docs/GrantTypePolicyRuleCondition.md +++ b/docs/GrantTypePolicyRuleCondition.md @@ -1,10 +1,11 @@ # Okta.Sdk.Model.GrantTypePolicyRuleCondition +Array of grant types that this condition includes. Determines the mechanism that Okta uses to authorize the creation of the tokens. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Include** | **List<string>** | | [optional] +**Include** | **List<string>** | Array of grant types thagt this condition includes. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GroupCondition.md b/docs/GroupCondition.md index 253890e5c..5453b630c 100644 --- a/docs/GroupCondition.md +++ b/docs/GroupCondition.md @@ -1,11 +1,12 @@ # Okta.Sdk.Model.GroupCondition +Specifies a set of Groups whose Users are to be included or excluded ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Exclude** | **List<string>** | | [optional] -**Include** | **List<string>** | | [optional] +**Exclude** | **List<string>** | Groups to be excluded | [optional] +**Include** | **List<string>** | Groups to be included | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GroupPolicyRuleCondition.md b/docs/GroupPolicyRuleCondition.md index c9b111812..8e2175807 100644 --- a/docs/GroupPolicyRuleCondition.md +++ b/docs/GroupPolicyRuleCondition.md @@ -1,11 +1,12 @@ # Okta.Sdk.Model.GroupPolicyRuleCondition +Specifies a set of Groups whose Users are to be included or excluded ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Exclude** | **List<string>** | | [optional] -**Include** | **List<string>** | | [optional] +**Exclude** | **List<string>** | Groups to be excluded | [optional] +**Include** | **List<string>** | Groups to be included | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/HrefObjectMappingsLink.md b/docs/HrefObjectMappingsLink.md new file mode 100644 index 000000000..2e69718da --- /dev/null +++ b/docs/HrefObjectMappingsLink.md @@ -0,0 +1,13 @@ +# Okta.Sdk.Model.HrefObjectMappingsLink + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Hints** | [**HrefObjectHints**](HrefObjectHints.md) | | [optional] +**Href** | **string** | Link URI | +**Name** | **string** | Link name | [optional] +**Type** | **string** | The media type of the link. If omitted, it is implicitly `application/json`. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/HrefObjectRulesLink.md b/docs/HrefObjectRulesLink.md new file mode 100644 index 000000000..51a276b4c --- /dev/null +++ b/docs/HrefObjectRulesLink.md @@ -0,0 +1,13 @@ +# Okta.Sdk.Model.HrefObjectRulesLink + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Hints** | [**HrefObjectHints**](HrefObjectHints.md) | | [optional] +**Href** | **string** | Link URI | +**Name** | **string** | Link name | [optional] +**Type** | **string** | The media type of the link. If omitted, it is implicitly `application/json`. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/IdentityProviderPolicy.md b/docs/IdentityProviderPolicy.md index 58147aa67..7f5437080 100644 --- a/docs/IdentityProviderPolicy.md +++ b/docs/IdentityProviderPolicy.md @@ -4,19 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Created** | **DateTimeOffset** | | [optional] [readonly] -**Description** | **string** | | [optional] -**Id** | **string** | | [optional] [readonly] -**LastUpdated** | **DateTimeOffset** | | [optional] [readonly] -**Name** | **string** | | [optional] -**Priority** | **int** | | [optional] -**Status** | [**LifecycleStatus**](LifecycleStatus.md) | | [optional] -**System** | **bool** | | [optional] -**Type** | [**PolicyType**](PolicyType.md) | | [optional] -**Embedded** | **Dictionary<string, Object>** | | [optional] [readonly] -**Links** | [**LinksSelf**](LinksSelf.md) | | [optional] **AccountLink** | [**PolicyAccountLink**](PolicyAccountLink.md) | | [optional] -**Conditions** | [**PolicyRuleConditions**](PolicyRuleConditions.md) | | [optional] **MapAMRClaims** | **bool** | Enable mapping AMR from IdP to Okta to downstream apps | [optional] [default to false] **MaxClockSkew** | **int** | | [optional] **Provisioning** | [**Provisioning**](Provisioning.md) | | [optional] diff --git a/docs/IdpDiscoveryPolicy.md b/docs/IdpDiscoveryPolicy.md new file mode 100644 index 000000000..732b69f96 --- /dev/null +++ b/docs/IdpDiscoveryPolicy.md @@ -0,0 +1,21 @@ +# Okta.Sdk.Model.IdpDiscoveryPolicy + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Created** | **DateTimeOffset** | Timestamp when the Policy was created | [optional] [readonly] +**Description** | **string** | Policy description | [optional] +**Id** | **string** | Policy ID | [optional] [readonly] +**LastUpdated** | **DateTimeOffset** | Timestamp when the Policy was last updated | [optional] [readonly] +**Name** | **string** | Policy name | [optional] +**Priority** | **int** | Specifies the order in which this Policy is evaluated in relation to the other policies | [optional] +**Status** | [**LifecycleStatus**](LifecycleStatus.md) | | [optional] +**System** | **bool** | Specifies whether Okta created the Policy | [optional] +**Type** | [**PolicyType**](PolicyType.md) | | [optional] +**Embedded** | **Dictionary<string, Object>** | | [optional] [readonly] +**Links** | [**PolicyLinks**](PolicyLinks.md) | | [optional] +**Conditions** | **Object** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/IdpDiscoveryPolicyRule.md b/docs/IdpDiscoveryPolicyRule.md new file mode 100644 index 000000000..6d4d425be --- /dev/null +++ b/docs/IdpDiscoveryPolicyRule.md @@ -0,0 +1,19 @@ +# Okta.Sdk.Model.IdpDiscoveryPolicyRule + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Created** | **DateTimeOffset?** | Timestamp when the rule was created | [optional] [readonly] +**Id** | **string** | Identifier for the rule | [optional] +**LastUpdated** | **DateTimeOffset?** | Timestamp when the rule was last modified | [optional] [readonly] +**Name** | **string** | Name of the rule | [optional] +**Priority** | **int** | Priority of the rule | [optional] +**Status** | [**LifecycleStatus**](LifecycleStatus.md) | | [optional] +**System** | **bool** | Specifies whether Okta created the Policy Rule (`system=true`). You can't delete Policy Rules that have `system` set to `true`. | [optional] [default to false] +**Type** | [**PolicyRuleType**](PolicyRuleType.md) | | [optional] +**Actions** | [**IdpPolicyRuleAction**](IdpPolicyRuleAction.md) | | [optional] +**Conditions** | [**IdpDiscoveryPolicyRuleCondition**](IdpDiscoveryPolicyRuleCondition.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/IdpDiscoveryPolicyRuleCondition.md b/docs/IdpDiscoveryPolicyRuleCondition.md new file mode 100644 index 000000000..826069b1c --- /dev/null +++ b/docs/IdpDiscoveryPolicyRuleCondition.md @@ -0,0 +1,13 @@ +# Okta.Sdk.Model.IdpDiscoveryPolicyRuleCondition + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**App** | [**AppAndInstancePolicyRuleCondition**](AppAndInstancePolicyRuleCondition.md) | | [optional] +**Network** | [**PolicyNetworkCondition**](PolicyNetworkCondition.md) | | [optional] +**UserIdentifier** | [**UserIdentifierPolicyRuleCondition**](UserIdentifierPolicyRuleCondition.md) | | [optional] +**Platform** | [**PlatformPolicyRuleCondition**](PlatformPolicyRuleCondition.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/IdpPolicyRuleAction.md b/docs/IdpPolicyRuleAction.md index ee7776848..c592e9597 100644 --- a/docs/IdpPolicyRuleAction.md +++ b/docs/IdpPolicyRuleAction.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Providers** | [**List<IdpPolicyRuleActionProvider>**](IdpPolicyRuleActionProvider.md) | | [optional] +**Idp** | [**IdpPolicyRuleActionIdp**](IdpPolicyRuleActionIdp.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/IdpPolicyRuleActionIdp.md b/docs/IdpPolicyRuleActionIdp.md new file mode 100644 index 000000000..491b4c9a4 --- /dev/null +++ b/docs/IdpPolicyRuleActionIdp.md @@ -0,0 +1,12 @@ +# Okta.Sdk.Model.IdpPolicyRuleActionIdp + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Providers** | [**List<IdpPolicyRuleActionProvider>**](IdpPolicyRuleActionProvider.md) | List of configured Identity Providers that a given Rule can route to. Ability to define multiple providers is a part of the Okta Identity Engine. This allows users to choose a Provider when they sign in. Contact support for information on the Identity Engine. | [optional] +**IdpSelectionType** | **IdpSelectionType** | | [optional] +**MatchCriteria** | [**List<IdpPolicyRuleActionMatchCriteria>**](IdpPolicyRuleActionMatchCriteria.md) | Required if `idpSelectionType` is set to `DYNAMIC` | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/IdpPolicyRuleActionMatchCriteria.md b/docs/IdpPolicyRuleActionMatchCriteria.md new file mode 100644 index 000000000..a6fabe3f5 --- /dev/null +++ b/docs/IdpPolicyRuleActionMatchCriteria.md @@ -0,0 +1,11 @@ +# Okta.Sdk.Model.IdpPolicyRuleActionMatchCriteria + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ProviderExpression** | **string** | You can provide an Okta Expression Language expression with the Login Context that's evaluated with the IdP. For example, the value `login.identifier` refers to the user's username. If the user is signing in with the username `john.doe@mycompany.com`, the expression `login.identifier.substringAfter(@))` is evaluated to the domain name of the user, for example: `mycompany.com`. | [optional] +**PropertyName** | **string** | The IdP property that the evaluated string should match to | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/IdpPolicyRuleActionProvider.md b/docs/IdpPolicyRuleActionProvider.md index e1b160b1b..e4fd161ca 100644 --- a/docs/IdpPolicyRuleActionProvider.md +++ b/docs/IdpPolicyRuleActionProvider.md @@ -4,8 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **string** | | [optional] [readonly] -**Type** | **string** | | [optional] +**Id** | **string** | IdP types of `OKTA`, `AgentlessDSSO`, and `IWA` don't require an ID. | [optional] +**Name** | **string** | Provider `name` in Okta. Optional. Supported in `IDENTITY ENGINE`. | [optional] +**Type** | **IdentityProviderType** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/IdpSelectionType.md b/docs/IdpSelectionType.md new file mode 100644 index 000000000..95ec86cd8 --- /dev/null +++ b/docs/IdpSelectionType.md @@ -0,0 +1,9 @@ +# Okta.Sdk.Model.IdpSelectionType + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/KnowledgeConstraint.md b/docs/KnowledgeConstraint.md index dfd0239e6..9e6a2f467 100644 --- a/docs/KnowledgeConstraint.md +++ b/docs/KnowledgeConstraint.md @@ -4,9 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Methods** | **List<string>** | | [optional] -**ReauthenticateIn** | **string** | | [optional] -**Types** | **List<string>** | | [optional] +**Methods** | **List<string>** | The Authenticator methods that are permitted | [optional] +**ReauthenticateIn** | **string** | The duration after which the user must re-authenticate regardless of user activity. This re-authentication interval overrides the Verification Method object's `reauthenticateIn` interval. The supported values use ISO 8601 period format for recurring time intervals (for example, `PT1H`). | [optional] +**Types** | **List<string>** | The Authenticator types that are permitted | [optional] +**AuthenticationMethods** | [**List<AuthenticationMethodObject>**](AuthenticationMethodObject.md) | This property specifies the precise authenticator and method for authentication. | [optional] +**ExcludedAuthenticationMethods** | [**List<AuthenticationMethodObject>**](AuthenticationMethodObject.md) | This property specifies the precise authenticator and method to exclude from authentication. | [optional] +**Required** | **bool** | This property indicates whether the knowledge or possession factor is required by the assurance. It's optional in the request, but is always returned in the response. By default, this field is `true`. If the knowledge or possession constraint has values for`excludedAuthenticationMethods` the `required` value is false. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MultifactorEnrollmentPolicy.md b/docs/MultifactorEnrollmentPolicy.md index b2b85ed45..be52330fd 100644 --- a/docs/MultifactorEnrollmentPolicy.md +++ b/docs/MultifactorEnrollmentPolicy.md @@ -4,17 +4,17 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Created** | **DateTimeOffset** | | [optional] [readonly] -**Description** | **string** | | [optional] -**Id** | **string** | | [optional] [readonly] -**LastUpdated** | **DateTimeOffset** | | [optional] [readonly] -**Name** | **string** | | [optional] -**Priority** | **int** | | [optional] +**Created** | **DateTimeOffset** | Timestamp when the Policy was created | [optional] [readonly] +**Description** | **string** | Policy description | [optional] +**Id** | **string** | Policy ID | [optional] [readonly] +**LastUpdated** | **DateTimeOffset** | Timestamp when the Policy was last updated | [optional] [readonly] +**Name** | **string** | Policy name | [optional] +**Priority** | **int** | Specifies the order in which this Policy is evaluated in relation to the other policies | [optional] **Status** | [**LifecycleStatus**](LifecycleStatus.md) | | [optional] -**System** | **bool** | | [optional] +**System** | **bool** | Specifies whether Okta created the Policy | [optional] **Type** | [**PolicyType**](PolicyType.md) | | [optional] **Embedded** | **Dictionary<string, Object>** | | [optional] [readonly] -**Links** | [**LinksSelf**](LinksSelf.md) | | [optional] +**Links** | [**PolicyLinks**](PolicyLinks.md) | | [optional] **Conditions** | [**PolicyRuleConditions**](PolicyRuleConditions.md) | | [optional] **Settings** | [**MultifactorEnrollmentPolicySettings**](MultifactorEnrollmentPolicySettings.md) | | [optional] diff --git a/docs/OktaSignOnPolicy.md b/docs/OktaSignOnPolicy.md index 961c2da31..cd4a54cc9 100644 --- a/docs/OktaSignOnPolicy.md +++ b/docs/OktaSignOnPolicy.md @@ -4,17 +4,17 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Created** | **DateTimeOffset** | | [optional] [readonly] -**Description** | **string** | | [optional] -**Id** | **string** | | [optional] [readonly] -**LastUpdated** | **DateTimeOffset** | | [optional] [readonly] -**Name** | **string** | | [optional] -**Priority** | **int** | | [optional] +**Created** | **DateTimeOffset** | Timestamp when the Policy was created | [optional] [readonly] +**Description** | **string** | Policy description | [optional] +**Id** | **string** | Policy ID | [optional] [readonly] +**LastUpdated** | **DateTimeOffset** | Timestamp when the Policy was last updated | [optional] [readonly] +**Name** | **string** | Policy name | [optional] +**Priority** | **int** | Specifies the order in which this Policy is evaluated in relation to the other policies | [optional] **Status** | [**LifecycleStatus**](LifecycleStatus.md) | | [optional] -**System** | **bool** | | [optional] +**System** | **bool** | Specifies whether Okta created the Policy | [optional] **Type** | [**PolicyType**](PolicyType.md) | | [optional] **Embedded** | **Dictionary<string, Object>** | | [optional] [readonly] -**Links** | [**LinksSelf**](LinksSelf.md) | | [optional] +**Links** | [**PolicyLinks**](PolicyLinks.md) | | [optional] **Conditions** | [**OktaSignOnPolicyConditions**](OktaSignOnPolicyConditions.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OktaSignOnPolicyRule.md b/docs/OktaSignOnPolicyRule.md index a613879cc..b95996986 100644 --- a/docs/OktaSignOnPolicyRule.md +++ b/docs/OktaSignOnPolicyRule.md @@ -4,13 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Created** | **DateTimeOffset?** | | [optional] [readonly] -**Id** | **string** | | [optional] -**LastUpdated** | **DateTimeOffset?** | | [optional] [readonly] -**Name** | **string** | | [optional] -**Priority** | **int** | | [optional] +**Created** | **DateTimeOffset?** | Timestamp when the rule was created | [optional] [readonly] +**Id** | **string** | Identifier for the rule | [optional] +**LastUpdated** | **DateTimeOffset?** | Timestamp when the rule was last modified | [optional] [readonly] +**Name** | **string** | Name of the rule | [optional] +**Priority** | **int** | Priority of the rule | [optional] **Status** | [**LifecycleStatus**](LifecycleStatus.md) | | [optional] -**System** | **bool** | | [optional] [default to false] +**System** | **bool** | Specifies whether Okta created the Policy Rule (`system=true`). You can't delete Policy Rules that have `system` set to `true`. | [optional] [default to false] **Type** | [**PolicyRuleType**](PolicyRuleType.md) | | [optional] **Actions** | [**OktaSignOnPolicyRuleActions**](OktaSignOnPolicyRuleActions.md) | | [optional] **Conditions** | [**OktaSignOnPolicyRuleConditions**](OktaSignOnPolicyRuleConditions.md) | | [optional] diff --git a/docs/PasswordPolicy.md b/docs/PasswordPolicy.md index 00deb0e6f..790a9171d 100644 --- a/docs/PasswordPolicy.md +++ b/docs/PasswordPolicy.md @@ -4,17 +4,17 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Created** | **DateTimeOffset** | | [optional] [readonly] -**Description** | **string** | | [optional] -**Id** | **string** | | [optional] [readonly] -**LastUpdated** | **DateTimeOffset** | | [optional] [readonly] -**Name** | **string** | | [optional] -**Priority** | **int** | | [optional] +**Created** | **DateTimeOffset** | Timestamp when the Policy was created | [optional] [readonly] +**Description** | **string** | Policy description | [optional] +**Id** | **string** | Policy ID | [optional] [readonly] +**LastUpdated** | **DateTimeOffset** | Timestamp when the Policy was last updated | [optional] [readonly] +**Name** | **string** | Policy name | [optional] +**Priority** | **int** | Specifies the order in which this Policy is evaluated in relation to the other policies | [optional] **Status** | [**LifecycleStatus**](LifecycleStatus.md) | | [optional] -**System** | **bool** | | [optional] +**System** | **bool** | Specifies whether Okta created the Policy | [optional] **Type** | [**PolicyType**](PolicyType.md) | | [optional] **Embedded** | **Dictionary<string, Object>** | | [optional] [readonly] -**Links** | [**LinksSelf**](LinksSelf.md) | | [optional] +**Links** | [**PolicyLinks**](PolicyLinks.md) | | [optional] **Conditions** | [**PasswordPolicyConditions**](PasswordPolicyConditions.md) | | [optional] **Settings** | [**PasswordPolicySettings**](PasswordPolicySettings.md) | | [optional] diff --git a/docs/PasswordPolicyRule.md b/docs/PasswordPolicyRule.md index 71db14d1a..aae2e77f2 100644 --- a/docs/PasswordPolicyRule.md +++ b/docs/PasswordPolicyRule.md @@ -4,13 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Created** | **DateTimeOffset?** | | [optional] [readonly] -**Id** | **string** | | [optional] -**LastUpdated** | **DateTimeOffset?** | | [optional] [readonly] -**Name** | **string** | | [optional] -**Priority** | **int** | | [optional] +**Created** | **DateTimeOffset?** | Timestamp when the rule was created | [optional] [readonly] +**Id** | **string** | Identifier for the rule | [optional] +**LastUpdated** | **DateTimeOffset?** | Timestamp when the rule was last modified | [optional] [readonly] +**Name** | **string** | Name of the rule | [optional] +**Priority** | **int** | Priority of the rule | [optional] **Status** | [**LifecycleStatus**](LifecycleStatus.md) | | [optional] -**System** | **bool** | | [optional] [default to false] +**System** | **bool** | Specifies whether Okta created the Policy Rule (`system=true`). You can't delete Policy Rules that have `system` set to `true`. | [optional] [default to false] **Type** | [**PolicyRuleType**](PolicyRuleType.md) | | [optional] **Actions** | [**PasswordPolicyRuleActions**](PasswordPolicyRuleActions.md) | | [optional] **Conditions** | [**PasswordPolicyRuleConditions**](PasswordPolicyRuleConditions.md) | | [optional] diff --git a/docs/Policy.md b/docs/Policy.md index faac3d75b..a0e4231c0 100644 --- a/docs/Policy.md +++ b/docs/Policy.md @@ -4,17 +4,17 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Created** | **DateTimeOffset** | | [optional] [readonly] -**Description** | **string** | | [optional] -**Id** | **string** | | [optional] [readonly] -**LastUpdated** | **DateTimeOffset** | | [optional] [readonly] -**Name** | **string** | | [optional] -**Priority** | **int** | | [optional] +**Created** | **DateTimeOffset** | Timestamp when the Policy was created | [optional] [readonly] +**Description** | **string** | Policy description | [optional] +**Id** | **string** | Policy ID | [optional] [readonly] +**LastUpdated** | **DateTimeOffset** | Timestamp when the Policy was last updated | [optional] [readonly] +**Name** | **string** | Policy name | [optional] +**Priority** | **int** | Specifies the order in which this Policy is evaluated in relation to the other policies | [optional] **Status** | **LifecycleStatus** | | [optional] -**System** | **bool** | | [optional] +**System** | **bool** | Specifies whether Okta created the Policy | [optional] **Type** | **PolicyType** | | [optional] **Embedded** | **Dictionary<string, Object>** | | [optional] [readonly] -**Links** | [**LinksSelf**](LinksSelf.md) | | [optional] +**Links** | [**PolicyLinks**](PolicyLinks.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PolicyApi.md b/docs/PolicyApi.md index c239f8888..1dfd045f3 100644 --- a/docs/PolicyApi.md +++ b/docs/PolicyApi.md @@ -267,7 +267,7 @@ Name | Type | Description | Notes # **CreatePolicy** -> Policy CreatePolicy (Policy policy, bool? activate = null) +> PolicyCanBeCreatedOrReplaced CreatePolicy (PolicyCanBeCreatedOrReplaced policy, bool? activate = null) Create a Policy @@ -295,13 +295,13 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PolicyApi(config); - var policy = new Policy(); // Policy | + var policy = new PolicyCanBeCreatedOrReplaced(); // PolicyCanBeCreatedOrReplaced | var activate = true; // bool? | (optional) (default to true) try { // Create a Policy - Policy result = apiInstance.CreatePolicy(policy, activate); + PolicyCanBeCreatedOrReplaced result = apiInstance.CreatePolicy(policy, activate); Debug.WriteLine(result); } catch (ApiException e) @@ -319,12 +319,12 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **policy** | [**Policy**](Policy.md)| | + **policy** | [**PolicyCanBeCreatedOrReplaced**](PolicyCanBeCreatedOrReplaced.md)| | **activate** | **bool?**| | [optional] [default to true] ### Return type -[**Policy**](Policy.md) +[**PolicyCanBeCreatedOrReplaced**](PolicyCanBeCreatedOrReplaced.md) ### Authorization @@ -1236,7 +1236,7 @@ Name | Type | Description | Notes List all Applications mapped to a Policy -Lists all applications mapped to a policy identified by `policyId` +Lists all applications mapped to a policy identified by `policyId` > **Note:** Use [List all resources mapped to a Policy](https://developer.okta.com/docs/api/openapi/okta-management/management/tag/Policy/#tag/Policy/operation/listPolicyMappings) to list all applications mapped to a policy. ### Example ```csharp @@ -1551,7 +1551,7 @@ Name | Type | Description | Notes # **ReplacePolicy** -> Policy ReplacePolicy (string policyId, Policy policy) +> PolicyCanBeCreatedOrReplaced ReplacePolicy (string policyId, PolicyCanBeCreatedOrReplaced policy) Replace a Policy @@ -1580,12 +1580,12 @@ namespace Example var apiInstance = new PolicyApi(config); var policyId = 00plrilJ7jZ66Gn0X0g3; // string | `id` of the Policy - var policy = new Policy(); // Policy | + var policy = new PolicyCanBeCreatedOrReplaced(); // PolicyCanBeCreatedOrReplaced | try { // Replace a Policy - Policy result = apiInstance.ReplacePolicy(policyId, policy); + PolicyCanBeCreatedOrReplaced result = apiInstance.ReplacePolicy(policyId, policy); Debug.WriteLine(result); } catch (ApiException e) @@ -1604,11 +1604,11 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **policyId** | **string**| `id` of the Policy | - **policy** | [**Policy**](Policy.md)| | + **policy** | [**PolicyCanBeCreatedOrReplaced**](PolicyCanBeCreatedOrReplaced.md)| | ### Return type -[**Policy**](Policy.md) +[**PolicyCanBeCreatedOrReplaced**](PolicyCanBeCreatedOrReplaced.md) ### Authorization diff --git a/docs/PolicyCanBeCreatedOrReplaced.md b/docs/PolicyCanBeCreatedOrReplaced.md new file mode 100644 index 000000000..5d6049c28 --- /dev/null +++ b/docs/PolicyCanBeCreatedOrReplaced.md @@ -0,0 +1,20 @@ +# Okta.Sdk.Model.PolicyCanBeCreatedOrReplaced + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Created** | **DateTimeOffset** | Timestamp when the Policy was created | [optional] [readonly] +**Description** | **string** | Policy description | [optional] +**Id** | **string** | Policy ID | [optional] [readonly] +**LastUpdated** | **DateTimeOffset** | Timestamp when the Policy was last updated | [optional] [readonly] +**Name** | **string** | Policy name | [optional] +**Priority** | **int** | Specifies the order in which this Policy is evaluated in relation to the other policies | [optional] +**Status** | **LifecycleStatus** | | [optional] +**System** | **bool** | Specifies whether Okta created the Policy | [optional] +**Type** | **PolicyType** | | [optional] +**Embedded** | **Dictionary<string, Object>** | | [optional] [readonly] +**Links** | [**LinksSelf**](LinksSelf.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/PolicyContext.md b/docs/PolicyContext.md index 0bbd2be93..c30ae8c74 100644 --- a/docs/PolicyContext.md +++ b/docs/PolicyContext.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Device** | [**PolicyContextDevice**](PolicyContextDevice.md) | | [optional] -**Groups** | **Object** | An array of Group IDs for the simulate operation. Only user IDs or Group IDs are allowed, not both. | -**Ip** | **string** | The network rule condition, zone, or IP address | [optional] -**Risk** | [**PolicyContextRisk**](PolicyContextRisk.md) | | [optional] **User** | [**PolicyContextUser**](PolicyContextUser.md) | | +**Groups** | [**PolicyContextGroups**](PolicyContextGroups.md) | | +**Risk** | [**PolicyContextRisk**](PolicyContextRisk.md) | | [optional] +**Ip** | **string** | The network rule condition, zone, or IP address | [optional] **Zones** | [**PolicyContextZones**](PolicyContextZones.md) | | [optional] +**Device** | [**PolicyContextDevice**](PolicyContextDevice.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PolicyContextGroups.md b/docs/PolicyContextGroups.md new file mode 100644 index 000000000..b70acb2a4 --- /dev/null +++ b/docs/PolicyContextGroups.md @@ -0,0 +1,11 @@ +# Okta.Sdk.Model.PolicyContextGroups +An array of Group IDs for the simulate operation. Only user IDs or Group IDs are allowed, not both. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ids** | **List<string>** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/PolicyContextZones.md b/docs/PolicyContextZones.md index fd0a27504..a2d689068 100644 --- a/docs/PolicyContextZones.md +++ b/docs/PolicyContextZones.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Ids** | **Object** | | [optional] +**Ids** | **List<string>** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PolicyLinks.md b/docs/PolicyLinks.md new file mode 100644 index 000000000..b63ce56ff --- /dev/null +++ b/docs/PolicyLinks.md @@ -0,0 +1,14 @@ +# Okta.Sdk.Model.PolicyLinks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Self** | [**HrefObjectSelfLink**](HrefObjectSelfLink.md) | | [optional] +**Activate** | [**HrefObjectActivateLink**](HrefObjectActivateLink.md) | | [optional] +**Deactivate** | [**HrefObjectDeactivateLink**](HrefObjectDeactivateLink.md) | | [optional] +**Rules** | [**HrefObjectRulesLink**](HrefObjectRulesLink.md) | | [optional] +**Mappings** | [**HrefObjectMappingsLink**](HrefObjectMappingsLink.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/PolicyMappingLinks.md b/docs/PolicyMappingLinks.md index 563219911..cf54d1480 100644 --- a/docs/PolicyMappingLinks.md +++ b/docs/PolicyMappingLinks.md @@ -6,6 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Self** | [**HrefObjectSelfLink**](HrefObjectSelfLink.md) | | [optional] **Application** | [**PolicyMappingLinksAllOfApplication**](PolicyMappingLinksAllOfApplication.md) | | [optional] +**Authenticator** | [**PolicyMappingLinksAllOfAuthenticator**](PolicyMappingLinksAllOfAuthenticator.md) | | [optional] +**Policy** | [**PolicyMappingLinksAllOfPolicy**](PolicyMappingLinksAllOfPolicy.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PolicyMappingLinksAllOfAuthenticator.md b/docs/PolicyMappingLinksAllOfAuthenticator.md new file mode 100644 index 000000000..fbb148039 --- /dev/null +++ b/docs/PolicyMappingLinksAllOfAuthenticator.md @@ -0,0 +1,13 @@ +# Okta.Sdk.Model.PolicyMappingLinksAllOfAuthenticator + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Hints** | [**HrefObjectHints**](HrefObjectHints.md) | | [optional] +**Href** | **string** | Link URI | +**Name** | **string** | Link name | [optional] +**Type** | **string** | The media type of the link. If omitted, it is implicitly `application/json`. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/PolicyMappingLinksAllOfPolicy.md b/docs/PolicyMappingLinksAllOfPolicy.md new file mode 100644 index 000000000..46b3e7d93 --- /dev/null +++ b/docs/PolicyMappingLinksAllOfPolicy.md @@ -0,0 +1,13 @@ +# Okta.Sdk.Model.PolicyMappingLinksAllOfPolicy + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Hints** | [**HrefObjectHints**](HrefObjectHints.md) | | [optional] +**Href** | **string** | Link URI | +**Name** | **string** | Link name | [optional] +**Type** | **string** | The media type of the link. If omitted, it is implicitly `application/json`. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/PolicyRule.md b/docs/PolicyRule.md index 62591abd4..bddd76157 100644 --- a/docs/PolicyRule.md +++ b/docs/PolicyRule.md @@ -4,13 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Created** | **DateTimeOffset?** | | [optional] [readonly] -**Id** | **string** | | [optional] -**LastUpdated** | **DateTimeOffset?** | | [optional] [readonly] -**Name** | **string** | | [optional] -**Priority** | **int** | | [optional] +**Created** | **DateTimeOffset?** | Timestamp when the rule was created | [optional] [readonly] +**Id** | **string** | Identifier for the rule | [optional] +**LastUpdated** | **DateTimeOffset?** | Timestamp when the rule was last modified | [optional] [readonly] +**Name** | **string** | Name of the rule | [optional] +**Priority** | **int** | Priority of the rule | [optional] **Status** | **LifecycleStatus** | | [optional] -**System** | **bool** | | [optional] [default to false] +**System** | **bool** | Specifies whether Okta created the Policy Rule (`system=true`). You can't delete Policy Rules that have `system` set to `true`. | [optional] [default to false] **Type** | **PolicyRuleType** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PossessionConstraint.md b/docs/PossessionConstraint.md index b1f063ae2..fdaa6a9f2 100644 --- a/docs/PossessionConstraint.md +++ b/docs/PossessionConstraint.md @@ -4,13 +4,17 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Methods** | **List<string>** | | [optional] -**ReauthenticateIn** | **string** | | [optional] -**Types** | **List<string>** | | [optional] -**DeviceBound** | **string** | | [optional] -**HardwareProtection** | **string** | | [optional] -**PhishingResistant** | **string** | | [optional] -**UserPresence** | **string** | | [optional] +**Methods** | **List<string>** | The Authenticator methods that are permitted | [optional] +**ReauthenticateIn** | **string** | The duration after which the user must re-authenticate regardless of user activity. This re-authentication interval overrides the Verification Method object's `reauthenticateIn` interval. The supported values use ISO 8601 period format for recurring time intervals (for example, `PT1H`). | [optional] +**Types** | **List<string>** | The Authenticator types that are permitted | [optional] +**AuthenticationMethods** | [**List<AuthenticationMethodObject>**](AuthenticationMethodObject.md) | This property specifies the precise authenticator and method for authentication. | [optional] +**ExcludedAuthenticationMethods** | [**List<AuthenticationMethodObject>**](AuthenticationMethodObject.md) | This property specifies the precise authenticator and method to exclude from authentication. | [optional] +**Required** | **bool** | This property indicates whether the knowledge or possession factor is required by the assurance. It's optional in the request, but is always returned in the response. By default, this field is `true`. If the knowledge or possession constraint has values for`excludedAuthenticationMethods` the `required` value is false. | [optional] +**DeviceBound** | **string** | Indicates if device-bound Factors are required. This property is only set for `POSSESSION` constraints. | [optional] [default to DeviceBoundEnum.OPTIONAL] +**HardwareProtection** | **string** | Indicates if any secrets or private keys used during authentication must be hardware protected and not exportable. This property is only set for `POSSESSION` constraints. | [optional] [default to HardwareProtectionEnum.OPTIONAL] +**PhishingResistant** | **string** | Indicates if phishing-resistant Factors are required. This property is only set for `POSSESSION` constraints. | [optional] [default to PhishingResistantEnum.OPTIONAL] +**UserPresence** | **string** | Indicates if the user needs to approve an Okta Verify prompt or provide biometrics (meets NIST AAL2 requirements). This property is only set for `POSSESSION` constraints. | [optional] [default to UserPresenceEnum.REQUIRED] +**UserVerification** | **string** | Indicates the user interaction requirement (PIN or biometrics) to ensure verification of a possession factor | [optional] [default to UserVerificationEnum.OPTIONAL] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ProfileEnrollmentPolicy.md b/docs/ProfileEnrollmentPolicy.md index daa4e0cfe..96b241031 100644 --- a/docs/ProfileEnrollmentPolicy.md +++ b/docs/ProfileEnrollmentPolicy.md @@ -4,17 +4,17 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Created** | **DateTimeOffset** | | [optional] [readonly] -**Description** | **string** | | [optional] -**Id** | **string** | | [optional] [readonly] -**LastUpdated** | **DateTimeOffset** | | [optional] [readonly] -**Name** | **string** | | [optional] -**Priority** | **int** | | [optional] +**Created** | **DateTimeOffset** | Timestamp when the Policy was created | [optional] [readonly] +**Description** | **string** | Policy description | [optional] +**Id** | **string** | Policy ID | [optional] [readonly] +**LastUpdated** | **DateTimeOffset** | Timestamp when the Policy was last updated | [optional] [readonly] +**Name** | **string** | Policy name | [optional] +**Priority** | **int** | Specifies the order in which this Policy is evaluated in relation to the other policies | [optional] **Status** | [**LifecycleStatus**](LifecycleStatus.md) | | [optional] -**System** | **bool** | | [optional] +**System** | **bool** | Specifies whether Okta created the Policy | [optional] **Type** | [**PolicyType**](PolicyType.md) | | [optional] **Embedded** | **Dictionary<string, Object>** | | [optional] [readonly] -**Links** | [**LinksSelf**](LinksSelf.md) | | [optional] +**Links** | [**PolicyLinks**](PolicyLinks.md) | | [optional] **Conditions** | [**PolicyRuleConditions**](PolicyRuleConditions.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ProfileEnrollmentPolicyRule.md b/docs/ProfileEnrollmentPolicyRule.md index c6b0d2bf8..c5f3add44 100644 --- a/docs/ProfileEnrollmentPolicyRule.md +++ b/docs/ProfileEnrollmentPolicyRule.md @@ -4,13 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Created** | **DateTimeOffset?** | | [optional] [readonly] -**Id** | **string** | | [optional] -**LastUpdated** | **DateTimeOffset?** | | [optional] [readonly] -**Name** | **string** | | [optional] -**Priority** | **int** | | [optional] +**Created** | **DateTimeOffset?** | Timestamp when the rule was created | [optional] [readonly] +**Id** | **string** | Identifier for the rule | [optional] +**LastUpdated** | **DateTimeOffset?** | Timestamp when the rule was last modified | [optional] [readonly] +**Name** | **string** | Name of the rule | [optional] +**Priority** | **int** | Priority of the rule | [optional] **Status** | [**LifecycleStatus**](LifecycleStatus.md) | | [optional] -**System** | **bool** | | [optional] [default to false] +**System** | **bool** | Specifies whether Okta created the Policy Rule (`system=true`). You can't delete Policy Rules that have `system` set to `true`. | [optional] [default to false] **Type** | [**PolicyRuleType**](PolicyRuleType.md) | | [optional] **Actions** | [**ProfileEnrollmentPolicyRuleActions**](ProfileEnrollmentPolicyRuleActions.md) | | [optional] **Conditions** | [**PolicyRuleConditions**](PolicyRuleConditions.md) | | [optional] diff --git a/docs/ProfileEnrollmentPolicyRuleAction.md b/docs/ProfileEnrollmentPolicyRuleAction.md index 7ebb0a394..4827c8d78 100644 --- a/docs/ProfileEnrollmentPolicyRuleAction.md +++ b/docs/ProfileEnrollmentPolicyRuleAction.md @@ -8,9 +8,9 @@ Name | Type | Description | Notes **ActivationRequirements** | [**ProfileEnrollmentPolicyRuleActivationRequirement**](ProfileEnrollmentPolicyRuleActivationRequirement.md) | | [optional] **PreRegistrationInlineHooks** | [**List<PreRegistrationInlineHook>**](PreRegistrationInlineHook.md) | | [optional] **ProfileAttributes** | [**List<ProfileEnrollmentPolicyRuleProfileAttribute>**](ProfileEnrollmentPolicyRuleProfileAttribute.md) | | [optional] -**ProgressiveProfilingAction** | **string** | | [optional] **TargetGroupIds** | **List<string>** | | [optional] **UnknownUserAction** | **string** | | [optional] +**ProgressiveProfilingAction** | **string** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SimulatePolicyBody.md b/docs/SimulatePolicyBody.md index fa0d3d693..6834b3a29 100644 --- a/docs/SimulatePolicyBody.md +++ b/docs/SimulatePolicyBody.md @@ -5,9 +5,9 @@ The request body required for a simulate policy operation. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**PolicyTypes** | [**List<PolicyType>**](PolicyType.md) | Supported policy types for a simulate operation. The default value, `null`, returns all types. | [optional] **AppInstance** | **string** | The application instance ID for a simulate operation | **PolicyContext** | [**PolicyContext**](PolicyContext.md) | | [optional] -**PolicyTypes** | [**List<PolicyType>**](PolicyType.md) | Supported policy types for a simulate operation. The default value, `null`, returns all types. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SimulatePolicyEvaluations.md b/docs/SimulatePolicyEvaluations.md index 48f87a978..eef454ee9 100644 --- a/docs/SimulatePolicyEvaluations.md +++ b/docs/SimulatePolicyEvaluations.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Evaluated** | [**SimulatePolicyEvaluationsEvaluated**](SimulatePolicyEvaluationsEvaluated.md) | | [optional] +**Status** | **string** | The result of this entity evaluation | [optional] **PolicyType** | [**List<PolicyType>**](PolicyType.md) | The policy type of the simulate operation | [optional] **Result** | [**SimulatePolicyResult**](SimulatePolicyResult.md) | | [optional] -**Status** | **string** | The result of this entity evaluation | [optional] **Undefined** | [**SimulatePolicyEvaluationsUndefined**](SimulatePolicyEvaluationsUndefined.md) | | [optional] +**Evaluated** | [**SimulatePolicyEvaluationsEvaluated**](SimulatePolicyEvaluationsEvaluated.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SimulateResultPoliciesItems.md b/docs/SimulateResultPoliciesItems.md index 6c526d396..46be7b0f7 100644 --- a/docs/SimulateResultPoliciesItems.md +++ b/docs/SimulateResultPoliciesItems.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Conditions** | [**SimulateResultConditions**](SimulateResultConditions.md) | | [optional] **Id** | **string** | | [optional] **Name** | **string** | | [optional] -**Rules** | [**SimulateResultRules**](SimulateResultRules.md) | | [optional] **Status** | **string** | | [optional] +**Conditions** | [**SimulateResultConditions**](SimulateResultConditions.md) | | [optional] +**Rules** | [**SimulateResultRules**](SimulateResultRules.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SimulateResultRules.md b/docs/SimulateResultRules.md index c949d2bfd..74bf27ce9 100644 --- a/docs/SimulateResultRules.md +++ b/docs/SimulateResultRules.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Conditions** | [**SimulateResultConditions**](SimulateResultConditions.md) | | [optional] **Id** | **string** | The unique ID number of the policy rule | [optional] **Name** | **string** | The name of the policy rule | [optional] **Status** | **string** | The result of the entity evaluation | [optional] +**Conditions** | [**SimulateResultConditions**](SimulateResultConditions.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SsprPrimaryRequirement.md b/docs/SsprPrimaryRequirement.md index 1633b3f66..0048b2b4e 100644 --- a/docs/SsprPrimaryRequirement.md +++ b/docs/SsprPrimaryRequirement.md @@ -5,8 +5,8 @@ Defines the authenticators permitted for the initial authentication step of pass Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**MethodConstraints** | [**List<AuthenticatorMethodConstraint>**](AuthenticatorMethodConstraint.md) | Constraints on the values specified in the `methods` array. Specifying a constraint limits methods to specific authenticator(s). Currently, Google OTP is the only accepted constraint. | [optional] **Methods** | **List<string>** | Authenticator methods allowed for the initial authentication step of password recovery | [optional] +**MethodConstraints** | [**List<AuthenticatorMethodConstraint>**](AuthenticatorMethodConstraint.md) | Constraints on the values specified in the `methods` array. Specifying a constraint limits methods to specific authenticator(s). Currently, Google OTP is the only accepted constraint. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserCondition.md b/docs/UserCondition.md index 8fb1eaebc..67bce822e 100644 --- a/docs/UserCondition.md +++ b/docs/UserCondition.md @@ -1,11 +1,12 @@ # Okta.Sdk.Model.UserCondition +Specifies a set of Users to be included or excluded ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Exclude** | **List<string>** | | [optional] -**Include** | **List<string>** | | [optional] +**Exclude** | **List<string>** | Users to be excluded | [optional] +**Include** | **List<string>** | Users to be included | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserIdentifierConditionEvaluatorPattern.md b/docs/UserIdentifierConditionEvaluatorPattern.md index f5dff0bb4..d076f3cf6 100644 --- a/docs/UserIdentifierConditionEvaluatorPattern.md +++ b/docs/UserIdentifierConditionEvaluatorPattern.md @@ -1,11 +1,12 @@ # Okta.Sdk.Model.UserIdentifierConditionEvaluatorPattern +Used in the User Identifier Condition object. Specifies the details of the patterns to match against. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **MatchType** | **UserIdentifierMatchType** | | [optional] -**Value** | **string** | | [optional] +**Value** | **string** | The regex expression of a simple match string | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserIdentifierMatchType.md b/docs/UserIdentifierMatchType.md index e65fb309a..b7cd7879b 100644 --- a/docs/UserIdentifierMatchType.md +++ b/docs/UserIdentifierMatchType.md @@ -1,4 +1,5 @@ # Okta.Sdk.Model.UserIdentifierMatchType +The type of pattern. For regex, use `EXPRESSION`. ## Properties diff --git a/openapi3/config.json b/openapi3/config.json index 962012309..133fe4f96 100644 --- a/openapi3/config.json +++ b/openapi3/config.json @@ -101,6 +101,16 @@ "destinationFilename": "StringEnumSerializingConverter.cs", "templateType": "SupportingFiles", "folder": "/src/Okta.Sdk/Model" + }, + "PolicyApi.mustache":{ + "destinationFilename": "PolicyApi.cs", + "templateType": "SupportingFiles", + "folder": "/src/Okta.Sdk/Obsolete" + }, + "IdentityProviderPolicy.mustache":{ + "destinationFilename": "IdentityProviderPolicy.cs", + "templateType": "SupportingFiles", + "folder": "/src/Okta.Sdk/Obsolete" } } } diff --git a/openapi3/management.yaml b/openapi3/management.yaml index df35833a6..ba6420802 100644 --- a/openapi3/management.yaml +++ b/openapi3/management.yaml @@ -12165,6 +12165,7 @@ paths: - okta.orgs.manage tags: - OrgSetting +# Policy Begin /api/v1/policies: get: summary: List all Policies @@ -12219,7 +12220,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Policy' + $ref: '#/components/schemas/PolicyCanBeCreatedOrReplaced' required: true responses: '200': @@ -12227,7 +12228,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Policy' + $ref: '#/components/schemas/PolicyCanBeCreatedOrReplaced' '400': $ref: '#/components/responses/ErrorApiValidationFailed400' '403': @@ -12240,49 +12241,6 @@ paths: - okta.policies.manage tags: - Policy - /api/v1/policies/simulate: - parameters: - - $ref: '#/components/parameters/simulateParameter' - post: - summary: Create a Policy Simulation - description: |- - Creates a policy or policy rule simulation. The access simulation evaluates policy and policy rules based on the existing policy rule configuration. - The evaluation result simulates what the real-world authentication flow is and what policy rules have been applied or matched to the authentication flow. - operationId: createPolicySimulation - x-codegen-request-body-name: simulatePolicy - requestBody: - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SimulatePolicyBody' - examples: - SimulatePolicy: - $ref: '#/components/examples/SimulatePolicyBody' - required: true - responses: - '204': - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/SimulatePolicyResponse' - examples: - SimulatePolicy: - $ref: '#/components/examples/SimulatePolicyResponse' - '403': - $ref: '#/components/responses/ErrorAccessDenied403' - '404': - $ref: '#/components/responses/ErrorResourceNotFound404' - '429': - $ref: '#/components/responses/ErrorTooManyRequests429' - security: - - apiToken: [] - - oauth2: - - okta.policies.read - tags: - - Policy /api/v1/policies/{policyId}: parameters: - $ref: '#/components/parameters/pathPolicyId' @@ -12324,7 +12282,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Policy' + $ref: '#/components/schemas/PolicyCanBeCreatedOrReplaced' required: true responses: '200': @@ -12332,7 +12290,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Policy' + $ref: '#/components/schemas/PolicyCanBeCreatedOrReplaced' '400': $ref: '#/components/responses/ErrorApiValidationFailed400' '403': @@ -12372,7 +12330,10 @@ paths: get: deprecated: true summary: List all Applications mapped to a Policy - description: Lists all applications mapped to a policy identified by `policyId` + description: |- + Lists all applications mapped to a policy identified by `policyId` + + > **Note:** Use [List all resources mapped to a Policy](https://developer.okta.com/docs/api/openapi/okta-management/management/tag/Policy/#tag/Policy/operation/listPolicyMappings) to list all applications mapped to a policy. operationId: listPolicyApps responses: '200': @@ -12620,6 +12581,12 @@ paths: $ref: '#/components/examples/sspr-enabled-sso-step-up' EnableSsprNoStepUp: $ref: '#/components/examples/sspr-enabled-no-step-up' + Enable2FAPreciseAuth: + $ref: "#/components/examples/twofa-enabled-disallow-password-allow-phishing" + EnableSpecificRoutingRule: + $ref: "#/components/examples/idp-discovery-specific-routing-rule" + EnableDynamicRoutingRule: + $ref: "#/components/examples/idp-discovery-dynamic-routing-rule" x-okta-feature-flag-amends: IDX_SSPR_EXTENDED_PRIMARY_FACTORS: examples: @@ -12640,6 +12607,12 @@ paths: $ref: '#/components/examples/sspr-enabled-sso-step-up-response' EnableSsprNoStepUp: $ref: '#/components/examples/sspr-enabled-no-step-up-response' + Enable2FAPreciseAuth: + $ref: '#/components/examples/twofa-enabled-disallow-password-allow-phishing-response' + EnableSpecificRoutingRule: + $ref: "#/components/examples/idp-discovery-specific-routing-rule-response" + EnableDynamicRoutingRule: + $ref: "#/components/examples/idp-discovery-dynamic-routing-rule-response" x-okta-feature-flag-amends: IDX_SSPR_EXTENDED_PRIMARY_FACTORS: examples: @@ -12820,6 +12793,49 @@ paths: - okta.policies.manage tags: - Policy + /api/v1/policies/simulate: + parameters: + - $ref: '#/components/parameters/simulateParameter' + post: + summary: Create a Policy Simulation + description: |- + Creates a policy or policy rule simulation. The access simulation evaluates policy and policy rules based on the existing policy rule configuration. + The evaluation result simulates what the real-world authentication flow is and what policy rules have been applied or matched to the authentication flow. + operationId: createPolicySimulation + x-codegen-request-body-name: simulatePolicy + requestBody: + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SimulatePolicyBody' + examples: + SimulatePolicy: + $ref: '#/components/examples/SimulatePolicyBody' + required: true + responses: + '204': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/SimulatePolicyResponse' + examples: + SimulatePolicy: + $ref: '#/components/examples/SimulatePolicyResponse' + '403': + $ref: '#/components/responses/ErrorAccessDenied403' + '404': + $ref: '#/components/responses/ErrorResourceNotFound404' + '429': + $ref: '#/components/responses/ErrorTooManyRequests429' + security: + - apiToken: [] + - oauth2: + - okta.policies.read + tags: + - Policy /api/v1/principal-rate-limits: get: summary: List all Principal Rate Limits @@ -22383,15 +22399,70 @@ components: type: object properties: methods: + description: The Authenticator methods that are permitted items: type: string + enum: + - PASSWORD + - SECURITY_QUESTION + - SMS + - VOICE + - EMAIL + - PUSH + - SIGNED_NONCE + - OTP + - TOTP + - WEBAUTHN + - DUO + - IDP + - CERT type: array reauthenticateIn: + description: The duration after which the user must re-authenticate regardless of user activity. This re-authentication interval overrides the Verification Method object's `reauthenticateIn` interval. The supported values use ISO 8601 period format for recurring time intervals (for example, `PT1H`). type: string types: + description: The Authenticator types that are permitted items: type: string + enum: + - SECURITY_KEY + - PHONE + - EMAIL + - PASSWORD + - SECURITY_QUESTION + - APP + - FEDERATED + type: array + authenticationMethods: + x-okta-lifecycle: + features: + - ASSURANCE_GRANULAR_AUTHENTICATOR_CONSTRAINTS + description: This property specifies the precise authenticator and method for authentication. type: array + items: + $ref: '#/components/schemas/AuthenticationMethodObject' + excludedAuthenticationMethods: + x-okta-lifecycle: + features: + - ASSURANCE_GRANULAR_AUTHENTICATOR_CONSTRAINTS + description: This property specifies the precise authenticator and method to exclude from authentication. + items: + $ref: '#/components/schemas/AuthenticationMethodObject' + required: + x-okta-lifecycle: + features: + - ASSURANCE_GRANULAR_AUTHENTICATOR_CONSTRAINTS + description: This property indicates whether the knowledge or possession factor is required by the assurance. It's optional in the request, but is always returned in the response. By default, this field is `true`. If the knowledge or possession constraint has values for`excludedAuthenticationMethods` the `required` value is false. + type: boolean + AuthenticationMethodObject: + type: object + properties: + key: + type: string + description: A label that identifies the authenticator + method: + type: string + description: Specifies the method used for the authenticator AccessPolicyConstraints: type: object properties: @@ -22639,9 +22710,11 @@ components: properties: id: type: string + description: ID of the app readOnly: true name: type: string + description: Name of the app type type: $ref: '#/components/schemas/AppAndInstanceType' AppAndInstancePolicyRuleCondition: @@ -23325,16 +23398,17 @@ components: duo: '#/components/schemas/AuthenticatorMethodWithVerifiableProperties' cert: '#/components/schemas/AuthenticatorMethodWithVerifiableProperties' AuthenticatorMethodConstraint: - description: 'Limits the authenticators that can be used for a given method. Currently, only the `otp` method supports constraints, and Google authenticator (key : ''google_otp'') is the only allowed authenticator.' + description: |- + Limits the authenticators that can be used for a given method. Currently, only the `otp` method supports constraints, and Google authenticator (key : 'google_otp') is the only allowed authenticator. type: object properties: + method: + enum: + - otp allowedAuthenticators: type: array items: $ref: '#/components/schemas/AuthenticatorIdentity' - method: - enum: - - otp AuthenticatorMethodOtp: allOf: - $ref: '#/components/schemas/AuthenticatorMethodWithVerifiableProperties' @@ -24167,9 +24241,11 @@ components: type: string ClientPolicyCondition: type: object + description: Specifies which clients are included in the Policy properties: include: type: array + description: Which clients are included in the Policy items: type: string Compliance: @@ -24557,6 +24633,15 @@ components: type: boolean registered: type: boolean + assurance: + $ref: '#/components/schemas/DevicePolicyRuleConditionAssurance' + DevicePolicyRuleConditionAssurance: + type: object + properties: + include: + type: array + items: + type: string DeviceAssurance: title: DeviceAssurance type: object @@ -25562,9 +25647,11 @@ components: readOnly: true GrantTypePolicyRuleCondition: type: object + description: Array of grant types that this condition includes. Determines the mechanism that Okta uses to authorize the creation of the tokens. properties: include: type: array + description: Array of grant types thagt this condition includes. items: type: string Group: @@ -25616,13 +25703,16 @@ components: $ref: '#/components/schemas/HrefObject' GroupCondition: type: object + description: Specifies a set of Groups whose Users are to be included or excluded properties: exclude: type: array + description: Groups to be excluded items: type: string include: type: array + description: Groups to be included items: type: string GroupOwner: @@ -25664,13 +25754,16 @@ components: - USER GroupPolicyRuleCondition: type: object + description: Specifies a set of Groups whose Users are to be included or excluded properties: exclude: type: array + description: Groups to be excluded items: type: string include: type: array + description: Groups to be included items: type: string GroupProfile: @@ -25973,6 +26066,14 @@ components: required: - href readOnly: true + HrefObjectMappingsLink: + allOf: + - $ref: '#/components/schemas/HrefObject' + - description: Link to the mappings resource + HrefObjectRulesLink: + allOf: + - $ref: '#/components/schemas/HrefObject' + - description: Link to the rules resource HrefObjectActivateLink: allOf: - $ref: '#/components/schemas/HrefObject' @@ -26159,13 +26260,10 @@ components: - OCSP IdentityProviderPolicy: allOf: - - $ref: '#/components/schemas/Policy' - type: object properties: accountLink: $ref: '#/components/schemas/PolicyAccountLink' - conditions: - $ref: '#/components/schemas/PolicyRuleConditions' mapAMRClaims: type: boolean description: Enable mapping AMR from IdP to Okta to downstream apps @@ -26179,12 +26277,25 @@ components: $ref: '#/components/schemas/Provisioning' subject: $ref: '#/components/schemas/PolicySubject' + IdpDiscoveryPolicy: + allOf: + - $ref: '#/components/schemas/Policy' + - type: object + properties: + conditions: + type: object + nullable: true IdentityProviderPolicyProvider: type: string enum: - ANY - OKTA - SPECIFIC_IDP + IdpSelectionType: + type: string + enum: + - DYNAMIC + - SPECIFIC IdentityProviderPolicyRuleCondition: type: object properties: @@ -26292,18 +26403,43 @@ components: IdpPolicyRuleAction: type: object properties: - providers: - items: - $ref: '#/components/schemas/IdpPolicyRuleActionProvider' - type: array + idp: + type: object + properties: + providers: + items: + $ref: '#/components/schemas/IdpPolicyRuleActionProvider' + type: array + description: List of configured Identity Providers that a given Rule can route to. Ability to define multiple providers is a part of the Okta Identity Engine. This allows users to choose a Provider when they sign in. Contact support for information on the Identity Engine. + idpSelectionType: + description: Determines whether the rule should use expression language or a specific IdP + $ref: '#/components/schemas/IdpSelectionType' + matchCriteria: + items: + $ref: '#/components/schemas/IdpPolicyRuleActionMatchCriteria' + type: array + description: Required if `idpSelectionType` is set to `DYNAMIC` + IdpPolicyRuleActionMatchCriteria: + type: object + properties: + providerExpression: + type: string + description: | + You can provide an Okta Expression Language expression with the Login Context that's evaluated with the IdP. For example, the value `login.identifier` refers to the user's username. If the user is signing in with the username `john.doe@mycompany.com`, the expression `login.identifier.substringAfter(@))` is evaluated to the domain name of the user, for example: `mycompany.com`. + propertyName: + type: string + description: The IdP property that the evaluated string should match to IdpPolicyRuleActionProvider: type: object properties: id: - readOnly: true type: string - type: + description: IdP types of `OKTA`, `AgentlessDSSO`, and `IWA` don't require an ID. + name: type: string + description: Provider `name` in Okta. Optional. Supported in `IDENTITY ENGINE`. + type: + $ref: '#/components/schemas/IdentityProviderType' IframeEmbedScopeAllowedApps: type: string enum: @@ -28565,25 +28701,82 @@ components: type: object properties: created: + description: Timestamp when the Policy was created type: string format: date-time readOnly: true description: + description: Policy description type: string id: + description: Policy ID type: string readOnly: true lastUpdated: + description: Timestamp when the Policy was last updated type: string format: date-time readOnly: true name: + description: Policy name type: string priority: + description: Specifies the order in which this Policy is evaluated in relation to the other policies type: integer status: $ref: '#/components/schemas/LifecycleStatus' system: + description: Specifies whether Okta created the Policy + type: boolean + type: + $ref: '#/components/schemas/PolicyType' + _embedded: + type: object + additionalProperties: + type: object + properties: {} + readOnly: true + _links: + $ref: '#/components/schemas/PolicyLinks' + discriminator: + propertyName: type + mapping: + ACCESS_POLICY: '#/components/schemas/AccessPolicy' + IDP_DISCOVERY: '#/components/schemas/IdpDiscoveryPolicy' + MFA_ENROLL: '#/components/schemas/MultifactorEnrollmentPolicy' + OKTA_SIGN_ON: '#/components/schemas/OktaSignOnPolicy' + PASSWORD: '#/components/schemas/PasswordPolicy' + PROFILE_ENROLLMENT: '#/components/schemas/ProfileEnrollmentPolicy' + PolicyCanBeCreatedOrReplaced: + type: object + properties: + created: + description: Timestamp when the Policy was created + type: string + format: date-time + readOnly: true + description: + description: Policy description + type: string + id: + description: Policy ID + type: string + readOnly: true + lastUpdated: + description: Timestamp when the Policy was last updated + type: string + format: date-time + readOnly: true + name: + description: Policy name + type: string + priority: + description: Specifies the order in which this Policy is evaluated in relation to the other policies + type: integer + status: + $ref: '#/components/schemas/LifecycleStatus' + system: + description: Specifies whether Okta created the Policy type: boolean type: $ref: '#/components/schemas/PolicyType' @@ -28599,11 +28792,23 @@ components: propertyName: type mapping: ACCESS_POLICY: '#/components/schemas/AccessPolicy' - IDP_DISCOVERY: '#/components/schemas/IdentityProviderPolicy' MFA_ENROLL: '#/components/schemas/MultifactorEnrollmentPolicy' OKTA_SIGN_ON: '#/components/schemas/OktaSignOnPolicy' PASSWORD: '#/components/schemas/PasswordPolicy' PROFILE_ENROLLMENT: '#/components/schemas/ProfileEnrollmentPolicy' + PolicyLinks: + type: object + properties: + self: + $ref: '#/components/schemas/HrefObjectSelfLink' + activate: + $ref: '#/components/schemas/HrefObjectActivateLink' + deactivate: + $ref: '#/components/schemas/HrefObjectDeactivateLink' + rules: + $ref: '#/components/schemas/HrefObjectRulesLink' + mappings: + $ref: '#/components/schemas/HrefObjectMappingsLink' PolicyAccess: type: string enum: @@ -28636,29 +28841,26 @@ components: PolicyContext: type: object properties: - device: + user: type: object + description: The user ID for the simulate operation. Only user IDs or Group IDs are allowed, not both. properties: - platform: + id: type: string - description: The platform of the device, for example, IOS. - registered: - type: boolean - description: If the device is registered - managed: - type: boolean - description: If the device is managed + description: The unique ID number for the user. + required: + - id groups: - type: array + type: object description: An array of Group IDs for the simulate operation. Only user IDs or Group IDs are allowed, not both. properties: ids: type: array + items: + type: string + uniqueItems: true required: - - ids - ip: - type: string - description: The network rule condition, zone, or IP address + - ids risk: type: object description: The risk rule condition level @@ -28669,23 +28871,28 @@ components: - LOW - MEDIUM - HIGH - user: - type: object - description: The user ID for the simulate operation. Only user IDs or Group IDs are allowed, not both. - properties: - id: - type: string - description: The unique ID number for the user. - required: - - id + ip: + type: string + description: The network rule condition, zone, or IP address zones: type: object properties: ids: type: array - properties: - ids: - type: string + items: + type: string + device: + type: object + properties: + platform: + type: string + description: The platform of the device, for example, IOS. + registered: + type: boolean + description: If the device is registered + managed: + type: boolean + description: If the device is managed required: - user - groups @@ -28702,6 +28909,14 @@ components: allOf: - $ref: '#/components/schemas/HrefObject' - description: Link to the mapped application + authenticator: + allOf: + - $ref: '#/components/schemas/HrefObject' + - description: Link to the mapped authenticator + policy: + allOf: + - $ref: '#/components/schemas/HrefObject' + - description: Link to the mapped policy PolicyMappingRequest: type: object properties: @@ -28759,24 +28974,30 @@ components: properties: created: type: string + description: Timestamp when the rule was created format: date-time readOnly: true nullable: true id: type: string + description: Identifier for the rule lastUpdated: type: string + description: Timestamp when the rule was last modified format: date-time readOnly: true nullable: true name: type: string + description: Name of the rule priority: type: integer + description: Priority of the rule status: $ref: '#/components/schemas/LifecycleStatus' system: type: boolean + description: Specifies whether Okta created the Policy Rule (`system=true`). You can't delete Policy Rules that have `system` set to `true`. default: false type: $ref: '#/components/schemas/PolicyRuleType' @@ -28788,6 +29009,7 @@ components: PROFILE_ENROLLMENT: '#/components/schemas/ProfileEnrollmentPolicyRule' RESOURCE_ACCESS: '#/components/schemas/AuthorizationServerPolicyRule' SIGN_ON: '#/components/schemas/OktaSignOnPolicyRule' + IDP_DISCOVERY: '#/components/schemas/IdpDiscoveryPolicyRule' PolicyRuleActions: type: object PolicyRuleActionsEnroll: @@ -28920,12 +29142,39 @@ components: properties: deviceBound: type: string + description: Indicates if device-bound Factors are required. This property is only set for `POSSESSION` constraints. + enum: + - OPTIONAL + - REQUIRED + default: OPTIONAL hardwareProtection: type: string + description: Indicates if any secrets or private keys used during authentication must be hardware protected and not exportable. This property is only set for `POSSESSION` constraints. + enum: + - OPTIONAL + - REQUIRED + default: OPTIONAL phishingResistant: type: string + description: Indicates if phishing-resistant Factors are required. This property is only set for `POSSESSION` constraints. + enum: + - OPTIONAL + - REQUIRED + default: OPTIONAL userPresence: type: string + description: Indicates if the user needs to approve an Okta Verify prompt or provide biometrics (meets NIST AAL2 requirements). This property is only set for `POSSESSION` constraints. + enum: + - OPTIONAL + - REQUIRED + default: REQUIRED + userVerification: + type: string + description: Indicates the user interaction requirement (PIN or biometrics) to ensure verification of a possession factor + enum: + - OPTIONAL + - REQUIRED + default: OPTIONAL PreRegistrationInlineHook: type: object properties: @@ -29004,20 +29253,20 @@ components: items: $ref: '#/components/schemas/ProfileEnrollmentPolicyRuleProfileAttribute' type: array - progressiveProfilingAction: - type: string - enum: - - ENABLED - - DISABLED targetGroupIds: items: type: string type: array unknownUserAction: type: string - enum: #TODO: Convert to StringEnum + enum: - DENY - REGISTER + progressiveProfilingAction: + type: string + enum: + - ENABLED + - DISABLED ProfileEnrollmentPolicyRuleActions: allOf: - $ref: '#/components/schemas/PolicyRuleActions' @@ -29029,7 +29278,7 @@ components: type: object properties: emailVerification: - type: boolean + type: boolean ProfileEnrollmentPolicyRuleProfileAttribute: type: object properties: @@ -29039,6 +29288,27 @@ components: type: string required: type: boolean + IdpDiscoveryPolicyRule: + allOf: + - $ref: '#/components/schemas/PolicyRule' + - type: object + properties: + actions: + $ref: '#/components/schemas/IdpPolicyRuleAction' + conditions: + $ref: '#/components/schemas/IdpDiscoveryPolicyRuleCondition' + IdpDiscoveryPolicyRuleCondition: + allOf: + - type: object + properties: + app: + $ref: '#/components/schemas/AppAndInstancePolicyRuleCondition' + network: + $ref: '#/components/schemas/PolicyNetworkCondition' + userIdentifier: + $ref: '#/components/schemas/UserIdentifierPolicyRuleCondition' + platform: + $ref: '#/components/schemas/PlatformPolicyRuleCondition' ProfileMapping: description: |- The Profile Mapping object describes a mapping between an Okta User's and an App User's properties using [JSON Schema Draft 4](https://datatracker.ietf.org/doc/html/draft-zyp-json-schema-04). @@ -30378,37 +30648,24 @@ components: type: string readOnly: false SimulatePolicyBody: - description: The request body required for a simulate policy operation. type: object + description: The request body required for a simulate policy operation. properties: + policyTypes: + type: array + description: Supported policy types for a simulate operation. The default value, `null`, returns all types. + items: + $ref: '#/components/schemas/PolicyType' appInstance: type: string description: The application instance ID for a simulate operation policyContext: $ref: '#/components/schemas/PolicyContext' - policyTypes: - type: array - description: Supported policy types for a simulate operation. The default value, `null`, returns all types. - items: - $ref: '#/components/schemas/PolicyType' #TODO: Revisit with API team required: - - appInstance + - appInstance SimulatePolicyEvaluations: type: object properties: - evaluated: - type: object - description: A list of evaluated but not matched policies and rules - properties: - policies: - $ref: '#/components/schemas/SimulateResultPolicies' - policyType: - type: array - description: The policy type of the simulate operation - items: - $ref: '#/components/schemas/PolicyType' #TODO: Revisit with API TEAM - result: - $ref: '#/components/schemas/SimulatePolicyResult' status: type: string description: The result of this entity evaluation @@ -30416,12 +30673,25 @@ components: - MATCH - NOT_MATCH - UNDEFINED + policyType: + type: array + description: The policy type of the simulate operation + items: + $ref: '#/components/schemas/PolicyType' + result: + $ref: "#/components/schemas/SimulatePolicyResult" undefined: type: object description: A list of undefined but not matched policies and rules properties: policies: - $ref: '#/components/schemas/SimulateResultPolicies' + $ref: "#/components/schemas/SimulateResultPolicies" + evaluated: + type: object + description: A list of evaluated but not matched policies and rules + properties: + policies: + $ref: "#/components/schemas/SimulateResultPolicies" SimulatePolicyResponse: description: The response body returned for a simulate policy operation. An array of `evaluations`. items: @@ -30453,24 +30723,21 @@ components: SimulateResultPoliciesItems: type: object properties: - conditions: - type: array - $ref: '#/components/schemas/SimulateResultConditions' id: type: string name: type: string - rules: - type: array - $ref: '#/components/schemas/SimulateResultRules' status: type: string + conditions: + type: array + $ref: "#/components/schemas/SimulateResultConditions" + rules: + type: array + $ref: "#/components/schemas/SimulateResultRules" SimulateResultRules: type: object properties: - conditions: - type: array - $ref: '#/components/schemas/SimulateResultConditions' id: type: string description: The unique ID number of the policy rule @@ -30484,6 +30751,9 @@ components: - MATCH - UNMATCHED - UNDEFINED + conditions: + type: array + $ref: "#/components/schemas/SimulateResultConditions" SingleLogout: type: object properties: @@ -30609,17 +30879,9 @@ components: type: string pattern: (?i)^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ SsprPrimaryRequirement: - description: Defines the authenticators permitted for the initial authentication step of password recovery type: object + description: Defines the authenticators permitted for the initial authentication step of password recovery properties: - methodConstraints: - description: Constraints on the values specified in the `methods` array. Specifying a constraint limits methods to specific authenticator(s). Currently, Google OTP is the only accepted constraint. - x-okta-lifecycle: - features: - - IDX_SSPR_EXTENDED_PRIMARY_FACTORS - type: array - items: - $ref: '#/components/schemas/AuthenticatorMethodConstraint' methods: type: array description: Authenticator methods allowed for the initial authentication step of password recovery @@ -30641,6 +30903,14 @@ components: - voice - email - otp + methodConstraints: + description: Constraints on the values specified in the `methods` array. Specifying a constraint limits methods to specific authenticator(s). Currently, Google OTP is the only accepted constraint. + x-okta-lifecycle: + features: + - IDX_SSPR_EXTENDED_PRIMARY_FACTORS + type: array + items: + $ref: '#/components/schemas/AuthenticatorMethodConstraint' SsprRequirement: description: Describes the initial and secondary authenticator requirements a user needs to reset their password type: object @@ -31003,7 +31273,8 @@ components: description: Specifies the button label for the `Submit` button at the bottom of the enrollment form. default: Submit elements: - $ref: '#/components/schemas/UIElement' + allOf: + $ref: '#/components/schemas/UIElement' label: type: string description: Specifies the label at the top of the enrollment form under the logo. @@ -31163,13 +31434,16 @@ components: type: string readOnly: true UserCondition: + description: Specifies a set of Users to be included or excluded type: object properties: exclude: + description: Users to be excluded type: array items: type: string include: + description: Users to be included type: array items: type: string @@ -31233,13 +31507,16 @@ components: hotp: '#/components/schemas/CustomHotpUserFactor' UserIdentifierConditionEvaluatorPattern: type: object + description: Used in the User Identifier Condition object. Specifies the details of the patterns to match against. properties: matchType: $ref: '#/components/schemas/UserIdentifierMatchType' value: type: string + description: The regex expression of a simple match string UserIdentifierMatchType: type: string + description: The type of pattern. For regex, use `EXPRESSION`. enum: - CONTAINS - EQUALS @@ -31802,8 +32079,6 @@ components: type: string stateToken: type: string - clientData: - type: string authenticatorData: type: string signatureData: diff --git a/openapi3/templates/ObsoleteIdentityProviderPolicy.mustache b/openapi3/templates/ObsoleteIdentityProviderPolicy.mustache new file mode 100644 index 000000000..6247169db --- /dev/null +++ b/openapi3/templates/ObsoleteIdentityProviderPolicy.mustache @@ -0,0 +1,30 @@ + +{{>partial_header}} + +using JsonSubTypes; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using System; + +namespace {{packageName}}.{{modelPackage}} +{ + + [JsonConverter(typeof(JsonSubtypes), "Type")] + [JsonSubtypes.KnownSubType(typeof(AccessPolicy), "ACCESS_POLICY")] + [JsonSubtypes.KnownSubType(typeof(IdentityProviderPolicy), "IDP_DISCOVERY")] + [JsonSubtypes.KnownSubType(typeof(MultifactorEnrollmentPolicy), "MFA_ENROLL")] + [JsonSubtypes.KnownSubType(typeof(OktaSignOnPolicy), "OKTA_SIGN_ON")] + [JsonSubtypes.KnownSubType(typeof(PasswordPolicy), "PASSWORD")] + [JsonSubtypes.KnownSubType(typeof(ProfileEnrollmentPolicy), "PROFILE_ENROLLMENT")] + [Obsolete("IdentityProviderPolicy will no longer inherits from Policy in the next major version.")] + public partial class IdentityProviderPolicy : Policy + { + /// + /// Gets or Sets Conditions + /// + [Obsolete("IdentityProviderPolicy will no longer inherits from Policy. Conditions will removed in the next major version.")] + [DataMember(Name = "conditions", EmitDefaultValue = true)] + public PolicyRuleConditions Conditions { get; set; } + + } +} diff --git a/openapi3/templates/ObsoletePolicyApi.mustache b/openapi3/templates/ObsoletePolicyApi.mustache new file mode 100644 index 000000000..d34844b3d --- /dev/null +++ b/openapi3/templates/ObsoletePolicyApi.mustache @@ -0,0 +1,280 @@ + +{{>partial_header}} + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using System.Runtime.CompilerServices; +using System.Threading; +using System.Threading.Tasks; +using Okta.Sdk.Client; +using Okta.Sdk.Model; + +namespace {{packageName}}.{{apiPackage}} +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial interface IPolicyApiAsync : IApiAccessor + { + /// + /// Create a Policy + /// + /// + /// Creates a policy + /// + /// Thrown when fails to make API call + /// + /// (optional, default to true) + /// Cancellation Token to cancel the request. + /// Task of Policy + System.Threading.Tasks.Task CreatePolicyAsync(Policy policy, bool? activate = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Create a Policy + /// + /// + /// Creates a policy + /// + /// Thrown when fails to make API call + /// + /// (optional, default to true) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Policy) + System.Threading.Tasks.Task> CreatePolicyWithHttpInfoAsync(Policy policy, bool? activate = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Replace a Policy + /// + /// + /// Replaces the properties of a Policy identified by `policyId` + /// + /// Thrown when fails to make API call + /// `id` of the Policy + /// + /// Cancellation Token to cancel the request. + /// Task of Policy + System.Threading.Tasks.Task ReplacePolicyAsync(string policyId, Policy policy, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Replace a Policy + /// + /// + /// Replaces the properties of a Policy identified by `policyId` + /// + /// Thrown when fails to make API call + /// `id` of the Policy + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Policy) + System.Threading.Tasks.Task> ReplacePolicyWithHttpInfoAsync(string policyId, Policy policy, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial interface IPolicyApi : IPolicyApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class PolicyApi : IPolicyApi + { + /// + /// Replace a Policy Replaces the properties of a Policy identified by `policyId` + /// + /// Thrown when fails to make API call + /// `id` of the Policy + /// + /// Cancellation Token to cancel the request. + /// Task of Policy + [Obsolete("This method is deprecated and will be removed in the next major version.Use ReplacePolicyAsync(string policyId, PolicyCanBeCreatedOrReplaced policy ..)")] + public async System.Threading.Tasks.Task ReplacePolicyAsync(string policyId, Policy policy, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Okta.Sdk.Client.ApiResponse localVarResponse = await ReplacePolicyWithHttpInfoAsync(policyId, policy, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + /// + /// Replace a Policy Replaces the properties of a Policy identified by `policyId` + /// + /// Thrown when fails to make API call + /// `id` of the Policy + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Policy) + [Obsolete("This method is deprecated and will be removed in the next major version.Use ReplacePolicyWithHttpInfoAsync(string policyId, PolicyCanBeCreatedOrReplaced policy ..)")] + public async System.Threading.Tasks.Task> ReplacePolicyWithHttpInfoAsync(string policyId, Policy policy, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'policyId' is set + if (policyId == null) + { + throw new Okta.Sdk.Client.ApiException(400, "Missing required parameter 'policyId' when calling PolicyApi->ReplacePolicy"); + } + + // verify the required parameter 'policy' is set + if (policy == null) + { + throw new Okta.Sdk.Client.ApiException(400, "Missing required parameter 'policy' when calling PolicyApi->ReplacePolicy"); + } + + + Okta.Sdk.Client.RequestOptions localVarRequestOptions = new Okta.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Okta.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Okta.Sdk.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("policyId", Okta.Sdk.Client.ClientUtils.ParameterToString(policyId)); // path parameter + localVarRequestOptions.Data = policy; + + // authentication (apiToken) required + if (Sdk.Client.Configuration.IsSswsMode(this.Configuration) && !string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization")); + } + // authentication (oauth2) required + // oauth required + if (Sdk.Client.Configuration.IsBearerTokenMode(this.Configuration) && !string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + if (Sdk.Client.Configuration.IsPrivateKeyMode(this.Configuration) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + var token = await _oAuthTokenProvider.GetAccessTokenAsync(cancellationToken: cancellationToken); + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + token); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/api/v1/policies/{policyId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ReplacePolicy", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Create a Policy Creates a policy + /// + /// Thrown when fails to make API call + /// + /// (optional, default to true) + /// Cancellation Token to cancel the request. + /// Task of Policy + [Obsolete("This method is deprecated and will be removed in the next major version.Use PolicyAsync(PolicyCanBeCreatedOrReplaced policy ..)")] + public async System.Threading.Tasks.Task CreatePolicyAsync(Policy policy, bool? activate = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Okta.Sdk.Client.ApiResponse localVarResponse = await CreatePolicyWithHttpInfoAsync(policy, activate, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + /// + /// Create a Policy Creates a policy + /// + /// Thrown when fails to make API call + /// + /// (optional, default to true) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Policy) + [Obsolete("This method is deprecated and will be removed in the next major version.Use CreatePolicyWithHttpInfoAsync(PolicyCanBeCreatedOrReplaced policy ..)")] + public async System.Threading.Tasks.Task> CreatePolicyWithHttpInfoAsync(Policy policy, bool? activate = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'policy' is set + if (policy == null) + { + throw new Okta.Sdk.Client.ApiException(400, "Missing required parameter 'policy' when calling PolicyApi->CreatePolicy"); + } + + + Okta.Sdk.Client.RequestOptions localVarRequestOptions = new Okta.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Okta.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Okta.Sdk.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (activate != null) + { + localVarRequestOptions.QueryParameters.Add(Okta.Sdk.Client.ClientUtils.ParameterToMultiMap("", "activate", activate)); + } + localVarRequestOptions.Data = policy; + + // authentication (apiToken) required + if (Sdk.Client.Configuration.IsSswsMode(this.Configuration) && !string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization")); + } + // authentication (oauth2) required + // oauth required + if (Sdk.Client.Configuration.IsBearerTokenMode(this.Configuration) && !string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + if (Sdk.Client.Configuration.IsPrivateKeyMode(this.Configuration) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + var token = await _oAuthTokenProvider.GetAccessTokenAsync(cancellationToken: cancellationToken); + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + token); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/api/v1/policies", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreatePolicy", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + + } +} diff --git a/openapi3/templates/modelInnerEnum copy.mustache b/openapi3/templates/modelInnerEnum copy.mustache deleted file mode 100644 index 2e16551de..000000000 --- a/openapi3/templates/modelInnerEnum copy.mustache +++ /dev/null @@ -1,28 +0,0 @@ - {{^isContainer}} - /// - /// {{description}}{{^description}}Defines {{{name}}}{{/description}} - /// - {{#description}} - /// {{.}} - {{/description}} - {{#isString}} - {{^useGenericHost}} - [JsonConverter(typeof(StringEnumSerializingConverter))] - {{/useGenericHost}} - {{/isString}} - {{>visibility}} sealed class {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} : StringEnum - { - {{#allowableValues}} - {{#enumVars}} - /// - /// StringEnum {{name}} for value: {{value}} - /// - {{#isString}} - [EnumMember(Value = "{{{value}}}")] - {{/isString}} - {{name}}{{^isString}} = {{{value}}}{{/isString}}{{#isString}} = {{-index}}{{/isString}}{{^-last}},{{/-last}} - - {{/enumVars}} - {{/allowableValues}} - } - {{/isContainer}} diff --git a/src/Okta.Sdk.IntegrationTest/PolicyScenarios.cs b/src/Okta.Sdk.IntegrationTest/PolicyScenarios.cs index 7bf3ff828..3f031bf34 100644 --- a/src/Okta.Sdk.IntegrationTest/PolicyScenarios.cs +++ b/src/Okta.Sdk.IntegrationTest/PolicyScenarios.cs @@ -151,6 +151,257 @@ public async Task GetPolicyOfType() } } + [Fact] + public async Task CreateIdpDiscoveryRule() + { + var guid = Guid.NewGuid(); + + var policies = await _policyApi.ListPolicies(PolicyType.IDPDISCOVERY).ToListAsync(); + policies.Count.Should().Be(1); + + var idpPolicy = policies.FirstOrDefault() as IdpDiscoveryPolicy; + PolicyRule createdRule = null; + + try + { + var policyRule = new IdpDiscoveryPolicyRule + { + Type = PolicyRuleType.IDPDISCOVERY, + Priority = 1, + Name = $"dotnet-sdk: {nameof(CreateIdpDiscoveryRule)} {guid}".Substring(0, 50), + Actions = new IdpPolicyRuleAction + { + Idp = new IdpPolicyRuleActionIdp + { + Providers = new List + { + new IdpPolicyRuleActionProvider + { + Type = IdentityProviderType.OKTA + } + } + } + }, + Conditions = new IdpDiscoveryPolicyRuleCondition + { + Network = new PolicyNetworkCondition + { + Connection = PolicyNetworkConnection.ZONE, + Include = new List { "ALL_ZONES" } + }, + App = new AppAndInstancePolicyRuleCondition + { + Exclude = new List(), + Include = new List() + }, + Platform = new PlatformPolicyRuleCondition + { + Include = new List + { + new PlatformConditionEvaluatorPlatform + { + Os = new PlatformConditionEvaluatorPlatformOperatingSystem + { + Type = PolicyPlatformOperatingSystemType.ANY + }, + + Type = PolicyPlatformType.ANY + } + } + } + } + }; + + createdRule = await _policyApi.CreatePolicyRuleAsync(idpPolicy.Id, policyRule); + createdRule.Should().NotBeNull(); + + createdRule.Name.Should().Be(policyRule.Name); + createdRule.Type.Should().Be(PolicyRuleType.IDPDISCOVERY); + createdRule.Status.Should().Be(LifecycleStatus.ACTIVE); + ((IdpDiscoveryPolicyRule)createdRule).Actions.Idp.Providers.Any(x => x.Type == IdentityProviderType.OKTA).Should().BeTrue(); + ((IdpDiscoveryPolicyRule)createdRule).Conditions.Network.Connection.Should().Be(PolicyNetworkConnection.ZONE); + ((IdpDiscoveryPolicyRule)createdRule).Conditions.Platform.Include.Any(x => x.Os.Type == PolicyPlatformOperatingSystemType.ANY).Should().BeTrue(); + + } + finally + { + + if (createdRule != null) + { + await _policyApi.DeletePolicyRuleAsync(idpPolicy.Id, createdRule.Id); + } + } + } + + [Fact] + public async Task GetIdpDiscoveryRule() + { + var guid = Guid.NewGuid(); + + var policies = await _policyApi.ListPolicies(PolicyType.IDPDISCOVERY).ToListAsync(); + var idpPolicy = policies.FirstOrDefault() as IdpDiscoveryPolicy; + PolicyRule createdRule = null; + + try + { + var policyRule = new IdpDiscoveryPolicyRule + { + Type = PolicyRuleType.IDPDISCOVERY, + Priority = 1, + Name = $"dotnet-sdk: {nameof(GetIdpDiscoveryRule)} {guid}".Substring(0, 50), + Actions = new IdpPolicyRuleAction + { + Idp = new IdpPolicyRuleActionIdp + { + Providers = new List + { + new IdpPolicyRuleActionProvider + { + Type = IdentityProviderType.OKTA + } + } + } + }, + Conditions = new IdpDiscoveryPolicyRuleCondition + { + Network = new PolicyNetworkCondition + { + Connection = PolicyNetworkConnection.ZONE, + Include = new List { "ALL_ZONES" } + }, + App = new AppAndInstancePolicyRuleCondition + { + Exclude = new List(), + Include = new List() + }, + Platform = new PlatformPolicyRuleCondition + { + Include = new List + { + new PlatformConditionEvaluatorPlatform + { + Os = new PlatformConditionEvaluatorPlatformOperatingSystem + { + Type = PolicyPlatformOperatingSystemType.ANY + }, + + Type = PolicyPlatformType.ANY + } + } + } + } + }; + + createdRule = await _policyApi.CreatePolicyRuleAsync(idpPolicy.Id, policyRule); + createdRule.Should().NotBeNull(); + + var retrievedRule = await _policyApi.GetPolicyRuleAsync(idpPolicy.Id, createdRule.Id); + + retrievedRule.Name.Should().Be(policyRule.Name); + retrievedRule.Type.Should().Be(PolicyRuleType.IDPDISCOVERY); + retrievedRule.Status.Should().Be(LifecycleStatus.ACTIVE); + ((IdpDiscoveryPolicyRule)retrievedRule).Actions.Idp.Providers.Any(x => x.Type == IdentityProviderType.OKTA).Should().BeTrue(); + ((IdpDiscoveryPolicyRule)retrievedRule).Conditions.Network.Connection.Should().Be(PolicyNetworkConnection.ZONE); + ((IdpDiscoveryPolicyRule)retrievedRule).Conditions.Platform.Include.Any(x => x.Os.Type == PolicyPlatformOperatingSystemType.ANY).Should().BeTrue(); + + } + finally + { + + if (createdRule != null) + { + await _policyApi.DeletePolicyRuleAsync(idpPolicy.Id, createdRule.Id); + } + } + } + + + [Fact] + public async Task ListIdpDiscoveryRules() + { + var guid = Guid.NewGuid(); + + var policies = await _policyApi.ListPolicies(PolicyType.IDPDISCOVERY).ToListAsync(); + var idpPolicy = policies.FirstOrDefault() as IdpDiscoveryPolicy; + PolicyRule createdRule = null; + + try + { + var policyRule = new IdpDiscoveryPolicyRule + { + Type = PolicyRuleType.IDPDISCOVERY, + Priority = 1, + Name = $"dotnet-sdk: {nameof(ListIdpDiscoveryRules)} {guid}".Substring(0, 50), + Actions = new IdpPolicyRuleAction + { + Idp = new IdpPolicyRuleActionIdp + { + Providers = new List + { + new IdpPolicyRuleActionProvider + { + Type = IdentityProviderType.OKTA + } + } + } + }, + Conditions = new IdpDiscoveryPolicyRuleCondition + { + Network = new PolicyNetworkCondition + { + Connection = PolicyNetworkConnection.ZONE, + Include = new List { "ALL_ZONES" } + }, + App = new AppAndInstancePolicyRuleCondition + { + Exclude = new List(), + Include = new List() + }, + Platform = new PlatformPolicyRuleCondition + { + Include = new List + { + new PlatformConditionEvaluatorPlatform + { + Os = new PlatformConditionEvaluatorPlatformOperatingSystem + { + Type = PolicyPlatformOperatingSystemType.ANY + }, + + Type = PolicyPlatformType.ANY + } + } + } + } + }; + + createdRule = await _policyApi.CreatePolicyRuleAsync(idpPolicy.Id, policyRule); + createdRule.Should().NotBeNull(); + + var rules = await _policyApi.ListPolicyRules(idpPolicy.Id).ToListAsync(); + + rules.Should().NotBeNullOrEmpty(); + + var retrievedRule = rules.FirstOrDefault(x => x.Id == createdRule.Id); + + retrievedRule.Name.Should().Be(policyRule.Name); + retrievedRule.Type.Should().Be(PolicyRuleType.IDPDISCOVERY); + retrievedRule.Status.Should().Be(LifecycleStatus.ACTIVE); + ((IdpDiscoveryPolicyRule)retrievedRule).Actions.Idp.Providers.Any(x => x.Type == IdentityProviderType.OKTA).Should().BeTrue(); + ((IdpDiscoveryPolicyRule)retrievedRule).Conditions.Network.Connection.Should().Be(PolicyNetworkConnection.ZONE); + ((IdpDiscoveryPolicyRule)retrievedRule).Conditions.Platform.Include.Any(x => x.Os.Type == PolicyPlatformOperatingSystemType.ANY).Should().BeTrue(); + + } + finally + { + + if (createdRule != null) + { + await _policyApi.DeletePolicyRuleAsync(idpPolicy.Id, createdRule.Id); + } + } + } + [Fact] public async Task CreateSignOnPolicyWithGroupConditions() { diff --git a/src/Okta.Sdk/Api/PolicyApi.cs b/src/Okta.Sdk/Api/PolicyApi.cs index ede6bfcf0..836ba6bc6 100644 --- a/src/Okta.Sdk/Api/PolicyApi.cs +++ b/src/Okta.Sdk/Api/PolicyApi.cs @@ -106,8 +106,8 @@ public partial interface IPolicyApiAsync : IApiAccessor /// /// (optional, default to true) /// Cancellation Token to cancel the request. - /// Task of Policy - System.Threading.Tasks.Task CreatePolicyAsync( Policy policy , bool? activate = default(bool?) , System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of PolicyCanBeCreatedOrReplaced + System.Threading.Tasks.Task CreatePolicyAsync( PolicyCanBeCreatedOrReplaced policy , bool? activate = default(bool?) , System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Create a Policy /// @@ -118,8 +118,8 @@ public partial interface IPolicyApiAsync : IApiAccessor /// /// (optional, default to true) /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Policy) - System.Threading.Tasks.Task> CreatePolicyWithHttpInfoAsync( Policy policy , bool? activate = default(bool?) , System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of ApiResponse (PolicyCanBeCreatedOrReplaced) + System.Threading.Tasks.Task> CreatePolicyWithHttpInfoAsync( PolicyCanBeCreatedOrReplaced policy , bool? activate = default(bool?) , System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Create a Policy Rule /// @@ -386,7 +386,7 @@ public partial interface IPolicyApiAsync : IApiAccessor /// List all Applications mapped to a Policy /// /// - /// Lists all applications mapped to a policy identified by `policyId` + /// Lists all applications mapped to a policy identified by `policyId` > **Note:** Use [List all resources mapped to a Policy](https://developer.okta.com/docs/api/openapi/okta-management/management/tag/Policy/#tag/Policy/operation/listPolicyMappings) to list all applications mapped to a policy. /// /// Thrown when fails to make API call /// `id` of the Policy @@ -398,7 +398,7 @@ public partial interface IPolicyApiAsync : IApiAccessor /// List all Applications mapped to a Policy /// /// - /// Lists all applications mapped to a policy identified by `policyId` + /// Lists all applications mapped to a policy identified by `policyId` > **Note:** Use [List all resources mapped to a Policy](https://developer.okta.com/docs/api/openapi/okta-management/management/tag/Policy/#tag/Policy/operation/listPolicyMappings) to list all applications mapped to a policy. /// /// Thrown when fails to make API call /// `id` of the Policy @@ -484,8 +484,8 @@ public partial interface IPolicyApiAsync : IApiAccessor /// `id` of the Policy /// /// Cancellation Token to cancel the request. - /// Task of Policy - System.Threading.Tasks.Task ReplacePolicyAsync( string policyId , Policy policy , System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of PolicyCanBeCreatedOrReplaced + System.Threading.Tasks.Task ReplacePolicyAsync( string policyId , PolicyCanBeCreatedOrReplaced policy , System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Replace a Policy /// @@ -496,8 +496,8 @@ public partial interface IPolicyApiAsync : IApiAccessor /// `id` of the Policy /// /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Policy) - System.Threading.Tasks.Task> ReplacePolicyWithHttpInfoAsync( string policyId , Policy policy , System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of ApiResponse (PolicyCanBeCreatedOrReplaced) + System.Threading.Tasks.Task> ReplacePolicyWithHttpInfoAsync( string policyId , PolicyCanBeCreatedOrReplaced policy , System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Replace a Policy Rule /// @@ -898,10 +898,10 @@ public Okta.Sdk.Client.ExceptionFactory ExceptionFactory /// /// (optional, default to true) /// Cancellation Token to cancel the request. - /// Task of Policy - public async System.Threading.Tasks.Task CreatePolicyAsync( Policy policy , bool? activate = default(bool?) , System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of PolicyCanBeCreatedOrReplaced + public async System.Threading.Tasks.Task CreatePolicyAsync( PolicyCanBeCreatedOrReplaced policy , bool? activate = default(bool?) , System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Okta.Sdk.Client.ApiResponse localVarResponse = await CreatePolicyWithHttpInfoAsync(policy, activate, cancellationToken).ConfigureAwait(false); + Okta.Sdk.Client.ApiResponse localVarResponse = await CreatePolicyWithHttpInfoAsync(policy, activate, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// @@ -911,8 +911,8 @@ public Okta.Sdk.Client.ExceptionFactory ExceptionFactory /// /// (optional, default to true) /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Policy) - public async System.Threading.Tasks.Task> CreatePolicyWithHttpInfoAsync( Policy policy , bool? activate = default(bool?) , System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (PolicyCanBeCreatedOrReplaced) + public async System.Threading.Tasks.Task> CreatePolicyWithHttpInfoAsync( PolicyCanBeCreatedOrReplaced policy , bool? activate = default(bool?) , System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'policy' is set if (policy == null) @@ -969,7 +969,7 @@ public Okta.Sdk.Client.ExceptionFactory ExceptionFactory } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/api/v1/policies", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.PostAsync("/api/v1/policies", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -2089,7 +2089,7 @@ public Okta.Sdk.Client.ExceptionFactory ExceptionFactory } /// - /// List all Applications mapped to a Policy Lists all applications mapped to a policy identified by `policyId` + /// List all Applications mapped to a Policy Lists all applications mapped to a policy identified by `policyId` > **Note:** Use [List all resources mapped to a Policy](https://developer.okta.com/docs/api/openapi/okta-management/management/tag/Policy/#tag/Policy/operation/listPolicyMappings) to list all applications mapped to a policy. /// /// Thrown when fails to make API call /// `id` of the Policy @@ -2147,7 +2147,7 @@ public Okta.Sdk.Client.ExceptionFactory ExceptionFactory return new OktaCollectionClient(localVarRequestOptions, "/api/v1/policies/{policyId}/app", this.AsynchronousClient, this.Configuration, this._oAuthTokenProvider); } /// - /// List all Applications mapped to a Policy Lists all applications mapped to a policy identified by `policyId` + /// List all Applications mapped to a Policy Lists all applications mapped to a policy identified by `policyId` > **Note:** Use [List all resources mapped to a Policy](https://developer.okta.com/docs/api/openapi/okta-management/management/tag/Policy/#tag/Policy/operation/listPolicyMappings) to list all applications mapped to a policy. /// /// Thrown when fails to make API call /// `id` of the Policy @@ -2570,10 +2570,10 @@ public Okta.Sdk.Client.ExceptionFactory ExceptionFactory /// `id` of the Policy /// /// Cancellation Token to cancel the request. - /// Task of Policy - public async System.Threading.Tasks.Task ReplacePolicyAsync( string policyId , Policy policy , System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of PolicyCanBeCreatedOrReplaced + public async System.Threading.Tasks.Task ReplacePolicyAsync( string policyId , PolicyCanBeCreatedOrReplaced policy , System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Okta.Sdk.Client.ApiResponse localVarResponse = await ReplacePolicyWithHttpInfoAsync(policyId, policy, cancellationToken).ConfigureAwait(false); + Okta.Sdk.Client.ApiResponse localVarResponse = await ReplacePolicyWithHttpInfoAsync(policyId, policy, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// @@ -2583,8 +2583,8 @@ public Okta.Sdk.Client.ExceptionFactory ExceptionFactory /// `id` of the Policy /// /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Policy) - public async System.Threading.Tasks.Task> ReplacePolicyWithHttpInfoAsync( string policyId , Policy policy , System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (PolicyCanBeCreatedOrReplaced) + public async System.Threading.Tasks.Task> ReplacePolicyWithHttpInfoAsync( string policyId , PolicyCanBeCreatedOrReplaced policy , System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'policyId' is set if (policyId == null) @@ -2644,7 +2644,7 @@ public Okta.Sdk.Client.ExceptionFactory ExceptionFactory } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PutAsync("/api/v1/policies/{policyId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.PutAsync("/api/v1/policies/{policyId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { diff --git a/src/Okta.Sdk/Model/AccessPolicy.cs b/src/Okta.Sdk/Model/AccessPolicy.cs index d103ed5bc..c27fad156 100644 --- a/src/Okta.Sdk/Model/AccessPolicy.cs +++ b/src/Okta.Sdk/Model/AccessPolicy.cs @@ -33,7 +33,7 @@ namespace Okta.Sdk.Model [DataContract(Name = "AccessPolicy")] [JsonConverter(typeof(JsonSubtypes), "Type")] [JsonSubtypes.KnownSubType(typeof(AccessPolicy), "ACCESS_POLICY")] - [JsonSubtypes.KnownSubType(typeof(IdentityProviderPolicy), "IDP_DISCOVERY")] + [JsonSubtypes.KnownSubType(typeof(IdpDiscoveryPolicy), "IDP_DISCOVERY")] [JsonSubtypes.KnownSubType(typeof(MultifactorEnrollmentPolicy), "MFA_ENROLL")] [JsonSubtypes.KnownSubType(typeof(OktaSignOnPolicy), "OKTA_SIGN_ON")] [JsonSubtypes.KnownSubType(typeof(PasswordPolicy), "PASSWORD")] diff --git a/src/Okta.Sdk/Model/AccessPolicyConstraint.cs b/src/Okta.Sdk/Model/AccessPolicyConstraint.cs index 9fdc7000f..5d412c719 100644 --- a/src/Okta.Sdk/Model/AccessPolicyConstraint.cs +++ b/src/Okta.Sdk/Model/AccessPolicyConstraint.cs @@ -33,24 +33,218 @@ namespace Okta.Sdk.Model public partial class AccessPolicyConstraint : IEquatable { - /// - /// Gets or Sets Methods + /// Defines Methods /// + [JsonConverter(typeof(StringEnumSerializingConverter))] + public sealed class MethodsEnum : StringEnum + { + /// + /// StringEnum PASSWORD for value: PASSWORD + /// + + public static MethodsEnum PASSWORD = new MethodsEnum("PASSWORD"); + + /// + /// StringEnum SECURITYQUESTION for value: SECURITY_QUESTION + /// + + public static MethodsEnum SECURITYQUESTION = new MethodsEnum("SECURITY_QUESTION"); + + /// + /// StringEnum SMS for value: SMS + /// + + public static MethodsEnum SMS = new MethodsEnum("SMS"); + + /// + /// StringEnum VOICE for value: VOICE + /// + + public static MethodsEnum VOICE = new MethodsEnum("VOICE"); + + /// + /// StringEnum EMAIL for value: EMAIL + /// + + public static MethodsEnum EMAIL = new MethodsEnum("EMAIL"); + + /// + /// StringEnum PUSH for value: PUSH + /// + + public static MethodsEnum PUSH = new MethodsEnum("PUSH"); + + /// + /// StringEnum SIGNEDNONCE for value: SIGNED_NONCE + /// + + public static MethodsEnum SIGNEDNONCE = new MethodsEnum("SIGNED_NONCE"); + + /// + /// StringEnum OTP for value: OTP + /// + + public static MethodsEnum OTP = new MethodsEnum("OTP"); + + /// + /// StringEnum TOTP for value: TOTP + /// + + public static MethodsEnum TOTP = new MethodsEnum("TOTP"); + + /// + /// StringEnum WEBAUTHN for value: WEBAUTHN + /// + + public static MethodsEnum WEBAUTHN = new MethodsEnum("WEBAUTHN"); + + /// + /// StringEnum DUO for value: DUO + /// + + public static MethodsEnum DUO = new MethodsEnum("DUO"); + + /// + /// StringEnum IDP for value: IDP + /// + + public static MethodsEnum IDP = new MethodsEnum("IDP"); + + /// + /// StringEnum CERT for value: CERT + /// + + public static MethodsEnum CERT = new MethodsEnum("CERT"); + + + /// + /// Implicit operator declaration to accept and convert a string value as a + /// + /// The value to use + public static implicit operator MethodsEnum(string value) => new MethodsEnum(value); + + /// + /// Creates a new instance. + /// + /// The value to use. + public MethodsEnum(string value) + : base(value) + { + } + } + + + + /// + /// The Authenticator methods that are permitted + /// + /// The Authenticator methods that are permitted [DataMember(Name = "methods", EmitDefaultValue = true)] - public List Methods { get; set; } + + public List Methods { get; set; } + /// + /// Defines Types + /// + [JsonConverter(typeof(StringEnumSerializingConverter))] + public sealed class TypesEnum : StringEnum + { + /// + /// StringEnum SECURITYKEY for value: SECURITY_KEY + /// + + public static TypesEnum SECURITYKEY = new TypesEnum("SECURITY_KEY"); + + /// + /// StringEnum PHONE for value: PHONE + /// + + public static TypesEnum PHONE = new TypesEnum("PHONE"); + + /// + /// StringEnum EMAIL for value: EMAIL + /// + + public static TypesEnum EMAIL = new TypesEnum("EMAIL"); + + /// + /// StringEnum PASSWORD for value: PASSWORD + /// + + public static TypesEnum PASSWORD = new TypesEnum("PASSWORD"); + + /// + /// StringEnum SECURITYQUESTION for value: SECURITY_QUESTION + /// + + public static TypesEnum SECURITYQUESTION = new TypesEnum("SECURITY_QUESTION"); + /// + /// StringEnum APP for value: APP + /// + + public static TypesEnum APP = new TypesEnum("APP"); + + /// + /// StringEnum FEDERATED for value: FEDERATED + /// + + public static TypesEnum FEDERATED = new TypesEnum("FEDERATED"); + + + /// + /// Implicit operator declaration to accept and convert a string value as a + /// + /// The value to use + public static implicit operator TypesEnum(string value) => new TypesEnum(value); + + /// + /// Creates a new instance. + /// + /// The value to use. + public TypesEnum(string value) + : base(value) + { + } + } + + + + /// + /// The Authenticator types that are permitted + /// + /// The Authenticator types that are permitted + [DataMember(Name = "types", EmitDefaultValue = true)] + + public List Types { get; set; } + /// - /// Gets or Sets ReauthenticateIn + /// The duration after which the user must re-authenticate regardless of user activity. This re-authentication interval overrides the Verification Method object's `reauthenticateIn` interval. The supported values use ISO 8601 period format for recurring time intervals (for example, `PT1H`). /// + /// The duration after which the user must re-authenticate regardless of user activity. This re-authentication interval overrides the Verification Method object's `reauthenticateIn` interval. The supported values use ISO 8601 period format for recurring time intervals (for example, `PT1H`). [DataMember(Name = "reauthenticateIn", EmitDefaultValue = true)] public string ReauthenticateIn { get; set; } /// - /// Gets or Sets Types + /// This property specifies the precise authenticator and method for authentication. /// - [DataMember(Name = "types", EmitDefaultValue = true)] - public List Types { get; set; } + /// This property specifies the precise authenticator and method for authentication. + [DataMember(Name = "authenticationMethods", EmitDefaultValue = true)] + public List AuthenticationMethods { get; set; } + + /// + /// This property specifies the precise authenticator and method to exclude from authentication. + /// + /// This property specifies the precise authenticator and method to exclude from authentication. + [DataMember(Name = "excludedAuthenticationMethods", EmitDefaultValue = true)] + public List ExcludedAuthenticationMethods { get; set; } + + /// + /// This property indicates whether the knowledge or possession factor is required by the assurance. It's optional in the request, but is always returned in the response. By default, this field is `true`. If the knowledge or possession constraint has values for`excludedAuthenticationMethods` the `required` value is false. + /// + /// This property indicates whether the knowledge or possession factor is required by the assurance. It's optional in the request, but is always returned in the response. By default, this field is `true`. If the knowledge or possession constraint has values for`excludedAuthenticationMethods` the `required` value is false. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } /// /// Returns the string presentation of the object @@ -63,6 +257,9 @@ public override string ToString() sb.Append(" Methods: ").Append(Methods).Append("\n"); sb.Append(" ReauthenticateIn: ").Append(ReauthenticateIn).Append("\n"); sb.Append(" Types: ").Append(Types).Append("\n"); + sb.Append(" AuthenticationMethods: ").Append(AuthenticationMethods).Append("\n"); + sb.Append(" ExcludedAuthenticationMethods: ").Append(ExcludedAuthenticationMethods).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -100,8 +297,6 @@ public bool Equals(AccessPolicyConstraint input) return ( this.Methods == input.Methods || - this.Methods != null && - input.Methods != null && this.Methods.SequenceEqual(input.Methods) ) && ( @@ -111,9 +306,23 @@ public bool Equals(AccessPolicyConstraint input) ) && ( this.Types == input.Types || - this.Types != null && - input.Types != null && this.Types.SequenceEqual(input.Types) + ) && + ( + this.AuthenticationMethods == input.AuthenticationMethods || + this.AuthenticationMethods != null && + input.AuthenticationMethods != null && + this.AuthenticationMethods.SequenceEqual(input.AuthenticationMethods) + ) && + ( + this.ExcludedAuthenticationMethods == input.ExcludedAuthenticationMethods || + this.ExcludedAuthenticationMethods != null && + input.ExcludedAuthenticationMethods != null && + this.ExcludedAuthenticationMethods.SequenceEqual(input.ExcludedAuthenticationMethods) + ) && + ( + this.Required == input.Required || + this.Required.Equals(input.Required) ); } @@ -139,6 +348,15 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Types.GetHashCode(); } + if (this.AuthenticationMethods != null) + { + hashCode = (hashCode * 59) + this.AuthenticationMethods.GetHashCode(); + } + if (this.ExcludedAuthenticationMethods != null) + { + hashCode = (hashCode * 59) + this.ExcludedAuthenticationMethods.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Required.GetHashCode(); return hashCode; } } diff --git a/src/Okta.Sdk/Model/AccessPolicyRule.cs b/src/Okta.Sdk/Model/AccessPolicyRule.cs index 2c46bb344..c6a18447b 100644 --- a/src/Okta.Sdk/Model/AccessPolicyRule.cs +++ b/src/Okta.Sdk/Model/AccessPolicyRule.cs @@ -33,6 +33,7 @@ namespace Okta.Sdk.Model [DataContract(Name = "AccessPolicyRule")] [JsonConverter(typeof(JsonSubtypes), "Type")] [JsonSubtypes.KnownSubType(typeof(AccessPolicyRule), "ACCESS_POLICY")] + [JsonSubtypes.KnownSubType(typeof(IdpDiscoveryPolicyRule), "IDP_DISCOVERY")] [JsonSubtypes.KnownSubType(typeof(PasswordPolicyRule), "PASSWORD")] [JsonSubtypes.KnownSubType(typeof(ProfileEnrollmentPolicyRule), "PROFILE_ENROLLMENT")] [JsonSubtypes.KnownSubType(typeof(AuthorizationServerPolicyRule), "RESOURCE_ACCESS")] diff --git a/src/Okta.Sdk/Model/AppAndInstanceConditionEvaluatorAppOrInstance.cs b/src/Okta.Sdk/Model/AppAndInstanceConditionEvaluatorAppOrInstance.cs index 40be6bdf5..1fbf7a15d 100644 --- a/src/Okta.Sdk/Model/AppAndInstanceConditionEvaluatorAppOrInstance.cs +++ b/src/Okta.Sdk/Model/AppAndInstanceConditionEvaluatorAppOrInstance.cs @@ -42,8 +42,9 @@ public partial class AppAndInstanceConditionEvaluatorAppOrInstance : IEquatable< public AppAndInstanceType Type { get; set; } /// - /// Gets or Sets Id + /// ID of the app /// + /// ID of the app [DataMember(Name = "id", EmitDefaultValue = true)] public string Id { get; private set; } @@ -56,8 +57,9 @@ public bool ShouldSerializeId() return false; } /// - /// Gets or Sets Name + /// Name of the app type /// + /// Name of the app type [DataMember(Name = "name", EmitDefaultValue = true)] public string Name { get; set; } diff --git a/src/Okta.Sdk/Model/AuthenticationMethodObject.cs b/src/Okta.Sdk/Model/AuthenticationMethodObject.cs new file mode 100644 index 000000000..a6815d743 --- /dev/null +++ b/src/Okta.Sdk/Model/AuthenticationMethodObject.cs @@ -0,0 +1,132 @@ +/* + * Okta Admin Management + * + * Allows customers to easily access the Okta Management APIs + * + * The version of the OpenAPI document: 5.1.0 + * Contact: devex-public@okta.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = Okta.Sdk.Client.OpenAPIDateConverter; + +namespace Okta.Sdk.Model +{ + /// + /// Template: ModelGeneric + /// AuthenticationMethodObject + /// + [DataContract(Name = "AuthenticationMethodObject")] + + public partial class AuthenticationMethodObject : IEquatable + { + + /// + /// A label that identifies the authenticator + /// + /// A label that identifies the authenticator + [DataMember(Name = "key", EmitDefaultValue = true)] + public string Key { get; set; } + + /// + /// Specifies the method used for the authenticator + /// + /// Specifies the method used for the authenticator + [DataMember(Name = "method", EmitDefaultValue = true)] + public string Method { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class AuthenticationMethodObject {\n"); + sb.Append(" Key: ").Append(Key).Append("\n"); + sb.Append(" Method: ").Append(Method).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as AuthenticationMethodObject); + } + + /// + /// Returns true if AuthenticationMethodObject instances are equal + /// + /// Instance of AuthenticationMethodObject to be compared + /// Boolean + public bool Equals(AuthenticationMethodObject input) + { + if (input == null) + { + return false; + } + return + ( + this.Key == input.Key || + (this.Key != null && + this.Key.Equals(input.Key)) + ) && + ( + this.Method == input.Method || + (this.Method != null && + this.Method.Equals(input.Method)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + + if (this.Key != null) + { + hashCode = (hashCode * 59) + this.Key.GetHashCode(); + } + if (this.Method != null) + { + hashCode = (hashCode * 59) + this.Method.GetHashCode(); + } + return hashCode; + } + } + + } + +} diff --git a/src/Okta.Sdk/Model/AuthenticatorMethodConstraint.cs b/src/Okta.Sdk/Model/AuthenticatorMethodConstraint.cs index 9436d6b15..c2d9cdeb9 100644 --- a/src/Okta.Sdk/Model/AuthenticatorMethodConstraint.cs +++ b/src/Okta.Sdk/Model/AuthenticatorMethodConstraint.cs @@ -84,8 +84,8 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class AuthenticatorMethodConstraint {\n"); - sb.Append(" AllowedAuthenticators: ").Append(AllowedAuthenticators).Append("\n"); sb.Append(" Method: ").Append(Method).Append("\n"); + sb.Append(" AllowedAuthenticators: ").Append(AllowedAuthenticators).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -121,15 +121,15 @@ public bool Equals(AuthenticatorMethodConstraint input) return false; } return + ( + this.Method == input.Method || + this.Method.Equals(input.Method) + ) && ( this.AllowedAuthenticators == input.AllowedAuthenticators || this.AllowedAuthenticators != null && input.AllowedAuthenticators != null && this.AllowedAuthenticators.SequenceEqual(input.AllowedAuthenticators) - ) && - ( - this.Method == input.Method || - this.Method.Equals(input.Method) ); } @@ -143,14 +143,14 @@ public override int GetHashCode() { int hashCode = 41; - if (this.AllowedAuthenticators != null) - { - hashCode = (hashCode * 59) + this.AllowedAuthenticators.GetHashCode(); - } if (this.Method != null) { hashCode = (hashCode * 59) + this.Method.GetHashCode(); } + if (this.AllowedAuthenticators != null) + { + hashCode = (hashCode * 59) + this.AllowedAuthenticators.GetHashCode(); + } return hashCode; } } diff --git a/src/Okta.Sdk/Model/AuthorizationServerPolicy.cs b/src/Okta.Sdk/Model/AuthorizationServerPolicy.cs index 3d3e54204..6759f6253 100644 --- a/src/Okta.Sdk/Model/AuthorizationServerPolicy.cs +++ b/src/Okta.Sdk/Model/AuthorizationServerPolicy.cs @@ -33,7 +33,7 @@ namespace Okta.Sdk.Model [DataContract(Name = "AuthorizationServerPolicy")] [JsonConverter(typeof(JsonSubtypes), "Type")] [JsonSubtypes.KnownSubType(typeof(AccessPolicy), "ACCESS_POLICY")] - [JsonSubtypes.KnownSubType(typeof(IdentityProviderPolicy), "IDP_DISCOVERY")] + [JsonSubtypes.KnownSubType(typeof(IdpDiscoveryPolicy), "IDP_DISCOVERY")] [JsonSubtypes.KnownSubType(typeof(MultifactorEnrollmentPolicy), "MFA_ENROLL")] [JsonSubtypes.KnownSubType(typeof(OktaSignOnPolicy), "OKTA_SIGN_ON")] [JsonSubtypes.KnownSubType(typeof(PasswordPolicy), "PASSWORD")] diff --git a/src/Okta.Sdk/Model/AuthorizationServerPolicyRule.cs b/src/Okta.Sdk/Model/AuthorizationServerPolicyRule.cs index 1d5239cb2..ecafed4c3 100644 --- a/src/Okta.Sdk/Model/AuthorizationServerPolicyRule.cs +++ b/src/Okta.Sdk/Model/AuthorizationServerPolicyRule.cs @@ -33,6 +33,7 @@ namespace Okta.Sdk.Model [DataContract(Name = "AuthorizationServerPolicyRule")] [JsonConverter(typeof(JsonSubtypes), "Type")] [JsonSubtypes.KnownSubType(typeof(AccessPolicyRule), "ACCESS_POLICY")] + [JsonSubtypes.KnownSubType(typeof(IdpDiscoveryPolicyRule), "IDP_DISCOVERY")] [JsonSubtypes.KnownSubType(typeof(PasswordPolicyRule), "PASSWORD")] [JsonSubtypes.KnownSubType(typeof(ProfileEnrollmentPolicyRule), "PROFILE_ENROLLMENT")] [JsonSubtypes.KnownSubType(typeof(AuthorizationServerPolicyRule), "RESOURCE_ACCESS")] diff --git a/src/Okta.Sdk/Model/ClientPolicyCondition.cs b/src/Okta.Sdk/Model/ClientPolicyCondition.cs index 6073699e8..5538119ba 100644 --- a/src/Okta.Sdk/Model/ClientPolicyCondition.cs +++ b/src/Okta.Sdk/Model/ClientPolicyCondition.cs @@ -27,7 +27,7 @@ namespace Okta.Sdk.Model { /// /// Template: ModelGeneric - /// ClientPolicyCondition + /// Specifies which clients are included in the Policy /// [DataContract(Name = "ClientPolicyCondition")] @@ -35,8 +35,9 @@ public partial class ClientPolicyCondition : IEquatable { /// - /// Gets or Sets Include + /// Which clients are included in the Policy /// + /// Which clients are included in the Policy [DataMember(Name = "include", EmitDefaultValue = true)] public List Include { get; set; } diff --git a/src/Okta.Sdk/Model/DeviceAccessPolicyRuleCondition.cs b/src/Okta.Sdk/Model/DeviceAccessPolicyRuleCondition.cs index aa8b35b9b..bf29dd8b9 100644 --- a/src/Okta.Sdk/Model/DeviceAccessPolicyRuleCondition.cs +++ b/src/Okta.Sdk/Model/DeviceAccessPolicyRuleCondition.cs @@ -71,6 +71,12 @@ public partial class DeviceAccessPolicyRuleCondition : IEquatable + /// Gets or Sets Assurance + /// + [DataMember(Name = "assurance", EmitDefaultValue = true)] + public DevicePolicyRuleConditionAssurance Assurance { get; set; } + /// /// Returns the string presentation of the object /// @@ -85,6 +91,7 @@ public override string ToString() sb.Append(" TrustLevel: ").Append(TrustLevel).Append("\n"); sb.Append(" Managed: ").Append(Managed).Append("\n"); sb.Append(" Registered: ").Append(Registered).Append("\n"); + sb.Append(" Assurance: ").Append(Assurance).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -144,6 +151,11 @@ public bool Equals(DeviceAccessPolicyRuleCondition input) ( this.Registered == input.Registered || this.Registered.Equals(input.Registered) + ) && + ( + this.Assurance == input.Assurance || + (this.Assurance != null && + this.Assurance.Equals(input.Assurance)) ); } @@ -169,6 +181,10 @@ public override int GetHashCode() } hashCode = (hashCode * 59) + this.Managed.GetHashCode(); hashCode = (hashCode * 59) + this.Registered.GetHashCode(); + if (this.Assurance != null) + { + hashCode = (hashCode * 59) + this.Assurance.GetHashCode(); + } return hashCode; } } diff --git a/src/Okta.Sdk/Model/DevicePolicyRuleConditionAssurance.cs b/src/Okta.Sdk/Model/DevicePolicyRuleConditionAssurance.cs new file mode 100644 index 000000000..37f6ec3bc --- /dev/null +++ b/src/Okta.Sdk/Model/DevicePolicyRuleConditionAssurance.cs @@ -0,0 +1,115 @@ +/* + * Okta Admin Management + * + * Allows customers to easily access the Okta Management APIs + * + * The version of the OpenAPI document: 5.1.0 + * Contact: devex-public@okta.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = Okta.Sdk.Client.OpenAPIDateConverter; + +namespace Okta.Sdk.Model +{ + /// + /// Template: ModelGeneric + /// DevicePolicyRuleConditionAssurance + /// + [DataContract(Name = "DevicePolicyRuleConditionAssurance")] + + public partial class DevicePolicyRuleConditionAssurance : IEquatable + { + + /// + /// Gets or Sets Include + /// + [DataMember(Name = "include", EmitDefaultValue = true)] + public List Include { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class DevicePolicyRuleConditionAssurance {\n"); + sb.Append(" Include: ").Append(Include).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as DevicePolicyRuleConditionAssurance); + } + + /// + /// Returns true if DevicePolicyRuleConditionAssurance instances are equal + /// + /// Instance of DevicePolicyRuleConditionAssurance to be compared + /// Boolean + public bool Equals(DevicePolicyRuleConditionAssurance input) + { + if (input == null) + { + return false; + } + return + ( + this.Include == input.Include || + this.Include != null && + input.Include != null && + this.Include.SequenceEqual(input.Include) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + + if (this.Include != null) + { + hashCode = (hashCode * 59) + this.Include.GetHashCode(); + } + return hashCode; + } + } + + } + +} diff --git a/src/Okta.Sdk/Model/GrantTypePolicyRuleCondition.cs b/src/Okta.Sdk/Model/GrantTypePolicyRuleCondition.cs index 4e1bf8754..34120c2a6 100644 --- a/src/Okta.Sdk/Model/GrantTypePolicyRuleCondition.cs +++ b/src/Okta.Sdk/Model/GrantTypePolicyRuleCondition.cs @@ -27,7 +27,7 @@ namespace Okta.Sdk.Model { /// /// Template: ModelGeneric - /// GrantTypePolicyRuleCondition + /// Array of grant types that this condition includes. Determines the mechanism that Okta uses to authorize the creation of the tokens. /// [DataContract(Name = "GrantTypePolicyRuleCondition")] @@ -35,8 +35,9 @@ public partial class GrantTypePolicyRuleCondition : IEquatable - /// Gets or Sets Include + /// Array of grant types thagt this condition includes. /// + /// Array of grant types thagt this condition includes. [DataMember(Name = "include", EmitDefaultValue = true)] public List Include { get; set; } diff --git a/src/Okta.Sdk/Model/GroupCondition.cs b/src/Okta.Sdk/Model/GroupCondition.cs index 9f9089140..5d2753fd7 100644 --- a/src/Okta.Sdk/Model/GroupCondition.cs +++ b/src/Okta.Sdk/Model/GroupCondition.cs @@ -27,7 +27,7 @@ namespace Okta.Sdk.Model { /// /// Template: ModelGeneric - /// GroupCondition + /// Specifies a set of Groups whose Users are to be included or excluded /// [DataContract(Name = "GroupCondition")] @@ -35,14 +35,16 @@ public partial class GroupCondition : IEquatable { /// - /// Gets or Sets Exclude + /// Groups to be excluded /// + /// Groups to be excluded [DataMember(Name = "exclude", EmitDefaultValue = true)] public List Exclude { get; set; } /// - /// Gets or Sets Include + /// Groups to be included /// + /// Groups to be included [DataMember(Name = "include", EmitDefaultValue = true)] public List Include { get; set; } diff --git a/src/Okta.Sdk/Model/GroupPolicyRuleCondition.cs b/src/Okta.Sdk/Model/GroupPolicyRuleCondition.cs index c39a3707c..c7bec7a16 100644 --- a/src/Okta.Sdk/Model/GroupPolicyRuleCondition.cs +++ b/src/Okta.Sdk/Model/GroupPolicyRuleCondition.cs @@ -27,7 +27,7 @@ namespace Okta.Sdk.Model { /// /// Template: ModelGeneric - /// GroupPolicyRuleCondition + /// Specifies a set of Groups whose Users are to be included or excluded /// [DataContract(Name = "GroupPolicyRuleCondition")] @@ -35,14 +35,16 @@ public partial class GroupPolicyRuleCondition : IEquatable - /// Gets or Sets Exclude + /// Groups to be excluded /// + /// Groups to be excluded [DataMember(Name = "exclude", EmitDefaultValue = true)] public List Exclude { get; set; } /// - /// Gets or Sets Include + /// Groups to be included /// + /// Groups to be included [DataMember(Name = "include", EmitDefaultValue = true)] public List Include { get; set; } diff --git a/src/Okta.Sdk/Model/HrefObjectMappingsLink.cs b/src/Okta.Sdk/Model/HrefObjectMappingsLink.cs new file mode 100644 index 000000000..4f5ba065f --- /dev/null +++ b/src/Okta.Sdk/Model/HrefObjectMappingsLink.cs @@ -0,0 +1,170 @@ +/* + * Okta Admin Management + * + * Allows customers to easily access the Okta Management APIs + * + * The version of the OpenAPI document: 5.1.0 + * Contact: devex-public@okta.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = Okta.Sdk.Client.OpenAPIDateConverter; + +namespace Okta.Sdk.Model +{ + /// + /// Template: ModelGeneric + /// HrefObjectMappingsLink + /// + [DataContract(Name = "HrefObjectMappingsLink")] + + public partial class HrefObjectMappingsLink : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + public HrefObjectMappingsLink() { } + + /// + /// Gets or Sets Hints + /// + [DataMember(Name = "hints", EmitDefaultValue = true)] + public HrefObjectHints Hints { get; set; } + + /// + /// Link URI + /// + /// Link URI + [DataMember(Name = "href", EmitDefaultValue = true)] + public string Href { get; set; } + + /// + /// Link name + /// + /// Link name + [DataMember(Name = "name", EmitDefaultValue = true)] + public string Name { get; set; } + + /// + /// The media type of the link. If omitted, it is implicitly `application/json`. + /// + /// The media type of the link. If omitted, it is implicitly `application/json`. + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class HrefObjectMappingsLink {\n"); + sb.Append(" Hints: ").Append(Hints).Append("\n"); + sb.Append(" Href: ").Append(Href).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as HrefObjectMappingsLink); + } + + /// + /// Returns true if HrefObjectMappingsLink instances are equal + /// + /// Instance of HrefObjectMappingsLink to be compared + /// Boolean + public bool Equals(HrefObjectMappingsLink input) + { + if (input == null) + { + return false; + } + return + ( + this.Hints == input.Hints || + (this.Hints != null && + this.Hints.Equals(input.Hints)) + ) && + ( + this.Href == input.Href || + (this.Href != null && + this.Href.Equals(input.Href)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + + if (this.Hints != null) + { + hashCode = (hashCode * 59) + this.Hints.GetHashCode(); + } + if (this.Href != null) + { + hashCode = (hashCode * 59) + this.Href.GetHashCode(); + } + if (this.Name != null) + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } + if (this.Type != null) + { + hashCode = (hashCode * 59) + this.Type.GetHashCode(); + } + return hashCode; + } + } + + } + +} diff --git a/src/Okta.Sdk/Model/HrefObjectRulesLink.cs b/src/Okta.Sdk/Model/HrefObjectRulesLink.cs new file mode 100644 index 000000000..c8287cebf --- /dev/null +++ b/src/Okta.Sdk/Model/HrefObjectRulesLink.cs @@ -0,0 +1,170 @@ +/* + * Okta Admin Management + * + * Allows customers to easily access the Okta Management APIs + * + * The version of the OpenAPI document: 5.1.0 + * Contact: devex-public@okta.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = Okta.Sdk.Client.OpenAPIDateConverter; + +namespace Okta.Sdk.Model +{ + /// + /// Template: ModelGeneric + /// HrefObjectRulesLink + /// + [DataContract(Name = "HrefObjectRulesLink")] + + public partial class HrefObjectRulesLink : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + public HrefObjectRulesLink() { } + + /// + /// Gets or Sets Hints + /// + [DataMember(Name = "hints", EmitDefaultValue = true)] + public HrefObjectHints Hints { get; set; } + + /// + /// Link URI + /// + /// Link URI + [DataMember(Name = "href", EmitDefaultValue = true)] + public string Href { get; set; } + + /// + /// Link name + /// + /// Link name + [DataMember(Name = "name", EmitDefaultValue = true)] + public string Name { get; set; } + + /// + /// The media type of the link. If omitted, it is implicitly `application/json`. + /// + /// The media type of the link. If omitted, it is implicitly `application/json`. + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class HrefObjectRulesLink {\n"); + sb.Append(" Hints: ").Append(Hints).Append("\n"); + sb.Append(" Href: ").Append(Href).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as HrefObjectRulesLink); + } + + /// + /// Returns true if HrefObjectRulesLink instances are equal + /// + /// Instance of HrefObjectRulesLink to be compared + /// Boolean + public bool Equals(HrefObjectRulesLink input) + { + if (input == null) + { + return false; + } + return + ( + this.Hints == input.Hints || + (this.Hints != null && + this.Hints.Equals(input.Hints)) + ) && + ( + this.Href == input.Href || + (this.Href != null && + this.Href.Equals(input.Href)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + + if (this.Hints != null) + { + hashCode = (hashCode * 59) + this.Hints.GetHashCode(); + } + if (this.Href != null) + { + hashCode = (hashCode * 59) + this.Href.GetHashCode(); + } + if (this.Name != null) + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } + if (this.Type != null) + { + hashCode = (hashCode * 59) + this.Type.GetHashCode(); + } + return hashCode; + } + } + + } + +} diff --git a/src/Okta.Sdk/Model/IdentityProviderPolicy.cs b/src/Okta.Sdk/Model/IdentityProviderPolicy.cs index 287213a91..71979f5db 100644 --- a/src/Okta.Sdk/Model/IdentityProviderPolicy.cs +++ b/src/Okta.Sdk/Model/IdentityProviderPolicy.cs @@ -21,7 +21,6 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; using OpenAPIDateConverter = Okta.Sdk.Client.OpenAPIDateConverter; namespace Okta.Sdk.Model @@ -31,15 +30,8 @@ namespace Okta.Sdk.Model /// IdentityProviderPolicy /// [DataContract(Name = "IdentityProviderPolicy")] - [JsonConverter(typeof(JsonSubtypes), "Type")] - [JsonSubtypes.KnownSubType(typeof(AccessPolicy), "ACCESS_POLICY")] - [JsonSubtypes.KnownSubType(typeof(IdentityProviderPolicy), "IDP_DISCOVERY")] - [JsonSubtypes.KnownSubType(typeof(MultifactorEnrollmentPolicy), "MFA_ENROLL")] - [JsonSubtypes.KnownSubType(typeof(OktaSignOnPolicy), "OKTA_SIGN_ON")] - [JsonSubtypes.KnownSubType(typeof(PasswordPolicy), "PASSWORD")] - [JsonSubtypes.KnownSubType(typeof(ProfileEnrollmentPolicy), "PROFILE_ENROLLMENT")] - public partial class IdentityProviderPolicy : Policy, IEquatable + public partial class IdentityProviderPolicy : IEquatable { /// @@ -48,12 +40,6 @@ public partial class IdentityProviderPolicy : Policy, IEquatable - /// Gets or Sets Conditions - /// - [DataMember(Name = "conditions", EmitDefaultValue = true)] - public PolicyRuleConditions Conditions { get; set; } - /// /// Enable mapping AMR from IdP to Okta to downstream apps /// @@ -87,9 +73,7 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class IdentityProviderPolicy {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append(" AccountLink: ").Append(AccountLink).Append("\n"); - sb.Append(" Conditions: ").Append(Conditions).Append("\n"); sb.Append(" MapAMRClaims: ").Append(MapAMRClaims).Append("\n"); sb.Append(" MaxClockSkew: ").Append(MaxClockSkew).Append("\n"); sb.Append(" Provisioning: ").Append(Provisioning).Append("\n"); @@ -102,7 +86,7 @@ public override string ToString() /// Returns the JSON string presentation of the object /// /// JSON string presentation of the object - public override string ToJson() + public virtual string ToJson() { return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } @@ -122,36 +106,31 @@ public override bool Equals(object input) /// /// Instance of IdentityProviderPolicy to be compared /// Boolean - public bool Equals(IdentityProviderPolicy input) + public virtual bool Equals(IdentityProviderPolicy input) { if (input == null) { return false; } - return base.Equals(input) && + return ( this.AccountLink == input.AccountLink || (this.AccountLink != null && this.AccountLink.Equals(input.AccountLink)) - ) && base.Equals(input) && - ( - this.Conditions == input.Conditions || - (this.Conditions != null && - this.Conditions.Equals(input.Conditions)) - ) && base.Equals(input) && + ) && ( this.MapAMRClaims == input.MapAMRClaims || this.MapAMRClaims.Equals(input.MapAMRClaims) - ) && base.Equals(input) && + ) && ( this.MaxClockSkew == input.MaxClockSkew || this.MaxClockSkew.Equals(input.MaxClockSkew) - ) && base.Equals(input) && + ) && ( this.Provisioning == input.Provisioning || (this.Provisioning != null && this.Provisioning.Equals(input.Provisioning)) - ) && base.Equals(input) && + ) && ( this.Subject == input.Subject || (this.Subject != null && @@ -167,16 +146,12 @@ public override int GetHashCode() { unchecked // Overflow is fine, just wrap { - int hashCode = base.GetHashCode(); + int hashCode = 41; if (this.AccountLink != null) { hashCode = (hashCode * 59) + this.AccountLink.GetHashCode(); } - if (this.Conditions != null) - { - hashCode = (hashCode * 59) + this.Conditions.GetHashCode(); - } hashCode = (hashCode * 59) + this.MapAMRClaims.GetHashCode(); hashCode = (hashCode * 59) + this.MaxClockSkew.GetHashCode(); if (this.Provisioning != null) diff --git a/src/Okta.Sdk/Model/IdpDiscoveryPolicy.cs b/src/Okta.Sdk/Model/IdpDiscoveryPolicy.cs new file mode 100644 index 000000000..d82761348 --- /dev/null +++ b/src/Okta.Sdk/Model/IdpDiscoveryPolicy.cs @@ -0,0 +1,123 @@ +/* + * Okta Admin Management + * + * Allows customers to easily access the Okta Management APIs + * + * The version of the OpenAPI document: 5.1.0 + * Contact: devex-public@okta.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; +using OpenAPIDateConverter = Okta.Sdk.Client.OpenAPIDateConverter; + +namespace Okta.Sdk.Model +{ + /// + /// Template: ModelGeneric + /// IdpDiscoveryPolicy + /// + [DataContract(Name = "IdpDiscoveryPolicy")] + [JsonConverter(typeof(JsonSubtypes), "Type")] + [JsonSubtypes.KnownSubType(typeof(AccessPolicy), "ACCESS_POLICY")] + [JsonSubtypes.KnownSubType(typeof(IdpDiscoveryPolicy), "IDP_DISCOVERY")] + [JsonSubtypes.KnownSubType(typeof(MultifactorEnrollmentPolicy), "MFA_ENROLL")] + [JsonSubtypes.KnownSubType(typeof(OktaSignOnPolicy), "OKTA_SIGN_ON")] + [JsonSubtypes.KnownSubType(typeof(PasswordPolicy), "PASSWORD")] + [JsonSubtypes.KnownSubType(typeof(ProfileEnrollmentPolicy), "PROFILE_ENROLLMENT")] + + public partial class IdpDiscoveryPolicy : Policy, IEquatable + { + + /// + /// Gets or Sets Conditions + /// + [DataMember(Name = "conditions", EmitDefaultValue = true)] + public Object Conditions { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class IdpDiscoveryPolicy {\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" Conditions: ").Append(Conditions).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as IdpDiscoveryPolicy); + } + + /// + /// Returns true if IdpDiscoveryPolicy instances are equal + /// + /// Instance of IdpDiscoveryPolicy to be compared + /// Boolean + public bool Equals(IdpDiscoveryPolicy input) + { + if (input == null) + { + return false; + } + return base.Equals(input) && + ( + this.Conditions == input.Conditions || + (this.Conditions != null && + this.Conditions.Equals(input.Conditions)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + + if (this.Conditions != null) + { + hashCode = (hashCode * 59) + this.Conditions.GetHashCode(); + } + return hashCode; + } + } + + } + +} diff --git a/src/Okta.Sdk/Model/IdpDiscoveryPolicyRule.cs b/src/Okta.Sdk/Model/IdpDiscoveryPolicyRule.cs new file mode 100644 index 000000000..0774aea2f --- /dev/null +++ b/src/Okta.Sdk/Model/IdpDiscoveryPolicyRule.cs @@ -0,0 +1,139 @@ +/* + * Okta Admin Management + * + * Allows customers to easily access the Okta Management APIs + * + * The version of the OpenAPI document: 5.1.0 + * Contact: devex-public@okta.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; +using OpenAPIDateConverter = Okta.Sdk.Client.OpenAPIDateConverter; + +namespace Okta.Sdk.Model +{ + /// + /// Template: ModelGeneric + /// IdpDiscoveryPolicyRule + /// + [DataContract(Name = "IdpDiscoveryPolicyRule")] + [JsonConverter(typeof(JsonSubtypes), "Type")] + [JsonSubtypes.KnownSubType(typeof(AccessPolicyRule), "ACCESS_POLICY")] + [JsonSubtypes.KnownSubType(typeof(IdpDiscoveryPolicyRule), "IDP_DISCOVERY")] + [JsonSubtypes.KnownSubType(typeof(PasswordPolicyRule), "PASSWORD")] + [JsonSubtypes.KnownSubType(typeof(ProfileEnrollmentPolicyRule), "PROFILE_ENROLLMENT")] + [JsonSubtypes.KnownSubType(typeof(AuthorizationServerPolicyRule), "RESOURCE_ACCESS")] + [JsonSubtypes.KnownSubType(typeof(OktaSignOnPolicyRule), "SIGN_ON")] + + public partial class IdpDiscoveryPolicyRule : PolicyRule, IEquatable + { + + /// + /// Gets or Sets Actions + /// + [DataMember(Name = "actions", EmitDefaultValue = true)] + public IdpPolicyRuleAction Actions { get; set; } + + /// + /// Gets or Sets Conditions + /// + [DataMember(Name = "conditions", EmitDefaultValue = true)] + public IdpDiscoveryPolicyRuleCondition Conditions { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class IdpDiscoveryPolicyRule {\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" Actions: ").Append(Actions).Append("\n"); + sb.Append(" Conditions: ").Append(Conditions).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as IdpDiscoveryPolicyRule); + } + + /// + /// Returns true if IdpDiscoveryPolicyRule instances are equal + /// + /// Instance of IdpDiscoveryPolicyRule to be compared + /// Boolean + public bool Equals(IdpDiscoveryPolicyRule input) + { + if (input == null) + { + return false; + } + return base.Equals(input) && + ( + this.Actions == input.Actions || + (this.Actions != null && + this.Actions.Equals(input.Actions)) + ) && base.Equals(input) && + ( + this.Conditions == input.Conditions || + (this.Conditions != null && + this.Conditions.Equals(input.Conditions)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + + if (this.Actions != null) + { + hashCode = (hashCode * 59) + this.Actions.GetHashCode(); + } + if (this.Conditions != null) + { + hashCode = (hashCode * 59) + this.Conditions.GetHashCode(); + } + return hashCode; + } + } + + } + +} diff --git a/src/Okta.Sdk/Model/IdpDiscoveryPolicyRuleCondition.cs b/src/Okta.Sdk/Model/IdpDiscoveryPolicyRuleCondition.cs new file mode 100644 index 000000000..bbbc0abcc --- /dev/null +++ b/src/Okta.Sdk/Model/IdpDiscoveryPolicyRuleCondition.cs @@ -0,0 +1,162 @@ +/* + * Okta Admin Management + * + * Allows customers to easily access the Okta Management APIs + * + * The version of the OpenAPI document: 5.1.0 + * Contact: devex-public@okta.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = Okta.Sdk.Client.OpenAPIDateConverter; + +namespace Okta.Sdk.Model +{ + /// + /// Template: ModelGeneric + /// IdpDiscoveryPolicyRuleCondition + /// + [DataContract(Name = "IdpDiscoveryPolicyRuleCondition")] + + public partial class IdpDiscoveryPolicyRuleCondition : IEquatable + { + + /// + /// Gets or Sets App + /// + [DataMember(Name = "app", EmitDefaultValue = true)] + public AppAndInstancePolicyRuleCondition App { get; set; } + + /// + /// Gets or Sets Network + /// + [DataMember(Name = "network", EmitDefaultValue = true)] + public PolicyNetworkCondition Network { get; set; } + + /// + /// Gets or Sets UserIdentifier + /// + [DataMember(Name = "userIdentifier", EmitDefaultValue = true)] + public UserIdentifierPolicyRuleCondition UserIdentifier { get; set; } + + /// + /// Gets or Sets Platform + /// + [DataMember(Name = "platform", EmitDefaultValue = true)] + public PlatformPolicyRuleCondition Platform { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class IdpDiscoveryPolicyRuleCondition {\n"); + sb.Append(" App: ").Append(App).Append("\n"); + sb.Append(" Network: ").Append(Network).Append("\n"); + sb.Append(" UserIdentifier: ").Append(UserIdentifier).Append("\n"); + sb.Append(" Platform: ").Append(Platform).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as IdpDiscoveryPolicyRuleCondition); + } + + /// + /// Returns true if IdpDiscoveryPolicyRuleCondition instances are equal + /// + /// Instance of IdpDiscoveryPolicyRuleCondition to be compared + /// Boolean + public bool Equals(IdpDiscoveryPolicyRuleCondition input) + { + if (input == null) + { + return false; + } + return + ( + this.App == input.App || + (this.App != null && + this.App.Equals(input.App)) + ) && + ( + this.Network == input.Network || + (this.Network != null && + this.Network.Equals(input.Network)) + ) && + ( + this.UserIdentifier == input.UserIdentifier || + (this.UserIdentifier != null && + this.UserIdentifier.Equals(input.UserIdentifier)) + ) && + ( + this.Platform == input.Platform || + (this.Platform != null && + this.Platform.Equals(input.Platform)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + + if (this.App != null) + { + hashCode = (hashCode * 59) + this.App.GetHashCode(); + } + if (this.Network != null) + { + hashCode = (hashCode * 59) + this.Network.GetHashCode(); + } + if (this.UserIdentifier != null) + { + hashCode = (hashCode * 59) + this.UserIdentifier.GetHashCode(); + } + if (this.Platform != null) + { + hashCode = (hashCode * 59) + this.Platform.GetHashCode(); + } + return hashCode; + } + } + + } + +} diff --git a/src/Okta.Sdk/Model/IdpPolicyRuleAction.cs b/src/Okta.Sdk/Model/IdpPolicyRuleAction.cs index ccfc89e2f..95cc2c831 100644 --- a/src/Okta.Sdk/Model/IdpPolicyRuleAction.cs +++ b/src/Okta.Sdk/Model/IdpPolicyRuleAction.cs @@ -35,10 +35,10 @@ public partial class IdpPolicyRuleAction : IEquatable { /// - /// Gets or Sets Providers + /// Gets or Sets Idp /// - [DataMember(Name = "providers", EmitDefaultValue = true)] - public List Providers { get; set; } + [DataMember(Name = "idp", EmitDefaultValue = true)] + public IdpPolicyRuleActionIdp Idp { get; set; } /// /// Returns the string presentation of the object @@ -48,7 +48,7 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class IdpPolicyRuleAction {\n"); - sb.Append(" Providers: ").Append(Providers).Append("\n"); + sb.Append(" Idp: ").Append(Idp).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -85,10 +85,9 @@ public bool Equals(IdpPolicyRuleAction input) } return ( - this.Providers == input.Providers || - this.Providers != null && - input.Providers != null && - this.Providers.SequenceEqual(input.Providers) + this.Idp == input.Idp || + (this.Idp != null && + this.Idp.Equals(input.Idp)) ); } @@ -102,9 +101,9 @@ public override int GetHashCode() { int hashCode = 41; - if (this.Providers != null) + if (this.Idp != null) { - hashCode = (hashCode * 59) + this.Providers.GetHashCode(); + hashCode = (hashCode * 59) + this.Idp.GetHashCode(); } return hashCode; } diff --git a/src/Okta.Sdk/Model/IdpPolicyRuleActionIdp.cs b/src/Okta.Sdk/Model/IdpPolicyRuleActionIdp.cs new file mode 100644 index 000000000..4aed7a3e5 --- /dev/null +++ b/src/Okta.Sdk/Model/IdpPolicyRuleActionIdp.cs @@ -0,0 +1,150 @@ +/* + * Okta Admin Management + * + * Allows customers to easily access the Okta Management APIs + * + * The version of the OpenAPI document: 5.1.0 + * Contact: devex-public@okta.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = Okta.Sdk.Client.OpenAPIDateConverter; + +namespace Okta.Sdk.Model +{ + /// + /// Template: ModelGeneric + /// IdpPolicyRuleActionIdp + /// + [DataContract(Name = "IdpPolicyRuleAction_idp")] + + public partial class IdpPolicyRuleActionIdp : IEquatable + { + + /// + /// Gets or Sets IdpSelectionType + /// + [DataMember(Name = "idpSelectionType", EmitDefaultValue = true)] + + public IdpSelectionType IdpSelectionType { get; set; } + + /// + /// List of configured Identity Providers that a given Rule can route to. Ability to define multiple providers is a part of the Okta Identity Engine. This allows users to choose a Provider when they sign in. Contact support for information on the Identity Engine. + /// + /// List of configured Identity Providers that a given Rule can route to. Ability to define multiple providers is a part of the Okta Identity Engine. This allows users to choose a Provider when they sign in. Contact support for information on the Identity Engine. + [DataMember(Name = "providers", EmitDefaultValue = true)] + public List Providers { get; set; } + + /// + /// Required if `idpSelectionType` is set to `DYNAMIC` + /// + /// Required if `idpSelectionType` is set to `DYNAMIC` + [DataMember(Name = "matchCriteria", EmitDefaultValue = true)] + public List MatchCriteria { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class IdpPolicyRuleActionIdp {\n"); + sb.Append(" Providers: ").Append(Providers).Append("\n"); + sb.Append(" IdpSelectionType: ").Append(IdpSelectionType).Append("\n"); + sb.Append(" MatchCriteria: ").Append(MatchCriteria).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as IdpPolicyRuleActionIdp); + } + + /// + /// Returns true if IdpPolicyRuleActionIdp instances are equal + /// + /// Instance of IdpPolicyRuleActionIdp to be compared + /// Boolean + public bool Equals(IdpPolicyRuleActionIdp input) + { + if (input == null) + { + return false; + } + return + ( + this.Providers == input.Providers || + this.Providers != null && + input.Providers != null && + this.Providers.SequenceEqual(input.Providers) + ) && + ( + this.IdpSelectionType == input.IdpSelectionType || + this.IdpSelectionType.Equals(input.IdpSelectionType) + ) && + ( + this.MatchCriteria == input.MatchCriteria || + this.MatchCriteria != null && + input.MatchCriteria != null && + this.MatchCriteria.SequenceEqual(input.MatchCriteria) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + + if (this.Providers != null) + { + hashCode = (hashCode * 59) + this.Providers.GetHashCode(); + } + if (this.IdpSelectionType != null) + { + hashCode = (hashCode * 59) + this.IdpSelectionType.GetHashCode(); + } + if (this.MatchCriteria != null) + { + hashCode = (hashCode * 59) + this.MatchCriteria.GetHashCode(); + } + return hashCode; + } + } + + } + +} diff --git a/src/Okta.Sdk/Model/IdpPolicyRuleActionMatchCriteria.cs b/src/Okta.Sdk/Model/IdpPolicyRuleActionMatchCriteria.cs new file mode 100644 index 000000000..6d6ea7217 --- /dev/null +++ b/src/Okta.Sdk/Model/IdpPolicyRuleActionMatchCriteria.cs @@ -0,0 +1,132 @@ +/* + * Okta Admin Management + * + * Allows customers to easily access the Okta Management APIs + * + * The version of the OpenAPI document: 5.1.0 + * Contact: devex-public@okta.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = Okta.Sdk.Client.OpenAPIDateConverter; + +namespace Okta.Sdk.Model +{ + /// + /// Template: ModelGeneric + /// IdpPolicyRuleActionMatchCriteria + /// + [DataContract(Name = "IdpPolicyRuleActionMatchCriteria")] + + public partial class IdpPolicyRuleActionMatchCriteria : IEquatable + { + + /// + /// You can provide an Okta Expression Language expression with the Login Context that's evaluated with the IdP. For example, the value `login.identifier` refers to the user's username. If the user is signing in with the username `john.doe@mycompany.com`, the expression `login.identifier.substringAfter(@))` is evaluated to the domain name of the user, for example: `mycompany.com`. + /// + /// You can provide an Okta Expression Language expression with the Login Context that's evaluated with the IdP. For example, the value `login.identifier` refers to the user's username. If the user is signing in with the username `john.doe@mycompany.com`, the expression `login.identifier.substringAfter(@))` is evaluated to the domain name of the user, for example: `mycompany.com`. + [DataMember(Name = "providerExpression", EmitDefaultValue = true)] + public string ProviderExpression { get; set; } + + /// + /// The IdP property that the evaluated string should match to + /// + /// The IdP property that the evaluated string should match to + [DataMember(Name = "propertyName", EmitDefaultValue = true)] + public string PropertyName { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class IdpPolicyRuleActionMatchCriteria {\n"); + sb.Append(" ProviderExpression: ").Append(ProviderExpression).Append("\n"); + sb.Append(" PropertyName: ").Append(PropertyName).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as IdpPolicyRuleActionMatchCriteria); + } + + /// + /// Returns true if IdpPolicyRuleActionMatchCriteria instances are equal + /// + /// Instance of IdpPolicyRuleActionMatchCriteria to be compared + /// Boolean + public bool Equals(IdpPolicyRuleActionMatchCriteria input) + { + if (input == null) + { + return false; + } + return + ( + this.ProviderExpression == input.ProviderExpression || + (this.ProviderExpression != null && + this.ProviderExpression.Equals(input.ProviderExpression)) + ) && + ( + this.PropertyName == input.PropertyName || + (this.PropertyName != null && + this.PropertyName.Equals(input.PropertyName)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + + if (this.ProviderExpression != null) + { + hashCode = (hashCode * 59) + this.ProviderExpression.GetHashCode(); + } + if (this.PropertyName != null) + { + hashCode = (hashCode * 59) + this.PropertyName.GetHashCode(); + } + return hashCode; + } + } + + } + +} diff --git a/src/Okta.Sdk/Model/IdpPolicyRuleActionProvider.cs b/src/Okta.Sdk/Model/IdpPolicyRuleActionProvider.cs index e7529bc48..64183c4ee 100644 --- a/src/Okta.Sdk/Model/IdpPolicyRuleActionProvider.cs +++ b/src/Okta.Sdk/Model/IdpPolicyRuleActionProvider.cs @@ -33,26 +33,27 @@ namespace Okta.Sdk.Model public partial class IdpPolicyRuleActionProvider : IEquatable { + + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + + public IdentityProviderType Type { get; set; } /// - /// Gets or Sets Id + /// IdP types of `OKTA`, `AgentlessDSSO`, and `IWA` don't require an ID. /// + /// IdP types of `OKTA`, `AgentlessDSSO`, and `IWA` don't require an ID. [DataMember(Name = "id", EmitDefaultValue = true)] - public string Id { get; private set; } + public string Id { get; set; } /// - /// Returns false as Id should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeId() - { - return false; - } - /// - /// Gets or Sets Type + /// Provider `name` in Okta. Optional. Supported in `IDENTITY ENGINE`. /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public string Type { get; set; } + /// Provider `name` in Okta. Optional. Supported in `IDENTITY ENGINE`. + [DataMember(Name = "name", EmitDefaultValue = true)] + public string Name { get; set; } /// /// Returns the string presentation of the object @@ -63,6 +64,7 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class IdpPolicyRuleActionProvider {\n"); sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -104,10 +106,14 @@ public bool Equals(IdpPolicyRuleActionProvider input) (this.Id != null && this.Id.Equals(input.Id)) ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && ( this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) + this.Type.Equals(input.Type) ); } @@ -125,6 +131,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Id.GetHashCode(); } + if (this.Name != null) + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } if (this.Type != null) { hashCode = (hashCode * 59) + this.Type.GetHashCode(); diff --git a/src/Okta.Sdk/Model/IdpSelectionType.cs b/src/Okta.Sdk/Model/IdpSelectionType.cs new file mode 100644 index 000000000..64fb8c78b --- /dev/null +++ b/src/Okta.Sdk/Model/IdpSelectionType.cs @@ -0,0 +1,60 @@ +/* + * Okta Admin Management + * + * Allows customers to easily access the Okta Management APIs + * + * The version of the OpenAPI document: 5.1.0 + * Contact: devex-public@okta.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = Okta.Sdk.Client.OpenAPIDateConverter; + +namespace Okta.Sdk.Model +{ + /// + /// Defines IdpSelectionType + /// + [JsonConverter(typeof(StringEnumSerializingConverter))] + public sealed class IdpSelectionType : StringEnum + { + /// + /// StringEnum IdpSelectionType for value: DYNAMIC + /// + public static IdpSelectionType DYNAMIC = new IdpSelectionType("DYNAMIC"); + /// + /// StringEnum IdpSelectionType for value: SPECIFIC + /// + public static IdpSelectionType SPECIFIC = new IdpSelectionType("SPECIFIC"); + + /// + /// Implicit operator declaration to accept and convert a string value as a + /// + /// The value to use + public static implicit operator IdpSelectionType(string value) => new IdpSelectionType(value); + + /// + /// Creates a new instance. + /// + /// The value to use. + public IdpSelectionType(string value) + : base(value) + { + } + } + + +} diff --git a/src/Okta.Sdk/Model/KnowledgeConstraint.cs b/src/Okta.Sdk/Model/KnowledgeConstraint.cs index 8f516fe96..32ab81558 100644 --- a/src/Okta.Sdk/Model/KnowledgeConstraint.cs +++ b/src/Okta.Sdk/Model/KnowledgeConstraint.cs @@ -33,24 +33,218 @@ namespace Okta.Sdk.Model public partial class KnowledgeConstraint : IEquatable { - /// - /// Gets or Sets Methods + /// Defines Methods /// + [JsonConverter(typeof(StringEnumSerializingConverter))] + public sealed class MethodsEnum : StringEnum + { + /// + /// StringEnum PASSWORD for value: PASSWORD + /// + + public static MethodsEnum PASSWORD = new MethodsEnum("PASSWORD"); + + /// + /// StringEnum SECURITYQUESTION for value: SECURITY_QUESTION + /// + + public static MethodsEnum SECURITYQUESTION = new MethodsEnum("SECURITY_QUESTION"); + + /// + /// StringEnum SMS for value: SMS + /// + + public static MethodsEnum SMS = new MethodsEnum("SMS"); + + /// + /// StringEnum VOICE for value: VOICE + /// + + public static MethodsEnum VOICE = new MethodsEnum("VOICE"); + + /// + /// StringEnum EMAIL for value: EMAIL + /// + + public static MethodsEnum EMAIL = new MethodsEnum("EMAIL"); + + /// + /// StringEnum PUSH for value: PUSH + /// + + public static MethodsEnum PUSH = new MethodsEnum("PUSH"); + + /// + /// StringEnum SIGNEDNONCE for value: SIGNED_NONCE + /// + + public static MethodsEnum SIGNEDNONCE = new MethodsEnum("SIGNED_NONCE"); + + /// + /// StringEnum OTP for value: OTP + /// + + public static MethodsEnum OTP = new MethodsEnum("OTP"); + + /// + /// StringEnum TOTP for value: TOTP + /// + + public static MethodsEnum TOTP = new MethodsEnum("TOTP"); + + /// + /// StringEnum WEBAUTHN for value: WEBAUTHN + /// + + public static MethodsEnum WEBAUTHN = new MethodsEnum("WEBAUTHN"); + + /// + /// StringEnum DUO for value: DUO + /// + + public static MethodsEnum DUO = new MethodsEnum("DUO"); + + /// + /// StringEnum IDP for value: IDP + /// + + public static MethodsEnum IDP = new MethodsEnum("IDP"); + + /// + /// StringEnum CERT for value: CERT + /// + + public static MethodsEnum CERT = new MethodsEnum("CERT"); + + + /// + /// Implicit operator declaration to accept and convert a string value as a + /// + /// The value to use + public static implicit operator MethodsEnum(string value) => new MethodsEnum(value); + + /// + /// Creates a new instance. + /// + /// The value to use. + public MethodsEnum(string value) + : base(value) + { + } + } + + + + /// + /// The Authenticator methods that are permitted + /// + /// The Authenticator methods that are permitted [DataMember(Name = "methods", EmitDefaultValue = true)] - public List Methods { get; set; } + + public List Methods { get; set; } + /// + /// Defines Types + /// + [JsonConverter(typeof(StringEnumSerializingConverter))] + public sealed class TypesEnum : StringEnum + { + /// + /// StringEnum SECURITYKEY for value: SECURITY_KEY + /// + + public static TypesEnum SECURITYKEY = new TypesEnum("SECURITY_KEY"); + + /// + /// StringEnum PHONE for value: PHONE + /// + + public static TypesEnum PHONE = new TypesEnum("PHONE"); + + /// + /// StringEnum EMAIL for value: EMAIL + /// + + public static TypesEnum EMAIL = new TypesEnum("EMAIL"); + + /// + /// StringEnum PASSWORD for value: PASSWORD + /// + + public static TypesEnum PASSWORD = new TypesEnum("PASSWORD"); + + /// + /// StringEnum SECURITYQUESTION for value: SECURITY_QUESTION + /// + + public static TypesEnum SECURITYQUESTION = new TypesEnum("SECURITY_QUESTION"); + /// + /// StringEnum APP for value: APP + /// + + public static TypesEnum APP = new TypesEnum("APP"); + + /// + /// StringEnum FEDERATED for value: FEDERATED + /// + + public static TypesEnum FEDERATED = new TypesEnum("FEDERATED"); + + + /// + /// Implicit operator declaration to accept and convert a string value as a + /// + /// The value to use + public static implicit operator TypesEnum(string value) => new TypesEnum(value); + + /// + /// Creates a new instance. + /// + /// The value to use. + public TypesEnum(string value) + : base(value) + { + } + } + + + + /// + /// The Authenticator types that are permitted + /// + /// The Authenticator types that are permitted + [DataMember(Name = "types", EmitDefaultValue = true)] + + public List Types { get; set; } + /// - /// Gets or Sets ReauthenticateIn + /// The duration after which the user must re-authenticate regardless of user activity. This re-authentication interval overrides the Verification Method object's `reauthenticateIn` interval. The supported values use ISO 8601 period format for recurring time intervals (for example, `PT1H`). /// + /// The duration after which the user must re-authenticate regardless of user activity. This re-authentication interval overrides the Verification Method object's `reauthenticateIn` interval. The supported values use ISO 8601 period format for recurring time intervals (for example, `PT1H`). [DataMember(Name = "reauthenticateIn", EmitDefaultValue = true)] public string ReauthenticateIn { get; set; } /// - /// Gets or Sets Types + /// This property specifies the precise authenticator and method for authentication. /// - [DataMember(Name = "types", EmitDefaultValue = true)] - public List Types { get; set; } + /// This property specifies the precise authenticator and method for authentication. + [DataMember(Name = "authenticationMethods", EmitDefaultValue = true)] + public List AuthenticationMethods { get; set; } + + /// + /// This property specifies the precise authenticator and method to exclude from authentication. + /// + /// This property specifies the precise authenticator and method to exclude from authentication. + [DataMember(Name = "excludedAuthenticationMethods", EmitDefaultValue = true)] + public List ExcludedAuthenticationMethods { get; set; } + + /// + /// This property indicates whether the knowledge or possession factor is required by the assurance. It's optional in the request, but is always returned in the response. By default, this field is `true`. If the knowledge or possession constraint has values for`excludedAuthenticationMethods` the `required` value is false. + /// + /// This property indicates whether the knowledge or possession factor is required by the assurance. It's optional in the request, but is always returned in the response. By default, this field is `true`. If the knowledge or possession constraint has values for`excludedAuthenticationMethods` the `required` value is false. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } /// /// Returns the string presentation of the object @@ -63,6 +257,9 @@ public override string ToString() sb.Append(" Methods: ").Append(Methods).Append("\n"); sb.Append(" ReauthenticateIn: ").Append(ReauthenticateIn).Append("\n"); sb.Append(" Types: ").Append(Types).Append("\n"); + sb.Append(" AuthenticationMethods: ").Append(AuthenticationMethods).Append("\n"); + sb.Append(" ExcludedAuthenticationMethods: ").Append(ExcludedAuthenticationMethods).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -100,8 +297,6 @@ public bool Equals(KnowledgeConstraint input) return ( this.Methods == input.Methods || - this.Methods != null && - input.Methods != null && this.Methods.SequenceEqual(input.Methods) ) && ( @@ -111,9 +306,23 @@ public bool Equals(KnowledgeConstraint input) ) && ( this.Types == input.Types || - this.Types != null && - input.Types != null && this.Types.SequenceEqual(input.Types) + ) && + ( + this.AuthenticationMethods == input.AuthenticationMethods || + this.AuthenticationMethods != null && + input.AuthenticationMethods != null && + this.AuthenticationMethods.SequenceEqual(input.AuthenticationMethods) + ) && + ( + this.ExcludedAuthenticationMethods == input.ExcludedAuthenticationMethods || + this.ExcludedAuthenticationMethods != null && + input.ExcludedAuthenticationMethods != null && + this.ExcludedAuthenticationMethods.SequenceEqual(input.ExcludedAuthenticationMethods) + ) && + ( + this.Required == input.Required || + this.Required.Equals(input.Required) ); } @@ -139,6 +348,15 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Types.GetHashCode(); } + if (this.AuthenticationMethods != null) + { + hashCode = (hashCode * 59) + this.AuthenticationMethods.GetHashCode(); + } + if (this.ExcludedAuthenticationMethods != null) + { + hashCode = (hashCode * 59) + this.ExcludedAuthenticationMethods.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Required.GetHashCode(); return hashCode; } } diff --git a/src/Okta.Sdk/Model/MultifactorEnrollmentPolicy.cs b/src/Okta.Sdk/Model/MultifactorEnrollmentPolicy.cs index cc9b83be8..9aec9a7c7 100644 --- a/src/Okta.Sdk/Model/MultifactorEnrollmentPolicy.cs +++ b/src/Okta.Sdk/Model/MultifactorEnrollmentPolicy.cs @@ -33,7 +33,7 @@ namespace Okta.Sdk.Model [DataContract(Name = "MultifactorEnrollmentPolicy")] [JsonConverter(typeof(JsonSubtypes), "Type")] [JsonSubtypes.KnownSubType(typeof(AccessPolicy), "ACCESS_POLICY")] - [JsonSubtypes.KnownSubType(typeof(IdentityProviderPolicy), "IDP_DISCOVERY")] + [JsonSubtypes.KnownSubType(typeof(IdpDiscoveryPolicy), "IDP_DISCOVERY")] [JsonSubtypes.KnownSubType(typeof(MultifactorEnrollmentPolicy), "MFA_ENROLL")] [JsonSubtypes.KnownSubType(typeof(OktaSignOnPolicy), "OKTA_SIGN_ON")] [JsonSubtypes.KnownSubType(typeof(PasswordPolicy), "PASSWORD")] diff --git a/src/Okta.Sdk/Model/OktaSignOnPolicy.cs b/src/Okta.Sdk/Model/OktaSignOnPolicy.cs index 95752f989..97e6863d8 100644 --- a/src/Okta.Sdk/Model/OktaSignOnPolicy.cs +++ b/src/Okta.Sdk/Model/OktaSignOnPolicy.cs @@ -33,7 +33,7 @@ namespace Okta.Sdk.Model [DataContract(Name = "OktaSignOnPolicy")] [JsonConverter(typeof(JsonSubtypes), "Type")] [JsonSubtypes.KnownSubType(typeof(AccessPolicy), "ACCESS_POLICY")] - [JsonSubtypes.KnownSubType(typeof(IdentityProviderPolicy), "IDP_DISCOVERY")] + [JsonSubtypes.KnownSubType(typeof(IdpDiscoveryPolicy), "IDP_DISCOVERY")] [JsonSubtypes.KnownSubType(typeof(MultifactorEnrollmentPolicy), "MFA_ENROLL")] [JsonSubtypes.KnownSubType(typeof(OktaSignOnPolicy), "OKTA_SIGN_ON")] [JsonSubtypes.KnownSubType(typeof(PasswordPolicy), "PASSWORD")] diff --git a/src/Okta.Sdk/Model/OktaSignOnPolicyRule.cs b/src/Okta.Sdk/Model/OktaSignOnPolicyRule.cs index b631c4324..0372ea0eb 100644 --- a/src/Okta.Sdk/Model/OktaSignOnPolicyRule.cs +++ b/src/Okta.Sdk/Model/OktaSignOnPolicyRule.cs @@ -33,6 +33,7 @@ namespace Okta.Sdk.Model [DataContract(Name = "OktaSignOnPolicyRule")] [JsonConverter(typeof(JsonSubtypes), "Type")] [JsonSubtypes.KnownSubType(typeof(AccessPolicyRule), "ACCESS_POLICY")] + [JsonSubtypes.KnownSubType(typeof(IdpDiscoveryPolicyRule), "IDP_DISCOVERY")] [JsonSubtypes.KnownSubType(typeof(PasswordPolicyRule), "PASSWORD")] [JsonSubtypes.KnownSubType(typeof(ProfileEnrollmentPolicyRule), "PROFILE_ENROLLMENT")] [JsonSubtypes.KnownSubType(typeof(AuthorizationServerPolicyRule), "RESOURCE_ACCESS")] diff --git a/src/Okta.Sdk/Model/PasswordPolicy.cs b/src/Okta.Sdk/Model/PasswordPolicy.cs index 139d782f4..f019f3388 100644 --- a/src/Okta.Sdk/Model/PasswordPolicy.cs +++ b/src/Okta.Sdk/Model/PasswordPolicy.cs @@ -33,7 +33,7 @@ namespace Okta.Sdk.Model [DataContract(Name = "PasswordPolicy")] [JsonConverter(typeof(JsonSubtypes), "Type")] [JsonSubtypes.KnownSubType(typeof(AccessPolicy), "ACCESS_POLICY")] - [JsonSubtypes.KnownSubType(typeof(IdentityProviderPolicy), "IDP_DISCOVERY")] + [JsonSubtypes.KnownSubType(typeof(IdpDiscoveryPolicy), "IDP_DISCOVERY")] [JsonSubtypes.KnownSubType(typeof(MultifactorEnrollmentPolicy), "MFA_ENROLL")] [JsonSubtypes.KnownSubType(typeof(OktaSignOnPolicy), "OKTA_SIGN_ON")] [JsonSubtypes.KnownSubType(typeof(PasswordPolicy), "PASSWORD")] diff --git a/src/Okta.Sdk/Model/PasswordPolicyRule.cs b/src/Okta.Sdk/Model/PasswordPolicyRule.cs index 70f86492f..dab40ce28 100644 --- a/src/Okta.Sdk/Model/PasswordPolicyRule.cs +++ b/src/Okta.Sdk/Model/PasswordPolicyRule.cs @@ -33,6 +33,7 @@ namespace Okta.Sdk.Model [DataContract(Name = "PasswordPolicyRule")] [JsonConverter(typeof(JsonSubtypes), "Type")] [JsonSubtypes.KnownSubType(typeof(AccessPolicyRule), "ACCESS_POLICY")] + [JsonSubtypes.KnownSubType(typeof(IdpDiscoveryPolicyRule), "IDP_DISCOVERY")] [JsonSubtypes.KnownSubType(typeof(PasswordPolicyRule), "PASSWORD")] [JsonSubtypes.KnownSubType(typeof(ProfileEnrollmentPolicyRule), "PROFILE_ENROLLMENT")] [JsonSubtypes.KnownSubType(typeof(AuthorizationServerPolicyRule), "RESOURCE_ACCESS")] diff --git a/src/Okta.Sdk/Model/Policy.cs b/src/Okta.Sdk/Model/Policy.cs index 4f6b40986..fc7ea3822 100644 --- a/src/Okta.Sdk/Model/Policy.cs +++ b/src/Okta.Sdk/Model/Policy.cs @@ -35,8 +35,8 @@ namespace Okta.Sdk.Model [JsonSubtypes.KnownSubType(typeof(AccessPolicy), "ACCESS_POLICY")] [JsonSubtypes.KnownSubType(typeof(AccessPolicy), "AccessPolicy")] [JsonSubtypes.KnownSubType(typeof(AuthorizationServerPolicy), "AuthorizationServerPolicy")] - [JsonSubtypes.KnownSubType(typeof(IdentityProviderPolicy), "IDP_DISCOVERY")] - [JsonSubtypes.KnownSubType(typeof(IdentityProviderPolicy), "IdentityProviderPolicy")] + [JsonSubtypes.KnownSubType(typeof(IdpDiscoveryPolicy), "IDP_DISCOVERY")] + [JsonSubtypes.KnownSubType(typeof(IdpDiscoveryPolicy), "IdpDiscoveryPolicy")] [JsonSubtypes.KnownSubType(typeof(MultifactorEnrollmentPolicy), "MFA_ENROLL")] [JsonSubtypes.KnownSubType(typeof(MultifactorEnrollmentPolicy), "MultifactorEnrollmentPolicy")] [JsonSubtypes.KnownSubType(typeof(OktaSignOnPolicy), "OKTA_SIGN_ON")] @@ -64,8 +64,9 @@ public partial class Policy : IEquatable public PolicyType Type { get; set; } /// - /// Gets or Sets Created + /// Timestamp when the Policy was created /// + /// Timestamp when the Policy was created [DataMember(Name = "created", EmitDefaultValue = true)] public DateTimeOffset Created { get; private set; } @@ -78,14 +79,16 @@ public bool ShouldSerializeCreated() return false; } /// - /// Gets or Sets Description + /// Policy description /// + /// Policy description [DataMember(Name = "description", EmitDefaultValue = true)] public string Description { get; set; } /// - /// Gets or Sets Id + /// Policy ID /// + /// Policy ID [DataMember(Name = "id", EmitDefaultValue = true)] public string Id { get; private set; } @@ -98,8 +101,9 @@ public bool ShouldSerializeId() return false; } /// - /// Gets or Sets LastUpdated + /// Timestamp when the Policy was last updated /// + /// Timestamp when the Policy was last updated [DataMember(Name = "lastUpdated", EmitDefaultValue = true)] public DateTimeOffset LastUpdated { get; private set; } @@ -112,20 +116,23 @@ public bool ShouldSerializeLastUpdated() return false; } /// - /// Gets or Sets Name + /// Policy name /// + /// Policy name [DataMember(Name = "name", EmitDefaultValue = true)] public string Name { get; set; } /// - /// Gets or Sets Priority + /// Specifies the order in which this Policy is evaluated in relation to the other policies /// + /// Specifies the order in which this Policy is evaluated in relation to the other policies [DataMember(Name = "priority", EmitDefaultValue = true)] public int Priority { get; set; } /// - /// Gets or Sets System + /// Specifies whether Okta created the Policy /// + /// Specifies whether Okta created the Policy [DataMember(Name = "system", EmitDefaultValue = true)] public bool System { get; set; } @@ -147,7 +154,7 @@ public bool ShouldSerializeEmbedded() /// Gets or Sets Links /// [DataMember(Name = "_links", EmitDefaultValue = true)] - public LinksSelf Links { get; set; } + public PolicyLinks Links { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Okta.Sdk/Model/PolicyCanBeCreatedOrReplaced.cs b/src/Okta.Sdk/Model/PolicyCanBeCreatedOrReplaced.cs new file mode 100644 index 000000000..6d4616584 --- /dev/null +++ b/src/Okta.Sdk/Model/PolicyCanBeCreatedOrReplaced.cs @@ -0,0 +1,313 @@ +/* + * Okta Admin Management + * + * Allows customers to easily access the Okta Management APIs + * + * The version of the OpenAPI document: 5.1.0 + * Contact: devex-public@okta.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; +using OpenAPIDateConverter = Okta.Sdk.Client.OpenAPIDateConverter; + +namespace Okta.Sdk.Model +{ + /// + /// Template: ModelGeneric + /// PolicyCanBeCreatedOrReplaced + /// + [DataContract(Name = "PolicyCanBeCreatedOrReplaced")] + [JsonConverter(typeof(JsonSubtypes), "Type")] + [JsonSubtypes.KnownSubType(typeof(AccessPolicy), "ACCESS_POLICY")] + [JsonSubtypes.KnownSubType(typeof(MultifactorEnrollmentPolicy), "MFA_ENROLL")] + [JsonSubtypes.KnownSubType(typeof(OktaSignOnPolicy), "OKTA_SIGN_ON")] + [JsonSubtypes.KnownSubType(typeof(PasswordPolicy), "PASSWORD")] + [JsonSubtypes.KnownSubType(typeof(ProfileEnrollmentPolicy), "PROFILE_ENROLLMENT")] + + public partial class PolicyCanBeCreatedOrReplaced : IEquatable + { + + /// + /// Gets or Sets Status + /// + [DataMember(Name = "status", EmitDefaultValue = true)] + + public LifecycleStatus Status { get; set; } + + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + + public PolicyType Type { get; set; } + + /// + /// Timestamp when the Policy was created + /// + /// Timestamp when the Policy was created + [DataMember(Name = "created", EmitDefaultValue = true)] + public DateTimeOffset Created { get; private set; } + + /// + /// Returns false as Created should not be serialized given that it's read-only. + /// + /// false (boolean) + public bool ShouldSerializeCreated() + { + return false; + } + /// + /// Policy description + /// + /// Policy description + [DataMember(Name = "description", EmitDefaultValue = true)] + public string Description { get; set; } + + /// + /// Policy ID + /// + /// Policy ID + [DataMember(Name = "id", EmitDefaultValue = true)] + public string Id { get; private set; } + + /// + /// Returns false as Id should not be serialized given that it's read-only. + /// + /// false (boolean) + public bool ShouldSerializeId() + { + return false; + } + /// + /// Timestamp when the Policy was last updated + /// + /// Timestamp when the Policy was last updated + [DataMember(Name = "lastUpdated", EmitDefaultValue = true)] + public DateTimeOffset LastUpdated { get; private set; } + + /// + /// Returns false as LastUpdated should not be serialized given that it's read-only. + /// + /// false (boolean) + public bool ShouldSerializeLastUpdated() + { + return false; + } + /// + /// Policy name + /// + /// Policy name + [DataMember(Name = "name", EmitDefaultValue = true)] + public string Name { get; set; } + + /// + /// Specifies the order in which this Policy is evaluated in relation to the other policies + /// + /// Specifies the order in which this Policy is evaluated in relation to the other policies + [DataMember(Name = "priority", EmitDefaultValue = true)] + public int Priority { get; set; } + + /// + /// Specifies whether Okta created the Policy + /// + /// Specifies whether Okta created the Policy + [DataMember(Name = "system", EmitDefaultValue = true)] + public bool System { get; set; } + + /// + /// Gets or Sets Embedded + /// + [DataMember(Name = "_embedded", EmitDefaultValue = true)] + public Dictionary Embedded { get; private set; } + + /// + /// Returns false as Embedded should not be serialized given that it's read-only. + /// + /// false (boolean) + public bool ShouldSerializeEmbedded() + { + return false; + } + /// + /// Gets or Sets Links + /// + [DataMember(Name = "_links", EmitDefaultValue = true)] + public LinksSelf Links { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PolicyCanBeCreatedOrReplaced {\n"); + sb.Append(" Created: ").Append(Created).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" LastUpdated: ").Append(LastUpdated).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Priority: ").Append(Priority).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" System: ").Append(System).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Embedded: ").Append(Embedded).Append("\n"); + sb.Append(" Links: ").Append(Links).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PolicyCanBeCreatedOrReplaced); + } + + /// + /// Returns true if PolicyCanBeCreatedOrReplaced instances are equal + /// + /// Instance of PolicyCanBeCreatedOrReplaced to be compared + /// Boolean + public bool Equals(PolicyCanBeCreatedOrReplaced input) + { + if (input == null) + { + return false; + } + return + ( + this.Created == input.Created || + (this.Created != null && + this.Created.Equals(input.Created)) + ) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ) && + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.LastUpdated == input.LastUpdated || + (this.LastUpdated != null && + this.LastUpdated.Equals(input.LastUpdated)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Priority == input.Priority || + this.Priority.Equals(input.Priority) + ) && + ( + this.Status == input.Status || + this.Status.Equals(input.Status) + ) && + ( + this.System == input.System || + this.System.Equals(input.System) + ) && + ( + this.Type == input.Type || + this.Type.Equals(input.Type) + ) && + ( + this.Embedded == input.Embedded || + this.Embedded != null && + input.Embedded != null && + this.Embedded.SequenceEqual(input.Embedded) + ) && + ( + this.Links == input.Links || + (this.Links != null && + this.Links.Equals(input.Links)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + + if (this.Created != null) + { + hashCode = (hashCode * 59) + this.Created.GetHashCode(); + } + if (this.Description != null) + { + hashCode = (hashCode * 59) + this.Description.GetHashCode(); + } + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.LastUpdated != null) + { + hashCode = (hashCode * 59) + this.LastUpdated.GetHashCode(); + } + if (this.Name != null) + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Priority.GetHashCode(); + if (this.Status != null) + { + hashCode = (hashCode * 59) + this.Status.GetHashCode(); + } + hashCode = (hashCode * 59) + this.System.GetHashCode(); + if (this.Type != null) + { + hashCode = (hashCode * 59) + this.Type.GetHashCode(); + } + if (this.Embedded != null) + { + hashCode = (hashCode * 59) + this.Embedded.GetHashCode(); + } + if (this.Links != null) + { + hashCode = (hashCode * 59) + this.Links.GetHashCode(); + } + return hashCode; + } + } + + } + +} diff --git a/src/Okta.Sdk/Model/PolicyContext.cs b/src/Okta.Sdk/Model/PolicyContext.cs index c89d35a69..ca77af05e 100644 --- a/src/Okta.Sdk/Model/PolicyContext.cs +++ b/src/Okta.Sdk/Model/PolicyContext.cs @@ -40,24 +40,16 @@ public partial class PolicyContext : IEquatable public PolicyContext() { } /// - /// Gets or Sets Device + /// Gets or Sets User /// - [DataMember(Name = "device", EmitDefaultValue = true)] - public PolicyContextDevice Device { get; set; } + [DataMember(Name = "user", EmitDefaultValue = true)] + public PolicyContextUser User { get; set; } /// - /// An array of Group IDs for the simulate operation. Only user IDs or Group IDs are allowed, not both. + /// Gets or Sets Groups /// - /// An array of Group IDs for the simulate operation. Only user IDs or Group IDs are allowed, not both. [DataMember(Name = "groups", EmitDefaultValue = true)] - public Object Groups { get; set; } - - /// - /// The network rule condition, zone, or IP address - /// - /// The network rule condition, zone, or IP address - [DataMember(Name = "ip", EmitDefaultValue = true)] - public string Ip { get; set; } + public PolicyContextGroups Groups { get; set; } /// /// Gets or Sets Risk @@ -66,10 +58,11 @@ public PolicyContext() { } public PolicyContextRisk Risk { get; set; } /// - /// Gets or Sets User + /// The network rule condition, zone, or IP address /// - [DataMember(Name = "user", EmitDefaultValue = true)] - public PolicyContextUser User { get; set; } + /// The network rule condition, zone, or IP address + [DataMember(Name = "ip", EmitDefaultValue = true)] + public string Ip { get; set; } /// /// Gets or Sets Zones @@ -77,6 +70,12 @@ public PolicyContext() { } [DataMember(Name = "zones", EmitDefaultValue = true)] public PolicyContextZones Zones { get; set; } + /// + /// Gets or Sets Device + /// + [DataMember(Name = "device", EmitDefaultValue = true)] + public PolicyContextDevice Device { get; set; } + /// /// Returns the string presentation of the object /// @@ -85,12 +84,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class PolicyContext {\n"); - sb.Append(" Device: ").Append(Device).Append("\n"); + sb.Append(" User: ").Append(User).Append("\n"); sb.Append(" Groups: ").Append(Groups).Append("\n"); - sb.Append(" Ip: ").Append(Ip).Append("\n"); sb.Append(" Risk: ").Append(Risk).Append("\n"); - sb.Append(" User: ").Append(User).Append("\n"); + sb.Append(" Ip: ").Append(Ip).Append("\n"); sb.Append(" Zones: ").Append(Zones).Append("\n"); + sb.Append(" Device: ").Append(Device).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -127,34 +126,34 @@ public bool Equals(PolicyContext input) } return ( - this.Device == input.Device || - (this.Device != null && - this.Device.Equals(input.Device)) + this.User == input.User || + (this.User != null && + this.User.Equals(input.User)) ) && ( this.Groups == input.Groups || (this.Groups != null && this.Groups.Equals(input.Groups)) ) && - ( - this.Ip == input.Ip || - (this.Ip != null && - this.Ip.Equals(input.Ip)) - ) && ( this.Risk == input.Risk || (this.Risk != null && this.Risk.Equals(input.Risk)) ) && ( - this.User == input.User || - (this.User != null && - this.User.Equals(input.User)) + this.Ip == input.Ip || + (this.Ip != null && + this.Ip.Equals(input.Ip)) ) && ( this.Zones == input.Zones || (this.Zones != null && this.Zones.Equals(input.Zones)) + ) && + ( + this.Device == input.Device || + (this.Device != null && + this.Device.Equals(input.Device)) ); } @@ -168,30 +167,30 @@ public override int GetHashCode() { int hashCode = 41; - if (this.Device != null) + if (this.User != null) { - hashCode = (hashCode * 59) + this.Device.GetHashCode(); + hashCode = (hashCode * 59) + this.User.GetHashCode(); } if (this.Groups != null) { hashCode = (hashCode * 59) + this.Groups.GetHashCode(); } - if (this.Ip != null) - { - hashCode = (hashCode * 59) + this.Ip.GetHashCode(); - } if (this.Risk != null) { hashCode = (hashCode * 59) + this.Risk.GetHashCode(); } - if (this.User != null) + if (this.Ip != null) { - hashCode = (hashCode * 59) + this.User.GetHashCode(); + hashCode = (hashCode * 59) + this.Ip.GetHashCode(); } if (this.Zones != null) { hashCode = (hashCode * 59) + this.Zones.GetHashCode(); } + if (this.Device != null) + { + hashCode = (hashCode * 59) + this.Device.GetHashCode(); + } return hashCode; } } diff --git a/src/Okta.Sdk/Model/PolicyContextGroups.cs b/src/Okta.Sdk/Model/PolicyContextGroups.cs new file mode 100644 index 000000000..26d8c1065 --- /dev/null +++ b/src/Okta.Sdk/Model/PolicyContextGroups.cs @@ -0,0 +1,120 @@ +/* + * Okta Admin Management + * + * Allows customers to easily access the Okta Management APIs + * + * The version of the OpenAPI document: 5.1.0 + * Contact: devex-public@okta.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = Okta.Sdk.Client.OpenAPIDateConverter; + +namespace Okta.Sdk.Model +{ + /// + /// Template: ModelGeneric + /// An array of Group IDs for the simulate operation. Only user IDs or Group IDs are allowed, not both. + /// + [DataContract(Name = "PolicyContext_groups")] + + public partial class PolicyContextGroups : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + public PolicyContextGroups() { } + + /// + /// Gets or Sets Ids + /// + [DataMember(Name = "ids", EmitDefaultValue = true)] + public List Ids { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PolicyContextGroups {\n"); + sb.Append(" Ids: ").Append(Ids).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PolicyContextGroups); + } + + /// + /// Returns true if PolicyContextGroups instances are equal + /// + /// Instance of PolicyContextGroups to be compared + /// Boolean + public bool Equals(PolicyContextGroups input) + { + if (input == null) + { + return false; + } + return + ( + this.Ids == input.Ids || + this.Ids != null && + input.Ids != null && + this.Ids.SequenceEqual(input.Ids) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + + if (this.Ids != null) + { + hashCode = (hashCode * 59) + this.Ids.GetHashCode(); + } + return hashCode; + } + } + + } + +} diff --git a/src/Okta.Sdk/Model/PolicyContextZones.cs b/src/Okta.Sdk/Model/PolicyContextZones.cs index 2ddfed4f2..beaefe802 100644 --- a/src/Okta.Sdk/Model/PolicyContextZones.cs +++ b/src/Okta.Sdk/Model/PolicyContextZones.cs @@ -38,7 +38,7 @@ public partial class PolicyContextZones : IEquatable /// Gets or Sets Ids /// [DataMember(Name = "ids", EmitDefaultValue = true)] - public Object Ids { get; set; } + public List Ids { get; set; } /// /// Returns the string presentation of the object @@ -86,8 +86,9 @@ public bool Equals(PolicyContextZones input) return ( this.Ids == input.Ids || - (this.Ids != null && - this.Ids.Equals(input.Ids)) + this.Ids != null && + input.Ids != null && + this.Ids.SequenceEqual(input.Ids) ); } diff --git a/src/Okta.Sdk/Model/PolicyLinks.cs b/src/Okta.Sdk/Model/PolicyLinks.cs new file mode 100644 index 000000000..cf8cfb4d6 --- /dev/null +++ b/src/Okta.Sdk/Model/PolicyLinks.cs @@ -0,0 +1,178 @@ +/* + * Okta Admin Management + * + * Allows customers to easily access the Okta Management APIs + * + * The version of the OpenAPI document: 5.1.0 + * Contact: devex-public@okta.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = Okta.Sdk.Client.OpenAPIDateConverter; + +namespace Okta.Sdk.Model +{ + /// + /// Template: ModelGeneric + /// PolicyLinks + /// + [DataContract(Name = "PolicyLinks")] + + public partial class PolicyLinks : IEquatable + { + + /// + /// Gets or Sets Self + /// + [DataMember(Name = "self", EmitDefaultValue = true)] + public HrefObjectSelfLink Self { get; set; } + + /// + /// Gets or Sets Activate + /// + [DataMember(Name = "activate", EmitDefaultValue = true)] + public HrefObjectActivateLink Activate { get; set; } + + /// + /// Gets or Sets Deactivate + /// + [DataMember(Name = "deactivate", EmitDefaultValue = true)] + public HrefObjectDeactivateLink Deactivate { get; set; } + + /// + /// Gets or Sets Rules + /// + [DataMember(Name = "rules", EmitDefaultValue = true)] + public HrefObjectRulesLink Rules { get; set; } + + /// + /// Gets or Sets Mappings + /// + [DataMember(Name = "mappings", EmitDefaultValue = true)] + public HrefObjectMappingsLink Mappings { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PolicyLinks {\n"); + sb.Append(" Self: ").Append(Self).Append("\n"); + sb.Append(" Activate: ").Append(Activate).Append("\n"); + sb.Append(" Deactivate: ").Append(Deactivate).Append("\n"); + sb.Append(" Rules: ").Append(Rules).Append("\n"); + sb.Append(" Mappings: ").Append(Mappings).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PolicyLinks); + } + + /// + /// Returns true if PolicyLinks instances are equal + /// + /// Instance of PolicyLinks to be compared + /// Boolean + public bool Equals(PolicyLinks input) + { + if (input == null) + { + return false; + } + return + ( + this.Self == input.Self || + (this.Self != null && + this.Self.Equals(input.Self)) + ) && + ( + this.Activate == input.Activate || + (this.Activate != null && + this.Activate.Equals(input.Activate)) + ) && + ( + this.Deactivate == input.Deactivate || + (this.Deactivate != null && + this.Deactivate.Equals(input.Deactivate)) + ) && + ( + this.Rules == input.Rules || + (this.Rules != null && + this.Rules.Equals(input.Rules)) + ) && + ( + this.Mappings == input.Mappings || + (this.Mappings != null && + this.Mappings.Equals(input.Mappings)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + + if (this.Self != null) + { + hashCode = (hashCode * 59) + this.Self.GetHashCode(); + } + if (this.Activate != null) + { + hashCode = (hashCode * 59) + this.Activate.GetHashCode(); + } + if (this.Deactivate != null) + { + hashCode = (hashCode * 59) + this.Deactivate.GetHashCode(); + } + if (this.Rules != null) + { + hashCode = (hashCode * 59) + this.Rules.GetHashCode(); + } + if (this.Mappings != null) + { + hashCode = (hashCode * 59) + this.Mappings.GetHashCode(); + } + return hashCode; + } + } + + } + +} diff --git a/src/Okta.Sdk/Model/PolicyMappingLinks.cs b/src/Okta.Sdk/Model/PolicyMappingLinks.cs index a68b15bad..2414c805f 100644 --- a/src/Okta.Sdk/Model/PolicyMappingLinks.cs +++ b/src/Okta.Sdk/Model/PolicyMappingLinks.cs @@ -46,6 +46,18 @@ public partial class PolicyMappingLinks : IEquatable [DataMember(Name = "application", EmitDefaultValue = true)] public PolicyMappingLinksAllOfApplication Application { get; set; } + /// + /// Gets or Sets Authenticator + /// + [DataMember(Name = "authenticator", EmitDefaultValue = true)] + public PolicyMappingLinksAllOfAuthenticator Authenticator { get; set; } + + /// + /// Gets or Sets Policy + /// + [DataMember(Name = "policy", EmitDefaultValue = true)] + public PolicyMappingLinksAllOfPolicy Policy { get; set; } + /// /// Returns the string presentation of the object /// @@ -56,6 +68,8 @@ public override string ToString() sb.Append("class PolicyMappingLinks {\n"); sb.Append(" Self: ").Append(Self).Append("\n"); sb.Append(" Application: ").Append(Application).Append("\n"); + sb.Append(" Authenticator: ").Append(Authenticator).Append("\n"); + sb.Append(" Policy: ").Append(Policy).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -100,6 +114,16 @@ public bool Equals(PolicyMappingLinks input) this.Application == input.Application || (this.Application != null && this.Application.Equals(input.Application)) + ) && + ( + this.Authenticator == input.Authenticator || + (this.Authenticator != null && + this.Authenticator.Equals(input.Authenticator)) + ) && + ( + this.Policy == input.Policy || + (this.Policy != null && + this.Policy.Equals(input.Policy)) ); } @@ -121,6 +145,14 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Application.GetHashCode(); } + if (this.Authenticator != null) + { + hashCode = (hashCode * 59) + this.Authenticator.GetHashCode(); + } + if (this.Policy != null) + { + hashCode = (hashCode * 59) + this.Policy.GetHashCode(); + } return hashCode; } } diff --git a/src/Okta.Sdk/Model/PolicyMappingLinksAllOfAuthenticator.cs b/src/Okta.Sdk/Model/PolicyMappingLinksAllOfAuthenticator.cs new file mode 100644 index 000000000..2a9afb61d --- /dev/null +++ b/src/Okta.Sdk/Model/PolicyMappingLinksAllOfAuthenticator.cs @@ -0,0 +1,170 @@ +/* + * Okta Admin Management + * + * Allows customers to easily access the Okta Management APIs + * + * The version of the OpenAPI document: 5.1.0 + * Contact: devex-public@okta.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = Okta.Sdk.Client.OpenAPIDateConverter; + +namespace Okta.Sdk.Model +{ + /// + /// Template: ModelGeneric + /// PolicyMappingLinksAllOfAuthenticator + /// + [DataContract(Name = "PolicyMapping__links_allOf_authenticator")] + + public partial class PolicyMappingLinksAllOfAuthenticator : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + public PolicyMappingLinksAllOfAuthenticator() { } + + /// + /// Gets or Sets Hints + /// + [DataMember(Name = "hints", EmitDefaultValue = true)] + public HrefObjectHints Hints { get; set; } + + /// + /// Link URI + /// + /// Link URI + [DataMember(Name = "href", EmitDefaultValue = true)] + public string Href { get; set; } + + /// + /// Link name + /// + /// Link name + [DataMember(Name = "name", EmitDefaultValue = true)] + public string Name { get; set; } + + /// + /// The media type of the link. If omitted, it is implicitly `application/json`. + /// + /// The media type of the link. If omitted, it is implicitly `application/json`. + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PolicyMappingLinksAllOfAuthenticator {\n"); + sb.Append(" Hints: ").Append(Hints).Append("\n"); + sb.Append(" Href: ").Append(Href).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PolicyMappingLinksAllOfAuthenticator); + } + + /// + /// Returns true if PolicyMappingLinksAllOfAuthenticator instances are equal + /// + /// Instance of PolicyMappingLinksAllOfAuthenticator to be compared + /// Boolean + public bool Equals(PolicyMappingLinksAllOfAuthenticator input) + { + if (input == null) + { + return false; + } + return + ( + this.Hints == input.Hints || + (this.Hints != null && + this.Hints.Equals(input.Hints)) + ) && + ( + this.Href == input.Href || + (this.Href != null && + this.Href.Equals(input.Href)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + + if (this.Hints != null) + { + hashCode = (hashCode * 59) + this.Hints.GetHashCode(); + } + if (this.Href != null) + { + hashCode = (hashCode * 59) + this.Href.GetHashCode(); + } + if (this.Name != null) + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } + if (this.Type != null) + { + hashCode = (hashCode * 59) + this.Type.GetHashCode(); + } + return hashCode; + } + } + + } + +} diff --git a/src/Okta.Sdk/Model/PolicyMappingLinksAllOfPolicy.cs b/src/Okta.Sdk/Model/PolicyMappingLinksAllOfPolicy.cs new file mode 100644 index 000000000..408621008 --- /dev/null +++ b/src/Okta.Sdk/Model/PolicyMappingLinksAllOfPolicy.cs @@ -0,0 +1,170 @@ +/* + * Okta Admin Management + * + * Allows customers to easily access the Okta Management APIs + * + * The version of the OpenAPI document: 5.1.0 + * Contact: devex-public@okta.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = Okta.Sdk.Client.OpenAPIDateConverter; + +namespace Okta.Sdk.Model +{ + /// + /// Template: ModelGeneric + /// PolicyMappingLinksAllOfPolicy + /// + [DataContract(Name = "PolicyMapping__links_allOf_policy")] + + public partial class PolicyMappingLinksAllOfPolicy : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + public PolicyMappingLinksAllOfPolicy() { } + + /// + /// Gets or Sets Hints + /// + [DataMember(Name = "hints", EmitDefaultValue = true)] + public HrefObjectHints Hints { get; set; } + + /// + /// Link URI + /// + /// Link URI + [DataMember(Name = "href", EmitDefaultValue = true)] + public string Href { get; set; } + + /// + /// Link name + /// + /// Link name + [DataMember(Name = "name", EmitDefaultValue = true)] + public string Name { get; set; } + + /// + /// The media type of the link. If omitted, it is implicitly `application/json`. + /// + /// The media type of the link. If omitted, it is implicitly `application/json`. + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PolicyMappingLinksAllOfPolicy {\n"); + sb.Append(" Hints: ").Append(Hints).Append("\n"); + sb.Append(" Href: ").Append(Href).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PolicyMappingLinksAllOfPolicy); + } + + /// + /// Returns true if PolicyMappingLinksAllOfPolicy instances are equal + /// + /// Instance of PolicyMappingLinksAllOfPolicy to be compared + /// Boolean + public bool Equals(PolicyMappingLinksAllOfPolicy input) + { + if (input == null) + { + return false; + } + return + ( + this.Hints == input.Hints || + (this.Hints != null && + this.Hints.Equals(input.Hints)) + ) && + ( + this.Href == input.Href || + (this.Href != null && + this.Href.Equals(input.Href)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + + if (this.Hints != null) + { + hashCode = (hashCode * 59) + this.Hints.GetHashCode(); + } + if (this.Href != null) + { + hashCode = (hashCode * 59) + this.Href.GetHashCode(); + } + if (this.Name != null) + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } + if (this.Type != null) + { + hashCode = (hashCode * 59) + this.Type.GetHashCode(); + } + return hashCode; + } + } + + } + +} diff --git a/src/Okta.Sdk/Model/PolicyRule.cs b/src/Okta.Sdk/Model/PolicyRule.cs index cf8531270..e1523bcbd 100644 --- a/src/Okta.Sdk/Model/PolicyRule.cs +++ b/src/Okta.Sdk/Model/PolicyRule.cs @@ -35,6 +35,8 @@ namespace Okta.Sdk.Model [JsonSubtypes.KnownSubType(typeof(AccessPolicyRule), "ACCESS_POLICY")] [JsonSubtypes.KnownSubType(typeof(AccessPolicyRule), "AccessPolicyRule")] [JsonSubtypes.KnownSubType(typeof(AuthorizationServerPolicyRule), "AuthorizationServerPolicyRule")] + [JsonSubtypes.KnownSubType(typeof(IdpDiscoveryPolicyRule), "IDP_DISCOVERY")] + [JsonSubtypes.KnownSubType(typeof(IdpDiscoveryPolicyRule), "IdpDiscoveryPolicyRule")] [JsonSubtypes.KnownSubType(typeof(OktaSignOnPolicyRule), "OktaSignOnPolicyRule")] [JsonSubtypes.KnownSubType(typeof(PasswordPolicyRule), "PASSWORD")] [JsonSubtypes.KnownSubType(typeof(ProfileEnrollmentPolicyRule), "PROFILE_ENROLLMENT")] @@ -61,8 +63,9 @@ public partial class PolicyRule : IEquatable public PolicyRuleType Type { get; set; } /// - /// Gets or Sets Created + /// Timestamp when the rule was created /// + /// Timestamp when the rule was created [DataMember(Name = "created", EmitDefaultValue = true)] public DateTimeOffset? Created { get; private set; } @@ -75,14 +78,16 @@ public bool ShouldSerializeCreated() return false; } /// - /// Gets or Sets Id + /// Identifier for the rule /// + /// Identifier for the rule [DataMember(Name = "id", EmitDefaultValue = true)] public string Id { get; set; } /// - /// Gets or Sets LastUpdated + /// Timestamp when the rule was last modified /// + /// Timestamp when the rule was last modified [DataMember(Name = "lastUpdated", EmitDefaultValue = true)] public DateTimeOffset? LastUpdated { get; private set; } @@ -95,20 +100,23 @@ public bool ShouldSerializeLastUpdated() return false; } /// - /// Gets or Sets Name + /// Name of the rule /// + /// Name of the rule [DataMember(Name = "name", EmitDefaultValue = true)] public string Name { get; set; } /// - /// Gets or Sets Priority + /// Priority of the rule /// + /// Priority of the rule [DataMember(Name = "priority", EmitDefaultValue = true)] public int Priority { get; set; } /// - /// Gets or Sets System + /// Specifies whether Okta created the Policy Rule (`system=true`). You can't delete Policy Rules that have `system` set to `true`. /// + /// Specifies whether Okta created the Policy Rule (`system=true`). You can't delete Policy Rules that have `system` set to `true`. [DataMember(Name = "system", EmitDefaultValue = true)] public bool System { get; set; } diff --git a/src/Okta.Sdk/Model/PossessionConstraint.cs b/src/Okta.Sdk/Model/PossessionConstraint.cs index c8c7a7f92..ff64e5ece 100644 --- a/src/Okta.Sdk/Model/PossessionConstraint.cs +++ b/src/Okta.Sdk/Model/PossessionConstraint.cs @@ -33,48 +33,438 @@ namespace Okta.Sdk.Model public partial class PossessionConstraint : IEquatable { - /// - /// Gets or Sets Methods + /// Defines Methods /// - [DataMember(Name = "methods", EmitDefaultValue = true)] - public List Methods { get; set; } + [JsonConverter(typeof(StringEnumSerializingConverter))] + public sealed class MethodsEnum : StringEnum + { + /// + /// StringEnum PASSWORD for value: PASSWORD + /// + + public static MethodsEnum PASSWORD = new MethodsEnum("PASSWORD"); + + /// + /// StringEnum SECURITYQUESTION for value: SECURITY_QUESTION + /// + + public static MethodsEnum SECURITYQUESTION = new MethodsEnum("SECURITY_QUESTION"); + + /// + /// StringEnum SMS for value: SMS + /// + + public static MethodsEnum SMS = new MethodsEnum("SMS"); + + /// + /// StringEnum VOICE for value: VOICE + /// + + public static MethodsEnum VOICE = new MethodsEnum("VOICE"); + + /// + /// StringEnum EMAIL for value: EMAIL + /// + + public static MethodsEnum EMAIL = new MethodsEnum("EMAIL"); + + /// + /// StringEnum PUSH for value: PUSH + /// + + public static MethodsEnum PUSH = new MethodsEnum("PUSH"); + + /// + /// StringEnum SIGNEDNONCE for value: SIGNED_NONCE + /// + + public static MethodsEnum SIGNEDNONCE = new MethodsEnum("SIGNED_NONCE"); + + /// + /// StringEnum OTP for value: OTP + /// + + public static MethodsEnum OTP = new MethodsEnum("OTP"); + + /// + /// StringEnum TOTP for value: TOTP + /// + + public static MethodsEnum TOTP = new MethodsEnum("TOTP"); + + /// + /// StringEnum WEBAUTHN for value: WEBAUTHN + /// + + public static MethodsEnum WEBAUTHN = new MethodsEnum("WEBAUTHN"); + + /// + /// StringEnum DUO for value: DUO + /// + + public static MethodsEnum DUO = new MethodsEnum("DUO"); + + /// + /// StringEnum IDP for value: IDP + /// + + public static MethodsEnum IDP = new MethodsEnum("IDP"); + + /// + /// StringEnum CERT for value: CERT + /// + + public static MethodsEnum CERT = new MethodsEnum("CERT"); + + + /// + /// Implicit operator declaration to accept and convert a string value as a + /// + /// The value to use + public static implicit operator MethodsEnum(string value) => new MethodsEnum(value); + + /// + /// Creates a new instance. + /// + /// The value to use. + public MethodsEnum(string value) + : base(value) + { + } + } + + /// - /// Gets or Sets ReauthenticateIn + /// The Authenticator methods that are permitted /// - [DataMember(Name = "reauthenticateIn", EmitDefaultValue = true)] - public string ReauthenticateIn { get; set; } + /// The Authenticator methods that are permitted + [DataMember(Name = "methods", EmitDefaultValue = true)] + + public List Methods { get; set; } + /// + /// Defines Types + /// + [JsonConverter(typeof(StringEnumSerializingConverter))] + public sealed class TypesEnum : StringEnum + { + /// + /// StringEnum SECURITYKEY for value: SECURITY_KEY + /// + + public static TypesEnum SECURITYKEY = new TypesEnum("SECURITY_KEY"); + + /// + /// StringEnum PHONE for value: PHONE + /// + + public static TypesEnum PHONE = new TypesEnum("PHONE"); + + /// + /// StringEnum EMAIL for value: EMAIL + /// + + public static TypesEnum EMAIL = new TypesEnum("EMAIL"); + + /// + /// StringEnum PASSWORD for value: PASSWORD + /// + + public static TypesEnum PASSWORD = new TypesEnum("PASSWORD"); + + /// + /// StringEnum SECURITYQUESTION for value: SECURITY_QUESTION + /// + + public static TypesEnum SECURITYQUESTION = new TypesEnum("SECURITY_QUESTION"); + + /// + /// StringEnum APP for value: APP + /// + + public static TypesEnum APP = new TypesEnum("APP"); + + /// + /// StringEnum FEDERATED for value: FEDERATED + /// + + public static TypesEnum FEDERATED = new TypesEnum("FEDERATED"); + + + /// + /// Implicit operator declaration to accept and convert a string value as a + /// + /// The value to use + public static implicit operator TypesEnum(string value) => new TypesEnum(value); + + /// + /// Creates a new instance. + /// + /// The value to use. + public TypesEnum(string value) + : base(value) + { + } + } + + /// - /// Gets or Sets Types + /// The Authenticator types that are permitted /// + /// The Authenticator types that are permitted [DataMember(Name = "types", EmitDefaultValue = true)] - public List Types { get; set; } + + public List Types { get; set; } + /// + /// Indicates if device-bound Factors are required. This property is only set for `POSSESSION` constraints. + /// + /// Indicates if device-bound Factors are required. This property is only set for `POSSESSION` constraints. + [JsonConverter(typeof(StringEnumSerializingConverter))] + public sealed class DeviceBoundEnum : StringEnum + { + /// + /// StringEnum OPTIONAL for value: OPTIONAL + /// + + public static DeviceBoundEnum OPTIONAL = new DeviceBoundEnum("OPTIONAL"); + + /// + /// StringEnum REQUIRED for value: REQUIRED + /// + + public static DeviceBoundEnum REQUIRED = new DeviceBoundEnum("REQUIRED"); + + + /// + /// Implicit operator declaration to accept and convert a string value as a + /// + /// The value to use + public static implicit operator DeviceBoundEnum(string value) => new DeviceBoundEnum(value); + + /// + /// Creates a new instance. + /// + /// The value to use. + public DeviceBoundEnum(string value) + : base(value) + { + } + } + /// - /// Gets or Sets DeviceBound + /// Indicates if device-bound Factors are required. This property is only set for `POSSESSION` constraints. /// + /// Indicates if device-bound Factors are required. This property is only set for `POSSESSION` constraints. [DataMember(Name = "deviceBound", EmitDefaultValue = true)] - public string DeviceBound { get; set; } + + public DeviceBoundEnum DeviceBound { get; set; } + /// + /// Indicates if any secrets or private keys used during authentication must be hardware protected and not exportable. This property is only set for `POSSESSION` constraints. + /// + /// Indicates if any secrets or private keys used during authentication must be hardware protected and not exportable. This property is only set for `POSSESSION` constraints. + [JsonConverter(typeof(StringEnumSerializingConverter))] + public sealed class HardwareProtectionEnum : StringEnum + { + /// + /// StringEnum OPTIONAL for value: OPTIONAL + /// + + public static HardwareProtectionEnum OPTIONAL = new HardwareProtectionEnum("OPTIONAL"); + + /// + /// StringEnum REQUIRED for value: REQUIRED + /// + + public static HardwareProtectionEnum REQUIRED = new HardwareProtectionEnum("REQUIRED"); + + + /// + /// Implicit operator declaration to accept and convert a string value as a + /// + /// The value to use + public static implicit operator HardwareProtectionEnum(string value) => new HardwareProtectionEnum(value); + + /// + /// Creates a new instance. + /// + /// The value to use. + public HardwareProtectionEnum(string value) + : base(value) + { + } + } + /// - /// Gets or Sets HardwareProtection + /// Indicates if any secrets or private keys used during authentication must be hardware protected and not exportable. This property is only set for `POSSESSION` constraints. /// + /// Indicates if any secrets or private keys used during authentication must be hardware protected and not exportable. This property is only set for `POSSESSION` constraints. [DataMember(Name = "hardwareProtection", EmitDefaultValue = true)] - public string HardwareProtection { get; set; } + + public HardwareProtectionEnum HardwareProtection { get; set; } + /// + /// Indicates if phishing-resistant Factors are required. This property is only set for `POSSESSION` constraints. + /// + /// Indicates if phishing-resistant Factors are required. This property is only set for `POSSESSION` constraints. + [JsonConverter(typeof(StringEnumSerializingConverter))] + public sealed class PhishingResistantEnum : StringEnum + { + /// + /// StringEnum OPTIONAL for value: OPTIONAL + /// + + public static PhishingResistantEnum OPTIONAL = new PhishingResistantEnum("OPTIONAL"); + + /// + /// StringEnum REQUIRED for value: REQUIRED + /// + + public static PhishingResistantEnum REQUIRED = new PhishingResistantEnum("REQUIRED"); + + + /// + /// Implicit operator declaration to accept and convert a string value as a + /// + /// The value to use + public static implicit operator PhishingResistantEnum(string value) => new PhishingResistantEnum(value); + + /// + /// Creates a new instance. + /// + /// The value to use. + public PhishingResistantEnum(string value) + : base(value) + { + } + } + /// - /// Gets or Sets PhishingResistant + /// Indicates if phishing-resistant Factors are required. This property is only set for `POSSESSION` constraints. /// + /// Indicates if phishing-resistant Factors are required. This property is only set for `POSSESSION` constraints. [DataMember(Name = "phishingResistant", EmitDefaultValue = true)] - public string PhishingResistant { get; set; } + + public PhishingResistantEnum PhishingResistant { get; set; } + /// + /// Indicates if the user needs to approve an Okta Verify prompt or provide biometrics (meets NIST AAL2 requirements). This property is only set for `POSSESSION` constraints. + /// + /// Indicates if the user needs to approve an Okta Verify prompt or provide biometrics (meets NIST AAL2 requirements). This property is only set for `POSSESSION` constraints. + [JsonConverter(typeof(StringEnumSerializingConverter))] + public sealed class UserPresenceEnum : StringEnum + { + /// + /// StringEnum OPTIONAL for value: OPTIONAL + /// + + public static UserPresenceEnum OPTIONAL = new UserPresenceEnum("OPTIONAL"); + + /// + /// StringEnum REQUIRED for value: REQUIRED + /// + + public static UserPresenceEnum REQUIRED = new UserPresenceEnum("REQUIRED"); + + + /// + /// Implicit operator declaration to accept and convert a string value as a + /// + /// The value to use + public static implicit operator UserPresenceEnum(string value) => new UserPresenceEnum(value); + + /// + /// Creates a new instance. + /// + /// The value to use. + public UserPresenceEnum(string value) + : base(value) + { + } + } + /// - /// Gets or Sets UserPresence + /// Indicates if the user needs to approve an Okta Verify prompt or provide biometrics (meets NIST AAL2 requirements). This property is only set for `POSSESSION` constraints. /// + /// Indicates if the user needs to approve an Okta Verify prompt or provide biometrics (meets NIST AAL2 requirements). This property is only set for `POSSESSION` constraints. [DataMember(Name = "userPresence", EmitDefaultValue = true)] - public string UserPresence { get; set; } + + public UserPresenceEnum UserPresence { get; set; } + /// + /// Indicates the user interaction requirement (PIN or biometrics) to ensure verification of a possession factor + /// + /// Indicates the user interaction requirement (PIN or biometrics) to ensure verification of a possession factor + [JsonConverter(typeof(StringEnumSerializingConverter))] + public sealed class UserVerificationEnum : StringEnum + { + /// + /// StringEnum OPTIONAL for value: OPTIONAL + /// + + public static UserVerificationEnum OPTIONAL = new UserVerificationEnum("OPTIONAL"); + + /// + /// StringEnum REQUIRED for value: REQUIRED + /// + + public static UserVerificationEnum REQUIRED = new UserVerificationEnum("REQUIRED"); + + + /// + /// Implicit operator declaration to accept and convert a string value as a + /// + /// The value to use + public static implicit operator UserVerificationEnum(string value) => new UserVerificationEnum(value); + + /// + /// Creates a new instance. + /// + /// The value to use. + public UserVerificationEnum(string value) + : base(value) + { + } + } + + + /// + /// Indicates the user interaction requirement (PIN or biometrics) to ensure verification of a possession factor + /// + /// Indicates the user interaction requirement (PIN or biometrics) to ensure verification of a possession factor + [DataMember(Name = "userVerification", EmitDefaultValue = true)] + + public UserVerificationEnum UserVerification { get; set; } + + /// + /// The duration after which the user must re-authenticate regardless of user activity. This re-authentication interval overrides the Verification Method object's `reauthenticateIn` interval. The supported values use ISO 8601 period format for recurring time intervals (for example, `PT1H`). + /// + /// The duration after which the user must re-authenticate regardless of user activity. This re-authentication interval overrides the Verification Method object's `reauthenticateIn` interval. The supported values use ISO 8601 period format for recurring time intervals (for example, `PT1H`). + [DataMember(Name = "reauthenticateIn", EmitDefaultValue = true)] + public string ReauthenticateIn { get; set; } + + /// + /// This property specifies the precise authenticator and method for authentication. + /// + /// This property specifies the precise authenticator and method for authentication. + [DataMember(Name = "authenticationMethods", EmitDefaultValue = true)] + public List AuthenticationMethods { get; set; } + + /// + /// This property specifies the precise authenticator and method to exclude from authentication. + /// + /// This property specifies the precise authenticator and method to exclude from authentication. + [DataMember(Name = "excludedAuthenticationMethods", EmitDefaultValue = true)] + public List ExcludedAuthenticationMethods { get; set; } + + /// + /// This property indicates whether the knowledge or possession factor is required by the assurance. It's optional in the request, but is always returned in the response. By default, this field is `true`. If the knowledge or possession constraint has values for`excludedAuthenticationMethods` the `required` value is false. + /// + /// This property indicates whether the knowledge or possession factor is required by the assurance. It's optional in the request, but is always returned in the response. By default, this field is `true`. If the knowledge or possession constraint has values for`excludedAuthenticationMethods` the `required` value is false. + [DataMember(Name = "required", EmitDefaultValue = true)] + public bool Required { get; set; } /// /// Returns the string presentation of the object @@ -87,10 +477,14 @@ public override string ToString() sb.Append(" Methods: ").Append(Methods).Append("\n"); sb.Append(" ReauthenticateIn: ").Append(ReauthenticateIn).Append("\n"); sb.Append(" Types: ").Append(Types).Append("\n"); + sb.Append(" AuthenticationMethods: ").Append(AuthenticationMethods).Append("\n"); + sb.Append(" ExcludedAuthenticationMethods: ").Append(ExcludedAuthenticationMethods).Append("\n"); + sb.Append(" Required: ").Append(Required).Append("\n"); sb.Append(" DeviceBound: ").Append(DeviceBound).Append("\n"); sb.Append(" HardwareProtection: ").Append(HardwareProtection).Append("\n"); sb.Append(" PhishingResistant: ").Append(PhishingResistant).Append("\n"); sb.Append(" UserPresence: ").Append(UserPresence).Append("\n"); + sb.Append(" UserVerification: ").Append(UserVerification).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -128,8 +522,6 @@ public bool Equals(PossessionConstraint input) return ( this.Methods == input.Methods || - this.Methods != null && - input.Methods != null && this.Methods.SequenceEqual(input.Methods) ) && ( @@ -139,29 +531,43 @@ public bool Equals(PossessionConstraint input) ) && ( this.Types == input.Types || - this.Types != null && - input.Types != null && this.Types.SequenceEqual(input.Types) ) && + ( + this.AuthenticationMethods == input.AuthenticationMethods || + this.AuthenticationMethods != null && + input.AuthenticationMethods != null && + this.AuthenticationMethods.SequenceEqual(input.AuthenticationMethods) + ) && + ( + this.ExcludedAuthenticationMethods == input.ExcludedAuthenticationMethods || + this.ExcludedAuthenticationMethods != null && + input.ExcludedAuthenticationMethods != null && + this.ExcludedAuthenticationMethods.SequenceEqual(input.ExcludedAuthenticationMethods) + ) && + ( + this.Required == input.Required || + this.Required.Equals(input.Required) + ) && ( this.DeviceBound == input.DeviceBound || - (this.DeviceBound != null && - this.DeviceBound.Equals(input.DeviceBound)) + this.DeviceBound.Equals(input.DeviceBound) ) && ( this.HardwareProtection == input.HardwareProtection || - (this.HardwareProtection != null && - this.HardwareProtection.Equals(input.HardwareProtection)) + this.HardwareProtection.Equals(input.HardwareProtection) ) && ( this.PhishingResistant == input.PhishingResistant || - (this.PhishingResistant != null && - this.PhishingResistant.Equals(input.PhishingResistant)) + this.PhishingResistant.Equals(input.PhishingResistant) ) && ( this.UserPresence == input.UserPresence || - (this.UserPresence != null && - this.UserPresence.Equals(input.UserPresence)) + this.UserPresence.Equals(input.UserPresence) + ) && + ( + this.UserVerification == input.UserVerification || + this.UserVerification.Equals(input.UserVerification) ); } @@ -187,6 +593,15 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Types.GetHashCode(); } + if (this.AuthenticationMethods != null) + { + hashCode = (hashCode * 59) + this.AuthenticationMethods.GetHashCode(); + } + if (this.ExcludedAuthenticationMethods != null) + { + hashCode = (hashCode * 59) + this.ExcludedAuthenticationMethods.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Required.GetHashCode(); if (this.DeviceBound != null) { hashCode = (hashCode * 59) + this.DeviceBound.GetHashCode(); @@ -203,6 +618,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.UserPresence.GetHashCode(); } + if (this.UserVerification != null) + { + hashCode = (hashCode * 59) + this.UserVerification.GetHashCode(); + } return hashCode; } } diff --git a/src/Okta.Sdk/Model/ProfileEnrollmentPolicy.cs b/src/Okta.Sdk/Model/ProfileEnrollmentPolicy.cs index 5f49e7dc2..810c7e5c5 100644 --- a/src/Okta.Sdk/Model/ProfileEnrollmentPolicy.cs +++ b/src/Okta.Sdk/Model/ProfileEnrollmentPolicy.cs @@ -33,7 +33,7 @@ namespace Okta.Sdk.Model [DataContract(Name = "ProfileEnrollmentPolicy")] [JsonConverter(typeof(JsonSubtypes), "Type")] [JsonSubtypes.KnownSubType(typeof(AccessPolicy), "ACCESS_POLICY")] - [JsonSubtypes.KnownSubType(typeof(IdentityProviderPolicy), "IDP_DISCOVERY")] + [JsonSubtypes.KnownSubType(typeof(IdpDiscoveryPolicy), "IDP_DISCOVERY")] [JsonSubtypes.KnownSubType(typeof(MultifactorEnrollmentPolicy), "MFA_ENROLL")] [JsonSubtypes.KnownSubType(typeof(OktaSignOnPolicy), "OKTA_SIGN_ON")] [JsonSubtypes.KnownSubType(typeof(PasswordPolicy), "PASSWORD")] diff --git a/src/Okta.Sdk/Model/ProfileEnrollmentPolicyRule.cs b/src/Okta.Sdk/Model/ProfileEnrollmentPolicyRule.cs index 7d41671c8..10700bfb8 100644 --- a/src/Okta.Sdk/Model/ProfileEnrollmentPolicyRule.cs +++ b/src/Okta.Sdk/Model/ProfileEnrollmentPolicyRule.cs @@ -33,6 +33,7 @@ namespace Okta.Sdk.Model [DataContract(Name = "ProfileEnrollmentPolicyRule")] [JsonConverter(typeof(JsonSubtypes), "Type")] [JsonSubtypes.KnownSubType(typeof(AccessPolicyRule), "ACCESS_POLICY")] + [JsonSubtypes.KnownSubType(typeof(IdpDiscoveryPolicyRule), "IDP_DISCOVERY")] [JsonSubtypes.KnownSubType(typeof(PasswordPolicyRule), "PASSWORD")] [JsonSubtypes.KnownSubType(typeof(ProfileEnrollmentPolicyRule), "PROFILE_ENROLLMENT")] [JsonSubtypes.KnownSubType(typeof(AuthorizationServerPolicyRule), "RESOURCE_ACCESS")] diff --git a/src/Okta.Sdk/Model/ProfileEnrollmentPolicyRuleAction.cs b/src/Okta.Sdk/Model/ProfileEnrollmentPolicyRuleAction.cs index 5a75f94b3..e75a9a4c0 100644 --- a/src/Okta.Sdk/Model/ProfileEnrollmentPolicyRuleAction.cs +++ b/src/Okta.Sdk/Model/ProfileEnrollmentPolicyRuleAction.cs @@ -34,35 +34,35 @@ namespace Okta.Sdk.Model public partial class ProfileEnrollmentPolicyRuleAction : IEquatable { /// - /// Defines ProgressiveProfilingAction + /// Defines UnknownUserAction /// [JsonConverter(typeof(StringEnumSerializingConverter))] - public sealed class ProgressiveProfilingActionEnum : StringEnum + public sealed class UnknownUserActionEnum : StringEnum { /// - /// StringEnum ENABLED for value: ENABLED + /// StringEnum DENY for value: DENY /// - public static ProgressiveProfilingActionEnum ENABLED = new ProgressiveProfilingActionEnum("ENABLED"); + public static UnknownUserActionEnum DENY = new UnknownUserActionEnum("DENY"); /// - /// StringEnum DISABLED for value: DISABLED + /// StringEnum REGISTER for value: REGISTER /// - public static ProgressiveProfilingActionEnum DISABLED = new ProgressiveProfilingActionEnum("DISABLED"); + public static UnknownUserActionEnum REGISTER = new UnknownUserActionEnum("REGISTER"); /// - /// Implicit operator declaration to accept and convert a string value as a + /// Implicit operator declaration to accept and convert a string value as a /// /// The value to use - public static implicit operator ProgressiveProfilingActionEnum(string value) => new ProgressiveProfilingActionEnum(value); + public static implicit operator UnknownUserActionEnum(string value) => new UnknownUserActionEnum(value); /// - /// Creates a new instance. + /// Creates a new instance. /// /// The value to use. - public ProgressiveProfilingActionEnum(string value) + public UnknownUserActionEnum(string value) : base(value) { } @@ -70,41 +70,41 @@ public ProgressiveProfilingActionEnum(string value) /// - /// Gets or Sets ProgressiveProfilingAction + /// Gets or Sets UnknownUserAction /// - [DataMember(Name = "progressiveProfilingAction", EmitDefaultValue = true)] + [DataMember(Name = "unknownUserAction", EmitDefaultValue = true)] - public ProgressiveProfilingActionEnum ProgressiveProfilingAction { get; set; } + public UnknownUserActionEnum UnknownUserAction { get; set; } /// - /// Defines UnknownUserAction + /// Defines ProgressiveProfilingAction /// [JsonConverter(typeof(StringEnumSerializingConverter))] - public sealed class UnknownUserActionEnum : StringEnum + public sealed class ProgressiveProfilingActionEnum : StringEnum { /// - /// StringEnum DENY for value: DENY + /// StringEnum ENABLED for value: ENABLED /// - public static UnknownUserActionEnum DENY = new UnknownUserActionEnum("DENY"); + public static ProgressiveProfilingActionEnum ENABLED = new ProgressiveProfilingActionEnum("ENABLED"); /// - /// StringEnum REGISTER for value: REGISTER + /// StringEnum DISABLED for value: DISABLED /// - public static UnknownUserActionEnum REGISTER = new UnknownUserActionEnum("REGISTER"); + public static ProgressiveProfilingActionEnum DISABLED = new ProgressiveProfilingActionEnum("DISABLED"); /// - /// Implicit operator declaration to accept and convert a string value as a + /// Implicit operator declaration to accept and convert a string value as a /// /// The value to use - public static implicit operator UnknownUserActionEnum(string value) => new UnknownUserActionEnum(value); + public static implicit operator ProgressiveProfilingActionEnum(string value) => new ProgressiveProfilingActionEnum(value); /// - /// Creates a new instance. + /// Creates a new instance. /// /// The value to use. - public UnknownUserActionEnum(string value) + public ProgressiveProfilingActionEnum(string value) : base(value) { } @@ -112,11 +112,11 @@ public UnknownUserActionEnum(string value) /// - /// Gets or Sets UnknownUserAction + /// Gets or Sets ProgressiveProfilingAction /// - [DataMember(Name = "unknownUserAction", EmitDefaultValue = true)] + [DataMember(Name = "progressiveProfilingAction", EmitDefaultValue = true)] - public UnknownUserActionEnum UnknownUserAction { get; set; } + public ProgressiveProfilingActionEnum ProgressiveProfilingAction { get; set; } /// /// Gets or Sets Access @@ -160,9 +160,9 @@ public override string ToString() sb.Append(" ActivationRequirements: ").Append(ActivationRequirements).Append("\n"); sb.Append(" PreRegistrationInlineHooks: ").Append(PreRegistrationInlineHooks).Append("\n"); sb.Append(" ProfileAttributes: ").Append(ProfileAttributes).Append("\n"); - sb.Append(" ProgressiveProfilingAction: ").Append(ProgressiveProfilingAction).Append("\n"); sb.Append(" TargetGroupIds: ").Append(TargetGroupIds).Append("\n"); sb.Append(" UnknownUserAction: ").Append(UnknownUserAction).Append("\n"); + sb.Append(" ProgressiveProfilingAction: ").Append(ProgressiveProfilingAction).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -220,10 +220,6 @@ public bool Equals(ProfileEnrollmentPolicyRuleAction input) input.ProfileAttributes != null && this.ProfileAttributes.SequenceEqual(input.ProfileAttributes) ) && - ( - this.ProgressiveProfilingAction == input.ProgressiveProfilingAction || - this.ProgressiveProfilingAction.Equals(input.ProgressiveProfilingAction) - ) && ( this.TargetGroupIds == input.TargetGroupIds || this.TargetGroupIds != null && @@ -233,6 +229,10 @@ public bool Equals(ProfileEnrollmentPolicyRuleAction input) ( this.UnknownUserAction == input.UnknownUserAction || this.UnknownUserAction.Equals(input.UnknownUserAction) + ) && + ( + this.ProgressiveProfilingAction == input.ProgressiveProfilingAction || + this.ProgressiveProfilingAction.Equals(input.ProgressiveProfilingAction) ); } @@ -262,10 +262,6 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.ProfileAttributes.GetHashCode(); } - if (this.ProgressiveProfilingAction != null) - { - hashCode = (hashCode * 59) + this.ProgressiveProfilingAction.GetHashCode(); - } if (this.TargetGroupIds != null) { hashCode = (hashCode * 59) + this.TargetGroupIds.GetHashCode(); @@ -274,6 +270,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.UnknownUserAction.GetHashCode(); } + if (this.ProgressiveProfilingAction != null) + { + hashCode = (hashCode * 59) + this.ProgressiveProfilingAction.GetHashCode(); + } return hashCode; } } diff --git a/src/Okta.Sdk/Model/SimulatePolicyBody.cs b/src/Okta.Sdk/Model/SimulatePolicyBody.cs index c982d5461..83158642f 100644 --- a/src/Okta.Sdk/Model/SimulatePolicyBody.cs +++ b/src/Okta.Sdk/Model/SimulatePolicyBody.cs @@ -39,6 +39,13 @@ public partial class SimulatePolicyBody : IEquatable [JsonConstructorAttribute] public SimulatePolicyBody() { } + /// + /// Supported policy types for a simulate operation. The default value, `null`, returns all types. + /// + /// Supported policy types for a simulate operation. The default value, `null`, returns all types. + [DataMember(Name = "policyTypes", EmitDefaultValue = true)] + public List PolicyTypes { get; set; } + /// /// The application instance ID for a simulate operation /// @@ -52,13 +59,6 @@ public SimulatePolicyBody() { } [DataMember(Name = "policyContext", EmitDefaultValue = true)] public PolicyContext PolicyContext { get; set; } - /// - /// Supported policy types for a simulate operation. The default value, `null`, returns all types. - /// - /// Supported policy types for a simulate operation. The default value, `null`, returns all types. - [DataMember(Name = "policyTypes", EmitDefaultValue = true)] - public List PolicyTypes { get; set; } - /// /// Returns the string presentation of the object /// @@ -67,9 +67,9 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class SimulatePolicyBody {\n"); + sb.Append(" PolicyTypes: ").Append(PolicyTypes).Append("\n"); sb.Append(" AppInstance: ").Append(AppInstance).Append("\n"); sb.Append(" PolicyContext: ").Append(PolicyContext).Append("\n"); - sb.Append(" PolicyTypes: ").Append(PolicyTypes).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -105,6 +105,12 @@ public bool Equals(SimulatePolicyBody input) return false; } return + ( + this.PolicyTypes == input.PolicyTypes || + this.PolicyTypes != null && + input.PolicyTypes != null && + this.PolicyTypes.SequenceEqual(input.PolicyTypes) + ) && ( this.AppInstance == input.AppInstance || (this.AppInstance != null && @@ -114,12 +120,6 @@ public bool Equals(SimulatePolicyBody input) this.PolicyContext == input.PolicyContext || (this.PolicyContext != null && this.PolicyContext.Equals(input.PolicyContext)) - ) && - ( - this.PolicyTypes == input.PolicyTypes || - this.PolicyTypes != null && - input.PolicyTypes != null && - this.PolicyTypes.SequenceEqual(input.PolicyTypes) ); } @@ -133,6 +133,10 @@ public override int GetHashCode() { int hashCode = 41; + if (this.PolicyTypes != null) + { + hashCode = (hashCode * 59) + this.PolicyTypes.GetHashCode(); + } if (this.AppInstance != null) { hashCode = (hashCode * 59) + this.AppInstance.GetHashCode(); @@ -141,10 +145,6 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.PolicyContext.GetHashCode(); } - if (this.PolicyTypes != null) - { - hashCode = (hashCode * 59) + this.PolicyTypes.GetHashCode(); - } return hashCode; } } diff --git a/src/Okta.Sdk/Model/SimulatePolicyEvaluations.cs b/src/Okta.Sdk/Model/SimulatePolicyEvaluations.cs index e93426284..0411da69b 100644 --- a/src/Okta.Sdk/Model/SimulatePolicyEvaluations.cs +++ b/src/Okta.Sdk/Model/SimulatePolicyEvaluations.cs @@ -84,12 +84,6 @@ public StatusEnum(string value) public StatusEnum Status { get; set; } - /// - /// Gets or Sets Evaluated - /// - [DataMember(Name = "evaluated", EmitDefaultValue = true)] - public SimulatePolicyEvaluationsEvaluated Evaluated { get; set; } - /// /// The policy type of the simulate operation /// @@ -109,6 +103,12 @@ public StatusEnum(string value) [DataMember(Name = "undefined", EmitDefaultValue = true)] public SimulatePolicyEvaluationsUndefined Undefined { get; set; } + /// + /// Gets or Sets Evaluated + /// + [DataMember(Name = "evaluated", EmitDefaultValue = true)] + public SimulatePolicyEvaluationsEvaluated Evaluated { get; set; } + /// /// Returns the string presentation of the object /// @@ -117,11 +117,11 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class SimulatePolicyEvaluations {\n"); - sb.Append(" Evaluated: ").Append(Evaluated).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); sb.Append(" PolicyType: ").Append(PolicyType).Append("\n"); sb.Append(" Result: ").Append(Result).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); sb.Append(" Undefined: ").Append(Undefined).Append("\n"); + sb.Append(" Evaluated: ").Append(Evaluated).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -158,9 +158,8 @@ public bool Equals(SimulatePolicyEvaluations input) } return ( - this.Evaluated == input.Evaluated || - (this.Evaluated != null && - this.Evaluated.Equals(input.Evaluated)) + this.Status == input.Status || + this.Status.Equals(input.Status) ) && ( this.PolicyType == input.PolicyType || @@ -173,14 +172,15 @@ public bool Equals(SimulatePolicyEvaluations input) (this.Result != null && this.Result.Equals(input.Result)) ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && ( this.Undefined == input.Undefined || (this.Undefined != null && this.Undefined.Equals(input.Undefined)) + ) && + ( + this.Evaluated == input.Evaluated || + (this.Evaluated != null && + this.Evaluated.Equals(input.Evaluated)) ); } @@ -194,9 +194,9 @@ public override int GetHashCode() { int hashCode = 41; - if (this.Evaluated != null) + if (this.Status != null) { - hashCode = (hashCode * 59) + this.Evaluated.GetHashCode(); + hashCode = (hashCode * 59) + this.Status.GetHashCode(); } if (this.PolicyType != null) { @@ -206,14 +206,14 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Result.GetHashCode(); } - if (this.Status != null) - { - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - } if (this.Undefined != null) { hashCode = (hashCode * 59) + this.Undefined.GetHashCode(); } + if (this.Evaluated != null) + { + hashCode = (hashCode * 59) + this.Evaluated.GetHashCode(); + } return hashCode; } } diff --git a/src/Okta.Sdk/Model/SimulateResultPoliciesItems.cs b/src/Okta.Sdk/Model/SimulateResultPoliciesItems.cs index 20814ccb0..622a988a8 100644 --- a/src/Okta.Sdk/Model/SimulateResultPoliciesItems.cs +++ b/src/Okta.Sdk/Model/SimulateResultPoliciesItems.cs @@ -34,12 +34,6 @@ namespace Okta.Sdk.Model public partial class SimulateResultPoliciesItems : IEquatable { - /// - /// Gets or Sets Conditions - /// - [DataMember(Name = "conditions", EmitDefaultValue = true)] - public SimulateResultConditions Conditions { get; set; } - /// /// Gets or Sets Id /// @@ -52,18 +46,24 @@ public partial class SimulateResultPoliciesItems : IEquatable - /// Gets or Sets Rules - /// - [DataMember(Name = "rules", EmitDefaultValue = true)] - public SimulateResultRules Rules { get; set; } - /// /// Gets or Sets Status /// [DataMember(Name = "status", EmitDefaultValue = true)] public string Status { get; set; } + /// + /// Gets or Sets Conditions + /// + [DataMember(Name = "conditions", EmitDefaultValue = true)] + public SimulateResultConditions Conditions { get; set; } + + /// + /// Gets or Sets Rules + /// + [DataMember(Name = "rules", EmitDefaultValue = true)] + public SimulateResultRules Rules { get; set; } + /// /// Returns the string presentation of the object /// @@ -72,11 +72,11 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class SimulateResultPoliciesItems {\n"); - sb.Append(" Conditions: ").Append(Conditions).Append("\n"); sb.Append(" Id: ").Append(Id).Append("\n"); sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Rules: ").Append(Rules).Append("\n"); sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" Conditions: ").Append(Conditions).Append("\n"); + sb.Append(" Rules: ").Append(Rules).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -112,11 +112,6 @@ public bool Equals(SimulateResultPoliciesItems input) return false; } return - ( - this.Conditions == input.Conditions || - (this.Conditions != null && - this.Conditions.Equals(input.Conditions)) - ) && ( this.Id == input.Id || (this.Id != null && @@ -127,15 +122,20 @@ public bool Equals(SimulateResultPoliciesItems input) (this.Name != null && this.Name.Equals(input.Name)) ) && - ( - this.Rules == input.Rules || - (this.Rules != null && - this.Rules.Equals(input.Rules)) - ) && ( this.Status == input.Status || (this.Status != null && this.Status.Equals(input.Status)) + ) && + ( + this.Conditions == input.Conditions || + (this.Conditions != null && + this.Conditions.Equals(input.Conditions)) + ) && + ( + this.Rules == input.Rules || + (this.Rules != null && + this.Rules.Equals(input.Rules)) ); } @@ -149,10 +149,6 @@ public override int GetHashCode() { int hashCode = 41; - if (this.Conditions != null) - { - hashCode = (hashCode * 59) + this.Conditions.GetHashCode(); - } if (this.Id != null) { hashCode = (hashCode * 59) + this.Id.GetHashCode(); @@ -161,14 +157,18 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Name.GetHashCode(); } - if (this.Rules != null) - { - hashCode = (hashCode * 59) + this.Rules.GetHashCode(); - } if (this.Status != null) { hashCode = (hashCode * 59) + this.Status.GetHashCode(); } + if (this.Conditions != null) + { + hashCode = (hashCode * 59) + this.Conditions.GetHashCode(); + } + if (this.Rules != null) + { + hashCode = (hashCode * 59) + this.Rules.GetHashCode(); + } return hashCode; } } diff --git a/src/Okta.Sdk/Model/SimulateResultRules.cs b/src/Okta.Sdk/Model/SimulateResultRules.cs index 0d7858d34..724d214a2 100644 --- a/src/Okta.Sdk/Model/SimulateResultRules.cs +++ b/src/Okta.Sdk/Model/SimulateResultRules.cs @@ -84,12 +84,6 @@ public StatusEnum(string value) public StatusEnum Status { get; set; } - /// - /// Gets or Sets Conditions - /// - [DataMember(Name = "conditions", EmitDefaultValue = true)] - public SimulateResultConditions Conditions { get; set; } - /// /// The unique ID number of the policy rule /// @@ -104,6 +98,12 @@ public StatusEnum(string value) [DataMember(Name = "name", EmitDefaultValue = true)] public string Name { get; set; } + /// + /// Gets or Sets Conditions + /// + [DataMember(Name = "conditions", EmitDefaultValue = true)] + public SimulateResultConditions Conditions { get; set; } + /// /// Returns the string presentation of the object /// @@ -112,10 +112,10 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class SimulateResultRules {\n"); - sb.Append(" Conditions: ").Append(Conditions).Append("\n"); sb.Append(" Id: ").Append(Id).Append("\n"); sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" Conditions: ").Append(Conditions).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -151,11 +151,6 @@ public bool Equals(SimulateResultRules input) return false; } return - ( - this.Conditions == input.Conditions || - (this.Conditions != null && - this.Conditions.Equals(input.Conditions)) - ) && ( this.Id == input.Id || (this.Id != null && @@ -169,6 +164,11 @@ public bool Equals(SimulateResultRules input) ( this.Status == input.Status || this.Status.Equals(input.Status) + ) && + ( + this.Conditions == input.Conditions || + (this.Conditions != null && + this.Conditions.Equals(input.Conditions)) ); } @@ -182,10 +182,6 @@ public override int GetHashCode() { int hashCode = 41; - if (this.Conditions != null) - { - hashCode = (hashCode * 59) + this.Conditions.GetHashCode(); - } if (this.Id != null) { hashCode = (hashCode * 59) + this.Id.GetHashCode(); @@ -198,6 +194,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Status.GetHashCode(); } + if (this.Conditions != null) + { + hashCode = (hashCode * 59) + this.Conditions.GetHashCode(); + } return hashCode; } } diff --git a/src/Okta.Sdk/Model/SsprPrimaryRequirement.cs b/src/Okta.Sdk/Model/SsprPrimaryRequirement.cs index e0e16f5c7..0bb0dc417 100644 --- a/src/Okta.Sdk/Model/SsprPrimaryRequirement.cs +++ b/src/Okta.Sdk/Model/SsprPrimaryRequirement.cs @@ -105,8 +105,8 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class SsprPrimaryRequirement {\n"); - sb.Append(" MethodConstraints: ").Append(MethodConstraints).Append("\n"); sb.Append(" Methods: ").Append(Methods).Append("\n"); + sb.Append(" MethodConstraints: ").Append(MethodConstraints).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -142,15 +142,15 @@ public bool Equals(SsprPrimaryRequirement input) return false; } return + ( + this.Methods == input.Methods || + this.Methods.SequenceEqual(input.Methods) + ) && ( this.MethodConstraints == input.MethodConstraints || this.MethodConstraints != null && input.MethodConstraints != null && this.MethodConstraints.SequenceEqual(input.MethodConstraints) - ) && - ( - this.Methods == input.Methods || - this.Methods.SequenceEqual(input.Methods) ); } @@ -164,14 +164,14 @@ public override int GetHashCode() { int hashCode = 41; - if (this.MethodConstraints != null) - { - hashCode = (hashCode * 59) + this.MethodConstraints.GetHashCode(); - } if (this.Methods != null) { hashCode = (hashCode * 59) + this.Methods.GetHashCode(); } + if (this.MethodConstraints != null) + { + hashCode = (hashCode * 59) + this.MethodConstraints.GetHashCode(); + } return hashCode; } } diff --git a/src/Okta.Sdk/Model/UserCondition.cs b/src/Okta.Sdk/Model/UserCondition.cs index 1fccf5bb8..ade77ff28 100644 --- a/src/Okta.Sdk/Model/UserCondition.cs +++ b/src/Okta.Sdk/Model/UserCondition.cs @@ -27,7 +27,7 @@ namespace Okta.Sdk.Model { /// /// Template: ModelGeneric - /// UserCondition + /// Specifies a set of Users to be included or excluded /// [DataContract(Name = "UserCondition")] @@ -35,14 +35,16 @@ public partial class UserCondition : IEquatable { /// - /// Gets or Sets Exclude + /// Users to be excluded /// + /// Users to be excluded [DataMember(Name = "exclude", EmitDefaultValue = true)] public List Exclude { get; set; } /// - /// Gets or Sets Include + /// Users to be included /// + /// Users to be included [DataMember(Name = "include", EmitDefaultValue = true)] public List Include { get; set; } diff --git a/src/Okta.Sdk/Model/UserIdentifierConditionEvaluatorPattern.cs b/src/Okta.Sdk/Model/UserIdentifierConditionEvaluatorPattern.cs index 0eb551834..452f56d44 100644 --- a/src/Okta.Sdk/Model/UserIdentifierConditionEvaluatorPattern.cs +++ b/src/Okta.Sdk/Model/UserIdentifierConditionEvaluatorPattern.cs @@ -27,7 +27,7 @@ namespace Okta.Sdk.Model { /// /// Template: ModelGeneric - /// UserIdentifierConditionEvaluatorPattern + /// Used in the User Identifier Condition object. Specifies the details of the patterns to match against. /// [DataContract(Name = "UserIdentifierConditionEvaluatorPattern")] @@ -42,8 +42,9 @@ public partial class UserIdentifierConditionEvaluatorPattern : IEquatable - /// Gets or Sets Value + /// The regex expression of a simple match string /// + /// The regex expression of a simple match string [DataMember(Name = "value", EmitDefaultValue = true)] public string Value { get; set; } diff --git a/src/Okta.Sdk/Model/UserIdentifierMatchType.cs b/src/Okta.Sdk/Model/UserIdentifierMatchType.cs index 958693782..8aac2ada0 100644 --- a/src/Okta.Sdk/Model/UserIdentifierMatchType.cs +++ b/src/Okta.Sdk/Model/UserIdentifierMatchType.cs @@ -26,8 +26,9 @@ namespace Okta.Sdk.Model { /// - /// Defines UserIdentifierMatchType + /// The type of pattern. For regex, use `EXPRESSION`. /// + /// The type of pattern. For regex, use `EXPRESSION`. [JsonConverter(typeof(StringEnumSerializingConverter))] public sealed class UserIdentifierMatchType : StringEnum { diff --git a/src/Okta.Sdk/Obsolete/IdentityProviderPolicy.cs b/src/Okta.Sdk/Obsolete/IdentityProviderPolicy.cs new file mode 100644 index 000000000..00f532960 --- /dev/null +++ b/src/Okta.Sdk/Obsolete/IdentityProviderPolicy.cs @@ -0,0 +1,27 @@ +using JsonSubTypes; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using System; + +namespace Okta.Sdk.Model +{ + + [JsonConverter(typeof(JsonSubtypes), "Type")] + [JsonSubtypes.KnownSubType(typeof(AccessPolicy), "ACCESS_POLICY")] + [JsonSubtypes.KnownSubType(typeof(IdentityProviderPolicy), "IDP_DISCOVERY")] + [JsonSubtypes.KnownSubType(typeof(MultifactorEnrollmentPolicy), "MFA_ENROLL")] + [JsonSubtypes.KnownSubType(typeof(OktaSignOnPolicy), "OKTA_SIGN_ON")] + [JsonSubtypes.KnownSubType(typeof(PasswordPolicy), "PASSWORD")] + [JsonSubtypes.KnownSubType(typeof(ProfileEnrollmentPolicy), "PROFILE_ENROLLMENT")] + [Obsolete("IdentityProviderPolicy will no longer inherits from Policy in the next major version.")] + public partial class IdentityProviderPolicy : Policy + { + /// + /// Gets or Sets Conditions + /// + [Obsolete("IdentityProviderPolicy will no longer inherits from Policy. Conditions will removed in the next major version.")] + [DataMember(Name = "conditions", EmitDefaultValue = true)] + public PolicyRuleConditions Conditions { get; set; } + + } +} diff --git a/src/Okta.Sdk/Obsolete/PolicyApi.cs b/src/Okta.Sdk/Obsolete/PolicyApi.cs new file mode 100644 index 000000000..8f92963b1 --- /dev/null +++ b/src/Okta.Sdk/Obsolete/PolicyApi.cs @@ -0,0 +1,288 @@ +/* + * Okta Admin Management + * + * Allows customers to easily access the Okta Management APIs + * + * The version of the OpenAPI document: 5.1.0 + * Contact: devex-public@okta.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using System.Runtime.CompilerServices; +using System.Threading; +using System.Threading.Tasks; +using Okta.Sdk.Client; +using Okta.Sdk.Model; + +namespace Okta.Sdk.Api +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial interface IPolicyApiAsync : IApiAccessor + { + /// + /// Create a Policy + /// + /// + /// Creates a policy + /// + /// Thrown when fails to make API call + /// + /// (optional, default to true) + /// Cancellation Token to cancel the request. + /// Task of Policy + System.Threading.Tasks.Task CreatePolicyAsync(Policy policy, bool? activate = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Create a Policy + /// + /// + /// Creates a policy + /// + /// Thrown when fails to make API call + /// + /// (optional, default to true) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Policy) + System.Threading.Tasks.Task> CreatePolicyWithHttpInfoAsync(Policy policy, bool? activate = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Replace a Policy + /// + /// + /// Replaces the properties of a Policy identified by `policyId` + /// + /// Thrown when fails to make API call + /// `id` of the Policy + /// + /// Cancellation Token to cancel the request. + /// Task of Policy + System.Threading.Tasks.Task ReplacePolicyAsync(string policyId, Policy policy, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Replace a Policy + /// + /// + /// Replaces the properties of a Policy identified by `policyId` + /// + /// Thrown when fails to make API call + /// `id` of the Policy + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Policy) + System.Threading.Tasks.Task> ReplacePolicyWithHttpInfoAsync(string policyId, Policy policy, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial interface IPolicyApi : IPolicyApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class PolicyApi : IPolicyApi + { + /// + /// Replace a Policy Replaces the properties of a Policy identified by `policyId` + /// + /// Thrown when fails to make API call + /// `id` of the Policy + /// + /// Cancellation Token to cancel the request. + /// Task of Policy + [Obsolete("This method is deprecated and will be removed in the next major version.Use ReplacePolicyAsync(string policyId, PolicyCanBeCreatedOrReplaced policy ..)")] + public async System.Threading.Tasks.Task ReplacePolicyAsync(string policyId, Policy policy, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Okta.Sdk.Client.ApiResponse localVarResponse = await ReplacePolicyWithHttpInfoAsync(policyId, policy, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + /// + /// Replace a Policy Replaces the properties of a Policy identified by `policyId` + /// + /// Thrown when fails to make API call + /// `id` of the Policy + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Policy) + [Obsolete("This method is deprecated and will be removed in the next major version.Use ReplacePolicyWithHttpInfoAsync(string policyId, PolicyCanBeCreatedOrReplaced policy ..)")] + public async System.Threading.Tasks.Task> ReplacePolicyWithHttpInfoAsync(string policyId, Policy policy, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'policyId' is set + if (policyId == null) + { + throw new Okta.Sdk.Client.ApiException(400, "Missing required parameter 'policyId' when calling PolicyApi->ReplacePolicy"); + } + + // verify the required parameter 'policy' is set + if (policy == null) + { + throw new Okta.Sdk.Client.ApiException(400, "Missing required parameter 'policy' when calling PolicyApi->ReplacePolicy"); + } + + + Okta.Sdk.Client.RequestOptions localVarRequestOptions = new Okta.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Okta.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Okta.Sdk.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("policyId", Okta.Sdk.Client.ClientUtils.ParameterToString(policyId)); // path parameter + localVarRequestOptions.Data = policy; + + // authentication (apiToken) required + if (Sdk.Client.Configuration.IsSswsMode(this.Configuration) && !string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization")); + } + // authentication (oauth2) required + // oauth required + if (Sdk.Client.Configuration.IsBearerTokenMode(this.Configuration) && !string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + if (Sdk.Client.Configuration.IsPrivateKeyMode(this.Configuration) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + var token = await _oAuthTokenProvider.GetAccessTokenAsync(cancellationToken: cancellationToken); + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + token); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/api/v1/policies/{policyId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ReplacePolicy", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Create a Policy Creates a policy + /// + /// Thrown when fails to make API call + /// + /// (optional, default to true) + /// Cancellation Token to cancel the request. + /// Task of Policy + [Obsolete("This method is deprecated and will be removed in the next major version.Use PolicyAsync(PolicyCanBeCreatedOrReplaced policy ..)")] + public async System.Threading.Tasks.Task CreatePolicyAsync(Policy policy, bool? activate = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Okta.Sdk.Client.ApiResponse localVarResponse = await CreatePolicyWithHttpInfoAsync(policy, activate, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + /// + /// Create a Policy Creates a policy + /// + /// Thrown when fails to make API call + /// + /// (optional, default to true) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Policy) + [Obsolete("This method is deprecated and will be removed in the next major version.Use CreatePolicyWithHttpInfoAsync(PolicyCanBeCreatedOrReplaced policy ..)")] + public async System.Threading.Tasks.Task> CreatePolicyWithHttpInfoAsync(Policy policy, bool? activate = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'policy' is set + if (policy == null) + { + throw new Okta.Sdk.Client.ApiException(400, "Missing required parameter 'policy' when calling PolicyApi->CreatePolicy"); + } + + + Okta.Sdk.Client.RequestOptions localVarRequestOptions = new Okta.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Okta.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Okta.Sdk.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (activate != null) + { + localVarRequestOptions.QueryParameters.Add(Okta.Sdk.Client.ClientUtils.ParameterToMultiMap("", "activate", activate)); + } + localVarRequestOptions.Data = policy; + + // authentication (apiToken) required + if (Sdk.Client.Configuration.IsSswsMode(this.Configuration) && !string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization")); + } + // authentication (oauth2) required + // oauth required + if (Sdk.Client.Configuration.IsBearerTokenMode(this.Configuration) && !string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + if (Sdk.Client.Configuration.IsPrivateKeyMode(this.Configuration) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + var token = await _oAuthTokenProvider.GetAccessTokenAsync(cancellationToken: cancellationToken); + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + token); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/api/v1/policies", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreatePolicy", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + + } +}