From 565f1369292f1868a8797c990384f0ec25740f18 Mon Sep 17 00:00:00 2001 From: henryrecker-pingidentity <58565376+henryrecker-pingidentity@users.noreply.github.com> Date: Tue, 19 Nov 2024 17:15:58 -0600 Subject: [PATCH] Remove duplicate prop and incorrect required --- api/pf-swagger.yaml | 17 --------- configurationapi/api/openapi.yaml | 15 -------- configurationapi/docs/ArtifactSettings.md | 9 +++-- .../docs/DataStoreRepositoryAggregation.md | 2 +- .../docs/JdbcDataStoreRepository.md | 23 +----------- .../docs/LdapDataStoreRepository.md | 23 +----------- configurationapi/model_artifact_settings.go | 35 ++++++++++++------- .../model_jdbc_data_store_repository.go | 29 +-------------- .../model_ldap_data_store_repository.go | 29 +-------------- 9 files changed, 34 insertions(+), 148 deletions(-) diff --git a/api/pf-swagger.yaml b/api/pf-swagger.yaml index 821dda9..60ffd13 100644 --- a/api/pf-swagger.yaml +++ b/api/pf-swagger.yaml @@ -17300,7 +17300,6 @@ components: description: The remote party URLs to resolve the artifact. ArtifactSettings: required: - - lifetime - resolverLocations type: object properties: @@ -18497,19 +18496,11 @@ components: allOf: - $ref: "#/components/schemas/DataStoreRepository" - required: - - jitRepositoryAttributeMapping - sqlMethod type: object properties: sqlMethod: $ref: "#/components/schemas/SqlMethod" - jitRepositoryAttributeMapping: - type: object - additionalProperties: - $ref: "#/components/schemas/AttributeFulfillmentValue" - description: - A list of user repository mappings from attribute names to - their fulfillment values. description: JDBC data store user repository. JitProvisioning: required: @@ -18555,7 +18546,6 @@ components: allOf: - $ref: "#/components/schemas/DataStoreRepository" - required: - - jitRepositoryAttributeMapping - uniqueUserIdFilter type: object properties: @@ -18569,13 +18559,6 @@ components: description: "The expression that results in a unique user identifier,\ \ when combined with the Base DN." - jitRepositoryAttributeMapping: - type: object - additionalProperties: - $ref: "#/components/schemas/AttributeFulfillmentValue" - description: - A list of user repository mappings from attribute names to - their fulfillment values. description: LDAP data store user repository. LdapInboundProvisioningUserRepository: allOf: diff --git a/configurationapi/api/openapi.yaml b/configurationapi/api/openapi.yaml index aa24349..d377ef9 100644 --- a/configurationapi/api/openapi.yaml +++ b/configurationapi/api/openapi.yaml @@ -19283,7 +19283,6 @@ components: description: Source ID for SAML1.x connections type: string required: - - lifetime - resolverLocations type: object AssertionLifetime: @@ -20726,14 +20725,7 @@ components: properties: sqlMethod: $ref: '#/components/schemas/SqlMethod' - jitRepositoryAttributeMapping: - additionalProperties: - $ref: '#/components/schemas/AttributeFulfillmentValue' - description: A list of user repository mappings from attribute names to - their fulfillment values. - type: object required: - - jitRepositoryAttributeMapping - sqlMethod type: object JitProvisioning: @@ -20786,14 +20778,7 @@ components: description: "The expression that results in a unique user identifier,\ \ when combined with the Base DN." type: string - jitRepositoryAttributeMapping: - additionalProperties: - $ref: '#/components/schemas/AttributeFulfillmentValue' - description: A list of user repository mappings from attribute names to - their fulfillment values. - type: object required: - - jitRepositoryAttributeMapping - uniqueUserIdFilter type: object LdapInboundProvisioningUserRepository: diff --git a/configurationapi/docs/ArtifactSettings.md b/configurationapi/docs/ArtifactSettings.md index 1a61ee7..ea0c7db 100644 --- a/configurationapi/docs/ArtifactSettings.md +++ b/configurationapi/docs/ArtifactSettings.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Lifetime** | **int64** | The lifetime of the artifact in seconds. | +**Lifetime** | Pointer to **int64** | The lifetime of the artifact in seconds. | [optional] **ResolverLocations** | [**[]ArtifactResolverLocation**](ArtifactResolverLocation.md) | Remote party URLs that you will use to resolve/translate the artifact and get the actual protocol message | **SourceId** | Pointer to **string** | Source ID for SAML1.x connections | [optional] @@ -12,7 +12,7 @@ Name | Type | Description | Notes ### NewArtifactSettings -`func NewArtifactSettings(lifetime int64, resolverLocations []ArtifactResolverLocation, ) *ArtifactSettings` +`func NewArtifactSettings(resolverLocations []ArtifactResolverLocation, ) *ArtifactSettings` NewArtifactSettings instantiates a new ArtifactSettings object This constructor will assign default values to properties that have it defined, @@ -46,6 +46,11 @@ and a boolean to check if the value has been set. SetLifetime sets Lifetime field to given value. +### HasLifetime + +`func (o *ArtifactSettings) HasLifetime() bool` + +HasLifetime returns a boolean if a field has been set. ### GetResolverLocations diff --git a/configurationapi/docs/DataStoreRepositoryAggregation.md b/configurationapi/docs/DataStoreRepositoryAggregation.md index 9eea34b..f57009e 100644 --- a/configurationapi/docs/DataStoreRepositoryAggregation.md +++ b/configurationapi/docs/DataStoreRepositoryAggregation.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Type** | **string** | The data store repository type. | **DataStoreRef** | [**ResourceLink**](ResourceLink.md) | | -**JitRepositoryAttributeMapping** | [**map[string]AttributeFulfillmentValue**](AttributeFulfillmentValue.md) | A list of user repository mappings from attribute names to their fulfillment values. | +**JitRepositoryAttributeMapping** | [**map[string]AttributeFulfillmentValue**](AttributeFulfillmentValue.md) | The user repository attribute mapping. | **BaseDn** | Pointer to **string** | The base DN to search from. If not specified, the search will start at the LDAP's root. | [optional] **UniqueUserIdFilter** | **string** | The expression that results in a unique user identifier, when combined with the Base DN. | diff --git a/configurationapi/docs/JdbcDataStoreRepository.md b/configurationapi/docs/JdbcDataStoreRepository.md index db9353f..c25629a 100644 --- a/configurationapi/docs/JdbcDataStoreRepository.md +++ b/configurationapi/docs/JdbcDataStoreRepository.md @@ -5,13 +5,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **SqlMethod** | [**SqlMethod**](SqlMethod.md) | | -**JitRepositoryAttributeMapping** | [**map[string]AttributeFulfillmentValue**](AttributeFulfillmentValue.md) | A list of user repository mappings from attribute names to their fulfillment values. | ## Methods ### NewJdbcDataStoreRepository -`func NewJdbcDataStoreRepository(sqlMethod SqlMethod, jitRepositoryAttributeMapping map[string]AttributeFulfillmentValue, ) *JdbcDataStoreRepository` +`func NewJdbcDataStoreRepository(sqlMethod SqlMethod, ) *JdbcDataStoreRepository` NewJdbcDataStoreRepository instantiates a new JdbcDataStoreRepository object This constructor will assign default values to properties that have it defined, @@ -46,26 +45,6 @@ and a boolean to check if the value has been set. SetSqlMethod sets SqlMethod field to given value. -### GetJitRepositoryAttributeMapping - -`func (o *JdbcDataStoreRepository) GetJitRepositoryAttributeMapping() map[string]AttributeFulfillmentValue` - -GetJitRepositoryAttributeMapping returns the JitRepositoryAttributeMapping field if non-nil, zero value otherwise. - -### GetJitRepositoryAttributeMappingOk - -`func (o *JdbcDataStoreRepository) GetJitRepositoryAttributeMappingOk() (*map[string]AttributeFulfillmentValue, bool)` - -GetJitRepositoryAttributeMappingOk returns a tuple with the JitRepositoryAttributeMapping field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetJitRepositoryAttributeMapping - -`func (o *JdbcDataStoreRepository) SetJitRepositoryAttributeMapping(v map[string]AttributeFulfillmentValue)` - -SetJitRepositoryAttributeMapping sets JitRepositoryAttributeMapping field to given value. - - [[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/configurationapi/docs/LdapDataStoreRepository.md b/configurationapi/docs/LdapDataStoreRepository.md index 10cf44a..b6d6c2f 100644 --- a/configurationapi/docs/LdapDataStoreRepository.md +++ b/configurationapi/docs/LdapDataStoreRepository.md @@ -6,13 +6,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **BaseDn** | Pointer to **string** | The base DN to search from. If not specified, the search will start at the LDAP's root. | [optional] **UniqueUserIdFilter** | **string** | The expression that results in a unique user identifier, when combined with the Base DN. | -**JitRepositoryAttributeMapping** | [**map[string]AttributeFulfillmentValue**](AttributeFulfillmentValue.md) | A list of user repository mappings from attribute names to their fulfillment values. | ## Methods ### NewLdapDataStoreRepository -`func NewLdapDataStoreRepository(uniqueUserIdFilter string, jitRepositoryAttributeMapping map[string]AttributeFulfillmentValue, ) *LdapDataStoreRepository` +`func NewLdapDataStoreRepository(uniqueUserIdFilter string, ) *LdapDataStoreRepository` NewLdapDataStoreRepository instantiates a new LdapDataStoreRepository object This constructor will assign default values to properties that have it defined, @@ -72,26 +71,6 @@ and a boolean to check if the value has been set. SetUniqueUserIdFilter sets UniqueUserIdFilter field to given value. -### GetJitRepositoryAttributeMapping - -`func (o *LdapDataStoreRepository) GetJitRepositoryAttributeMapping() map[string]AttributeFulfillmentValue` - -GetJitRepositoryAttributeMapping returns the JitRepositoryAttributeMapping field if non-nil, zero value otherwise. - -### GetJitRepositoryAttributeMappingOk - -`func (o *LdapDataStoreRepository) GetJitRepositoryAttributeMappingOk() (*map[string]AttributeFulfillmentValue, bool)` - -GetJitRepositoryAttributeMappingOk returns a tuple with the JitRepositoryAttributeMapping field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetJitRepositoryAttributeMapping - -`func (o *LdapDataStoreRepository) SetJitRepositoryAttributeMapping(v map[string]AttributeFulfillmentValue)` - -SetJitRepositoryAttributeMapping sets JitRepositoryAttributeMapping field to given value. - - [[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/configurationapi/model_artifact_settings.go b/configurationapi/model_artifact_settings.go index acd6a7f..69f0536 100644 --- a/configurationapi/model_artifact_settings.go +++ b/configurationapi/model_artifact_settings.go @@ -20,7 +20,7 @@ var _ MappedNullable = &ArtifactSettings{} // ArtifactSettings The settings for an Artifact binding. type ArtifactSettings struct { // The lifetime of the artifact in seconds. - Lifetime int64 `json:"lifetime" tfsdk:"lifetime"` + Lifetime *int64 `json:"lifetime,omitempty" tfsdk:"lifetime"` // Remote party URLs that you will use to resolve/translate the artifact and get the actual protocol message ResolverLocations []ArtifactResolverLocation `json:"resolverLocations" tfsdk:"resolver_locations"` // Source ID for SAML1.x connections @@ -31,9 +31,8 @@ type ArtifactSettings struct { // 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 NewArtifactSettings(lifetime int64, resolverLocations []ArtifactResolverLocation) *ArtifactSettings { +func NewArtifactSettings(resolverLocations []ArtifactResolverLocation) *ArtifactSettings { this := ArtifactSettings{} - this.Lifetime = lifetime this.ResolverLocations = resolverLocations return &this } @@ -46,28 +45,36 @@ func NewArtifactSettingsWithDefaults() *ArtifactSettings { return &this } -// GetLifetime returns the Lifetime field value +// GetLifetime returns the Lifetime field value if set, zero value otherwise. func (o *ArtifactSettings) GetLifetime() int64 { - if o == nil { + if o == nil || IsNil(o.Lifetime) { var ret int64 return ret } - - return o.Lifetime + return *o.Lifetime } -// GetLifetimeOk returns a tuple with the Lifetime field value +// GetLifetimeOk returns a tuple with the Lifetime field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ArtifactSettings) GetLifetimeOk() (*int64, bool) { - if o == nil { + if o == nil || IsNil(o.Lifetime) { return nil, false } - return &o.Lifetime, true + return o.Lifetime, true +} + +// HasLifetime returns a boolean if a field has been set. +func (o *ArtifactSettings) HasLifetime() bool { + if o != nil && !IsNil(o.Lifetime) { + return true + } + + return false } -// SetLifetime sets field value +// SetLifetime gets a reference to the given int64 and assigns it to the Lifetime field. func (o *ArtifactSettings) SetLifetime(v int64) { - o.Lifetime = v + o.Lifetime = &v } // GetResolverLocations returns the ResolverLocations field value @@ -136,7 +143,9 @@ func (o ArtifactSettings) MarshalJSON() ([]byte, error) { func (o ArtifactSettings) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["lifetime"] = o.Lifetime + if !IsNil(o.Lifetime) { + toSerialize["lifetime"] = o.Lifetime + } toSerialize["resolverLocations"] = o.ResolverLocations if !IsNil(o.SourceId) { toSerialize["sourceId"] = o.SourceId diff --git a/configurationapi/model_jdbc_data_store_repository.go b/configurationapi/model_jdbc_data_store_repository.go index eb3890c..a7a1caa 100644 --- a/configurationapi/model_jdbc_data_store_repository.go +++ b/configurationapi/model_jdbc_data_store_repository.go @@ -21,15 +21,13 @@ var _ MappedNullable = &JdbcDataStoreRepository{} type JdbcDataStoreRepository struct { DataStoreRepository SqlMethod SqlMethod `json:"sqlMethod" tfsdk:"sql_method"` - // A list of user repository mappings from attribute names to their fulfillment values. - JitRepositoryAttributeMapping map[string]AttributeFulfillmentValue `json:"jitRepositoryAttributeMapping" tfsdk:"jit_repository_attribute_mapping"` } // NewJdbcDataStoreRepository instantiates a new JdbcDataStoreRepository 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 NewJdbcDataStoreRepository(sqlMethod SqlMethod, jitRepositoryAttributeMapping map[string]AttributeFulfillmentValue, type_ string, dataStoreRef ResourceLink) *JdbcDataStoreRepository { +func NewJdbcDataStoreRepository(sqlMethod SqlMethod, type_ string, dataStoreRef ResourceLink, jitRepositoryAttributeMapping map[string]AttributeFulfillmentValue) *JdbcDataStoreRepository { this := JdbcDataStoreRepository{} this.Type = type_ this.DataStoreRef = dataStoreRef @@ -70,30 +68,6 @@ func (o *JdbcDataStoreRepository) SetSqlMethod(v SqlMethod) { o.SqlMethod = v } -// GetJitRepositoryAttributeMapping returns the JitRepositoryAttributeMapping field value -func (o *JdbcDataStoreRepository) GetJitRepositoryAttributeMapping() map[string]AttributeFulfillmentValue { - if o == nil { - var ret map[string]AttributeFulfillmentValue - return ret - } - - return o.JitRepositoryAttributeMapping -} - -// GetJitRepositoryAttributeMappingOk returns a tuple with the JitRepositoryAttributeMapping field value -// and a boolean to check if the value has been set. -func (o *JdbcDataStoreRepository) GetJitRepositoryAttributeMappingOk() (*map[string]AttributeFulfillmentValue, bool) { - if o == nil { - return nil, false - } - return &o.JitRepositoryAttributeMapping, true -} - -// SetJitRepositoryAttributeMapping sets field value -func (o *JdbcDataStoreRepository) SetJitRepositoryAttributeMapping(v map[string]AttributeFulfillmentValue) { - o.JitRepositoryAttributeMapping = v -} - func (o JdbcDataStoreRepository) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -113,7 +87,6 @@ func (o JdbcDataStoreRepository) ToMap() (map[string]interface{}, error) { return map[string]interface{}{}, errDataStoreRepository } toSerialize["sqlMethod"] = o.SqlMethod - toSerialize["jitRepositoryAttributeMapping"] = o.JitRepositoryAttributeMapping return toSerialize, nil } diff --git a/configurationapi/model_ldap_data_store_repository.go b/configurationapi/model_ldap_data_store_repository.go index b990da0..ce2160f 100644 --- a/configurationapi/model_ldap_data_store_repository.go +++ b/configurationapi/model_ldap_data_store_repository.go @@ -24,15 +24,13 @@ type LdapDataStoreRepository struct { BaseDn *string `json:"baseDn,omitempty" tfsdk:"base_dn"` // The expression that results in a unique user identifier, when combined with the Base DN. UniqueUserIdFilter string `json:"uniqueUserIdFilter" tfsdk:"unique_user_id_filter"` - // A list of user repository mappings from attribute names to their fulfillment values. - JitRepositoryAttributeMapping map[string]AttributeFulfillmentValue `json:"jitRepositoryAttributeMapping" tfsdk:"jit_repository_attribute_mapping"` } // NewLdapDataStoreRepository instantiates a new LdapDataStoreRepository 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 NewLdapDataStoreRepository(uniqueUserIdFilter string, jitRepositoryAttributeMapping map[string]AttributeFulfillmentValue, type_ string, dataStoreRef ResourceLink) *LdapDataStoreRepository { +func NewLdapDataStoreRepository(uniqueUserIdFilter string, type_ string, dataStoreRef ResourceLink, jitRepositoryAttributeMapping map[string]AttributeFulfillmentValue) *LdapDataStoreRepository { this := LdapDataStoreRepository{} this.Type = type_ this.DataStoreRef = dataStoreRef @@ -105,30 +103,6 @@ func (o *LdapDataStoreRepository) SetUniqueUserIdFilter(v string) { o.UniqueUserIdFilter = v } -// GetJitRepositoryAttributeMapping returns the JitRepositoryAttributeMapping field value -func (o *LdapDataStoreRepository) GetJitRepositoryAttributeMapping() map[string]AttributeFulfillmentValue { - if o == nil { - var ret map[string]AttributeFulfillmentValue - return ret - } - - return o.JitRepositoryAttributeMapping -} - -// GetJitRepositoryAttributeMappingOk returns a tuple with the JitRepositoryAttributeMapping field value -// and a boolean to check if the value has been set. -func (o *LdapDataStoreRepository) GetJitRepositoryAttributeMappingOk() (*map[string]AttributeFulfillmentValue, bool) { - if o == nil { - return nil, false - } - return &o.JitRepositoryAttributeMapping, true -} - -// SetJitRepositoryAttributeMapping sets field value -func (o *LdapDataStoreRepository) SetJitRepositoryAttributeMapping(v map[string]AttributeFulfillmentValue) { - o.JitRepositoryAttributeMapping = v -} - func (o LdapDataStoreRepository) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -151,7 +125,6 @@ func (o LdapDataStoreRepository) ToMap() (map[string]interface{}, error) { toSerialize["baseDn"] = o.BaseDn } toSerialize["uniqueUserIdFilter"] = o.UniqueUserIdFilter - toSerialize["jitRepositoryAttributeMapping"] = o.JitRepositoryAttributeMapping return toSerialize, nil }