Skip to content

Commit

Permalink
correct Certificate key data model required attrs (#35)
Browse files Browse the repository at this point in the history
correct `Certificate` key data model required attr
  • Loading branch information
patrickcping authored Aug 31, 2022
1 parent ad9d26b commit b5f96e4
Show file tree
Hide file tree
Showing 7 changed files with 149 additions and 104 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* **Note** Documentation formatting change `EnumCertificateKeySignagureAlgorithm` [#33](https://github.com/patrickcping/pingone-go-sdk-v2/pull/33)
* **Note** Documentation formatting change `EnumCertificateKeyUsageType` [#33](https://github.com/patrickcping/pingone-go-sdk-v2/pull/33)
* **Breaking change** Added required fields to the SAML Identity Provider constructor [#31](https://github.com/patrickcping/pingone-go-sdk-v2/pull/31)
* **Breaking change** Changed required attributes on the `Certificate` model [#35](https://github.com/patrickcping/pingone-go-sdk-v2/pull/35)
* **Enhancement** Support for Kerberos Gateway [#32](https://github.com/patrickcping/pingone-go-sdk-v2/pull/32)
* **Enhancement** `EnumCertificateKeyUsageType` includes missing enum values [#33](https://github.com/patrickcping/pingone-go-sdk-v2/pull/33)
* **Enhancement** `EnumCertificateKeySignagureAlgorithm` includes missing enum values [#33](https://github.com/patrickcping/pingone-go-sdk-v2/pull/33)
Expand Down
1 change: 1 addition & 0 deletions management/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* **Note** Documentation formatting change `EnumCertificateKeySignagureAlgorithm` [#33](https://github.com/patrickcping/pingone-go-sdk-v2/pull/33)
* **Note** Documentation formatting change `EnumCertificateKeyUsageType` [#33](https://github.com/patrickcping/pingone-go-sdk-v2/pull/33)
* **Breaking change** Added required fields to the SAML Identity Provider constructor [#31](https://github.com/patrickcping/pingone-go-sdk-v2/pull/31)
* **Breaking change** Changed required attributes on the `Certificate` model [#35](https://github.com/patrickcping/pingone-go-sdk-v2/pull/35)
* **Enhancement** Support for Kerberos Gateway [#32](https://github.com/patrickcping/pingone-go-sdk-v2/pull/32)
* **Enhancement** `EnumCertificateKeyUsageType` includes missing enum values [#33](https://github.com/patrickcping/pingone-go-sdk-v2/pull/33)
* **Enhancement** `EnumCertificateKeySignagureAlgorithm` includes missing enum values [#33](https://github.com/patrickcping/pingone-go-sdk-v2/pull/33)
Expand Down
8 changes: 3 additions & 5 deletions management/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21156,6 +21156,7 @@ components:
- EXPIRED
- NOT_YET_VALID
- REVOKED
readOnly: true
type: string
EnumCertificateKeyUsageType:
description: "Specifies how the certificate is used. Options are `ENCRYPTION`,\
Expand Down Expand Up @@ -22013,6 +22014,7 @@ components:
startsAt:
description: The time the validity period starts.
format: date-time
readOnly: true
type: string
status:
$ref: '#/components/schemas/EnumCertificateKeyStatus'
Expand All @@ -22027,13 +22029,9 @@ components:
type: integer
required:
- algorithm
- default
- issuerDN
- keyLength
- serialNumber
- name
- signatureAlgorithm
- startsAt
- status
- subjectDN
- usageType
- validityPeriod
Expand Down
44 changes: 32 additions & 12 deletions management/docs/Certificate.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Algorithm** | [**EnumCertificateKeyAlgorithm**](EnumCertificateKeyAlgorithm.md) | |
**CreatedAt** | Pointer to **string** | The time the resource was created. | [optional] [readonly]
**Default** | **bool** | Specifies whether this is the default key for the specified environment. |
**Default** | Pointer to **bool** | Specifies whether this is the default key for the specified environment. | [optional]
**Environment** | Pointer to [**ObjectEnvironment**](ObjectEnvironment.md) | | [optional]
**ExpiresAt** | Pointer to **time.Time** | The time the key resource expires. | [optional] [readonly]
**Id** | Pointer to **string** | Specifies the resource’s unique identifier. | [optional] [readonly]
**IssuerDN** | **string** | Specifies the distinguished name of the certificate issuer. |
**IssuerDN** | Pointer to **string** | Specifies the distinguished name of the certificate issuer. | [optional]
**KeyLength** | **int32** | Specifies the key length. For RSA keys, options are 2048, 3072, and 7680. For elliptical curve (EC) keys, options are 224, 256, and 384. |
**Name** | Pointer to **string** | Specifies the resource name. | [optional]
**Name** | **string** | Specifies the resource name. |
**Organization** | Pointer to [**ObjectOrganization**](ObjectOrganization.md) | | [optional]
**SerialNumber** | **int32** | Specifies the serial number of the key or certificate. |
**SerialNumber** | Pointer to **int32** | Specifies the serial number of the key or certificate. | [optional]
**SignatureAlgorithm** | [**EnumCertificateKeySignagureAlgorithm**](EnumCertificateKeySignagureAlgorithm.md) | |
**StartsAt** | **time.Time** | The time the validity period starts. |
**Status** | [**EnumCertificateKeyStatus**](EnumCertificateKeyStatus.md) | |
**StartsAt** | Pointer to **time.Time** | The time the validity period starts. | [optional] [readonly]
**Status** | Pointer to [**EnumCertificateKeyStatus**](EnumCertificateKeyStatus.md) | | [optional]
**SubjectDN** | **string** | Specifies the distinguished name of the subject being secured. |
**UsageType** | [**EnumCertificateKeyUsageType**](EnumCertificateKeyUsageType.md) | |
**ValidityPeriod** | **int32** | Specifies the number of days the key is valid. |
Expand All @@ -26,7 +26,7 @@ Name | Type | Description | Notes

### NewCertificate

`func NewCertificate(algorithm EnumCertificateKeyAlgorithm, default_ bool, issuerDN string, keyLength int32, serialNumber int32, signatureAlgorithm EnumCertificateKeySignagureAlgorithm, startsAt time.Time, status EnumCertificateKeyStatus, subjectDN string, usageType EnumCertificateKeyUsageType, validityPeriod int32, ) *Certificate`
`func NewCertificate(algorithm EnumCertificateKeyAlgorithm, keyLength int32, name string, signatureAlgorithm EnumCertificateKeySignagureAlgorithm, subjectDN string, usageType EnumCertificateKeyUsageType, validityPeriod int32, ) *Certificate`

NewCertificate instantiates a new Certificate object
This constructor will assign default values to properties that have it defined,
Expand Down Expand Up @@ -105,6 +105,11 @@ and a boolean to check if the value has been set.

SetDefault sets Default field to given value.

### HasDefault

`func (o *Certificate) HasDefault() bool`

HasDefault returns a boolean if a field has been set.

### GetEnvironment

Expand Down Expand Up @@ -200,6 +205,11 @@ and a boolean to check if the value has been set.

SetIssuerDN sets IssuerDN field to given value.

### HasIssuerDN

`func (o *Certificate) HasIssuerDN() bool`

HasIssuerDN returns a boolean if a field has been set.

### GetKeyLength

Expand Down Expand Up @@ -240,11 +250,6 @@ and a boolean to check if the value has been set.

SetName sets Name field to given value.

### HasName

`func (o *Certificate) HasName() bool`

HasName returns a boolean if a field has been set.

### GetOrganization

Expand Down Expand Up @@ -290,6 +295,11 @@ and a boolean to check if the value has been set.

SetSerialNumber sets SerialNumber field to given value.

### HasSerialNumber

`func (o *Certificate) HasSerialNumber() bool`

HasSerialNumber returns a boolean if a field has been set.

### GetSignatureAlgorithm

Expand Down Expand Up @@ -330,6 +340,11 @@ and a boolean to check if the value has been set.

SetStartsAt sets StartsAt field to given value.

### HasStartsAt

`func (o *Certificate) HasStartsAt() bool`

HasStartsAt returns a boolean if a field has been set.

### GetStatus

Expand All @@ -350,6 +365,11 @@ and a boolean to check if the value has been set.

SetStatus sets Status field to given value.

### HasStatus

`func (o *Certificate) HasStatus() bool`

HasStatus returns a boolean if a field has been set.

### GetSubjectDN

Expand Down
3 changes: 1 addition & 2 deletions management/docs/CertificateManagementApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,13 @@ import (
"context"
"fmt"
"os"
"time"
openapiclient "./openapi"
)

func main() {
environmentID := "environmentID_example" // string |
contentType := "application/x-pkcs12-certificates" // string | (optional)
certificate := *openapiclient.NewCertificate(openapiclient.EnumCertificateKeyAlgorithm("RSA"), false, "IssuerDN_example", int32(123), int32(123), openapiclient.EnumCertificateKeySignagureAlgorithm("SHA224withRSA"), time.Now(), openapiclient.EnumCertificateKeyStatus("VALID"), "SubjectDN_example", openapiclient.EnumCertificateKeyUsageType("ENCRYPTION"), int32(123)) // Certificate | (optional)
certificate := *openapiclient.NewCertificate(openapiclient.EnumCertificateKeyAlgorithm("RSA"), int32(123), "Name_example", openapiclient.EnumCertificateKeySignagureAlgorithm("SHA224withRSA"), "SubjectDN_example", openapiclient.EnumCertificateKeyUsageType("ENCRYPTION"), int32(123)) // Certificate | (optional)

configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
Expand Down
Loading

0 comments on commit b5f96e4

Please sign in to comment.