Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct AuthorizationServerPolicy definition #763

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion API_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion docs/AuthorizationServerPolicy.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

13 changes: 13 additions & 0 deletions docs/AuthorizationServerPolicyLinks.md
Original file line number Diff line number Diff line change
@@ -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)

14 changes: 14 additions & 0 deletions docs/AuthorizationServerPolicyLinksAllOfRules.md
Original file line number Diff line number Diff line change
@@ -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)

91 changes: 45 additions & 46 deletions openapi3/management.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion src/Okta.Sdk/Model/AuthorizationServerPolicy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public bool ShouldSerializeLastUpdated()
/// Gets or Sets Links
/// </summary>
[DataMember(Name = "_links", EmitDefaultValue = true)]
public LinksSelfAndLifecycle Links { get; set; }
public AuthorizationServerPolicyLinks Links { get; set; }

/// <summary>
/// Returns the string presentation of the object
Expand Down
162 changes: 162 additions & 0 deletions src/Okta.Sdk/Model/AuthorizationServerPolicyLinks.cs
Original file line number Diff line number Diff line change
@@ -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
{
/// <summary>
/// Template: ModelGeneric
/// AuthorizationServerPolicyLinks
/// </summary>
[DataContract(Name = "AuthorizationServerPolicy__links")]

public partial class AuthorizationServerPolicyLinks : IEquatable<AuthorizationServerPolicyLinks>
{

/// <summary>
/// Gets or Sets Self
/// </summary>
[DataMember(Name = "self", EmitDefaultValue = true)]
public HrefObjectSelfLink Self { get; set; }

/// <summary>
/// Gets or Sets Activate
/// </summary>
[DataMember(Name = "activate", EmitDefaultValue = true)]
public HrefObjectActivateLink Activate { get; set; }

/// <summary>
/// Gets or Sets Deactivate
/// </summary>
[DataMember(Name = "deactivate", EmitDefaultValue = true)]
public HrefObjectDeactivateLink Deactivate { get; set; }

/// <summary>
/// Gets or Sets Rules
/// </summary>
[DataMember(Name = "rules", EmitDefaultValue = true)]
public AuthorizationServerPolicyLinksAllOfRules Rules { get; set; }

/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
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();
}

/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}

/// <summary>
/// Returns true if objects are equal
/// </summary>
/// <param name="input">Object to be compared</param>
/// <returns>Boolean</returns>
public override bool Equals(object input)
{
return this.Equals(input as AuthorizationServerPolicyLinks);
}

/// <summary>
/// Returns true if AuthorizationServerPolicyLinks instances are equal
/// </summary>
/// <param name="input">Instance of AuthorizationServerPolicyLinks to be compared</param>
/// <returns>Boolean</returns>
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))
);
}

/// <summary>
/// Gets the hash code
/// </summary>
/// <returns>Hash code</returns>
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;
}
}

}

}
Loading