From 9af3e86139f1ee12c39d2b4a794b7bf8059e11c2 Mon Sep 17 00:00:00 2001 From: Bryan Apellanes Date: Tue, 3 Dec 2024 09:33:46 -0600 Subject: [PATCH] Correct AuthorizationServerPolicy definition --- .openapi-generator/FILES | 4 + API_README.md | 4 +- docs/AuthorizationServerPolicy.md | 2 +- docs/AuthorizationServerPolicyLinks.md | 13 ++ ...uthorizationServerPolicyLinksAllOfRules.md | 14 ++ openapi3/management.yaml | 91 +++++---- .../Model/AuthorizationServerPolicy.cs | 2 +- .../Model/AuthorizationServerPolicyLinks.cs | 162 ++++++++++++++++ ...uthorizationServerPolicyLinksAllOfRules.cs | 183 ++++++++++++++++++ 9 files changed, 426 insertions(+), 49 deletions(-) create mode 100644 docs/AuthorizationServerPolicyLinks.md create mode 100644 docs/AuthorizationServerPolicyLinksAllOfRules.md create mode 100644 src/Okta.Sdk/Model/AuthorizationServerPolicyLinks.cs create mode 100644 src/Okta.Sdk/Model/AuthorizationServerPolicyLinksAllOfRules.cs diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 9d44d00f..b15ac707 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -165,6 +165,8 @@ docs/AuthorizationServerKeysApi.md docs/AuthorizationServerPoliciesApi.md docs/AuthorizationServerPolicy.md docs/AuthorizationServerPolicyConditions.md +docs/AuthorizationServerPolicyLinks.md +docs/AuthorizationServerPolicyLinksAllOfRules.md docs/AuthorizationServerPolicyPeopleCondition.md docs/AuthorizationServerPolicyRule.md docs/AuthorizationServerPolicyRuleActions.md @@ -1515,6 +1517,8 @@ src/Okta.Sdk/Model/AuthorizationServerCredentialsUse.cs src/Okta.Sdk/Model/AuthorizationServerJsonWebKey.cs src/Okta.Sdk/Model/AuthorizationServerPolicy.cs src/Okta.Sdk/Model/AuthorizationServerPolicyConditions.cs +src/Okta.Sdk/Model/AuthorizationServerPolicyLinks.cs +src/Okta.Sdk/Model/AuthorizationServerPolicyLinksAllOfRules.cs src/Okta.Sdk/Model/AuthorizationServerPolicyPeopleCondition.cs src/Okta.Sdk/Model/AuthorizationServerPolicyRule.cs src/Okta.Sdk/Model/AuthorizationServerPolicyRuleActions.cs diff --git a/API_README.md b/API_README.md index 8d7f2ed6..dcf898d0 100644 --- a/API_README.md +++ b/API_README.md @@ -787,8 +787,10 @@ Class | Method | HTTP request | Description - [Model.AuthorizationServerCredentialsUse](docs/AuthorizationServerCredentialsUse.md) - [Model.AuthorizationServerJsonWebKey](docs/AuthorizationServerJsonWebKey.md) - [Model.AuthorizationServerPolicy](docs/AuthorizationServerPolicy.md) - - [Model.AuthorizationServerPolicyAllOf](docs/AuthorizationServerPolicyAllOf.md) - [Model.AuthorizationServerPolicyConditions](docs/AuthorizationServerPolicyConditions.md) + - [Model.AuthorizationServerPolicyLinks](docs/AuthorizationServerPolicyLinks.md) + - [Model.AuthorizationServerPolicyLinksAllOf](docs/AuthorizationServerPolicyLinksAllOf.md) + - [Model.AuthorizationServerPolicyLinksAllOfRules](docs/AuthorizationServerPolicyLinksAllOfRules.md) - [Model.AuthorizationServerPolicyPeopleCondition](docs/AuthorizationServerPolicyPeopleCondition.md) - [Model.AuthorizationServerPolicyRule](docs/AuthorizationServerPolicyRule.md) - [Model.AuthorizationServerPolicyRuleActions](docs/AuthorizationServerPolicyRuleActions.md) diff --git a/docs/AuthorizationServerPolicy.md b/docs/AuthorizationServerPolicy.md index 251c44f9..b7a33181 100644 --- a/docs/AuthorizationServerPolicy.md +++ b/docs/AuthorizationServerPolicy.md @@ -14,7 +14,7 @@ Name | Type | Description | Notes **System** | **bool** | Specifies whether Okta created this Policy | [optional] **Created** | **DateTimeOffset** | Timestamp when the Policy was created | [optional] [readonly] **LastUpdated** | **DateTimeOffset** | Timestamp when the Policy was last updated | [optional] [readonly] -**Links** | [**LinksSelfAndLifecycle**](LinksSelfAndLifecycle.md) | | [optional] +**Links** | [**AuthorizationServerPolicyLinks**](AuthorizationServerPolicyLinks.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/AuthorizationServerPolicyLinks.md b/docs/AuthorizationServerPolicyLinks.md new file mode 100644 index 00000000..4d9b76ca --- /dev/null +++ b/docs/AuthorizationServerPolicyLinks.md @@ -0,0 +1,13 @@ +# Okta.Sdk.Model.AuthorizationServerPolicyLinks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Self** | [**HrefObjectSelfLink**](HrefObjectSelfLink.md) | | [optional] +**Activate** | [**HrefObjectActivateLink**](HrefObjectActivateLink.md) | | [optional] +**Deactivate** | [**HrefObjectDeactivateLink**](HrefObjectDeactivateLink.md) | | [optional] +**Rules** | [**AuthorizationServerPolicyLinksAllOfRules**](AuthorizationServerPolicyLinksAllOfRules.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/AuthorizationServerPolicyLinksAllOfRules.md b/docs/AuthorizationServerPolicyLinksAllOfRules.md new file mode 100644 index 00000000..9648b0b7 --- /dev/null +++ b/docs/AuthorizationServerPolicyLinksAllOfRules.md @@ -0,0 +1,14 @@ +# Okta.Sdk.Model.AuthorizationServerPolicyLinksAllOfRules + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Hints** | [**HrefHints**](HrefHints.md) | | [optional] +**Href** | **string** | Link URI | +**Name** | **string** | Link name | [optional] +**Templated** | **bool** | Indicates whether the Link Object's `href` property is a URI template. | [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/openapi3/management.yaml b/openapi3/management.yaml index ef6ed67e..cd6cf04c 100644 --- a/openapi3/management.yaml +++ b/openapi3/management.yaml @@ -34304,52 +34304,51 @@ components: _links: $ref: '#/components/schemas/LinksSelf' AuthorizationServerPolicy: - allOf: - - type: object - properties: - id: - type: string - description: ID of the Policy - type: - type: string - description: Indicates that the Policy is an authorization server Policy - enum: - - OAUTH_AUTHORIZATION_POLICY - name: - type: string - description: Name of the Policy - conditions: - $ref: '#/components/schemas/AuthorizationServerPolicyConditions' - description: - type: string - description: Description of the Policy - priority: - type: integer - description: Specifies the order in which this Policy is evaluated in relation to the other Policies in a custom authorization server - status: - $ref: '#/components/schemas/AuthorizationServerPolicyStatus' - system: - type: boolean - description: Specifies whether Okta created this Policy - created: - type: string - format: date-time - readOnly: true - description: Timestamp when the Policy was created - lastUpdated: - type: string - format: date-time - readOnly: true - description: Timestamp when the Policy was last updated - _links: - allOf: - - $ref: '#/components/schemas/LinksSelfAndLifecycle' - - type: object - properties: - rules: - allOf: - - description: Link to the authorization server policy's rules - - $ref: '#/components/schemas/HrefObject' + type: object + properties: + id: + type: string + description: ID of the Policy + type: + type: string + description: Indicates that the Policy is an authorization server Policy + enum: + - OAUTH_AUTHORIZATION_POLICY + name: + type: string + description: Name of the Policy + conditions: + $ref: '#/components/schemas/AuthorizationServerPolicyConditions' + description: + type: string + description: Description of the Policy + priority: + type: integer + description: Specifies the order in which this Policy is evaluated in relation to the other Policies in a custom authorization server + status: + $ref: '#/components/schemas/AuthorizationServerPolicyStatus' + system: + type: boolean + description: Specifies whether Okta created this Policy + created: + type: string + format: date-time + readOnly: true + description: Timestamp when the Policy was created + lastUpdated: + type: string + format: date-time + readOnly: true + description: Timestamp when the Policy was last updated + _links: + allOf: + - $ref: '#/components/schemas/LinksSelfAndLifecycle' + - type: object + properties: + rules: + allOf: + - description: Link to the authorization server policy's rules + - $ref: '#/components/schemas/HrefObject' AuthorizationServerPolicyConditions: type: object properties: diff --git a/src/Okta.Sdk/Model/AuthorizationServerPolicy.cs b/src/Okta.Sdk/Model/AuthorizationServerPolicy.cs index 39930d1c..9a368c0d 100644 --- a/src/Okta.Sdk/Model/AuthorizationServerPolicy.cs +++ b/src/Okta.Sdk/Model/AuthorizationServerPolicy.cs @@ -154,7 +154,7 @@ public bool ShouldSerializeLastUpdated() /// Gets or Sets Links /// [DataMember(Name = "_links", EmitDefaultValue = true)] - public LinksSelfAndLifecycle Links { get; set; } + public AuthorizationServerPolicyLinks Links { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Okta.Sdk/Model/AuthorizationServerPolicyLinks.cs b/src/Okta.Sdk/Model/AuthorizationServerPolicyLinks.cs new file mode 100644 index 00000000..c52aa42e --- /dev/null +++ b/src/Okta.Sdk/Model/AuthorizationServerPolicyLinks.cs @@ -0,0 +1,162 @@ +/* + * Okta Admin Management + * + * Allows customers to easily access the Okta Management APIs + * + * The version of the OpenAPI document: 2024.07.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 + /// AuthorizationServerPolicyLinks + /// + [DataContract(Name = "AuthorizationServerPolicy__links")] + + public partial class AuthorizationServerPolicyLinks : 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 AuthorizationServerPolicyLinksAllOfRules Rules { 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 AuthorizationServerPolicyLinks {\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("}\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 AuthorizationServerPolicyLinks); + } + + /// + /// Returns true if AuthorizationServerPolicyLinks instances are equal + /// + /// Instance of AuthorizationServerPolicyLinks to be compared + /// Boolean + public bool Equals(AuthorizationServerPolicyLinks 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)) + ); + } + + /// + /// 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(); + } + return hashCode; + } + } + + } + +} diff --git a/src/Okta.Sdk/Model/AuthorizationServerPolicyLinksAllOfRules.cs b/src/Okta.Sdk/Model/AuthorizationServerPolicyLinksAllOfRules.cs new file mode 100644 index 00000000..5dfd4eaa --- /dev/null +++ b/src/Okta.Sdk/Model/AuthorizationServerPolicyLinksAllOfRules.cs @@ -0,0 +1,183 @@ +/* + * Okta Admin Management + * + * Allows customers to easily access the Okta Management APIs + * + * The version of the OpenAPI document: 2024.07.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 + /// AuthorizationServerPolicyLinksAllOfRules + /// + [DataContract(Name = "AuthorizationServerPolicy__links_allOf_rules")] + + public partial class AuthorizationServerPolicyLinksAllOfRules : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + public AuthorizationServerPolicyLinksAllOfRules() { } + + /// + /// Gets or Sets Hints + /// + [DataMember(Name = "hints", EmitDefaultValue = true)] + public HrefHints 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; } + + /// + /// Indicates whether the Link Object's `href` property is a URI template. + /// + /// Indicates whether the Link Object's `href` property is a URI template. + [DataMember(Name = "templated", EmitDefaultValue = true)] + public bool Templated { 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 AuthorizationServerPolicyLinksAllOfRules {\n"); + sb.Append(" Hints: ").Append(Hints).Append("\n"); + sb.Append(" Href: ").Append(Href).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Templated: ").Append(Templated).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 AuthorizationServerPolicyLinksAllOfRules); + } + + /// + /// Returns true if AuthorizationServerPolicyLinksAllOfRules instances are equal + /// + /// Instance of AuthorizationServerPolicyLinksAllOfRules to be compared + /// Boolean + public bool Equals(AuthorizationServerPolicyLinksAllOfRules 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.Templated == input.Templated || + this.Templated.Equals(input.Templated) + ) && + ( + 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(); + } + hashCode = (hashCode * 59) + this.Templated.GetHashCode(); + if (this.Type != null) + { + hashCode = (hashCode * 59) + this.Type.GetHashCode(); + } + return hashCode; + } + } + + } + +}