From 92be4eec6f72c4076243f55006858a87b026cf15 Mon Sep 17 00:00:00 2001 From: Patrick Cowland Date: Tue, 28 Nov 2023 15:12:24 +0000 Subject: [PATCH 1/2] Corrected and expanded the `SchemaAttributePatch` request and response payload --- CHANGELOG.md | 1 + management/.openapi-generator/FILES | 2 + management/CHANGELOG.md | 1 + management/README.md | 1 + management/api/openapi.yaml | 172 ++++++- management/api_schemas.go | 8 +- management/docs/SchemaAttributePatch.md | 342 +++++++++++++ management/docs/SchemasApi.md | 8 +- management/generate/pingone-management.yml | 75 ++- management/model_schema_attribute_patch.go | 534 +++++++++++++++++++++ 10 files changed, 1134 insertions(+), 10 deletions(-) create mode 100644 management/docs/SchemaAttributePatch.md create mode 100644 management/model_schema_attribute_patch.go diff --git a/CHANGELOG.md b/CHANGELOG.md index c556e2e2..c46d98c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ * **Feature** Add support for User Account API (allowing lock and unlock). [#282](https://github.com/patrickcping/pingone-go-sdk-v2/pull/282) * **Enhancement** Expand the `GroupMembership` data model. [#284](https://github.com/patrickcping/pingone-go-sdk-v2/pull/284) * **Enhancement** Simplified the `GroupMembershipApi` request and response payload models. [#284](https://github.com/patrickcping/pingone-go-sdk-v2/pull/284) + * **Enhancement** Corrected and expanded the `SchemaAttributePatch` request and response payload. # Release (2023-11-10) diff --git a/management/.openapi-generator/FILES b/management/.openapi-generator/FILES index 12360a3a..74acbd64 100644 --- a/management/.openapi-generator/FILES +++ b/management/.openapi-generator/FILES @@ -522,6 +522,7 @@ docs/RolesApi.md docs/Schema.md docs/SchemaAttribute.md docs/SchemaAttributeEnumeratedValuesInner.md +docs/SchemaAttributePatch.md docs/SchemaAttributeRegexValidation.md docs/SchemaAttributeSchema.md docs/SchemasApi.md @@ -1004,6 +1005,7 @@ model_role_permissions_inner.go model_schema.go model_schema_attribute.go model_schema_attribute_enumerated_values_inner.go +model_schema_attribute_patch.go model_schema_attribute_regex_validation.go model_schema_attribute_schema.go model_sign_on_policy.go diff --git a/management/CHANGELOG.md b/management/CHANGELOG.md index 628a4a05..9dfc8e2b 100644 --- a/management/CHANGELOG.md +++ b/management/CHANGELOG.md @@ -3,6 +3,7 @@ * **Feature** Add support for User Account API (allowing lock and unlock). [#282](https://github.com/patrickcping/pingone-go-sdk-v2/pull/282) * **Enhancement** Expand the `GroupMembership` data model. [#284](https://github.com/patrickcping/pingone-go-sdk-v2/pull/284) * **Enhancement** Simplified the `GroupMembershipApi` request and response payload models. [#284](https://github.com/patrickcping/pingone-go-sdk-v2/pull/284) +* **Enhancement** Corrected and expanded the `SchemaAttributePatch` request and response payload. # v0.32.0 (2023-11-10) diff --git a/management/README.md b/management/README.md index 46b83d3f..eec0584e 100644 --- a/management/README.md +++ b/management/README.md @@ -808,6 +808,7 @@ Class | Method | HTTP request | Description - [Schema](docs/Schema.md) - [SchemaAttribute](docs/SchemaAttribute.md) - [SchemaAttributeEnumeratedValuesInner](docs/SchemaAttributeEnumeratedValuesInner.md) + - [SchemaAttributePatch](docs/SchemaAttributePatch.md) - [SchemaAttributeRegexValidation](docs/SchemaAttributeRegexValidation.md) - [SchemaAttributeSchema](docs/SchemaAttributeSchema.md) - [SignOnPolicy](docs/SignOnPolicy.md) diff --git a/management/api/openapi.yaml b/management/api/openapi.yaml index d7df9787..e18144b6 100644 --- a/management/api/openapi.yaml +++ b/management/api/openapi.yaml @@ -19369,7 +19369,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SchemaAttribute' + $ref: '#/components/schemas/SchemaAttributePatch' responses: "400": content: @@ -33106,6 +33106,176 @@ components: - name - type type: object + SchemaAttributePatch: + example: + regexValidation: + valuesPatternShouldNotMatch: + - valuesPatternShouldNotMatch + - valuesPatternShouldNotMatch + requirements: requirements + valuesPatternShouldMatch: + - valuesPatternShouldMatch + - valuesPatternShouldMatch + pattern: pattern + displayName: displayName + unique: true + name: name + schemaType: null + description: description + type: null + multiValued: true + enumeratedValues: + - archived: true + description: description + value: value + - archived: true + description: description + value: value + enabled: true + required: true + subAttributes: + - schema: + id: id + _links: + next: + href: https://openapi-generator.tech + self: + href: https://openapi-generator.tech + displayName: displayName + description: description + type: null + enumeratedValues: + - archived: true + description: description + value: value + - archived: true + description: description + value: value + enabled: true + required: true + subAttributes: + - null + - null + regexValidation: + valuesPatternShouldNotMatch: + - valuesPatternShouldNotMatch + - valuesPatternShouldNotMatch + requirements: requirements + valuesPatternShouldMatch: + - valuesPatternShouldMatch + - valuesPatternShouldMatch + pattern: pattern + environment: + id: id + unique: true + name: name + schemaType: null + id: id + ldapAttribute: ldapAttribute + multiValued: true + - schema: + id: id + _links: + next: + href: https://openapi-generator.tech + self: + href: https://openapi-generator.tech + displayName: displayName + description: description + type: null + enumeratedValues: + - archived: true + description: description + value: value + - archived: true + description: description + value: value + enabled: true + required: true + subAttributes: + - null + - null + regexValidation: + valuesPatternShouldNotMatch: + - valuesPatternShouldNotMatch + - valuesPatternShouldNotMatch + requirements: requirements + valuesPatternShouldMatch: + - valuesPatternShouldMatch + - valuesPatternShouldMatch + pattern: pattern + environment: + id: id + unique: true + name: name + schemaType: null + id: id + ldapAttribute: ldapAttribute + multiValued: true + properties: + description: + description: "A string that specifies an optional property that specifies\ + \ the description of the attribute. If provided, it must not be an empty\ + \ string. Valid characters consists of any Unicode letter, mark (for example,\ + \ accent or umlaut), numeric character, punctuation character, or space." + type: string + displayName: + description: "A string that specifies an optional property that specifies\ + \ the display name of the attribute such as 'T-shirt size’. If provided,\ + \ it must not be an empty string. Valid characters consist of any Unicode\ + \ letter, mark (for example, accent or umlaut), numeric character, forward\ + \ slash, dot, apostrophe, underscore, space, or hyphen." + type: string + enabled: + description: A boolean that specifies whether or not the attribute is enabled. + This is a required property for POST and PUT operations; it cannot be + omitted or explicitly set to null. Disabled attributes are ignored on + create/update and not returned on read. + type: boolean + name: + description: "A string that specifies the name of the attribute. The attribute\ + \ name must be provided during creation, must not be empty and must not\ + \ exceed 256 characters. It must also be unique within the schema for\ + \ an environment. It must start with a letter and may be followed by letters,\ + \ numbers or hyphens." + type: string + required: + description: A boolean that specifies whether or not the attribute is required. + Required attributes must be provided a value during create/update. Defaults + to false if not provided. + type: boolean + schemaType: + $ref: '#/components/schemas/EnumSchemaAttributeSchemaType' + subAttributes: + description: "The list of sub-attributes of this attribute. Only `COMPLEX`\ + \ attribute types can have sub-attributes, and only one-level of nesting\ + \ is allowed. The leaf attribute definition must have a type of `STRING`\ + \ or `JSON`. A `COMPLEX` attribute definition must have at least one child\ + \ attribute definition." + items: + $ref: '#/components/schemas/SchemaAttribute' + type: array + type: + $ref: '#/components/schemas/EnumSchemaAttributeType' + unique: + description: A boolean that specifies whether or not the attribute must + have a unique value within the environment. This is a required property + for POST and PUT operations; it cannot be omitted or explicitly set to + null. + type: boolean + multiValued: + description: "A boolean that specifies whether the attribute has multiple\ + \ values or a single one. This value can only change from false to true,\ + \ as changing from true to false is not allowed. Maximum number of values\ + \ stored is 1,000." + type: boolean + enumeratedValues: + items: + $ref: '#/components/schemas/SchemaAttribute_enumeratedValues_inner' + type: array + regexValidation: + $ref: '#/components/schemas/SchemaAttribute_regexValidation' + type: object SignOnPolicy: example: createdAt: createdAt diff --git a/management/api_schemas.go b/management/api_schemas.go index 8ae4a03d..f12b339b 100644 --- a/management/api_schemas.go +++ b/management/api_schemas.go @@ -1229,11 +1229,11 @@ type ApiUpdateAttributePatchRequest struct { environmentID string schemaID string attributeID string - schemaAttribute *SchemaAttribute + schemaAttributePatch *SchemaAttributePatch } -func (r ApiUpdateAttributePatchRequest) SchemaAttribute(schemaAttribute SchemaAttribute) ApiUpdateAttributePatchRequest { - r.schemaAttribute = &schemaAttribute +func (r ApiUpdateAttributePatchRequest) SchemaAttributePatch(schemaAttributePatch SchemaAttributePatch) ApiUpdateAttributePatchRequest { + r.schemaAttributePatch = &schemaAttributePatch return r } @@ -1318,7 +1318,7 @@ func (a *SchemasApiService) internalUpdateAttributePatchExecute(r ApiUpdateAttri localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = r.schemaAttribute + localVarPostBody = r.schemaAttributePatch req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err diff --git a/management/docs/SchemaAttributePatch.md b/management/docs/SchemaAttributePatch.md new file mode 100644 index 00000000..1d5d41e8 --- /dev/null +++ b/management/docs/SchemaAttributePatch.md @@ -0,0 +1,342 @@ +# SchemaAttributePatch + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Description** | Pointer to **string** | A string that specifies an optional property that specifies the description of the attribute. If provided, it must not be an empty string. Valid characters consists of any Unicode letter, mark (for example, accent or umlaut), numeric character, punctuation character, or space. | [optional] +**DisplayName** | Pointer to **string** | A string that specifies an optional property that specifies the display name of the attribute such as 'T-shirt size’. If provided, it must not be an empty string. Valid characters consist of any Unicode letter, mark (for example, accent or umlaut), numeric character, forward slash, dot, apostrophe, underscore, space, or hyphen. | [optional] +**Enabled** | Pointer to **bool** | A boolean that specifies whether or not the attribute is enabled. This is a required property for POST and PUT operations; it cannot be omitted or explicitly set to null. Disabled attributes are ignored on create/update and not returned on read. | [optional] +**Name** | Pointer to **string** | A string that specifies the name of the attribute. The attribute name must be provided during creation, must not be empty and must not exceed 256 characters. It must also be unique within the schema for an environment. It must start with a letter and may be followed by letters, numbers or hyphens. | [optional] +**Required** | Pointer to **bool** | A boolean that specifies whether or not the attribute is required. Required attributes must be provided a value during create/update. Defaults to false if not provided. | [optional] +**SchemaType** | Pointer to [**EnumSchemaAttributeSchemaType**](EnumSchemaAttributeSchemaType.md) | | [optional] +**SubAttributes** | Pointer to [**[]SchemaAttribute**](SchemaAttribute.md) | The list of sub-attributes of this attribute. Only `COMPLEX` attribute types can have sub-attributes, and only one-level of nesting is allowed. The leaf attribute definition must have a type of `STRING` or `JSON`. A `COMPLEX` attribute definition must have at least one child attribute definition. | [optional] +**Type** | Pointer to [**EnumSchemaAttributeType**](EnumSchemaAttributeType.md) | | [optional] [default to ENUMSCHEMAATTRIBUTETYPE_STRING] +**Unique** | Pointer to **bool** | A boolean that specifies whether or not the attribute must have a unique value within the environment. This is a required property for POST and PUT operations; it cannot be omitted or explicitly set to null. | [optional] +**MultiValued** | Pointer to **bool** | A boolean that specifies whether the attribute has multiple values or a single one. This value can only change from false to true, as changing from true to false is not allowed. Maximum number of values stored is 1,000. | [optional] +**EnumeratedValues** | Pointer to [**[]SchemaAttributeEnumeratedValuesInner**](SchemaAttributeEnumeratedValuesInner.md) | | [optional] +**RegexValidation** | Pointer to [**SchemaAttributeRegexValidation**](SchemaAttributeRegexValidation.md) | | [optional] + +## Methods + +### NewSchemaAttributePatch + +`func NewSchemaAttributePatch() *SchemaAttributePatch` + +NewSchemaAttributePatch instantiates a new SchemaAttributePatch object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSchemaAttributePatchWithDefaults + +`func NewSchemaAttributePatchWithDefaults() *SchemaAttributePatch` + +NewSchemaAttributePatchWithDefaults instantiates a new SchemaAttributePatch object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDescription + +`func (o *SchemaAttributePatch) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *SchemaAttributePatch) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *SchemaAttributePatch) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *SchemaAttributePatch) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetDisplayName + +`func (o *SchemaAttributePatch) GetDisplayName() string` + +GetDisplayName returns the DisplayName field if non-nil, zero value otherwise. + +### GetDisplayNameOk + +`func (o *SchemaAttributePatch) GetDisplayNameOk() (*string, bool)` + +GetDisplayNameOk returns a tuple with the DisplayName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisplayName + +`func (o *SchemaAttributePatch) SetDisplayName(v string)` + +SetDisplayName sets DisplayName field to given value. + +### HasDisplayName + +`func (o *SchemaAttributePatch) HasDisplayName() bool` + +HasDisplayName returns a boolean if a field has been set. + +### GetEnabled + +`func (o *SchemaAttributePatch) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *SchemaAttributePatch) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *SchemaAttributePatch) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *SchemaAttributePatch) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + +### GetName + +`func (o *SchemaAttributePatch) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *SchemaAttributePatch) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *SchemaAttributePatch) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *SchemaAttributePatch) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetRequired + +`func (o *SchemaAttributePatch) GetRequired() bool` + +GetRequired returns the Required field if non-nil, zero value otherwise. + +### GetRequiredOk + +`func (o *SchemaAttributePatch) GetRequiredOk() (*bool, bool)` + +GetRequiredOk returns a tuple with the Required field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRequired + +`func (o *SchemaAttributePatch) SetRequired(v bool)` + +SetRequired sets Required field to given value. + +### HasRequired + +`func (o *SchemaAttributePatch) HasRequired() bool` + +HasRequired returns a boolean if a field has been set. + +### GetSchemaType + +`func (o *SchemaAttributePatch) GetSchemaType() EnumSchemaAttributeSchemaType` + +GetSchemaType returns the SchemaType field if non-nil, zero value otherwise. + +### GetSchemaTypeOk + +`func (o *SchemaAttributePatch) GetSchemaTypeOk() (*EnumSchemaAttributeSchemaType, bool)` + +GetSchemaTypeOk returns a tuple with the SchemaType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSchemaType + +`func (o *SchemaAttributePatch) SetSchemaType(v EnumSchemaAttributeSchemaType)` + +SetSchemaType sets SchemaType field to given value. + +### HasSchemaType + +`func (o *SchemaAttributePatch) HasSchemaType() bool` + +HasSchemaType returns a boolean if a field has been set. + +### GetSubAttributes + +`func (o *SchemaAttributePatch) GetSubAttributes() []SchemaAttribute` + +GetSubAttributes returns the SubAttributes field if non-nil, zero value otherwise. + +### GetSubAttributesOk + +`func (o *SchemaAttributePatch) GetSubAttributesOk() (*[]SchemaAttribute, bool)` + +GetSubAttributesOk returns a tuple with the SubAttributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubAttributes + +`func (o *SchemaAttributePatch) SetSubAttributes(v []SchemaAttribute)` + +SetSubAttributes sets SubAttributes field to given value. + +### HasSubAttributes + +`func (o *SchemaAttributePatch) HasSubAttributes() bool` + +HasSubAttributes returns a boolean if a field has been set. + +### GetType + +`func (o *SchemaAttributePatch) GetType() EnumSchemaAttributeType` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *SchemaAttributePatch) GetTypeOk() (*EnumSchemaAttributeType, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *SchemaAttributePatch) SetType(v EnumSchemaAttributeType)` + +SetType sets Type field to given value. + +### HasType + +`func (o *SchemaAttributePatch) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetUnique + +`func (o *SchemaAttributePatch) GetUnique() bool` + +GetUnique returns the Unique field if non-nil, zero value otherwise. + +### GetUniqueOk + +`func (o *SchemaAttributePatch) GetUniqueOk() (*bool, bool)` + +GetUniqueOk returns a tuple with the Unique field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUnique + +`func (o *SchemaAttributePatch) SetUnique(v bool)` + +SetUnique sets Unique field to given value. + +### HasUnique + +`func (o *SchemaAttributePatch) HasUnique() bool` + +HasUnique returns a boolean if a field has been set. + +### GetMultiValued + +`func (o *SchemaAttributePatch) GetMultiValued() bool` + +GetMultiValued returns the MultiValued field if non-nil, zero value otherwise. + +### GetMultiValuedOk + +`func (o *SchemaAttributePatch) GetMultiValuedOk() (*bool, bool)` + +GetMultiValuedOk returns a tuple with the MultiValued field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMultiValued + +`func (o *SchemaAttributePatch) SetMultiValued(v bool)` + +SetMultiValued sets MultiValued field to given value. + +### HasMultiValued + +`func (o *SchemaAttributePatch) HasMultiValued() bool` + +HasMultiValued returns a boolean if a field has been set. + +### GetEnumeratedValues + +`func (o *SchemaAttributePatch) GetEnumeratedValues() []SchemaAttributeEnumeratedValuesInner` + +GetEnumeratedValues returns the EnumeratedValues field if non-nil, zero value otherwise. + +### GetEnumeratedValuesOk + +`func (o *SchemaAttributePatch) GetEnumeratedValuesOk() (*[]SchemaAttributeEnumeratedValuesInner, bool)` + +GetEnumeratedValuesOk returns a tuple with the EnumeratedValues field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnumeratedValues + +`func (o *SchemaAttributePatch) SetEnumeratedValues(v []SchemaAttributeEnumeratedValuesInner)` + +SetEnumeratedValues sets EnumeratedValues field to given value. + +### HasEnumeratedValues + +`func (o *SchemaAttributePatch) HasEnumeratedValues() bool` + +HasEnumeratedValues returns a boolean if a field has been set. + +### GetRegexValidation + +`func (o *SchemaAttributePatch) GetRegexValidation() SchemaAttributeRegexValidation` + +GetRegexValidation returns the RegexValidation field if non-nil, zero value otherwise. + +### GetRegexValidationOk + +`func (o *SchemaAttributePatch) GetRegexValidationOk() (*SchemaAttributeRegexValidation, bool)` + +GetRegexValidationOk returns a tuple with the RegexValidation field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRegexValidation + +`func (o *SchemaAttributePatch) SetRegexValidation(v SchemaAttributeRegexValidation)` + +SetRegexValidation sets RegexValidation field to given value. + +### HasRegexValidation + +`func (o *SchemaAttributePatch) HasRegexValidation() bool` + +HasRegexValidation returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/management/docs/SchemasApi.md b/management/docs/SchemasApi.md index dfc1e885..f2055cc8 100644 --- a/management/docs/SchemasApi.md +++ b/management/docs/SchemasApi.md @@ -446,7 +446,7 @@ Name | Type | Description | Notes ## UpdateAttributePatch -> SchemaAttribute UpdateAttributePatch(ctx, environmentID, schemaID, attributeID).SchemaAttribute(schemaAttribute).Execute() +> SchemaAttribute UpdateAttributePatch(ctx, environmentID, schemaID, attributeID).SchemaAttributePatch(schemaAttributePatch).Execute() UPDATE Attribute (Patch) @@ -466,11 +466,11 @@ func main() { environmentID := "environmentID_example" // string | schemaID := "schemaID_example" // string | attributeID := "attributeID_example" // string | - schemaAttribute := *openapiclient.NewSchemaAttribute(false, "Name_example", openapiclient.EnumSchemaAttributeType("STRING")) // SchemaAttribute | (optional) + schemaAttributePatch := *openapiclient.NewSchemaAttributePatch() // SchemaAttributePatch | (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SchemasApi.UpdateAttributePatch(context.Background(), environmentID, schemaID, attributeID).SchemaAttribute(schemaAttribute).Execute() + resp, r, err := apiClient.SchemasApi.UpdateAttributePatch(context.Background(), environmentID, schemaID, attributeID).SchemaAttributePatch(schemaAttributePatch).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `SchemasApi.UpdateAttributePatch``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -500,7 +500,7 @@ Name | Type | Description | Notes - **schemaAttribute** | [**SchemaAttribute**](SchemaAttribute.md) | | + **schemaAttributePatch** | [**SchemaAttributePatch**](SchemaAttributePatch.md) | | ### Return type diff --git a/management/generate/pingone-management.yml b/management/generate/pingone-management.yml index 20bbd7ad..10a6ef95 100644 --- a/management/generate/pingone-management.yml +++ b/management/generate/pingone-management.yml @@ -5427,6 +5427,79 @@ components: - name - enabled - type + SchemaAttributePatch: + type: object + properties: + description: + type: string + description: A string that specifies an optional property that specifies the description of the attribute. If provided, it must not be an empty string. Valid characters consists of any Unicode letter, mark (for example, accent or umlaut), numeric character, punctuation character, or space. + displayName: + type: string + description: A string that specifies an optional property that specifies the display name of the attribute such as 'T-shirt size’. If provided, it must not be an empty string. Valid characters consist of any Unicode letter, mark (for example, accent or umlaut), numeric character, forward slash, dot, apostrophe, underscore, space, or hyphen. + enabled: + type: boolean + description: A boolean that specifies whether or not the attribute is enabled. This is a required property for POST and PUT operations; it cannot be omitted or explicitly set to null. Disabled attributes are ignored on create/update and not returned on read. + name: + type: string + description: A string that specifies the name of the attribute. The attribute name must be provided during creation, must not be empty and must not exceed 256 characters. It must also be unique within the schema for an environment. It must start with a letter and may be followed by letters, numbers or hyphens. + required: + type: boolean + description: A boolean that specifies whether or not the attribute is required. Required attributes must be provided a value during create/update. Defaults to false if not provided. + schemaType: + $ref: '#/components/schemas/EnumSchemaAttributeSchemaType' + subAttributes: + type: array + description: The list of sub-attributes of this attribute. Only `COMPLEX` attribute types can have sub-attributes, and only one-level of nesting is allowed. The leaf attribute definition must have a type of `STRING` or `JSON`. A `COMPLEX` attribute definition must have at least one child attribute definition. + items: + $ref: '#/components/schemas/SchemaAttribute' + type: + $ref: '#/components/schemas/EnumSchemaAttributeType' + unique: + type: boolean + description: A boolean that specifies whether or not the attribute must have a unique value within the environment. This is a required property for POST and PUT operations; it cannot be omitted or explicitly set to null. + multiValued: + type: boolean + description: A boolean that specifies whether the attribute has multiple values or a single one. This value can only change from false to true, as changing from true to false is not allowed. Maximum number of values stored is 1,000. + enumeratedValues: + type: array + items: + type: object + description: An object representation of an enumerated value. Maximum number of enumerations is 100. + properties: + value: + type: string + description: A string that specifies the immutable value. Values are case sensitive; two values that differ only by case are not allowed. + archived: + type: boolean + description: A boolean that specifies whether the enumerated value is archived. Archived values cannot be added to a user, but existing archived values are preserved. This allows clients that read the schema to know all possible values of an attribute. + description: + type: string + description: A string that specifies the description of the enumerated value. + required: + - value + regexValidation: + type: object + description: Object representation of the optional regular expression representation of this attribute. + properties: + pattern: + type: string + description: A string that specifies the regular expression to which the attribute must conform. + requirements: + type: string + description: A string that specifies a developer friendly description of the regular expression requirements. + valuesPatternShouldMatch: + type: array + description: An array that specifies the list of strings matching the regular expression. + items: + type: string + valuesPatternShouldNotMatch: + type: array + description: An array that specifies the list of strings not matching the regular expression. + items: + type: string + required: + - pattern + - requirements SignOnPolicy: type: object properties: @@ -17380,7 +17453,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SchemaAttribute' + $ref: '#/components/schemas/SchemaAttributePatch' example: name: NewName schemaType: CORE diff --git a/management/model_schema_attribute_patch.go b/management/model_schema_attribute_patch.go new file mode 100644 index 00000000..ddbf8fd5 --- /dev/null +++ b/management/model_schema_attribute_patch.go @@ -0,0 +1,534 @@ +/* +PingOne Platform API - SSO and Base + +The PingOne Platform API covering the base and SSO services (otherwise known as the Management APIs) + +API version: 2023-06-29 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package management + +import ( + "encoding/json" +) + +// checks if the SchemaAttributePatch type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SchemaAttributePatch{} + +// SchemaAttributePatch struct for SchemaAttributePatch +type SchemaAttributePatch struct { + // A string that specifies an optional property that specifies the description of the attribute. If provided, it must not be an empty string. Valid characters consists of any Unicode letter, mark (for example, accent or umlaut), numeric character, punctuation character, or space. + Description *string `json:"description,omitempty"` + // A string that specifies an optional property that specifies the display name of the attribute such as 'T-shirt size’. If provided, it must not be an empty string. Valid characters consist of any Unicode letter, mark (for example, accent or umlaut), numeric character, forward slash, dot, apostrophe, underscore, space, or hyphen. + DisplayName *string `json:"displayName,omitempty"` + // A boolean that specifies whether or not the attribute is enabled. This is a required property for POST and PUT operations; it cannot be omitted or explicitly set to null. Disabled attributes are ignored on create/update and not returned on read. + Enabled *bool `json:"enabled,omitempty"` + // A string that specifies the name of the attribute. The attribute name must be provided during creation, must not be empty and must not exceed 256 characters. It must also be unique within the schema for an environment. It must start with a letter and may be followed by letters, numbers or hyphens. + Name *string `json:"name,omitempty"` + // A boolean that specifies whether or not the attribute is required. Required attributes must be provided a value during create/update. Defaults to false if not provided. + Required *bool `json:"required,omitempty"` + SchemaType *EnumSchemaAttributeSchemaType `json:"schemaType,omitempty"` + // The list of sub-attributes of this attribute. Only `COMPLEX` attribute types can have sub-attributes, and only one-level of nesting is allowed. The leaf attribute definition must have a type of `STRING` or `JSON`. A `COMPLEX` attribute definition must have at least one child attribute definition. + SubAttributes []SchemaAttribute `json:"subAttributes,omitempty"` + Type *EnumSchemaAttributeType `json:"type,omitempty"` + // A boolean that specifies whether or not the attribute must have a unique value within the environment. This is a required property for POST and PUT operations; it cannot be omitted or explicitly set to null. + Unique *bool `json:"unique,omitempty"` + // A boolean that specifies whether the attribute has multiple values or a single one. This value can only change from false to true, as changing from true to false is not allowed. Maximum number of values stored is 1,000. + MultiValued *bool `json:"multiValued,omitempty"` + EnumeratedValues []SchemaAttributeEnumeratedValuesInner `json:"enumeratedValues,omitempty"` + RegexValidation *SchemaAttributeRegexValidation `json:"regexValidation,omitempty"` +} + +// NewSchemaAttributePatch instantiates a new SchemaAttributePatch object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSchemaAttributePatch() *SchemaAttributePatch { + this := SchemaAttributePatch{} + var type_ EnumSchemaAttributeType = ENUMSCHEMAATTRIBUTETYPE_STRING + this.Type = &type_ + return &this +} + +// NewSchemaAttributePatchWithDefaults instantiates a new SchemaAttributePatch object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSchemaAttributePatchWithDefaults() *SchemaAttributePatch { + this := SchemaAttributePatch{} + var type_ EnumSchemaAttributeType = ENUMSCHEMAATTRIBUTETYPE_STRING + this.Type = &type_ + return &this +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *SchemaAttributePatch) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SchemaAttributePatch) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *SchemaAttributePatch) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *SchemaAttributePatch) SetDescription(v string) { + o.Description = &v +} + +// GetDisplayName returns the DisplayName field value if set, zero value otherwise. +func (o *SchemaAttributePatch) GetDisplayName() string { + if o == nil || IsNil(o.DisplayName) { + var ret string + return ret + } + return *o.DisplayName +} + +// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SchemaAttributePatch) GetDisplayNameOk() (*string, bool) { + if o == nil || IsNil(o.DisplayName) { + return nil, false + } + return o.DisplayName, true +} + +// HasDisplayName returns a boolean if a field has been set. +func (o *SchemaAttributePatch) HasDisplayName() bool { + if o != nil && !IsNil(o.DisplayName) { + return true + } + + return false +} + +// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field. +func (o *SchemaAttributePatch) SetDisplayName(v string) { + o.DisplayName = &v +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *SchemaAttributePatch) GetEnabled() bool { + if o == nil || IsNil(o.Enabled) { + var ret bool + return ret + } + return *o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SchemaAttributePatch) GetEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *SchemaAttributePatch) HasEnabled() bool { + if o != nil && !IsNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *SchemaAttributePatch) SetEnabled(v bool) { + o.Enabled = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *SchemaAttributePatch) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SchemaAttributePatch) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *SchemaAttributePatch) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *SchemaAttributePatch) SetName(v string) { + o.Name = &v +} + +// GetRequired returns the Required field value if set, zero value otherwise. +func (o *SchemaAttributePatch) GetRequired() bool { + if o == nil || IsNil(o.Required) { + var ret bool + return ret + } + return *o.Required +} + +// GetRequiredOk returns a tuple with the Required field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SchemaAttributePatch) GetRequiredOk() (*bool, bool) { + if o == nil || IsNil(o.Required) { + return nil, false + } + return o.Required, true +} + +// HasRequired returns a boolean if a field has been set. +func (o *SchemaAttributePatch) HasRequired() bool { + if o != nil && !IsNil(o.Required) { + return true + } + + return false +} + +// SetRequired gets a reference to the given bool and assigns it to the Required field. +func (o *SchemaAttributePatch) SetRequired(v bool) { + o.Required = &v +} + +// GetSchemaType returns the SchemaType field value if set, zero value otherwise. +func (o *SchemaAttributePatch) GetSchemaType() EnumSchemaAttributeSchemaType { + if o == nil || IsNil(o.SchemaType) { + var ret EnumSchemaAttributeSchemaType + return ret + } + return *o.SchemaType +} + +// GetSchemaTypeOk returns a tuple with the SchemaType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SchemaAttributePatch) GetSchemaTypeOk() (*EnumSchemaAttributeSchemaType, bool) { + if o == nil || IsNil(o.SchemaType) { + return nil, false + } + return o.SchemaType, true +} + +// HasSchemaType returns a boolean if a field has been set. +func (o *SchemaAttributePatch) HasSchemaType() bool { + if o != nil && !IsNil(o.SchemaType) { + return true + } + + return false +} + +// SetSchemaType gets a reference to the given EnumSchemaAttributeSchemaType and assigns it to the SchemaType field. +func (o *SchemaAttributePatch) SetSchemaType(v EnumSchemaAttributeSchemaType) { + o.SchemaType = &v +} + +// GetSubAttributes returns the SubAttributes field value if set, zero value otherwise. +func (o *SchemaAttributePatch) GetSubAttributes() []SchemaAttribute { + if o == nil || IsNil(o.SubAttributes) { + var ret []SchemaAttribute + return ret + } + return o.SubAttributes +} + +// GetSubAttributesOk returns a tuple with the SubAttributes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SchemaAttributePatch) GetSubAttributesOk() ([]SchemaAttribute, bool) { + if o == nil || IsNil(o.SubAttributes) { + return nil, false + } + return o.SubAttributes, true +} + +// HasSubAttributes returns a boolean if a field has been set. +func (o *SchemaAttributePatch) HasSubAttributes() bool { + if o != nil && !IsNil(o.SubAttributes) { + return true + } + + return false +} + +// SetSubAttributes gets a reference to the given []SchemaAttribute and assigns it to the SubAttributes field. +func (o *SchemaAttributePatch) SetSubAttributes(v []SchemaAttribute) { + o.SubAttributes = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *SchemaAttributePatch) GetType() EnumSchemaAttributeType { + if o == nil || IsNil(o.Type) { + var ret EnumSchemaAttributeType + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SchemaAttributePatch) GetTypeOk() (*EnumSchemaAttributeType, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *SchemaAttributePatch) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given EnumSchemaAttributeType and assigns it to the Type field. +func (o *SchemaAttributePatch) SetType(v EnumSchemaAttributeType) { + o.Type = &v +} + +// GetUnique returns the Unique field value if set, zero value otherwise. +func (o *SchemaAttributePatch) GetUnique() bool { + if o == nil || IsNil(o.Unique) { + var ret bool + return ret + } + return *o.Unique +} + +// GetUniqueOk returns a tuple with the Unique field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SchemaAttributePatch) GetUniqueOk() (*bool, bool) { + if o == nil || IsNil(o.Unique) { + return nil, false + } + return o.Unique, true +} + +// HasUnique returns a boolean if a field has been set. +func (o *SchemaAttributePatch) HasUnique() bool { + if o != nil && !IsNil(o.Unique) { + return true + } + + return false +} + +// SetUnique gets a reference to the given bool and assigns it to the Unique field. +func (o *SchemaAttributePatch) SetUnique(v bool) { + o.Unique = &v +} + +// GetMultiValued returns the MultiValued field value if set, zero value otherwise. +func (o *SchemaAttributePatch) GetMultiValued() bool { + if o == nil || IsNil(o.MultiValued) { + var ret bool + return ret + } + return *o.MultiValued +} + +// GetMultiValuedOk returns a tuple with the MultiValued field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SchemaAttributePatch) GetMultiValuedOk() (*bool, bool) { + if o == nil || IsNil(o.MultiValued) { + return nil, false + } + return o.MultiValued, true +} + +// HasMultiValued returns a boolean if a field has been set. +func (o *SchemaAttributePatch) HasMultiValued() bool { + if o != nil && !IsNil(o.MultiValued) { + return true + } + + return false +} + +// SetMultiValued gets a reference to the given bool and assigns it to the MultiValued field. +func (o *SchemaAttributePatch) SetMultiValued(v bool) { + o.MultiValued = &v +} + +// GetEnumeratedValues returns the EnumeratedValues field value if set, zero value otherwise. +func (o *SchemaAttributePatch) GetEnumeratedValues() []SchemaAttributeEnumeratedValuesInner { + if o == nil || IsNil(o.EnumeratedValues) { + var ret []SchemaAttributeEnumeratedValuesInner + return ret + } + return o.EnumeratedValues +} + +// GetEnumeratedValuesOk returns a tuple with the EnumeratedValues field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SchemaAttributePatch) GetEnumeratedValuesOk() ([]SchemaAttributeEnumeratedValuesInner, bool) { + if o == nil || IsNil(o.EnumeratedValues) { + return nil, false + } + return o.EnumeratedValues, true +} + +// HasEnumeratedValues returns a boolean if a field has been set. +func (o *SchemaAttributePatch) HasEnumeratedValues() bool { + if o != nil && !IsNil(o.EnumeratedValues) { + return true + } + + return false +} + +// SetEnumeratedValues gets a reference to the given []SchemaAttributeEnumeratedValuesInner and assigns it to the EnumeratedValues field. +func (o *SchemaAttributePatch) SetEnumeratedValues(v []SchemaAttributeEnumeratedValuesInner) { + o.EnumeratedValues = v +} + +// GetRegexValidation returns the RegexValidation field value if set, zero value otherwise. +func (o *SchemaAttributePatch) GetRegexValidation() SchemaAttributeRegexValidation { + if o == nil || IsNil(o.RegexValidation) { + var ret SchemaAttributeRegexValidation + return ret + } + return *o.RegexValidation +} + +// GetRegexValidationOk returns a tuple with the RegexValidation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SchemaAttributePatch) GetRegexValidationOk() (*SchemaAttributeRegexValidation, bool) { + if o == nil || IsNil(o.RegexValidation) { + return nil, false + } + return o.RegexValidation, true +} + +// HasRegexValidation returns a boolean if a field has been set. +func (o *SchemaAttributePatch) HasRegexValidation() bool { + if o != nil && !IsNil(o.RegexValidation) { + return true + } + + return false +} + +// SetRegexValidation gets a reference to the given SchemaAttributeRegexValidation and assigns it to the RegexValidation field. +func (o *SchemaAttributePatch) SetRegexValidation(v SchemaAttributeRegexValidation) { + o.RegexValidation = &v +} + +func (o SchemaAttributePatch) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SchemaAttributePatch) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.DisplayName) { + toSerialize["displayName"] = o.DisplayName + } + if !IsNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Required) { + toSerialize["required"] = o.Required + } + if !IsNil(o.SchemaType) { + toSerialize["schemaType"] = o.SchemaType + } + if !IsNil(o.SubAttributes) { + toSerialize["subAttributes"] = o.SubAttributes + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Unique) { + toSerialize["unique"] = o.Unique + } + if !IsNil(o.MultiValued) { + toSerialize["multiValued"] = o.MultiValued + } + if !IsNil(o.EnumeratedValues) { + toSerialize["enumeratedValues"] = o.EnumeratedValues + } + if !IsNil(o.RegexValidation) { + toSerialize["regexValidation"] = o.RegexValidation + } + return toSerialize, nil +} + +type NullableSchemaAttributePatch struct { + value *SchemaAttributePatch + isSet bool +} + +func (v NullableSchemaAttributePatch) Get() *SchemaAttributePatch { + return v.value +} + +func (v *NullableSchemaAttributePatch) Set(val *SchemaAttributePatch) { + v.value = val + v.isSet = true +} + +func (v NullableSchemaAttributePatch) IsSet() bool { + return v.isSet +} + +func (v *NullableSchemaAttributePatch) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSchemaAttributePatch(val *SchemaAttributePatch) *NullableSchemaAttributePatch { + return &NullableSchemaAttributePatch{value: val, isSet: true} +} + +func (v NullableSchemaAttributePatch) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSchemaAttributePatch) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + From 2c5df6247404799bd6fa81f0401fbfa7706d265c Mon Sep 17 00:00:00 2001 From: Patrick Cowland Date: Tue, 28 Nov 2023 15:13:15 +0000 Subject: [PATCH 2/2] changelog --- CHANGELOG.md | 2 +- management/CHANGELOG.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c46d98c6..94cb45fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ * **Feature** Add support for User Account API (allowing lock and unlock). [#282](https://github.com/patrickcping/pingone-go-sdk-v2/pull/282) * **Enhancement** Expand the `GroupMembership` data model. [#284](https://github.com/patrickcping/pingone-go-sdk-v2/pull/284) * **Enhancement** Simplified the `GroupMembershipApi` request and response payload models. [#284](https://github.com/patrickcping/pingone-go-sdk-v2/pull/284) - * **Enhancement** Corrected and expanded the `SchemaAttributePatch` request and response payload. + * **Enhancement** Corrected and expanded the `SchemaAttributePatch` request and response payload. [#285](https://github.com/patrickcping/pingone-go-sdk-v2/pull/285) # Release (2023-11-10) diff --git a/management/CHANGELOG.md b/management/CHANGELOG.md index 9dfc8e2b..1cfc2029 100644 --- a/management/CHANGELOG.md +++ b/management/CHANGELOG.md @@ -3,7 +3,7 @@ * **Feature** Add support for User Account API (allowing lock and unlock). [#282](https://github.com/patrickcping/pingone-go-sdk-v2/pull/282) * **Enhancement** Expand the `GroupMembership` data model. [#284](https://github.com/patrickcping/pingone-go-sdk-v2/pull/284) * **Enhancement** Simplified the `GroupMembershipApi` request and response payload models. [#284](https://github.com/patrickcping/pingone-go-sdk-v2/pull/284) -* **Enhancement** Corrected and expanded the `SchemaAttributePatch` request and response payload. +* **Enhancement** Corrected and expanded the `SchemaAttributePatch` request and response payload. [#285](https://github.com/patrickcping/pingone-go-sdk-v2/pull/285) # v0.32.0 (2023-11-10)