From 8e07a2b767773a6d7fafb18ccf2c03662991d148 Mon Sep 17 00:00:00 2001 From: Shrinjay Mukherjee Date: Thu, 18 Sep 2025 17:27:01 -0400 Subject: [PATCH 1/2] clean unused files in sdk --- Makefile | 9 + clean.sh | 66 +++++++ common.go | 34 ---- model_access_rule_condition.go | 188 -------------------- model_bundles_visibility_type_enum.go | 112 ------------ model_group_function_enum.go | 114 ------------ model_message_channel_type_enum.go | 114 ------------ model_new_admin_id_list.go | 117 ------------- model_paginated_resource_user_list.go | 210 ----------------------- model_resource_access_status.go | 238 -------------------------- model_resource_access_status_enum.go | 113 ------------ model_users_list.go | 116 ------------- model_visibility_enum.go | 112 ------------ 13 files changed, 75 insertions(+), 1468 deletions(-) create mode 100644 clean.sh delete mode 100644 common.go delete mode 100644 model_access_rule_condition.go delete mode 100644 model_bundles_visibility_type_enum.go delete mode 100644 model_group_function_enum.go delete mode 100644 model_message_channel_type_enum.go delete mode 100644 model_new_admin_id_list.go delete mode 100644 model_paginated_resource_user_list.go delete mode 100644 model_resource_access_status.go delete mode 100644 model_resource_access_status_enum.go delete mode 100644 model_users_list.go delete mode 100644 model_visibility_enum.go diff --git a/Makefile b/Makefile index a17d0fe..10dcd9c 100644 --- a/Makefile +++ b/Makefile @@ -3,12 +3,21 @@ SHELL := /bin/bash OPENAPI_GEN=openapi-generator generate -i api/openapi.yaml -g go -o . -c config.json OPENAPI_GEN_CI=openapi-generator-cli generate --enable-post-process-file -i api/openapi.yaml -g go -o . -c config.json PULL_REMOTE_OPENAPI=curl https://app.opal.dev/openapi.yaml > api/openapi.yaml +CLEAN=bash clean.sh +CLEAN_CI=CI=true bash clean.sh gen-openapi: $(OPENAPI_GEN) + $(CLEAN) gen-openapi-remote: $(PULL_REMOTE_OPENAPI) $(OPENAPI_GEN) + $(CLEAN) gen-openapi-remote-for-ci: $(PULL_REMOTE_OPENAPI) $(OPENAPI_GEN_CI) + $(CLEAN_CI) +clean: + $(CLEAN) +clean-ci: + $(CLEAN_CI) diff --git a/clean.sh b/clean.sh new file mode 100644 index 0000000..bc1c13a --- /dev/null +++ b/clean.sh @@ -0,0 +1,66 @@ +#!/bin/bash + +# Check for CI parameter +CI_MODE=false +if [[ "$1" == "CI=true" ]] || [[ "$CI" == "true" ]]; then + CI_MODE=true +fi + +# Dynamically find Go files not in .openapi-generator/FILES +files=() +for file in *.go; do + if [ -f "$file" ]; then + # Check if file is NOT in the FILES list + if ! grep -qx "$file" .openapi-generator/FILES; then + files+=("$file") + fi + fi +done + +# Check if any unlisted files were found +if [ ${#files[@]} -eq 0 ]; then + echo "All Go files are listed in .openapi-generator/FILES" + exit 0 +fi + +echo "Go files not in .openapi-generator/FILES:" +echo "=========================================" +for file in "${files[@]}"; do + echo " - $file" +done +echo "" +echo "Total: ${#files[@]} file(s)" +echo "" + +# If CI mode, automatically delete. Otherwise, ask user +if [ "$CI_MODE" = true ]; then + echo "CI mode enabled - automatically deleting files..." + for file in "${files[@]}"; do + if [ -f "$file" ]; then + rm "$file" + echo " Deleted: $file" + else + echo " Not found: $file" + fi + done + echo "Done!" +else + # Ask user if they want to delete these files + read -p "Do you want to delete these files? (y/N): " -n 1 -r + echo "" + + if [[ $REPLY =~ ^[Yy]$ ]]; then + echo "Deleting files..." + for file in "${files[@]}"; do + if [ -f "$file" ]; then + rm "$file" + echo " Deleted: $file" + else + echo " Not found: $file" + fi + done + echo "Done!" + else + echo "No files were deleted." + fi +fi diff --git a/common.go b/common.go deleted file mode 100644 index 02333f2..0000000 --- a/common.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -Utils to facilitate easier usage of the SDK. -*/ -package opal - -func GroupToUpdateGroupInfo(group Group) (updateGroupInfo UpdateGroupInfo) { - return UpdateGroupInfo{ - GroupId: group.GroupId, - Description: group.Description, - AdminOwnerId: group.AdminOwnerId, - MaxDuration: group.MaxDuration, - RequireManagerApproval: group.RequireManagerApproval, - RequireSupportTicket: group.RequireSupportTicket, - Name: group.Name, - RequireMfaToApprove: group.RequireMfaToApprove, - AutoApproval: group.AutoApproval, - RequestTemplateId: group.RequestTemplateId, - } -} - -func ResourceToUpdateResourceInfo(resource Resource) (updateResourceInfo UpdateResourceInfo) { - return UpdateResourceInfo{ - ResourceId: resource.ResourceId, - Description: resource.Description, - AdminOwnerId: resource.AdminOwnerId, - MaxDuration: resource.MaxDuration, - RequireManagerApproval: resource.RequireManagerApproval, - RequireSupportTicket: resource.RequireSupportTicket, - Name: resource.Name, - RequireMfaToApprove: resource.RequireMfaToApprove, - AutoApproval: resource.AutoApproval, - RequestTemplateId: resource.RequestTemplateId, - } -} diff --git a/model_access_rule_condition.go b/model_access_rule_condition.go deleted file mode 100644 index ab5a9b7..0000000 --- a/model_access_rule_condition.go +++ /dev/null @@ -1,188 +0,0 @@ -/* -Opal API - -The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. - -API version: 1.0 -Contact: hello@opal.dev -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package opal - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the AccessRuleCondition type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AccessRuleCondition{} - -// AccessRuleCondition # Access Rule Config Object ### Description The `AccessRuleConfig` object is used to represent an access rule configuration. ### Usage Example Get access rule configurations from the `GET Access Rule Configs` endpoint. -type AccessRuleCondition struct { - // The status of the access rule. - Status string `json:"status"` - RuleClauses RuleClauses `json:"ruleClauses"` -} - -type _AccessRuleCondition AccessRuleCondition - -// NewAccessRuleCondition instantiates a new AccessRuleCondition 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 NewAccessRuleCondition(status string, ruleClauses RuleClauses) *AccessRuleCondition { - this := AccessRuleCondition{} - this.Status = status - this.RuleClauses = ruleClauses - return &this -} - -// NewAccessRuleConditionWithDefaults instantiates a new AccessRuleCondition 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 NewAccessRuleConditionWithDefaults() *AccessRuleCondition { - this := AccessRuleCondition{} - return &this -} - -// GetStatus returns the Status field value -func (o *AccessRuleCondition) GetStatus() string { - if o == nil { - var ret string - return ret - } - - return o.Status -} - -// GetStatusOk returns a tuple with the Status field value -// and a boolean to check if the value has been set. -func (o *AccessRuleCondition) GetStatusOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Status, true -} - -// SetStatus sets field value -func (o *AccessRuleCondition) SetStatus(v string) { - o.Status = v -} - -// GetRuleClauses returns the RuleClauses field value -func (o *AccessRuleCondition) GetRuleClauses() RuleClauses { - if o == nil { - var ret RuleClauses - return ret - } - - return o.RuleClauses -} - -// GetRuleClausesOk returns a tuple with the RuleClauses field value -// and a boolean to check if the value has been set. -func (o *AccessRuleCondition) GetRuleClausesOk() (*RuleClauses, bool) { - if o == nil { - return nil, false - } - return &o.RuleClauses, true -} - -// SetRuleClauses sets field value -func (o *AccessRuleCondition) SetRuleClauses(v RuleClauses) { - o.RuleClauses = v -} - -func (o AccessRuleCondition) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o AccessRuleCondition) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["status"] = o.Status - toSerialize["ruleClauses"] = o.RuleClauses - return toSerialize, nil -} - -func (o *AccessRuleCondition) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "status", - "ruleClauses", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varAccessRuleCondition := _AccessRuleCondition{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varAccessRuleCondition) - - if err != nil { - return err - } - - *o = AccessRuleCondition(varAccessRuleCondition) - - return err -} - -type NullableAccessRuleCondition struct { - value *AccessRuleCondition - isSet bool -} - -func (v NullableAccessRuleCondition) Get() *AccessRuleCondition { - return v.value -} - -func (v *NullableAccessRuleCondition) Set(val *AccessRuleCondition) { - v.value = val - v.isSet = true -} - -func (v NullableAccessRuleCondition) IsSet() bool { - return v.isSet -} - -func (v *NullableAccessRuleCondition) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAccessRuleCondition(val *AccessRuleCondition) *NullableAccessRuleCondition { - return &NullableAccessRuleCondition{value: val, isSet: true} -} - -func (v NullableAccessRuleCondition) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAccessRuleCondition) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_bundles_visibility_type_enum.go b/model_bundles_visibility_type_enum.go deleted file mode 100644 index e337394..0000000 --- a/model_bundles_visibility_type_enum.go +++ /dev/null @@ -1,112 +0,0 @@ -/* -Opal API - -The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. - -API version: 1.0 -Contact: hello@opal.dev -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package opal - -import ( - "encoding/json" - "fmt" -) - -// BundlesVisibilityTypeEnum The visibility level of the entity. -type BundlesVisibilityTypeEnum string - -// List of BundlesVisibilityTypeEnum -const ( - BUNDLESVISIBILITYTYPEENUM_GLOBAL BundlesVisibilityTypeEnum = "GLOBAL" - BUNDLESVISIBILITYTYPEENUM_TEAM BundlesVisibilityTypeEnum = "TEAM" -) - -// All allowed values of BundlesVisibilityTypeEnum enum -var AllowedBundlesVisibilityTypeEnumEnumValues = []BundlesVisibilityTypeEnum{ - "GLOBAL", - "TEAM", -} - -func (v *BundlesVisibilityTypeEnum) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := BundlesVisibilityTypeEnum(value) - for _, existing := range AllowedBundlesVisibilityTypeEnumEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid BundlesVisibilityTypeEnum", value) -} - -// NewBundlesVisibilityTypeEnumFromValue returns a pointer to a valid BundlesVisibilityTypeEnum -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewBundlesVisibilityTypeEnumFromValue(v string) (*BundlesVisibilityTypeEnum, error) { - ev := BundlesVisibilityTypeEnum(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for BundlesVisibilityTypeEnum: valid values are %v", v, AllowedBundlesVisibilityTypeEnumEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v BundlesVisibilityTypeEnum) IsValid() bool { - for _, existing := range AllowedBundlesVisibilityTypeEnumEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to BundlesVisibilityTypeEnum value -func (v BundlesVisibilityTypeEnum) Ptr() *BundlesVisibilityTypeEnum { - return &v -} - -type NullableBundlesVisibilityTypeEnum struct { - value *BundlesVisibilityTypeEnum - isSet bool -} - -func (v NullableBundlesVisibilityTypeEnum) Get() *BundlesVisibilityTypeEnum { - return v.value -} - -func (v *NullableBundlesVisibilityTypeEnum) Set(val *BundlesVisibilityTypeEnum) { - v.value = val - v.isSet = true -} - -func (v NullableBundlesVisibilityTypeEnum) IsSet() bool { - return v.isSet -} - -func (v *NullableBundlesVisibilityTypeEnum) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBundlesVisibilityTypeEnum(val *BundlesVisibilityTypeEnum) *NullableBundlesVisibilityTypeEnum { - return &NullableBundlesVisibilityTypeEnum{value: val, isSet: true} -} - -func (v NullableBundlesVisibilityTypeEnum) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBundlesVisibilityTypeEnum) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/model_group_function_enum.go b/model_group_function_enum.go deleted file mode 100644 index 234b59a..0000000 --- a/model_group_function_enum.go +++ /dev/null @@ -1,114 +0,0 @@ -/* -Opal API - -Your Home For Developer Resources. - -API version: 1.0 -Contact: hello@opal.dev -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package opal - -import ( - "encoding/json" - "fmt" -) - -// GroupFunctionEnum The function type of the group. -type GroupFunctionEnum string - -// List of GroupFunctionEnum -const ( - GROUPFUNCTIONENUM_ON_CALL GroupFunctionEnum = "ON_CALL" - GROUPFUNCTIONENUM_REGULAR GroupFunctionEnum = "REGULAR" - GROUPFUNCTIONENUM_UNKNOWN GroupFunctionEnum = "UNKNOWN" -) - -// All allowed values of GroupFunctionEnum enum -var AllowedGroupFunctionEnumEnumValues = []GroupFunctionEnum{ - "ON_CALL", - "REGULAR", - "UNKNOWN", -} - -func (v *GroupFunctionEnum) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := GroupFunctionEnum(value) - for _, existing := range AllowedGroupFunctionEnumEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid GroupFunctionEnum", value) -} - -// NewGroupFunctionEnumFromValue returns a pointer to a valid GroupFunctionEnum -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewGroupFunctionEnumFromValue(v string) (*GroupFunctionEnum, error) { - ev := GroupFunctionEnum(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for GroupFunctionEnum: valid values are %v", v, AllowedGroupFunctionEnumEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v GroupFunctionEnum) IsValid() bool { - for _, existing := range AllowedGroupFunctionEnumEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to GroupFunctionEnum value -func (v GroupFunctionEnum) Ptr() *GroupFunctionEnum { - return &v -} - -type NullableGroupFunctionEnum struct { - value *GroupFunctionEnum - isSet bool -} - -func (v NullableGroupFunctionEnum) Get() *GroupFunctionEnum { - return v.value -} - -func (v *NullableGroupFunctionEnum) Set(val *GroupFunctionEnum) { - v.value = val - v.isSet = true -} - -func (v NullableGroupFunctionEnum) IsSet() bool { - return v.isSet -} - -func (v *NullableGroupFunctionEnum) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGroupFunctionEnum(val *GroupFunctionEnum) *NullableGroupFunctionEnum { - return &NullableGroupFunctionEnum{value: val, isSet: true} -} - -func (v NullableGroupFunctionEnum) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGroupFunctionEnum) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/model_message_channel_type_enum.go b/model_message_channel_type_enum.go deleted file mode 100644 index 9dd7a2b..0000000 --- a/model_message_channel_type_enum.go +++ /dev/null @@ -1,114 +0,0 @@ -/* -Opal API - -Your Home For Developer Resources. - -API version: 1.0 -Contact: hello@opal.dev -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package opal - -import ( - "encoding/json" - "fmt" -) - -// MessageChannelTypeEnum The type of the message channel. -type MessageChannelTypeEnum string - -// List of MessageChannelTypeEnum -const ( - MESSAGECHANNELTYPEENUM_AUDIT MessageChannelTypeEnum = "AUDIT" - MESSAGECHANNELTYPEENUM_MONITOR MessageChannelTypeEnum = "MONITOR" - MESSAGECHANNELTYPEENUM_REVIEWER MessageChannelTypeEnum = "REVIEWER" -) - -// All allowed values of MessageChannelTypeEnum enum -var AllowedMessageChannelTypeEnumEnumValues = []MessageChannelTypeEnum{ - "AUDIT", - "MONITOR", - "REVIEWER", -} - -func (v *MessageChannelTypeEnum) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := MessageChannelTypeEnum(value) - for _, existing := range AllowedMessageChannelTypeEnumEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid MessageChannelTypeEnum", value) -} - -// NewMessageChannelTypeEnumFromValue returns a pointer to a valid MessageChannelTypeEnum -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewMessageChannelTypeEnumFromValue(v string) (*MessageChannelTypeEnum, error) { - ev := MessageChannelTypeEnum(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for MessageChannelTypeEnum: valid values are %v", v, AllowedMessageChannelTypeEnumEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v MessageChannelTypeEnum) IsValid() bool { - for _, existing := range AllowedMessageChannelTypeEnumEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to MessageChannelTypeEnum value -func (v MessageChannelTypeEnum) Ptr() *MessageChannelTypeEnum { - return &v -} - -type NullableMessageChannelTypeEnum struct { - value *MessageChannelTypeEnum - isSet bool -} - -func (v NullableMessageChannelTypeEnum) Get() *MessageChannelTypeEnum { - return v.value -} - -func (v *NullableMessageChannelTypeEnum) Set(val *MessageChannelTypeEnum) { - v.value = val - v.isSet = true -} - -func (v NullableMessageChannelTypeEnum) IsSet() bool { - return v.isSet -} - -func (v *NullableMessageChannelTypeEnum) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableMessageChannelTypeEnum(val *MessageChannelTypeEnum) *NullableMessageChannelTypeEnum { - return &NullableMessageChannelTypeEnum{value: val, isSet: true} -} - -func (v NullableMessageChannelTypeEnum) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableMessageChannelTypeEnum) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/model_new_admin_id_list.go b/model_new_admin_id_list.go deleted file mode 100644 index aa0a2e1..0000000 --- a/model_new_admin_id_list.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Opal API - -Your Home For Developer Resources. - -API version: 1.0 -Contact: hello@opal.dev -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package opal - -import ( - "encoding/json" -) - -// NewAdminIDList struct for NewAdminIDList -type NewAdminIDList struct { - // The IDs of admins to set for the group if converting to a team. Required when converting from Group to Team. - AdminIds []string `json:"admin_ids,omitempty"` -} - -// NewNewAdminIDList instantiates a new NewAdminIDList 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 NewNewAdminIDList() *NewAdminIDList { - this := NewAdminIDList{} - return &this -} - -// NewNewAdminIDListWithDefaults instantiates a new NewAdminIDList 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 NewNewAdminIDListWithDefaults() *NewAdminIDList { - this := NewAdminIDList{} - return &this -} - -// GetAdminIds returns the AdminIds field value if set, zero value otherwise. -func (o *NewAdminIDList) GetAdminIds() []string { - if o == nil || o.AdminIds == nil { - var ret []string - return ret - } - return o.AdminIds -} - -// GetAdminIdsOk returns a tuple with the AdminIds field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *NewAdminIDList) GetAdminIdsOk() ([]string, bool) { - if o == nil || o.AdminIds == nil { - return nil, false - } - return o.AdminIds, true -} - -// HasAdminIds returns a boolean if a field has been set. -func (o *NewAdminIDList) HasAdminIds() bool { - if o != nil && o.AdminIds != nil { - return true - } - - return false -} - -// SetAdminIds gets a reference to the given []string and assigns it to the AdminIds field. -func (o *NewAdminIDList) SetAdminIds(v []string) { - o.AdminIds = v -} - -func (o NewAdminIDList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.AdminIds != nil { - toSerialize["admin_ids"] = o.AdminIds - } - return json.Marshal(toSerialize) -} - -type NullableNewAdminIDList struct { - value *NewAdminIDList - isSet bool -} - -func (v NullableNewAdminIDList) Get() *NewAdminIDList { - return v.value -} - -func (v *NullableNewAdminIDList) Set(val *NewAdminIDList) { - v.value = val - v.isSet = true -} - -func (v NullableNewAdminIDList) IsSet() bool { - return v.isSet -} - -func (v *NullableNewAdminIDList) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableNewAdminIDList(val *NewAdminIDList) *NullableNewAdminIDList { - return &NullableNewAdminIDList{value: val, isSet: true} -} - -func (v NullableNewAdminIDList) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableNewAdminIDList) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_paginated_resource_user_list.go b/model_paginated_resource_user_list.go deleted file mode 100644 index 610ee42..0000000 --- a/model_paginated_resource_user_list.go +++ /dev/null @@ -1,210 +0,0 @@ -/* -Opal API - -Your Home For Developer Resources. - -API version: 1.0 -Contact: hello@opal.dev -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package opal - -import ( - "encoding/json" -) - -// PaginatedResourceUserList struct for PaginatedResourceUserList -type PaginatedResourceUserList struct { - // The cursor with which to continue pagination if additional result pages exist. - Next NullableString `json:"next,omitempty"` - // The cursor used to obtain the current result page. - Previous NullableString `json:"previous,omitempty"` - Results []ResourceUser `json:"results,omitempty"` -} - -// NewPaginatedResourceUserList instantiates a new PaginatedResourceUserList 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 NewPaginatedResourceUserList() *PaginatedResourceUserList { - this := PaginatedResourceUserList{} - return &this -} - -// NewPaginatedResourceUserListWithDefaults instantiates a new PaginatedResourceUserList 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 NewPaginatedResourceUserListWithDefaults() *PaginatedResourceUserList { - this := PaginatedResourceUserList{} - return &this -} - -// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *PaginatedResourceUserList) GetNext() string { - if o == nil || o.Next.Get() == nil { - var ret string - return ret - } - return *o.Next.Get() -} - -// GetNextOk returns a tuple with the Next field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PaginatedResourceUserList) GetNextOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Next.Get(), o.Next.IsSet() -} - -// HasNext returns a boolean if a field has been set. -func (o *PaginatedResourceUserList) HasNext() bool { - if o != nil && o.Next.IsSet() { - return true - } - - return false -} - -// SetNext gets a reference to the given NullableString and assigns it to the Next field. -func (o *PaginatedResourceUserList) SetNext(v string) { - o.Next.Set(&v) -} -// SetNextNil sets the value for Next to be an explicit nil -func (o *PaginatedResourceUserList) SetNextNil() { - o.Next.Set(nil) -} - -// UnsetNext ensures that no value is present for Next, not even an explicit nil -func (o *PaginatedResourceUserList) UnsetNext() { - o.Next.Unset() -} - -// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *PaginatedResourceUserList) GetPrevious() string { - if o == nil || o.Previous.Get() == nil { - var ret string - return ret - } - return *o.Previous.Get() -} - -// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *PaginatedResourceUserList) GetPreviousOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Previous.Get(), o.Previous.IsSet() -} - -// HasPrevious returns a boolean if a field has been set. -func (o *PaginatedResourceUserList) HasPrevious() bool { - if o != nil && o.Previous.IsSet() { - return true - } - - return false -} - -// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. -func (o *PaginatedResourceUserList) SetPrevious(v string) { - o.Previous.Set(&v) -} -// SetPreviousNil sets the value for Previous to be an explicit nil -func (o *PaginatedResourceUserList) SetPreviousNil() { - o.Previous.Set(nil) -} - -// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil -func (o *PaginatedResourceUserList) UnsetPrevious() { - o.Previous.Unset() -} - -// GetResults returns the Results field value if set, zero value otherwise. -func (o *PaginatedResourceUserList) GetResults() []ResourceUser { - if o == nil || o.Results == nil { - var ret []ResourceUser - return ret - } - return o.Results -} - -// GetResultsOk returns a tuple with the Results field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaginatedResourceUserList) GetResultsOk() ([]ResourceUser, bool) { - if o == nil || o.Results == nil { - return nil, false - } - return o.Results, true -} - -// HasResults returns a boolean if a field has been set. -func (o *PaginatedResourceUserList) HasResults() bool { - if o != nil && o.Results != nil { - return true - } - - return false -} - -// SetResults gets a reference to the given []ResourceUser and assigns it to the Results field. -func (o *PaginatedResourceUserList) SetResults(v []ResourceUser) { - o.Results = v -} - -func (o PaginatedResourceUserList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Next.IsSet() { - toSerialize["next"] = o.Next.Get() - } - if o.Previous.IsSet() { - toSerialize["previous"] = o.Previous.Get() - } - if o.Results != nil { - toSerialize["results"] = o.Results - } - return json.Marshal(toSerialize) -} - -type NullablePaginatedResourceUserList struct { - value *PaginatedResourceUserList - isSet bool -} - -func (v NullablePaginatedResourceUserList) Get() *PaginatedResourceUserList { - return v.value -} - -func (v *NullablePaginatedResourceUserList) Set(val *PaginatedResourceUserList) { - v.value = val - v.isSet = true -} - -func (v NullablePaginatedResourceUserList) IsSet() bool { - return v.isSet -} - -func (v *NullablePaginatedResourceUserList) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePaginatedResourceUserList(val *PaginatedResourceUserList) *NullablePaginatedResourceUserList { - return &NullablePaginatedResourceUserList{value: val, isSet: true} -} - -func (v NullablePaginatedResourceUserList) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePaginatedResourceUserList) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_resource_access_status.go b/model_resource_access_status.go deleted file mode 100644 index 7cf6c8b..0000000 --- a/model_resource_access_status.go +++ /dev/null @@ -1,238 +0,0 @@ -/* - * Opal API - * - * Your Home For Developer Resources. - * - * API version: 1.0 - * Contact: hello@opal.dev - */ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package opal - -import ( - "encoding/json" - "time" -) - -// ResourceAccessStatus # AccessStatus Object ### Description The `AccessStatus` object is used to represent the user's access to the resource. ### Usage Example View the `AccessStatus` for a resource/user pair to determine if the user has access to the resource. -type ResourceAccessStatus struct { - // The ID of the resource. - ResourceId string `json:"resource_id"` - // The ID of the user. - UserId string `json:"user_id"` - AccessLevel *ResourceAccessLevel `json:"access_level,omitempty"` - Status ResourceAccessStatusEnum `json:"status"` - // The day and time the user's access will expire. - ExpirationDate NullableTime `json:"expiration_date"` -} - -// NewResourceAccessStatus instantiates a new ResourceAccessStatus 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 NewResourceAccessStatus(resourceId string, userId string, status ResourceAccessStatusEnum, expirationDate NullableTime) *ResourceAccessStatus { - this := ResourceAccessStatus{} - this.ResourceId = resourceId - this.UserId = userId - this.Status = status - this.ExpirationDate = expirationDate - return &this -} - -// NewResourceAccessStatusWithDefaults instantiates a new ResourceAccessStatus 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 NewResourceAccessStatusWithDefaults() *ResourceAccessStatus { - this := ResourceAccessStatus{} - return &this -} - -// GetResourceId returns the ResourceId field value -func (o *ResourceAccessStatus) GetResourceId() string { - if o == nil { - var ret string - return ret - } - - return o.ResourceId -} - -// GetResourceIdOk returns a tuple with the ResourceId field value -// and a boolean to check if the value has been set. -func (o *ResourceAccessStatus) GetResourceIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ResourceId, true -} - -// SetResourceId sets field value -func (o *ResourceAccessStatus) SetResourceId(v string) { - o.ResourceId = v -} - -// GetUserId returns the UserId field value -func (o *ResourceAccessStatus) GetUserId() string { - if o == nil { - var ret string - return ret - } - - return o.UserId -} - -// GetUserIdOk returns a tuple with the UserId field value -// and a boolean to check if the value has been set. -func (o *ResourceAccessStatus) GetUserIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.UserId, true -} - -// SetUserId sets field value -func (o *ResourceAccessStatus) SetUserId(v string) { - o.UserId = v -} - -// GetAccessLevel returns the AccessLevel field value if set, zero value otherwise. -func (o *ResourceAccessStatus) GetAccessLevel() ResourceAccessLevel { - if o == nil || o.AccessLevel == nil { - var ret ResourceAccessLevel - return ret - } - return *o.AccessLevel -} - -// GetAccessLevelOk returns a tuple with the AccessLevel field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ResourceAccessStatus) GetAccessLevelOk() (*ResourceAccessLevel, bool) { - if o == nil || o.AccessLevel == nil { - return nil, false - } - return o.AccessLevel, true -} - -// HasAccessLevel returns a boolean if a field has been set. -func (o *ResourceAccessStatus) HasAccessLevel() bool { - if o != nil && o.AccessLevel != nil { - return true - } - - return false -} - -// SetAccessLevel gets a reference to the given ResourceAccessLevel and assigns it to the AccessLevel field. -func (o *ResourceAccessStatus) SetAccessLevel(v ResourceAccessLevel) { - o.AccessLevel = &v -} - -// GetStatus returns the Status field value -func (o *ResourceAccessStatus) GetStatus() ResourceAccessStatusEnum { - if o == nil { - var ret ResourceAccessStatusEnum - return ret - } - - return o.Status -} - -// GetStatusOk returns a tuple with the Status field value -// and a boolean to check if the value has been set. -func (o *ResourceAccessStatus) GetStatusOk() (*ResourceAccessStatusEnum, bool) { - if o == nil { - return nil, false - } - return &o.Status, true -} - -// SetStatus sets field value -func (o *ResourceAccessStatus) SetStatus(v ResourceAccessStatusEnum) { - o.Status = v -} - -// GetExpirationDate returns the ExpirationDate field value -// If the value is explicit nil, the zero value for time.Time will be returned -func (o *ResourceAccessStatus) GetExpirationDate() time.Time { - if o == nil || o.ExpirationDate.Get() == nil { - var ret time.Time - return ret - } - - return *o.ExpirationDate.Get() -} - -// GetExpirationDateOk returns a tuple with the ExpirationDate field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ResourceAccessStatus) GetExpirationDateOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return o.ExpirationDate.Get(), o.ExpirationDate.IsSet() -} - -// SetExpirationDate sets field value -func (o *ResourceAccessStatus) SetExpirationDate(v time.Time) { - o.ExpirationDate.Set(&v) -} - -func (o ResourceAccessStatus) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["resource_id"] = o.ResourceId - } - if true { - toSerialize["user_id"] = o.UserId - } - if o.AccessLevel != nil { - toSerialize["access_level"] = o.AccessLevel - } - if true { - toSerialize["status"] = o.Status - } - if true { - toSerialize["expiration_date"] = o.ExpirationDate.Get() - } - return json.Marshal(toSerialize) -} - -type NullableResourceAccessStatus struct { - value *ResourceAccessStatus - isSet bool -} - -func (v NullableResourceAccessStatus) Get() *ResourceAccessStatus { - return v.value -} - -func (v *NullableResourceAccessStatus) Set(val *ResourceAccessStatus) { - v.value = val - v.isSet = true -} - -func (v NullableResourceAccessStatus) IsSet() bool { - return v.isSet -} - -func (v *NullableResourceAccessStatus) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableResourceAccessStatus(val *ResourceAccessStatus) *NullableResourceAccessStatus { - return &NullableResourceAccessStatus{value: val, isSet: true} -} - -func (v NullableResourceAccessStatus) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableResourceAccessStatus) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_resource_access_status_enum.go b/model_resource_access_status_enum.go deleted file mode 100644 index afc77ac..0000000 --- a/model_resource_access_status_enum.go +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Opal API - * - * Your Home For Developer Resources. - * - * API version: 1.0 - * Contact: hello@opal.dev - */ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package opal - -import ( - "encoding/json" - "fmt" -) - -// ResourceAccessStatusEnum The status of the user's access to the resource. -type ResourceAccessStatusEnum string - -// List of ResourceAccessStatusEnum -const ( - RESOURCEACCESSSTATUSENUM_UNAUTHORIZED ResourceAccessStatusEnum = "UNAUTHORIZED" - RESOURCEACCESSSTATUSENUM_REQUESTED ResourceAccessStatusEnum = "REQUESTED" - RESOURCEACCESSSTATUSENUM_AUTHORIZED ResourceAccessStatusEnum = "AUTHORIZED" -) - -var allowedResourceAccessStatusEnumEnumValues = []ResourceAccessStatusEnum{ - "UNAUTHORIZED", - "REQUESTED", - "AUTHORIZED", -} - -func (v *ResourceAccessStatusEnum) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := ResourceAccessStatusEnum(value) - for _, existing := range allowedResourceAccessStatusEnumEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid ResourceAccessStatusEnum", value) -} - -// NewResourceAccessStatusEnumFromValue returns a pointer to a valid ResourceAccessStatusEnum -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewResourceAccessStatusEnumFromValue(v string) (*ResourceAccessStatusEnum, error) { - ev := ResourceAccessStatusEnum(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for ResourceAccessStatusEnum: valid values are %v", v, allowedResourceAccessStatusEnumEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v ResourceAccessStatusEnum) IsValid() bool { - for _, existing := range allowedResourceAccessStatusEnumEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to ResourceAccessStatusEnum value -func (v ResourceAccessStatusEnum) Ptr() *ResourceAccessStatusEnum { - return &v -} - -type NullableResourceAccessStatusEnum struct { - value *ResourceAccessStatusEnum - isSet bool -} - -func (v NullableResourceAccessStatusEnum) Get() *ResourceAccessStatusEnum { - return v.value -} - -func (v *NullableResourceAccessStatusEnum) Set(val *ResourceAccessStatusEnum) { - v.value = val - v.isSet = true -} - -func (v NullableResourceAccessStatusEnum) IsSet() bool { - return v.isSet -} - -func (v *NullableResourceAccessStatusEnum) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableResourceAccessStatusEnum(val *ResourceAccessStatusEnum) *NullableResourceAccessStatusEnum { - return &NullableResourceAccessStatusEnum{value: val, isSet: true} -} - -func (v NullableResourceAccessStatusEnum) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableResourceAccessStatusEnum) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/model_users_list.go b/model_users_list.go deleted file mode 100644 index c433f1e..0000000 --- a/model_users_list.go +++ /dev/null @@ -1,116 +0,0 @@ -/* -Opal API - -Your Home For Developer Resources. - -API version: 1.0 -Contact: hello@opal.dev -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package opal - -import ( - "encoding/json" -) - -// UsersList struct for UsersList -type UsersList struct { - Results []User `json:"results,omitempty"` -} - -// NewUsersList instantiates a new UsersList 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 NewUsersList() *UsersList { - this := UsersList{} - return &this -} - -// NewUsersListWithDefaults instantiates a new UsersList 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 NewUsersListWithDefaults() *UsersList { - this := UsersList{} - return &this -} - -// GetResults returns the Results field value if set, zero value otherwise. -func (o *UsersList) GetResults() []User { - if o == nil || o.Results == nil { - var ret []User - return ret - } - return o.Results -} - -// GetResultsOk returns a tuple with the Results field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsersList) GetResultsOk() ([]User, bool) { - if o == nil || o.Results == nil { - return nil, false - } - return o.Results, true -} - -// HasResults returns a boolean if a field has been set. -func (o *UsersList) HasResults() bool { - if o != nil && o.Results != nil { - return true - } - - return false -} - -// SetResults gets a reference to the given []User and assigns it to the Results field. -func (o *UsersList) SetResults(v []User) { - o.Results = v -} - -func (o UsersList) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Results != nil { - toSerialize["results"] = o.Results - } - return json.Marshal(toSerialize) -} - -type NullableUsersList struct { - value *UsersList - isSet bool -} - -func (v NullableUsersList) Get() *UsersList { - return v.value -} - -func (v *NullableUsersList) Set(val *UsersList) { - v.value = val - v.isSet = true -} - -func (v NullableUsersList) IsSet() bool { - return v.isSet -} - -func (v *NullableUsersList) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUsersList(val *UsersList) *NullableUsersList { - return &NullableUsersList{value: val, isSet: true} -} - -func (v NullableUsersList) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUsersList) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_visibility_enum.go b/model_visibility_enum.go deleted file mode 100644 index b9808ce..0000000 --- a/model_visibility_enum.go +++ /dev/null @@ -1,112 +0,0 @@ -/* -Opal API - -Your Home For Developer Resources. - -API version: 1.0 -Contact: hello@opal.dev -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package opal - -import ( - "encoding/json" - "fmt" -) - -// VisibilityEnum The visibility level of the entity. -type VisibilityEnum string - -// List of VisibilityEnum -const ( - VISIBILITYENUM_GLOBAL VisibilityEnum = "GLOBAL" - VISIBILITYENUM_TEAM VisibilityEnum = "TEAM" -) - -// All allowed values of VisibilityEnum enum -var AllowedVisibilityEnumEnumValues = []VisibilityEnum{ - "GLOBAL", - "TEAM", -} - -func (v *VisibilityEnum) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := VisibilityEnum(value) - for _, existing := range AllowedVisibilityEnumEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid VisibilityEnum", value) -} - -// NewVisibilityEnumFromValue returns a pointer to a valid VisibilityEnum -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewVisibilityEnumFromValue(v string) (*VisibilityEnum, error) { - ev := VisibilityEnum(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for VisibilityEnum: valid values are %v", v, AllowedVisibilityEnumEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v VisibilityEnum) IsValid() bool { - for _, existing := range AllowedVisibilityEnumEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to VisibilityEnum value -func (v VisibilityEnum) Ptr() *VisibilityEnum { - return &v -} - -type NullableVisibilityEnum struct { - value *VisibilityEnum - isSet bool -} - -func (v NullableVisibilityEnum) Get() *VisibilityEnum { - return v.value -} - -func (v *NullableVisibilityEnum) Set(val *VisibilityEnum) { - v.value = val - v.isSet = true -} - -func (v NullableVisibilityEnum) IsSet() bool { - return v.isSet -} - -func (v *NullableVisibilityEnum) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableVisibilityEnum(val *VisibilityEnum) *NullableVisibilityEnum { - return &NullableVisibilityEnum{value: val, isSet: true} -} - -func (v NullableVisibilityEnum) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableVisibilityEnum) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - From 9c4d8b283168c802b1c6788e22ac843628e1b671 Mon Sep 17 00:00:00 2001 From: Shrinjay Mukherjee Date: Thu, 18 Sep 2025 17:34:27 -0400 Subject: [PATCH 2/2] get rid of disallow unknown fields in generated go models --- .openapi-generator-ignore | 4 +- .openapi-generator/FILES | 3 - Makefile | 4 +- go.mod | 4 -- model_access.go | 25 ++++++-- model_access_list.go | 29 +++++++++ model_access_rule.go | 23 +++++-- model_add_bundle_group_request.go | 20 +++++-- model_add_bundle_resource_request.go | 20 +++++-- model_add_group_resource_request.go | 30 ++++++++++ model_add_group_user_request.go | 19 ++++-- model_add_resource_nhi_request.go | 19 ++++-- model_add_resource_user_request.go | 19 ++++-- model_app.go | 23 +++++-- model_app_validation.go | 24 ++++++-- model_approve_request_200_response.go | 29 +++++++++ model_approve_request_request.go | 19 ++++-- model_apps_list.go | 18 ++++-- model_aws_permission_set_metadata.go | 18 ++++-- ...mission_set_metadata_aws_permission_set.go | 19 ++++-- model_bundle.go | 37 ++++++++++++ model_bundle_group.go | 32 ++++++++++ model_bundle_resource.go | 32 ++++++++++ model_condition.go | 30 ++++++++++ model_configuration_template.go | 41 ++++++++++++- model_create_bundle_info.go | 20 +++++-- model_create_configuration_template_info.go | 35 +++++++---- model_create_delegation_request.go | 22 +++++-- model_create_group_binding_info.go | 19 ++++-- ..._create_group_binding_info_groups_inner.go | 18 ++++-- model_create_group_info.go | 26 ++++++-- model_create_idp_group_mapping_request.go | 30 ++++++++++ model_create_message_channel_info.go | 19 ++++-- model_create_on_call_schedule_info.go | 19 ++++-- model_create_owner_info.go | 23 +++++-- model_create_request_200_response.go | 29 +++++++++ model_create_request_comment_request.go | 18 ++++-- ..._create_request_configuration_info_list.go | 18 ++++-- model_create_request_info.go | 25 ++++++-- ...eate_request_info_custom_metadata_inner.go | 20 +++++-- model_create_request_info_groups_inner.go | 20 +++++-- model_create_request_info_resources_inner.go | 31 ++++++++++ model_create_request_info_support_ticket.go | 21 +++++-- model_create_resource_info.go | 26 ++++++-- model_create_tag_info.go | 19 ++++-- model_create_uar_info.go | 26 ++++++-- model_delegation.go | 25 ++++++-- model_deny_request_request.go | 18 ++++-- model_event.go | 27 +++++++-- model_get_resource_user_200_response.go | 20 +++++-- model_group.go | 47 +++++++++++++-- model_group_access_level.go | 19 ++++-- model_group_binding.go | 22 +++++-- model_group_binding_group.go | 19 ++++-- model_group_containing_group.go | 18 ++++-- model_group_containing_group_list.go | 18 ++++-- model_group_remote_info.go | 40 +++++++++++++ ...roup_remote_info_active_directory_group.go | 18 ++++-- ...emote_info_azure_ad_microsoft_365_group.go | 18 ++++-- ...oup_remote_info_azure_ad_security_group.go | 18 ++++-- model_group_remote_info_duo_group.go | 18 ++++-- model_group_remote_info_github_team.go | 19 ++++-- model_group_remote_info_gitlab_group.go | 18 ++++-- model_group_remote_info_google_group.go | 18 ++++-- model_group_remote_info_ldap_group.go | 18 ++++-- model_group_remote_info_okta_group.go | 18 ++++-- model_group_remote_info_okta_group_rule.go | 18 ++++-- model_group_remote_info_snowflake_role.go | 18 ++++-- ...remote_info_workday_user_security_group.go | 18 ++++-- model_group_resource.go | 20 +++++-- model_group_resource_list.go | 18 ++++-- model_group_user.go | 24 ++++++-- model_group_user_list.go | 31 ++++++++++ model_group_with_access_level.go | 19 ++++-- model_idp_group_mapping.go | 21 +++++-- model_idp_group_mapping_list.go | 18 ++++-- model_message_channel.go | 22 +++++-- model_message_channel_id_list.go | 18 ++++-- model_message_channel_list.go | 18 ++++-- model_on_call_schedule.go | 32 ++++++++++ model_on_call_schedule_id_list.go | 18 ++++-- model_on_call_schedule_list.go | 18 ++++-- model_owner.go | 23 +++++-- model_page_info.go | 21 +++++-- model_paginated_assigned_request_list.go | 19 ++++-- model_paginated_bundle_group_list.go | 21 +++++-- model_paginated_bundle_list.go | 21 +++++-- model_paginated_bundle_resource_list.go | 21 +++++-- ...l_paginated_configuration_template_list.go | 29 +++++++++ model_paginated_delegations_list.go | 32 ++++++++++ model_paginated_event_list.go | 31 ++++++++++ model_paginated_group_bindings_list.go | 20 +++++-- model_paginated_groups_list.go | 20 +++++-- model_paginated_owners_list.go | 20 +++++-- model_paginated_remote_users_list.go | 20 +++++-- model_paginated_resources_list.go | 20 +++++-- model_paginated_tags_list.go | 20 +++++-- model_paginated_uars_list.go | 20 +++++-- model_paginated_users_list.go | 20 +++++-- model_propagation_status.go | 18 ++++-- model_remote_user.go | 21 +++++-- model_request.go | 32 ++++++++-- model_request_comment.go | 23 +++++-- model_request_comment_list.go | 18 ++++-- model_request_configuration.go | 29 +++++++-- model_request_connection.go | 20 +++++-- model_request_custom_field_response.go | 20 +++++-- model_request_edge.go | 19 ++++-- model_request_item_stages.go | 20 +++++-- model_request_list.go | 30 ++++++++++ model_request_reviewer.go | 20 +++++-- model_request_reviewer_stages.go | 22 +++++-- model_request_stage.go | 21 +++++-- model_requested_item.go | 35 +++++++++++ model_resource.go | 50 ++++++++++++++-- model_resource_access_level.go | 19 ++++-- model_resource_access_user.go | 26 ++++++-- model_resource_access_user_list.go | 31 ++++++++++ model_resource_nhi.go | 21 +++++-- model_resource_remote_info.go | 60 +++++++++++++++++++ model_resource_remote_info_aws_account.go | 19 ++++-- ...l_resource_remote_info_aws_ec2_instance.go | 20 +++++-- model_resource_remote_info_aws_eks_cluster.go | 19 ++++-- model_resource_remote_info_aws_iam_role.go | 19 ++++-- ...rce_remote_info_aws_organizational_unit.go | 19 ++++-- ...resource_remote_info_aws_permission_set.go | 19 ++++-- ...l_resource_remote_info_aws_rds_instance.go | 21 +++++-- model_resource_remote_info_coupa_role.go | 18 ++++-- ...l_resource_remote_info_custom_connector.go | 19 ++++-- ...esource_remote_info_datastax_astra_role.go | 18 ++++-- ...ource_remote_info_gcp_big_query_dataset.go | 19 ++++-- ...esource_remote_info_gcp_big_query_table.go | 20 +++++-- model_resource_remote_info_gcp_bucket.go | 18 ++++-- ...source_remote_info_gcp_compute_instance.go | 20 +++++-- model_resource_remote_info_gcp_folder.go | 18 ++++-- model_resource_remote_info_gcp_gke_cluster.go | 18 ++++-- ...l_resource_remote_info_gcp_organization.go | 18 ++++-- model_resource_remote_info_gcp_project.go | 18 ++++-- ...esource_remote_info_gcp_service_account.go | 20 +++++-- ...l_resource_remote_info_gcp_sql_instance.go | 19 ++++-- model_resource_remote_info_github_org_role.go | 18 ++++-- model_resource_remote_info_github_repo.go | 19 ++++-- model_resource_remote_info_gitlab_project.go | 18 ++++-- ...ource_remote_info_google_workspace_role.go | 18 ++++-- model_resource_remote_info_okta_app.go | 18 ++++-- ...l_resource_remote_info_okta_custom_role.go | 18 ++++-- ...resource_remote_info_okta_standard_role.go | 18 ++++-- model_resource_remote_info_pagerduty_role.go | 18 ++++-- ...e_remote_info_salesforce_permission_set.go | 18 ++++-- ...resource_remote_info_salesforce_profile.go | 19 ++++-- model_resource_remote_info_salesforce_role.go | 18 ++++-- model_resource_remote_info_teleport_role.go | 18 ++++-- model_resource_user.go | 23 +++++-- model_resource_user_access_status.go | 22 +++++-- model_resource_with_access_level.go | 19 ++++-- model_reviewer_id_list.go | 18 ++++-- model_reviewer_stage.go | 21 +++++-- model_reviewer_stage_list.go | 18 ++++-- model_rule_clauses.go | 19 ++++-- model_rule_conjunction.go | 18 ++++-- model_rule_disjunction.go | 18 ++++-- model_scoped_role_permission.go | 21 +++++-- model_scoped_role_permission_list.go | 18 ++++-- model_session.go | 22 +++++-- model_sessions_list.go | 31 ++++++++++ model_sync_error.go | 21 +++++-- model_sync_error_list.go | 18 ++++-- model_sync_task.go | 19 ++++-- model_tag.go | 23 +++++-- model_tag_filter.go | 19 ++++-- model_tag_selector.go | 20 +++++-- model_tags_list.go | 18 ++++-- model_ticket_propagation_configuration.go | 21 +++++-- model_uar.go | 25 ++++++-- model_uar_scope.go | 39 ++++++++++++ model_update_access_rule_info.go | 22 +++++-- model_update_configuration_template_info.go | 36 +++++++---- model_update_group_binding_info.go | 20 +++++-- model_update_group_binding_info_list.go | 18 ++++-- model_update_group_info.go | 43 ++++++++++--- model_update_group_info_list.go | 18 ++++-- model_update_group_resources_info.go | 18 ++++-- model_update_group_user_request.go | 19 ++++-- model_update_idp_group_mappings_request.go | 18 ++++-- ...p_group_mappings_request_mappings_inner.go | 31 ++++++++++ model_update_owner_info.go | 23 +++++-- model_update_owner_info_list.go | 18 ++++-- model_update_resource_info.go | 44 +++++++++++--- model_update_resource_info_list.go | 18 ++++-- model_update_resource_user_request.go | 19 ++++-- model_user.go | 24 ++++++-- model_user_id_list.go | 18 ++++-- model_user_list.go | 18 ++++-- model_visibility_info.go | 19 ++++-- 194 files changed, 3553 insertions(+), 704 deletions(-) diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore index 2cfdbf3..0309138 100644 --- a/.openapi-generator-ignore +++ b/.openapi-generator-ignore @@ -1,4 +1,6 @@ .travis.yml test/ git_push.sh - +go.mod +api/ +.gitignore diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 6da5f70..e767c31 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -1,6 +1,4 @@ -.gitignore README.md -api/openapi.yaml api_access_rules.go api_apps.go api_bundles.go @@ -255,7 +253,6 @@ docs/UserList.md docs/UsersAPI.md docs/VisibilityInfo.md docs/VisibilityTypeEnum.md -go.mod go.sum model_access.go model_access_list.go diff --git a/Makefile b/Makefile index 10dcd9c..ed5160b 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ SHELL := /bin/bash -OPENAPI_GEN=openapi-generator generate -i api/openapi.yaml -g go -o . -c config.json -OPENAPI_GEN_CI=openapi-generator-cli generate --enable-post-process-file -i api/openapi.yaml -g go -o . -c config.json +OPENAPI_GEN=openapi-generator generate --additional-properties=disallowAdditionalPropertiesIfNotPresent=false -i api/openapi.yaml -g go -o . -c config.json +OPENAPI_GEN_CI=openapi-generator-cli generate --additional-properties=disallowAdditionalPropertiesIfNotPresent=false --enable-post-process-file -i api/openapi.yaml -g go -o . -c config.json PULL_REMOTE_OPENAPI=curl https://app.opal.dev/openapi.yaml > api/openapi.yaml CLEAN=bash clean.sh CLEAN_CI=CI=true bash clean.sh diff --git a/go.mod b/go.mod index 40d5d2c..88f3523 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,3 @@ go 1.18 require ( gopkg.in/validator.v2 v2.0.1 ) - -retract ( - v1.1.1 // cannot be installed on macos -) diff --git a/model_access.go b/model_access.go index d337f6d..a97c58d 100644 --- a/model_access.go +++ b/model_access.go @@ -14,7 +14,6 @@ package opal import ( "encoding/json" "time" - "bytes" "fmt" ) @@ -36,6 +35,7 @@ type Access struct { HasDirectAccess bool `json:"has_direct_access"` // The number of ways in which the principal has access to this entity (directly and inherited). NumAccessPaths int32 `json:"num_access_paths"` + AdditionalProperties map[string]interface{} } type _Access Access @@ -293,6 +293,11 @@ func (o Access) ToMap() (map[string]interface{}, error) { } toSerialize["has_direct_access"] = o.HasDirectAccess toSerialize["num_access_paths"] = o.NumAccessPaths + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -325,9 +330,7 @@ func (o *Access) UnmarshalJSON(data []byte) (err error) { varAccess := _Access{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varAccess) + err = json.Unmarshal(data, &varAccess) if err != nil { return err @@ -335,6 +338,20 @@ func (o *Access) UnmarshalJSON(data []byte) (err error) { *o = Access(varAccess) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "principal_id") + delete(additionalProperties, "principal_type") + delete(additionalProperties, "entity_id") + delete(additionalProperties, "entity_type") + delete(additionalProperties, "access_level") + delete(additionalProperties, "expiration_date") + delete(additionalProperties, "has_direct_access") + delete(additionalProperties, "num_access_paths") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_access_list.go b/model_access_list.go index 91b4b88..7d4be8f 100644 --- a/model_access_list.go +++ b/model_access_list.go @@ -21,8 +21,11 @@ var _ MappedNullable = &AccessList{} // AccessList struct for AccessList type AccessList struct { Results []Access `json:"results,omitempty"` + AdditionalProperties map[string]interface{} } +type _AccessList AccessList + // NewAccessList instantiates a new AccessList 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 @@ -85,9 +88,35 @@ func (o AccessList) ToMap() (map[string]interface{}, error) { if !IsNil(o.Results) { toSerialize["results"] = o.Results } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *AccessList) UnmarshalJSON(data []byte) (err error) { + varAccessList := _AccessList{} + + err = json.Unmarshal(data, &varAccessList) + + if err != nil { + return err + } + + *o = AccessList(varAccessList) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableAccessList struct { value *AccessList isSet bool diff --git a/model_access_rule.go b/model_access_rule.go index 008cc0e..f768cfa 100644 --- a/model_access_rule.go +++ b/model_access_rule.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -33,6 +32,7 @@ type AccessRule struct { // The status of the access rule. Status string `json:"status"` RuleClauses RuleClauses `json:"ruleClauses"` + AdditionalProperties map[string]interface{} } type _AccessRule AccessRule @@ -220,6 +220,11 @@ func (o AccessRule) ToMap() (map[string]interface{}, error) { toSerialize["admin_owner_id"] = o.AdminOwnerId toSerialize["status"] = o.Status toSerialize["ruleClauses"] = o.RuleClauses + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -252,9 +257,7 @@ func (o *AccessRule) UnmarshalJSON(data []byte) (err error) { varAccessRule := _AccessRule{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varAccessRule) + err = json.Unmarshal(data, &varAccessRule) if err != nil { return err @@ -262,6 +265,18 @@ func (o *AccessRule) UnmarshalJSON(data []byte) (err error) { *o = AccessRule(varAccessRule) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "access_rule_id") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "admin_owner_id") + delete(additionalProperties, "status") + delete(additionalProperties, "ruleClauses") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_add_bundle_group_request.go b/model_add_bundle_group_request.go index fa12e4e..7ea9d63 100644 --- a/model_add_bundle_group_request.go +++ b/model_add_bundle_group_request.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -28,6 +27,7 @@ type AddBundleGroupRequest struct { AccessLevelRemoteId *string `json:"access_level_remote_id,omitempty"` // The name of the access level to grant to this user. If omitted, the default access level name value (empty string) is used. AccessLevelName *string `json:"access_level_name,omitempty"` + AdditionalProperties map[string]interface{} } type _AddBundleGroupRequest AddBundleGroupRequest @@ -155,6 +155,11 @@ func (o AddBundleGroupRequest) ToMap() (map[string]interface{}, error) { if !IsNil(o.AccessLevelName) { toSerialize["access_level_name"] = o.AccessLevelName } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -182,9 +187,7 @@ func (o *AddBundleGroupRequest) UnmarshalJSON(data []byte) (err error) { varAddBundleGroupRequest := _AddBundleGroupRequest{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varAddBundleGroupRequest) + err = json.Unmarshal(data, &varAddBundleGroupRequest) if err != nil { return err @@ -192,6 +195,15 @@ func (o *AddBundleGroupRequest) UnmarshalJSON(data []byte) (err error) { *o = AddBundleGroupRequest(varAddBundleGroupRequest) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "group_id") + delete(additionalProperties, "access_level_remote_id") + delete(additionalProperties, "access_level_name") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_add_bundle_resource_request.go b/model_add_bundle_resource_request.go index 2212167..a666092 100644 --- a/model_add_bundle_resource_request.go +++ b/model_add_bundle_resource_request.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -28,6 +27,7 @@ type AddBundleResourceRequest struct { AccessLevelRemoteId *string `json:"access_level_remote_id,omitempty"` // The name of the access level to grant to this user. If omitted, the default access level name value (empty string) is used. AccessLevelName *string `json:"access_level_name,omitempty"` + AdditionalProperties map[string]interface{} } type _AddBundleResourceRequest AddBundleResourceRequest @@ -155,6 +155,11 @@ func (o AddBundleResourceRequest) ToMap() (map[string]interface{}, error) { if !IsNil(o.AccessLevelName) { toSerialize["access_level_name"] = o.AccessLevelName } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -182,9 +187,7 @@ func (o *AddBundleResourceRequest) UnmarshalJSON(data []byte) (err error) { varAddBundleResourceRequest := _AddBundleResourceRequest{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varAddBundleResourceRequest) + err = json.Unmarshal(data, &varAddBundleResourceRequest) if err != nil { return err @@ -192,6 +195,15 @@ func (o *AddBundleResourceRequest) UnmarshalJSON(data []byte) (err error) { *o = AddBundleResourceRequest(varAddBundleResourceRequest) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "resource_id") + delete(additionalProperties, "access_level_remote_id") + delete(additionalProperties, "access_level_name") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_add_group_resource_request.go b/model_add_group_resource_request.go index a237044..66dfa34 100644 --- a/model_add_group_resource_request.go +++ b/model_add_group_resource_request.go @@ -24,8 +24,11 @@ type AddGroupResourceRequest struct { AccessLevelRemoteId *string `json:"access_level_remote_id,omitempty"` // The duration for which the resource can be accessed (in minutes). Use 0 to set to indefinite. DurationMinutes *int32 `json:"duration_minutes,omitempty"` + AdditionalProperties map[string]interface{} } +type _AddGroupResourceRequest AddGroupResourceRequest + // NewAddGroupResourceRequest instantiates a new AddGroupResourceRequest 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 @@ -123,9 +126,36 @@ func (o AddGroupResourceRequest) ToMap() (map[string]interface{}, error) { if !IsNil(o.DurationMinutes) { toSerialize["duration_minutes"] = o.DurationMinutes } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *AddGroupResourceRequest) UnmarshalJSON(data []byte) (err error) { + varAddGroupResourceRequest := _AddGroupResourceRequest{} + + err = json.Unmarshal(data, &varAddGroupResourceRequest) + + if err != nil { + return err + } + + *o = AddGroupResourceRequest(varAddGroupResourceRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "access_level_remote_id") + delete(additionalProperties, "duration_minutes") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableAddGroupResourceRequest struct { value *AddGroupResourceRequest isSet bool diff --git a/model_add_group_user_request.go b/model_add_group_user_request.go index 49bf506..e797981 100644 --- a/model_add_group_user_request.go +++ b/model_add_group_user_request.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -26,6 +25,7 @@ type AddGroupUserRequest struct { DurationMinutes int32 `json:"duration_minutes"` // The remote ID of the access level to grant to this user. If omitted, the default access level remote ID value (empty string) is used. AccessLevelRemoteId *string `json:"access_level_remote_id,omitempty"` + AdditionalProperties map[string]interface{} } type _AddGroupUserRequest AddGroupUserRequest @@ -118,6 +118,11 @@ func (o AddGroupUserRequest) ToMap() (map[string]interface{}, error) { if !IsNil(o.AccessLevelRemoteId) { toSerialize["access_level_remote_id"] = o.AccessLevelRemoteId } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -145,9 +150,7 @@ func (o *AddGroupUserRequest) UnmarshalJSON(data []byte) (err error) { varAddGroupUserRequest := _AddGroupUserRequest{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varAddGroupUserRequest) + err = json.Unmarshal(data, &varAddGroupUserRequest) if err != nil { return err @@ -155,6 +158,14 @@ func (o *AddGroupUserRequest) UnmarshalJSON(data []byte) (err error) { *o = AddGroupUserRequest(varAddGroupUserRequest) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "duration_minutes") + delete(additionalProperties, "access_level_remote_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_add_resource_nhi_request.go b/model_add_resource_nhi_request.go index 84fc132..5afbd46 100644 --- a/model_add_resource_nhi_request.go +++ b/model_add_resource_nhi_request.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -26,6 +25,7 @@ type AddResourceNhiRequest struct { DurationMinutes int32 `json:"duration_minutes"` // The remote ID of the access level to grant. If omitted, the default access level remote ID value (empty string) is used. AccessLevelRemoteId *string `json:"access_level_remote_id,omitempty"` + AdditionalProperties map[string]interface{} } type _AddResourceNhiRequest AddResourceNhiRequest @@ -118,6 +118,11 @@ func (o AddResourceNhiRequest) ToMap() (map[string]interface{}, error) { if !IsNil(o.AccessLevelRemoteId) { toSerialize["access_level_remote_id"] = o.AccessLevelRemoteId } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -145,9 +150,7 @@ func (o *AddResourceNhiRequest) UnmarshalJSON(data []byte) (err error) { varAddResourceNhiRequest := _AddResourceNhiRequest{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varAddResourceNhiRequest) + err = json.Unmarshal(data, &varAddResourceNhiRequest) if err != nil { return err @@ -155,6 +158,14 @@ func (o *AddResourceNhiRequest) UnmarshalJSON(data []byte) (err error) { *o = AddResourceNhiRequest(varAddResourceNhiRequest) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "duration_minutes") + delete(additionalProperties, "access_level_remote_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_add_resource_user_request.go b/model_add_resource_user_request.go index 69f9a89..9ee8435 100644 --- a/model_add_resource_user_request.go +++ b/model_add_resource_user_request.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -26,6 +25,7 @@ type AddResourceUserRequest struct { DurationMinutes int32 `json:"duration_minutes"` // The remote ID of the access level to grant to this user. If omitted, the default access level remote ID value (empty string) is used. AccessLevelRemoteId *string `json:"access_level_remote_id,omitempty"` + AdditionalProperties map[string]interface{} } type _AddResourceUserRequest AddResourceUserRequest @@ -118,6 +118,11 @@ func (o AddResourceUserRequest) ToMap() (map[string]interface{}, error) { if !IsNil(o.AccessLevelRemoteId) { toSerialize["access_level_remote_id"] = o.AccessLevelRemoteId } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -145,9 +150,7 @@ func (o *AddResourceUserRequest) UnmarshalJSON(data []byte) (err error) { varAddResourceUserRequest := _AddResourceUserRequest{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varAddResourceUserRequest) + err = json.Unmarshal(data, &varAddResourceUserRequest) if err != nil { return err @@ -155,6 +158,14 @@ func (o *AddResourceUserRequest) UnmarshalJSON(data []byte) (err error) { *o = AddResourceUserRequest(varAddResourceUserRequest) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "duration_minutes") + delete(additionalProperties, "access_level_remote_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_app.go b/model_app.go index 35a0935..5af25cf 100644 --- a/model_app.go +++ b/model_app.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -33,6 +32,7 @@ type App struct { AppType AppTypeEnum `json:"app_type"` // Validation checks of an apps' configuration and permissions. Validations []AppValidation `json:"validations,omitempty"` + AdditionalProperties map[string]interface{} } type _App App @@ -229,6 +229,11 @@ func (o App) ToMap() (map[string]interface{}, error) { if !IsNil(o.Validations) { toSerialize["validations"] = o.Validations } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -260,9 +265,7 @@ func (o *App) UnmarshalJSON(data []byte) (err error) { varApp := _App{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varApp) + err = json.Unmarshal(data, &varApp) if err != nil { return err @@ -270,6 +273,18 @@ func (o *App) UnmarshalJSON(data []byte) (err error) { *o = App(varApp) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "app_id") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "admin_owner_id") + delete(additionalProperties, "app_type") + delete(additionalProperties, "validations") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_app_validation.go b/model_app_validation.go index a338707..9f1a7cf 100644 --- a/model_app_validation.go +++ b/model_app_validation.go @@ -14,7 +14,6 @@ package opal import ( "encoding/json" "time" - "bytes" "fmt" ) @@ -34,6 +33,7 @@ type AppValidation struct { Status AppValidationStatusEnum `json:"status"` // The date and time the app validation was last run. UpdatedAt time.Time `json:"updated_at"` + AdditionalProperties map[string]interface{} } type _AppValidation AppValidation @@ -269,6 +269,11 @@ func (o AppValidation) ToMap() (map[string]interface{}, error) { toSerialize["severity"] = o.Severity toSerialize["status"] = o.Status toSerialize["updated_at"] = o.UpdatedAt + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -300,9 +305,7 @@ func (o *AppValidation) UnmarshalJSON(data []byte) (err error) { varAppValidation := _AppValidation{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varAppValidation) + err = json.Unmarshal(data, &varAppValidation) if err != nil { return err @@ -310,6 +313,19 @@ func (o *AppValidation) UnmarshalJSON(data []byte) (err error) { *o = AppValidation(varAppValidation) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "key") + delete(additionalProperties, "name") + delete(additionalProperties, "usage_reason") + delete(additionalProperties, "details") + delete(additionalProperties, "severity") + delete(additionalProperties, "status") + delete(additionalProperties, "updated_at") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_approve_request_200_response.go b/model_approve_request_200_response.go index a4c3e92..47aac57 100644 --- a/model_approve_request_200_response.go +++ b/model_approve_request_200_response.go @@ -21,8 +21,11 @@ var _ MappedNullable = &ApproveRequest200Response{} // ApproveRequest200Response struct for ApproveRequest200Response type ApproveRequest200Response struct { Request *Request `json:"request,omitempty"` + AdditionalProperties map[string]interface{} } +type _ApproveRequest200Response ApproveRequest200Response + // NewApproveRequest200Response instantiates a new ApproveRequest200Response 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 @@ -85,9 +88,35 @@ func (o ApproveRequest200Response) ToMap() (map[string]interface{}, error) { if !IsNil(o.Request) { toSerialize["request"] = o.Request } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *ApproveRequest200Response) UnmarshalJSON(data []byte) (err error) { + varApproveRequest200Response := _ApproveRequest200Response{} + + err = json.Unmarshal(data, &varApproveRequest200Response) + + if err != nil { + return err + } + + *o = ApproveRequest200Response(varApproveRequest200Response) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "request") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableApproveRequest200Response struct { value *ApproveRequest200Response isSet bool diff --git a/model_approve_request_request.go b/model_approve_request_request.go index 8c2660f..771f62b 100644 --- a/model_approve_request_request.go +++ b/model_approve_request_request.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -25,6 +24,7 @@ type ApproveRequestRequest struct { Level RequestApprovalEnum `json:"level"` // Optional comment for the approval Comment *string `json:"comment,omitempty"` + AdditionalProperties map[string]interface{} } type _ApproveRequestRequest ApproveRequestRequest @@ -117,6 +117,11 @@ func (o ApproveRequestRequest) ToMap() (map[string]interface{}, error) { if !IsNil(o.Comment) { toSerialize["comment"] = o.Comment } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -144,9 +149,7 @@ func (o *ApproveRequestRequest) UnmarshalJSON(data []byte) (err error) { varApproveRequestRequest := _ApproveRequestRequest{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varApproveRequestRequest) + err = json.Unmarshal(data, &varApproveRequestRequest) if err != nil { return err @@ -154,6 +157,14 @@ func (o *ApproveRequestRequest) UnmarshalJSON(data []byte) (err error) { *o = ApproveRequestRequest(varApproveRequestRequest) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "level") + delete(additionalProperties, "comment") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_apps_list.go b/model_apps_list.go index dbdade8..aa8f7bf 100644 --- a/model_apps_list.go +++ b/model_apps_list.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -23,6 +22,7 @@ var _ MappedNullable = &AppsList{} // AppsList A list of apps. type AppsList struct { Apps []App `json:"apps"` + AdditionalProperties map[string]interface{} } type _AppsList AppsList @@ -80,6 +80,11 @@ func (o AppsList) MarshalJSON() ([]byte, error) { func (o AppsList) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["apps"] = o.Apps + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -107,9 +112,7 @@ func (o *AppsList) UnmarshalJSON(data []byte) (err error) { varAppsList := _AppsList{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varAppsList) + err = json.Unmarshal(data, &varAppsList) if err != nil { return err @@ -117,6 +120,13 @@ func (o *AppsList) UnmarshalJSON(data []byte) (err error) { *o = AppsList(varAppsList) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "apps") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_aws_permission_set_metadata.go b/model_aws_permission_set_metadata.go index bacbc36..b29d996 100644 --- a/model_aws_permission_set_metadata.go +++ b/model_aws_permission_set_metadata.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -23,6 +22,7 @@ var _ MappedNullable = &AwsPermissionSetMetadata{} // AwsPermissionSetMetadata Metadata for AWS Identity Center permission set. type AwsPermissionSetMetadata struct { AwsPermissionSet AwsPermissionSetMetadataAwsPermissionSet `json:"aws_permission_set"` + AdditionalProperties map[string]interface{} } type _AwsPermissionSetMetadata AwsPermissionSetMetadata @@ -80,6 +80,11 @@ func (o AwsPermissionSetMetadata) MarshalJSON() ([]byte, error) { func (o AwsPermissionSetMetadata) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["aws_permission_set"] = o.AwsPermissionSet + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -107,9 +112,7 @@ func (o *AwsPermissionSetMetadata) UnmarshalJSON(data []byte) (err error) { varAwsPermissionSetMetadata := _AwsPermissionSetMetadata{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varAwsPermissionSetMetadata) + err = json.Unmarshal(data, &varAwsPermissionSetMetadata) if err != nil { return err @@ -117,6 +120,13 @@ func (o *AwsPermissionSetMetadata) UnmarshalJSON(data []byte) (err error) { *o = AwsPermissionSetMetadata(varAwsPermissionSetMetadata) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "aws_permission_set") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_aws_permission_set_metadata_aws_permission_set.go b/model_aws_permission_set_metadata_aws_permission_set.go index 3531172..7fc0b63 100644 --- a/model_aws_permission_set_metadata_aws_permission_set.go +++ b/model_aws_permission_set_metadata_aws_permission_set.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -26,6 +25,7 @@ type AwsPermissionSetMetadataAwsPermissionSet struct { Arn string `json:"arn"` // The ID of an AWS account to which this permission set is provisioned. AccountId string `json:"account_id"` + AdditionalProperties map[string]interface{} } type _AwsPermissionSetMetadataAwsPermissionSet AwsPermissionSetMetadataAwsPermissionSet @@ -109,6 +109,11 @@ func (o AwsPermissionSetMetadataAwsPermissionSet) ToMap() (map[string]interface{ toSerialize := map[string]interface{}{} toSerialize["arn"] = o.Arn toSerialize["account_id"] = o.AccountId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -137,9 +142,7 @@ func (o *AwsPermissionSetMetadataAwsPermissionSet) UnmarshalJSON(data []byte) (e varAwsPermissionSetMetadataAwsPermissionSet := _AwsPermissionSetMetadataAwsPermissionSet{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varAwsPermissionSetMetadataAwsPermissionSet) + err = json.Unmarshal(data, &varAwsPermissionSetMetadataAwsPermissionSet) if err != nil { return err @@ -147,6 +150,14 @@ func (o *AwsPermissionSetMetadataAwsPermissionSet) UnmarshalJSON(data []byte) (e *o = AwsPermissionSetMetadataAwsPermissionSet(varAwsPermissionSetMetadataAwsPermissionSet) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "arn") + delete(additionalProperties, "account_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_bundle.go b/model_bundle.go index f5e91c6..97ec8d0 100644 --- a/model_bundle.go +++ b/model_bundle.go @@ -39,8 +39,11 @@ type Bundle struct { TotalNumResources *int32 `json:"total_num_resources,omitempty"` // The total number of groups in the bundle. TotalNumGroups *int32 `json:"total_num_groups,omitempty"` + AdditionalProperties map[string]interface{} } +type _Bundle Bundle + // NewBundle instantiates a new Bundle 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 @@ -383,9 +386,43 @@ func (o Bundle) ToMap() (map[string]interface{}, error) { if !IsNil(o.TotalNumGroups) { toSerialize["total_num_groups"] = o.TotalNumGroups } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *Bundle) UnmarshalJSON(data []byte) (err error) { + varBundle := _Bundle{} + + err = json.Unmarshal(data, &varBundle) + + if err != nil { + return err + } + + *o = Bundle(varBundle) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "bundle_id") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "created_at") + delete(additionalProperties, "updated_at") + delete(additionalProperties, "admin_owner_id") + delete(additionalProperties, "total_num_items") + delete(additionalProperties, "total_num_resources") + delete(additionalProperties, "total_num_groups") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableBundle struct { value *Bundle isSet bool diff --git a/model_bundle_group.go b/model_bundle_group.go index bbb1621..aba3ed3 100644 --- a/model_bundle_group.go +++ b/model_bundle_group.go @@ -28,8 +28,11 @@ type BundleGroup struct { AccessLevelName *string `json:"access_level_name,omitempty"` // The remote ID of the access level of the group within a bundle. AccessLevelRemoteId *string `json:"access_level_remote_id,omitempty"` + AdditionalProperties map[string]interface{} } +type _BundleGroup BundleGroup + // NewBundleGroup instantiates a new BundleGroup 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 @@ -197,9 +200,38 @@ func (o BundleGroup) ToMap() (map[string]interface{}, error) { if !IsNil(o.AccessLevelRemoteId) { toSerialize["access_level_remote_id"] = o.AccessLevelRemoteId } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *BundleGroup) UnmarshalJSON(data []byte) (err error) { + varBundleGroup := _BundleGroup{} + + err = json.Unmarshal(data, &varBundleGroup) + + if err != nil { + return err + } + + *o = BundleGroup(varBundleGroup) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "bundle_id") + delete(additionalProperties, "group_id") + delete(additionalProperties, "access_level_name") + delete(additionalProperties, "access_level_remote_id") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableBundleGroup struct { value *BundleGroup isSet bool diff --git a/model_bundle_resource.go b/model_bundle_resource.go index 6ce96dc..b3da302 100644 --- a/model_bundle_resource.go +++ b/model_bundle_resource.go @@ -28,8 +28,11 @@ type BundleResource struct { AccessLevelName *string `json:"access_level_name,omitempty"` // The remote ID of the access level of the resource within a bundle. AccessLevelRemoteId *string `json:"access_level_remote_id,omitempty"` + AdditionalProperties map[string]interface{} } +type _BundleResource BundleResource + // NewBundleResource instantiates a new BundleResource 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 @@ -197,9 +200,38 @@ func (o BundleResource) ToMap() (map[string]interface{}, error) { if !IsNil(o.AccessLevelRemoteId) { toSerialize["access_level_remote_id"] = o.AccessLevelRemoteId } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *BundleResource) UnmarshalJSON(data []byte) (err error) { + varBundleResource := _BundleResource{} + + err = json.Unmarshal(data, &varBundleResource) + + if err != nil { + return err + } + + *o = BundleResource(varBundleResource) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "bundle_id") + delete(additionalProperties, "resource_id") + delete(additionalProperties, "access_level_name") + delete(additionalProperties, "access_level_remote_id") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableBundleResource struct { value *BundleResource isSet bool diff --git a/model_condition.go b/model_condition.go index da4233b..1dc467f 100644 --- a/model_condition.go +++ b/model_condition.go @@ -24,8 +24,11 @@ type Condition struct { GroupIds []string `json:"group_ids,omitempty"` // The list of role remote IDs to match. RoleRemoteIds []string `json:"role_remote_ids,omitempty"` + AdditionalProperties map[string]interface{} } +type _Condition Condition + // NewCondition instantiates a new Condition 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 @@ -123,9 +126,36 @@ func (o Condition) ToMap() (map[string]interface{}, error) { if !IsNil(o.RoleRemoteIds) { toSerialize["role_remote_ids"] = o.RoleRemoteIds } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *Condition) UnmarshalJSON(data []byte) (err error) { + varCondition := _Condition{} + + err = json.Unmarshal(data, &varCondition) + + if err != nil { + return err + } + + *o = Condition(varCondition) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "group_ids") + delete(additionalProperties, "role_remote_ids") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableCondition struct { value *Condition isSet bool diff --git a/model_configuration_template.go b/model_configuration_template.go index f73c767..c231eb3 100644 --- a/model_configuration_template.go +++ b/model_configuration_template.go @@ -26,7 +26,6 @@ type ConfigurationTemplate struct { Name *string `json:"name,omitempty"` // The ID of the owner of the configuration template. AdminOwnerId *string `json:"admin_owner_id,omitempty"` - // The visibility info of the configuration template. Visibility *VisibilityInfo `json:"visibility,omitempty"` // The IDs of the audit message channels linked to the configuration template. LinkedAuditMessageChannelIds []string `json:"linked_audit_message_channel_ids,omitempty"` @@ -43,8 +42,11 @@ type ConfigurationTemplate struct { TicketPropagation *TicketPropagationConfiguration `json:"ticket_propagation,omitempty"` // Custom request notification sent upon request approval for this configuration template. CustomRequestNotification *string `json:"custom_request_notification,omitempty"` + AdditionalProperties map[string]interface{} } +type _ConfigurationTemplate ConfigurationTemplate + // NewConfigurationTemplate instantiates a new ConfigurationTemplate 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 @@ -492,9 +494,46 @@ func (o ConfigurationTemplate) ToMap() (map[string]interface{}, error) { if !IsNil(o.CustomRequestNotification) { toSerialize["custom_request_notification"] = o.CustomRequestNotification } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *ConfigurationTemplate) UnmarshalJSON(data []byte) (err error) { + varConfigurationTemplate := _ConfigurationTemplate{} + + err = json.Unmarshal(data, &varConfigurationTemplate) + + if err != nil { + return err + } + + *o = ConfigurationTemplate(varConfigurationTemplate) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "configuration_template_id") + delete(additionalProperties, "name") + delete(additionalProperties, "admin_owner_id") + delete(additionalProperties, "visibility") + delete(additionalProperties, "linked_audit_message_channel_ids") + delete(additionalProperties, "request_configuration_id") + delete(additionalProperties, "member_oncall_schedule_ids") + delete(additionalProperties, "break_glass_user_ids") + delete(additionalProperties, "require_mfa_to_approve") + delete(additionalProperties, "require_mfa_to_connect") + delete(additionalProperties, "ticket_propagation") + delete(additionalProperties, "custom_request_notification") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableConfigurationTemplate struct { value *ConfigurationTemplate isSet bool diff --git a/model_create_bundle_info.go b/model_create_bundle_info.go index 7ddddce..2dcfc3c 100644 --- a/model_create_bundle_info.go +++ b/model_create_bundle_info.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -28,6 +27,7 @@ type CreateBundleInfo struct { Description *string `json:"description,omitempty"` // The ID of the bundle's admin owner. AdminOwnerId string `json:"admin_owner_id"` + AdditionalProperties map[string]interface{} } type _CreateBundleInfo CreateBundleInfo @@ -146,6 +146,11 @@ func (o CreateBundleInfo) ToMap() (map[string]interface{}, error) { toSerialize["description"] = o.Description } toSerialize["admin_owner_id"] = o.AdminOwnerId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -174,9 +179,7 @@ func (o *CreateBundleInfo) UnmarshalJSON(data []byte) (err error) { varCreateBundleInfo := _CreateBundleInfo{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varCreateBundleInfo) + err = json.Unmarshal(data, &varCreateBundleInfo) if err != nil { return err @@ -184,6 +187,15 @@ func (o *CreateBundleInfo) UnmarshalJSON(data []byte) (err error) { *o = CreateBundleInfo(varCreateBundleInfo) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "admin_owner_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_create_configuration_template_info.go b/model_create_configuration_template_info.go index e9c5a27..002479a 100644 --- a/model_create_configuration_template_info.go +++ b/model_create_configuration_template_info.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -24,7 +23,6 @@ var _ MappedNullable = &CreateConfigurationTemplateInfo{} type CreateConfigurationTemplateInfo struct { // The ID of the owner of the configuration template. AdminOwnerId string `json:"admin_owner_id"` - // The visibility info of the configuration template. Visibility VisibilityInfo `json:"visibility"` // The IDs of the audit message channels linked to the configuration template. LinkedAuditMessageChannelIds []string `json:"linked_audit_message_channel_ids,omitempty"` @@ -40,12 +38,11 @@ type CreateConfigurationTemplateInfo struct { Name string `json:"name"` // The request configuration list of the configuration template. If not provided, the default request configuration will be used. RequestConfigurations []RequestConfiguration `json:"request_configurations,omitempty"` - // The request configuration list of the configuration template. If not provided, the default request configuration will be used. Deprecated in favor of `request_configurations`. - // Deprecated RequestConfigurationList *CreateRequestConfigurationInfoList `json:"request_configuration_list,omitempty"` TicketPropagation *TicketPropagationConfiguration `json:"ticket_propagation,omitempty"` // Custom request notification sent upon request approval for this configuration template. CustomRequestNotification *string `json:"custom_request_notification,omitempty"` + AdditionalProperties map[string]interface{} } type _CreateConfigurationTemplateInfo CreateConfigurationTemplateInfo @@ -321,7 +318,6 @@ func (o *CreateConfigurationTemplateInfo) SetRequestConfigurations(v []RequestCo } // GetRequestConfigurationList returns the RequestConfigurationList field value if set, zero value otherwise. -// Deprecated func (o *CreateConfigurationTemplateInfo) GetRequestConfigurationList() CreateRequestConfigurationInfoList { if o == nil || IsNil(o.RequestConfigurationList) { var ret CreateRequestConfigurationInfoList @@ -332,7 +328,6 @@ func (o *CreateConfigurationTemplateInfo) GetRequestConfigurationList() CreateRe // GetRequestConfigurationListOk returns a tuple with the RequestConfigurationList field value if set, nil otherwise // and a boolean to check if the value has been set. -// Deprecated func (o *CreateConfigurationTemplateInfo) GetRequestConfigurationListOk() (*CreateRequestConfigurationInfoList, bool) { if o == nil || IsNil(o.RequestConfigurationList) { return nil, false @@ -350,7 +345,6 @@ func (o *CreateConfigurationTemplateInfo) HasRequestConfigurationList() bool { } // SetRequestConfigurationList gets a reference to the given CreateRequestConfigurationInfoList and assigns it to the RequestConfigurationList field. -// Deprecated func (o *CreateConfigurationTemplateInfo) SetRequestConfigurationList(v CreateRequestConfigurationInfoList) { o.RequestConfigurationList = &v } @@ -455,6 +449,11 @@ func (o CreateConfigurationTemplateInfo) ToMap() (map[string]interface{}, error) if !IsNil(o.CustomRequestNotification) { toSerialize["custom_request_notification"] = o.CustomRequestNotification } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -486,9 +485,7 @@ func (o *CreateConfigurationTemplateInfo) UnmarshalJSON(data []byte) (err error) varCreateConfigurationTemplateInfo := _CreateConfigurationTemplateInfo{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varCreateConfigurationTemplateInfo) + err = json.Unmarshal(data, &varCreateConfigurationTemplateInfo) if err != nil { return err @@ -496,6 +493,24 @@ func (o *CreateConfigurationTemplateInfo) UnmarshalJSON(data []byte) (err error) *o = CreateConfigurationTemplateInfo(varCreateConfigurationTemplateInfo) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "admin_owner_id") + delete(additionalProperties, "visibility") + delete(additionalProperties, "linked_audit_message_channel_ids") + delete(additionalProperties, "member_oncall_schedule_ids") + delete(additionalProperties, "break_glass_user_ids") + delete(additionalProperties, "require_mfa_to_approve") + delete(additionalProperties, "require_mfa_to_connect") + delete(additionalProperties, "name") + delete(additionalProperties, "request_configurations") + delete(additionalProperties, "request_configuration_list") + delete(additionalProperties, "ticket_propagation") + delete(additionalProperties, "custom_request_notification") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_create_delegation_request.go b/model_create_delegation_request.go index a7ff7b5..82f874d 100644 --- a/model_create_delegation_request.go +++ b/model_create_delegation_request.go @@ -14,7 +14,6 @@ package opal import ( "encoding/json" "time" - "bytes" "fmt" ) @@ -33,6 +32,7 @@ type CreateDelegationRequest struct { EndTime time.Time `json:"end_time"` // The reason for the delegation. Reason string `json:"reason"` + AdditionalProperties map[string]interface{} } type _CreateDelegationRequest CreateDelegationRequest @@ -194,6 +194,11 @@ func (o CreateDelegationRequest) ToMap() (map[string]interface{}, error) { toSerialize["start_time"] = o.StartTime toSerialize["end_time"] = o.EndTime toSerialize["reason"] = o.Reason + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -225,9 +230,7 @@ func (o *CreateDelegationRequest) UnmarshalJSON(data []byte) (err error) { varCreateDelegationRequest := _CreateDelegationRequest{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varCreateDelegationRequest) + err = json.Unmarshal(data, &varCreateDelegationRequest) if err != nil { return err @@ -235,6 +238,17 @@ func (o *CreateDelegationRequest) UnmarshalJSON(data []byte) (err error) { *o = CreateDelegationRequest(varCreateDelegationRequest) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "delegator_user_id") + delete(additionalProperties, "delegate_user_id") + delete(additionalProperties, "start_time") + delete(additionalProperties, "end_time") + delete(additionalProperties, "reason") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_create_group_binding_info.go b/model_create_group_binding_info.go index 0960ff9..22500ac 100644 --- a/model_create_group_binding_info.go +++ b/model_create_group_binding_info.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -26,6 +25,7 @@ type CreateGroupBindingInfo struct { SourceGroupId string `json:"source_group_id"` // The list of groups. Groups []CreateGroupBindingInfoGroupsInner `json:"groups"` + AdditionalProperties map[string]interface{} } type _CreateGroupBindingInfo CreateGroupBindingInfo @@ -109,6 +109,11 @@ func (o CreateGroupBindingInfo) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["source_group_id"] = o.SourceGroupId toSerialize["groups"] = o.Groups + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -137,9 +142,7 @@ func (o *CreateGroupBindingInfo) UnmarshalJSON(data []byte) (err error) { varCreateGroupBindingInfo := _CreateGroupBindingInfo{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varCreateGroupBindingInfo) + err = json.Unmarshal(data, &varCreateGroupBindingInfo) if err != nil { return err @@ -147,6 +150,14 @@ func (o *CreateGroupBindingInfo) UnmarshalJSON(data []byte) (err error) { *o = CreateGroupBindingInfo(varCreateGroupBindingInfo) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "source_group_id") + delete(additionalProperties, "groups") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_create_group_binding_info_groups_inner.go b/model_create_group_binding_info_groups_inner.go index 9a2fea3..47af651 100644 --- a/model_create_group_binding_info_groups_inner.go +++ b/model_create_group_binding_info_groups_inner.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -24,6 +23,7 @@ var _ MappedNullable = &CreateGroupBindingInfoGroupsInner{} type CreateGroupBindingInfoGroupsInner struct { // The ID of the group. GroupId string `json:"group_id"` + AdditionalProperties map[string]interface{} } type _CreateGroupBindingInfoGroupsInner CreateGroupBindingInfoGroupsInner @@ -81,6 +81,11 @@ func (o CreateGroupBindingInfoGroupsInner) MarshalJSON() ([]byte, error) { func (o CreateGroupBindingInfoGroupsInner) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["group_id"] = o.GroupId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -108,9 +113,7 @@ func (o *CreateGroupBindingInfoGroupsInner) UnmarshalJSON(data []byte) (err erro varCreateGroupBindingInfoGroupsInner := _CreateGroupBindingInfoGroupsInner{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varCreateGroupBindingInfoGroupsInner) + err = json.Unmarshal(data, &varCreateGroupBindingInfoGroupsInner) if err != nil { return err @@ -118,6 +121,13 @@ func (o *CreateGroupBindingInfoGroupsInner) UnmarshalJSON(data []byte) (err erro *o = CreateGroupBindingInfoGroupsInner(varCreateGroupBindingInfoGroupsInner) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "group_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_create_group_info.go b/model_create_group_info.go index fd25757..8090e74 100644 --- a/model_create_group_info.go +++ b/model_create_group_info.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -39,6 +38,7 @@ type CreateGroupInfo struct { // Custom request notification sent upon request approval. CustomRequestNotification *string `json:"custom_request_notification,omitempty"` RiskSensitivityOverride *RiskSensitivityEnum `json:"risk_sensitivity_override,omitempty"` + AdditionalProperties map[string]interface{} } type _CreateGroupInfo CreateGroupInfo @@ -364,6 +364,11 @@ func (o CreateGroupInfo) ToMap() (map[string]interface{}, error) { if !IsNil(o.RiskSensitivityOverride) { toSerialize["risk_sensitivity_override"] = o.RiskSensitivityOverride } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -393,9 +398,7 @@ func (o *CreateGroupInfo) UnmarshalJSON(data []byte) (err error) { varCreateGroupInfo := _CreateGroupInfo{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varCreateGroupInfo) + err = json.Unmarshal(data, &varCreateGroupInfo) if err != nil { return err @@ -403,6 +406,21 @@ func (o *CreateGroupInfo) UnmarshalJSON(data []byte) (err error) { *o = CreateGroupInfo(varCreateGroupInfo) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "group_type") + delete(additionalProperties, "app_id") + delete(additionalProperties, "remote_info") + delete(additionalProperties, "remote_group_id") + delete(additionalProperties, "metadata") + delete(additionalProperties, "custom_request_notification") + delete(additionalProperties, "risk_sensitivity_override") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_create_idp_group_mapping_request.go b/model_create_idp_group_mapping_request.go index ae501d5..42281e8 100644 --- a/model_create_idp_group_mapping_request.go +++ b/model_create_idp_group_mapping_request.go @@ -24,8 +24,11 @@ type CreateIdpGroupMappingRequest struct { Alias *string `json:"alias,omitempty"` // Whether this mapping should be hidden from end users. - **New mappings**: If not provided, defaults to `false` - **Existing mappings**: If not provided, existing value is preserved (no change) - **Explicit values**: If provided, value is updated to the specified boolean HiddenFromEndUser *bool `json:"hidden_from_end_user,omitempty"` + AdditionalProperties map[string]interface{} } +type _CreateIdpGroupMappingRequest CreateIdpGroupMappingRequest + // NewCreateIdpGroupMappingRequest instantiates a new CreateIdpGroupMappingRequest 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 @@ -123,9 +126,36 @@ func (o CreateIdpGroupMappingRequest) ToMap() (map[string]interface{}, error) { if !IsNil(o.HiddenFromEndUser) { toSerialize["hidden_from_end_user"] = o.HiddenFromEndUser } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *CreateIdpGroupMappingRequest) UnmarshalJSON(data []byte) (err error) { + varCreateIdpGroupMappingRequest := _CreateIdpGroupMappingRequest{} + + err = json.Unmarshal(data, &varCreateIdpGroupMappingRequest) + + if err != nil { + return err + } + + *o = CreateIdpGroupMappingRequest(varCreateIdpGroupMappingRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "alias") + delete(additionalProperties, "hidden_from_end_user") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableCreateIdpGroupMappingRequest struct { value *CreateIdpGroupMappingRequest isSet bool diff --git a/model_create_message_channel_info.go b/model_create_message_channel_info.go index 349e9e9..f23fa54 100644 --- a/model_create_message_channel_info.go +++ b/model_create_message_channel_info.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -25,6 +24,7 @@ type CreateMessageChannelInfo struct { ThirdPartyProvider MessageChannelProviderEnum `json:"third_party_provider"` // The remote ID of the message channel RemoteId string `json:"remote_id"` + AdditionalProperties map[string]interface{} } type _CreateMessageChannelInfo CreateMessageChannelInfo @@ -108,6 +108,11 @@ func (o CreateMessageChannelInfo) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["third_party_provider"] = o.ThirdPartyProvider toSerialize["remote_id"] = o.RemoteId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -136,9 +141,7 @@ func (o *CreateMessageChannelInfo) UnmarshalJSON(data []byte) (err error) { varCreateMessageChannelInfo := _CreateMessageChannelInfo{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varCreateMessageChannelInfo) + err = json.Unmarshal(data, &varCreateMessageChannelInfo) if err != nil { return err @@ -146,6 +149,14 @@ func (o *CreateMessageChannelInfo) UnmarshalJSON(data []byte) (err error) { *o = CreateMessageChannelInfo(varCreateMessageChannelInfo) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "third_party_provider") + delete(additionalProperties, "remote_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_create_on_call_schedule_info.go b/model_create_on_call_schedule_info.go index fac7117..2810063 100644 --- a/model_create_on_call_schedule_info.go +++ b/model_create_on_call_schedule_info.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -25,6 +24,7 @@ type CreateOnCallScheduleInfo struct { ThirdPartyProvider OnCallScheduleProviderEnum `json:"third_party_provider"` // The remote ID of the on call schedule RemoteId string `json:"remote_id"` + AdditionalProperties map[string]interface{} } type _CreateOnCallScheduleInfo CreateOnCallScheduleInfo @@ -108,6 +108,11 @@ func (o CreateOnCallScheduleInfo) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["third_party_provider"] = o.ThirdPartyProvider toSerialize["remote_id"] = o.RemoteId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -136,9 +141,7 @@ func (o *CreateOnCallScheduleInfo) UnmarshalJSON(data []byte) (err error) { varCreateOnCallScheduleInfo := _CreateOnCallScheduleInfo{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varCreateOnCallScheduleInfo) + err = json.Unmarshal(data, &varCreateOnCallScheduleInfo) if err != nil { return err @@ -146,6 +149,14 @@ func (o *CreateOnCallScheduleInfo) UnmarshalJSON(data []byte) (err error) { *o = CreateOnCallScheduleInfo(varCreateOnCallScheduleInfo) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "third_party_provider") + delete(additionalProperties, "remote_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_create_owner_info.go b/model_create_owner_info.go index 35d762f..f4be297 100644 --- a/model_create_owner_info.go +++ b/model_create_owner_info.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -34,6 +33,7 @@ type CreateOwnerInfo struct { ReviewerMessageChannelId *string `json:"reviewer_message_channel_id,omitempty"` // Sync this owner's user list with a source group. SourceGroupId *string `json:"source_group_id,omitempty"` + AdditionalProperties map[string]interface{} } type _CreateOwnerInfo CreateOwnerInfo @@ -257,6 +257,11 @@ func (o CreateOwnerInfo) ToMap() (map[string]interface{}, error) { if !IsNil(o.SourceGroupId) { toSerialize["source_group_id"] = o.SourceGroupId } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -285,9 +290,7 @@ func (o *CreateOwnerInfo) UnmarshalJSON(data []byte) (err error) { varCreateOwnerInfo := _CreateOwnerInfo{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varCreateOwnerInfo) + err = json.Unmarshal(data, &varCreateOwnerInfo) if err != nil { return err @@ -295,6 +298,18 @@ func (o *CreateOwnerInfo) UnmarshalJSON(data []byte) (err error) { *o = CreateOwnerInfo(varCreateOwnerInfo) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "access_request_escalation_period") + delete(additionalProperties, "user_ids") + delete(additionalProperties, "reviewer_message_channel_id") + delete(additionalProperties, "source_group_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_create_request_200_response.go b/model_create_request_200_response.go index 8d74b67..5058df4 100644 --- a/model_create_request_200_response.go +++ b/model_create_request_200_response.go @@ -21,8 +21,11 @@ var _ MappedNullable = &CreateRequest200Response{} // CreateRequest200Response struct for CreateRequest200Response type CreateRequest200Response struct { Id *string `json:"id,omitempty"` + AdditionalProperties map[string]interface{} } +type _CreateRequest200Response CreateRequest200Response + // NewCreateRequest200Response instantiates a new CreateRequest200Response 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 @@ -85,9 +88,35 @@ func (o CreateRequest200Response) ToMap() (map[string]interface{}, error) { if !IsNil(o.Id) { toSerialize["id"] = o.Id } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *CreateRequest200Response) UnmarshalJSON(data []byte) (err error) { + varCreateRequest200Response := _CreateRequest200Response{} + + err = json.Unmarshal(data, &varCreateRequest200Response) + + if err != nil { + return err + } + + *o = CreateRequest200Response(varCreateRequest200Response) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "id") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableCreateRequest200Response struct { value *CreateRequest200Response isSet bool diff --git a/model_create_request_comment_request.go b/model_create_request_comment_request.go index 645bd92..6447ffc 100644 --- a/model_create_request_comment_request.go +++ b/model_create_request_comment_request.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -24,6 +23,7 @@ var _ MappedNullable = &CreateRequestCommentRequest{} type CreateRequestCommentRequest struct { // comment Comment string `json:"comment"` + AdditionalProperties map[string]interface{} } type _CreateRequestCommentRequest CreateRequestCommentRequest @@ -81,6 +81,11 @@ func (o CreateRequestCommentRequest) MarshalJSON() ([]byte, error) { func (o CreateRequestCommentRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["comment"] = o.Comment + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -108,9 +113,7 @@ func (o *CreateRequestCommentRequest) UnmarshalJSON(data []byte) (err error) { varCreateRequestCommentRequest := _CreateRequestCommentRequest{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varCreateRequestCommentRequest) + err = json.Unmarshal(data, &varCreateRequestCommentRequest) if err != nil { return err @@ -118,6 +121,13 @@ func (o *CreateRequestCommentRequest) UnmarshalJSON(data []byte) (err error) { *o = CreateRequestCommentRequest(varCreateRequestCommentRequest) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "comment") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_create_request_configuration_info_list.go b/model_create_request_configuration_info_list.go index 6d8a664..d72f706 100644 --- a/model_create_request_configuration_info_list.go +++ b/model_create_request_configuration_info_list.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -24,6 +23,7 @@ var _ MappedNullable = &CreateRequestConfigurationInfoList{} type CreateRequestConfigurationInfoList struct { // A list of request configurations to create. RequestConfigurations []RequestConfiguration `json:"request_configurations"` + AdditionalProperties map[string]interface{} } type _CreateRequestConfigurationInfoList CreateRequestConfigurationInfoList @@ -81,6 +81,11 @@ func (o CreateRequestConfigurationInfoList) MarshalJSON() ([]byte, error) { func (o CreateRequestConfigurationInfoList) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["request_configurations"] = o.RequestConfigurations + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -108,9 +113,7 @@ func (o *CreateRequestConfigurationInfoList) UnmarshalJSON(data []byte) (err err varCreateRequestConfigurationInfoList := _CreateRequestConfigurationInfoList{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varCreateRequestConfigurationInfoList) + err = json.Unmarshal(data, &varCreateRequestConfigurationInfoList) if err != nil { return err @@ -118,6 +121,13 @@ func (o *CreateRequestConfigurationInfoList) UnmarshalJSON(data []byte) (err err *o = CreateRequestConfigurationInfoList(varCreateRequestConfigurationInfoList) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "request_configurations") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_create_request_info.go b/model_create_request_info.go index b431298..9ecc170 100644 --- a/model_create_request_info.go +++ b/model_create_request_info.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -33,6 +32,7 @@ type CreateRequestInfo struct { // The duration of the request in minutes. -1 represents an indefinite duration DurationMinutes int32 `json:"duration_minutes"` CustomMetadata []CreateRequestInfoCustomMetadataInner `json:"custom_metadata,omitempty"` + AdditionalProperties map[string]interface{} } type _CreateRequestInfo CreateRequestInfo @@ -308,6 +308,11 @@ func (o CreateRequestInfo) ToMap() (map[string]interface{}, error) { if !IsNil(o.CustomMetadata) { toSerialize["custom_metadata"] = o.CustomMetadata } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -338,9 +343,7 @@ func (o *CreateRequestInfo) UnmarshalJSON(data []byte) (err error) { varCreateRequestInfo := _CreateRequestInfo{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varCreateRequestInfo) + err = json.Unmarshal(data, &varCreateRequestInfo) if err != nil { return err @@ -348,6 +351,20 @@ func (o *CreateRequestInfo) UnmarshalJSON(data []byte) (err error) { *o = CreateRequestInfo(varCreateRequestInfo) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "resources") + delete(additionalProperties, "groups") + delete(additionalProperties, "target_user_id") + delete(additionalProperties, "target_group_id") + delete(additionalProperties, "reason") + delete(additionalProperties, "support_ticket") + delete(additionalProperties, "duration_minutes") + delete(additionalProperties, "custom_metadata") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_create_request_info_custom_metadata_inner.go b/model_create_request_info_custom_metadata_inner.go index 0d14426..0beb290 100644 --- a/model_create_request_info_custom_metadata_inner.go +++ b/model_create_request_info_custom_metadata_inner.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -25,6 +24,7 @@ type CreateRequestInfoCustomMetadataInner struct { Name string `json:"name"` Type RequestTemplateCustomFieldTypeEnum `json:"type"` Value string `json:"value"` + AdditionalProperties map[string]interface{} } type _CreateRequestInfoCustomMetadataInner CreateRequestInfoCustomMetadataInner @@ -134,6 +134,11 @@ func (o CreateRequestInfoCustomMetadataInner) ToMap() (map[string]interface{}, e toSerialize["name"] = o.Name toSerialize["type"] = o.Type toSerialize["value"] = o.Value + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -163,9 +168,7 @@ func (o *CreateRequestInfoCustomMetadataInner) UnmarshalJSON(data []byte) (err e varCreateRequestInfoCustomMetadataInner := _CreateRequestInfoCustomMetadataInner{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varCreateRequestInfoCustomMetadataInner) + err = json.Unmarshal(data, &varCreateRequestInfoCustomMetadataInner) if err != nil { return err @@ -173,6 +176,15 @@ func (o *CreateRequestInfoCustomMetadataInner) UnmarshalJSON(data []byte) (err e *o = CreateRequestInfoCustomMetadataInner(varCreateRequestInfoCustomMetadataInner) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "type") + delete(additionalProperties, "value") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_create_request_info_groups_inner.go b/model_create_request_info_groups_inner.go index 6354435..079dca6 100644 --- a/model_create_request_info_groups_inner.go +++ b/model_create_request_info_groups_inner.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -28,6 +27,7 @@ type CreateRequestInfoGroupsInner struct { AccessLevelRemoteId *string `json:"access_level_remote_id,omitempty"` // The ID of the access level requested on the remote system. AccessLevelName *string `json:"access_level_name,omitempty"` + AdditionalProperties map[string]interface{} } type _CreateRequestInfoGroupsInner CreateRequestInfoGroupsInner @@ -155,6 +155,11 @@ func (o CreateRequestInfoGroupsInner) ToMap() (map[string]interface{}, error) { if !IsNil(o.AccessLevelName) { toSerialize["access_level_name"] = o.AccessLevelName } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -182,9 +187,7 @@ func (o *CreateRequestInfoGroupsInner) UnmarshalJSON(data []byte) (err error) { varCreateRequestInfoGroupsInner := _CreateRequestInfoGroupsInner{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varCreateRequestInfoGroupsInner) + err = json.Unmarshal(data, &varCreateRequestInfoGroupsInner) if err != nil { return err @@ -192,6 +195,15 @@ func (o *CreateRequestInfoGroupsInner) UnmarshalJSON(data []byte) (err error) { *o = CreateRequestInfoGroupsInner(varCreateRequestInfoGroupsInner) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "id") + delete(additionalProperties, "access_level_remote_id") + delete(additionalProperties, "access_level_name") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_create_request_info_resources_inner.go b/model_create_request_info_resources_inner.go index fb39dac..d49fb75 100644 --- a/model_create_request_info_resources_inner.go +++ b/model_create_request_info_resources_inner.go @@ -26,8 +26,11 @@ type CreateRequestInfoResourcesInner struct { AccessLevelRemoteId *string `json:"access_level_remote_id,omitempty"` // The ID of the access level requested on the remote system. AccessLevelName *string `json:"access_level_name,omitempty"` + AdditionalProperties map[string]interface{} } +type _CreateRequestInfoResourcesInner CreateRequestInfoResourcesInner + // NewCreateRequestInfoResourcesInner instantiates a new CreateRequestInfoResourcesInner 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 @@ -160,9 +163,37 @@ func (o CreateRequestInfoResourcesInner) ToMap() (map[string]interface{}, error) if !IsNil(o.AccessLevelName) { toSerialize["access_level_name"] = o.AccessLevelName } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *CreateRequestInfoResourcesInner) UnmarshalJSON(data []byte) (err error) { + varCreateRequestInfoResourcesInner := _CreateRequestInfoResourcesInner{} + + err = json.Unmarshal(data, &varCreateRequestInfoResourcesInner) + + if err != nil { + return err + } + + *o = CreateRequestInfoResourcesInner(varCreateRequestInfoResourcesInner) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "id") + delete(additionalProperties, "access_level_remote_id") + delete(additionalProperties, "access_level_name") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableCreateRequestInfoResourcesInner struct { value *CreateRequestInfoResourcesInner isSet bool diff --git a/model_create_request_info_support_ticket.go b/model_create_request_info_support_ticket.go index 1851026..3bd0f55 100644 --- a/model_create_request_info_support_ticket.go +++ b/model_create_request_info_support_ticket.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -26,6 +25,7 @@ type CreateRequestInfoSupportTicket struct { RemoteId string `json:"remote_id"` Identifier string `json:"identifier"` Url string `json:"url"` + AdditionalProperties map[string]interface{} } type _CreateRequestInfoSupportTicket CreateRequestInfoSupportTicket @@ -161,6 +161,11 @@ func (o CreateRequestInfoSupportTicket) ToMap() (map[string]interface{}, error) toSerialize["remote_id"] = o.RemoteId toSerialize["identifier"] = o.Identifier toSerialize["url"] = o.Url + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -191,9 +196,7 @@ func (o *CreateRequestInfoSupportTicket) UnmarshalJSON(data []byte) (err error) varCreateRequestInfoSupportTicket := _CreateRequestInfoSupportTicket{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varCreateRequestInfoSupportTicket) + err = json.Unmarshal(data, &varCreateRequestInfoSupportTicket) if err != nil { return err @@ -201,6 +204,16 @@ func (o *CreateRequestInfoSupportTicket) UnmarshalJSON(data []byte) (err error) *o = CreateRequestInfoSupportTicket(varCreateRequestInfoSupportTicket) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "ticketing_provider") + delete(additionalProperties, "remote_id") + delete(additionalProperties, "identifier") + delete(additionalProperties, "url") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_create_resource_info.go b/model_create_resource_info.go index 66170e1..e5cb582 100644 --- a/model_create_resource_info.go +++ b/model_create_resource_info.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -39,6 +38,7 @@ type CreateResourceInfo struct { // Custom request notification sent upon request approval. CustomRequestNotification *string `json:"custom_request_notification,omitempty"` RiskSensitivityOverride *RiskSensitivityEnum `json:"risk_sensitivity_override,omitempty"` + AdditionalProperties map[string]interface{} } type _CreateResourceInfo CreateResourceInfo @@ -364,6 +364,11 @@ func (o CreateResourceInfo) ToMap() (map[string]interface{}, error) { if !IsNil(o.RiskSensitivityOverride) { toSerialize["risk_sensitivity_override"] = o.RiskSensitivityOverride } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -393,9 +398,7 @@ func (o *CreateResourceInfo) UnmarshalJSON(data []byte) (err error) { varCreateResourceInfo := _CreateResourceInfo{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varCreateResourceInfo) + err = json.Unmarshal(data, &varCreateResourceInfo) if err != nil { return err @@ -403,6 +406,21 @@ func (o *CreateResourceInfo) UnmarshalJSON(data []byte) (err error) { *o = CreateResourceInfo(varCreateResourceInfo) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "resource_type") + delete(additionalProperties, "app_id") + delete(additionalProperties, "remote_info") + delete(additionalProperties, "remote_resource_id") + delete(additionalProperties, "metadata") + delete(additionalProperties, "custom_request_notification") + delete(additionalProperties, "risk_sensitivity_override") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_create_tag_info.go b/model_create_tag_info.go index 3655d32..2521cc0 100644 --- a/model_create_tag_info.go +++ b/model_create_tag_info.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -26,6 +25,7 @@ type CreateTagInfo struct { TagKey string `json:"tag_key"` // The value of the tag to create. TagValue *string `json:"tag_value,omitempty"` + AdditionalProperties map[string]interface{} } type _CreateTagInfo CreateTagInfo @@ -118,6 +118,11 @@ func (o CreateTagInfo) ToMap() (map[string]interface{}, error) { if !IsNil(o.TagValue) { toSerialize["tag_value"] = o.TagValue } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -145,9 +150,7 @@ func (o *CreateTagInfo) UnmarshalJSON(data []byte) (err error) { varCreateTagInfo := _CreateTagInfo{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varCreateTagInfo) + err = json.Unmarshal(data, &varCreateTagInfo) if err != nil { return err @@ -155,6 +158,14 @@ func (o *CreateTagInfo) UnmarshalJSON(data []byte) (err error) { *o = CreateTagInfo(varCreateTagInfo) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "tag_key") + delete(additionalProperties, "tag_value") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_create_uar_info.go b/model_create_uar_info.go index 409afab..c07006a 100644 --- a/model_create_uar_info.go +++ b/model_create_uar_info.go @@ -14,7 +14,6 @@ package opal import ( "encoding/json" "time" - "bytes" "fmt" ) @@ -37,6 +36,7 @@ type CreateUARInfo struct { ReminderSchedule []int32 `json:"reminder_schedule,omitempty"` ReminderIncludeManager *bool `json:"reminder_include_manager,omitempty"` UarScope *UARScope `json:"uar_scope,omitempty"` + AdditionalProperties map[string]interface{} } type _CreateUARInfo CreateUARInfo @@ -329,6 +329,11 @@ func (o CreateUARInfo) ToMap() (map[string]interface{}, error) { if !IsNil(o.UarScope) { toSerialize["uar_scope"] = o.UarScope } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -361,9 +366,7 @@ func (o *CreateUARInfo) UnmarshalJSON(data []byte) (err error) { varCreateUARInfo := _CreateUARInfo{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varCreateUARInfo) + err = json.Unmarshal(data, &varCreateUARInfo) if err != nil { return err @@ -371,6 +374,21 @@ func (o *CreateUARInfo) UnmarshalJSON(data []byte) (err error) { *o = CreateUARInfo(varCreateUARInfo) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "reviewer_assignment_policy") + delete(additionalProperties, "send_reviewer_assignment_notification") + delete(additionalProperties, "deadline") + delete(additionalProperties, "time_zone") + delete(additionalProperties, "self_review_allowed") + delete(additionalProperties, "reminder_schedule") + delete(additionalProperties, "reminder_include_manager") + delete(additionalProperties, "uar_scope") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_delegation.go b/model_delegation.go index b9ef063..5804b2d 100644 --- a/model_delegation.go +++ b/model_delegation.go @@ -14,7 +14,6 @@ package opal import ( "encoding/json" "time" - "bytes" "fmt" ) @@ -39,6 +38,7 @@ type Delegation struct { CreatedAt time.Time `json:"created_at"` // The last updated time of the delegation. UpdatedAt time.Time `json:"updated_at"` + AdditionalProperties map[string]interface{} } type _Delegation Delegation @@ -278,6 +278,11 @@ func (o Delegation) ToMap() (map[string]interface{}, error) { toSerialize["reason"] = o.Reason toSerialize["created_at"] = o.CreatedAt toSerialize["updated_at"] = o.UpdatedAt + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -312,9 +317,7 @@ func (o *Delegation) UnmarshalJSON(data []byte) (err error) { varDelegation := _Delegation{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varDelegation) + err = json.Unmarshal(data, &varDelegation) if err != nil { return err @@ -322,6 +325,20 @@ func (o *Delegation) UnmarshalJSON(data []byte) (err error) { *o = Delegation(varDelegation) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "id") + delete(additionalProperties, "delegator_user_id") + delete(additionalProperties, "delegate_user_id") + delete(additionalProperties, "start_time") + delete(additionalProperties, "end_time") + delete(additionalProperties, "reason") + delete(additionalProperties, "created_at") + delete(additionalProperties, "updated_at") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_deny_request_request.go b/model_deny_request_request.go index 16d2e04..7406bbb 100644 --- a/model_deny_request_request.go +++ b/model_deny_request_request.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -24,6 +23,7 @@ var _ MappedNullable = &DenyRequestRequest{} type DenyRequestRequest struct { // Comment for the denial Comment string `json:"comment"` + AdditionalProperties map[string]interface{} } type _DenyRequestRequest DenyRequestRequest @@ -81,6 +81,11 @@ func (o DenyRequestRequest) MarshalJSON() ([]byte, error) { func (o DenyRequestRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["comment"] = o.Comment + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -108,9 +113,7 @@ func (o *DenyRequestRequest) UnmarshalJSON(data []byte) (err error) { varDenyRequestRequest := _DenyRequestRequest{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varDenyRequestRequest) + err = json.Unmarshal(data, &varDenyRequestRequest) if err != nil { return err @@ -118,6 +121,13 @@ func (o *DenyRequestRequest) UnmarshalJSON(data []byte) (err error) { *o = DenyRequestRequest(varDenyRequestRequest) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "comment") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_event.go b/model_event.go index 75b2f45..5a6af5d 100644 --- a/model_event.go +++ b/model_event.go @@ -14,7 +14,6 @@ package opal import ( "encoding/json" "time" - "bytes" "fmt" ) @@ -41,6 +40,7 @@ type Event struct { // The preview of the API token used to create the event. ApiTokenPreview *string `json:"api_token_preview,omitempty"` SubEvents []SubEvent `json:"sub_events,omitempty"` + AdditionalProperties map[string]interface{} } type _Event Event @@ -381,6 +381,11 @@ func (o Event) ToMap() (map[string]interface{}, error) { if !IsNil(o.SubEvents) { toSerialize["sub_events"] = o.SubEvents } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -412,9 +417,7 @@ func (o *Event) UnmarshalJSON(data []byte) (err error) { varEvent := _Event{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varEvent) + err = json.Unmarshal(data, &varEvent) if err != nil { return err @@ -422,6 +425,22 @@ func (o *Event) UnmarshalJSON(data []byte) (err error) { *o = Event(varEvent) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "event_id") + delete(additionalProperties, "actor_user_id") + delete(additionalProperties, "actor_name") + delete(additionalProperties, "actor_email") + delete(additionalProperties, "event_type") + delete(additionalProperties, "created_at") + delete(additionalProperties, "actor_ip_address") + delete(additionalProperties, "api_token_name") + delete(additionalProperties, "api_token_preview") + delete(additionalProperties, "sub_events") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_get_resource_user_200_response.go b/model_get_resource_user_200_response.go index 29ea69c..b8a8ba0 100644 --- a/model_get_resource_user_200_response.go +++ b/model_get_resource_user_200_response.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -27,6 +26,7 @@ type GetResourceUser200Response struct { Cursor *string `json:"cursor,omitempty"` // Total number of results TotalCount *int32 `json:"total_count,omitempty"` + AdditionalProperties map[string]interface{} } type _GetResourceUser200Response GetResourceUser200Response @@ -154,6 +154,11 @@ func (o GetResourceUser200Response) ToMap() (map[string]interface{}, error) { if !IsNil(o.TotalCount) { toSerialize["total_count"] = o.TotalCount } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -181,9 +186,7 @@ func (o *GetResourceUser200Response) UnmarshalJSON(data []byte) (err error) { varGetResourceUser200Response := _GetResourceUser200Response{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGetResourceUser200Response) + err = json.Unmarshal(data, &varGetResourceUser200Response) if err != nil { return err @@ -191,6 +194,15 @@ func (o *GetResourceUser200Response) UnmarshalJSON(data []byte) (err error) { *o = GetResourceUser200Response(varGetResourceUser200Response) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "data") + delete(additionalProperties, "cursor") + delete(additionalProperties, "total_count") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_group.go b/model_group.go index 85d532b..6f13833 100644 --- a/model_group.go +++ b/model_group.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -77,8 +76,8 @@ type Group struct { // The risk sensitivity level for the group. When an override is set, this field will match that. RiskSensitivity *RiskSensitivityEnum `json:"risk_sensitivity,omitempty"` RiskSensitivityOverride *RiskSensitivityEnum `json:"risk_sensitivity_override,omitempty"` - // Information about the last successful sync of this group. LastSuccessfulSync *SyncTask `json:"last_successful_sync,omitempty"` + AdditionalProperties map[string]interface{} } type _Group Group @@ -1122,6 +1121,11 @@ func (o Group) ToMap() (map[string]interface{}, error) { if !IsNil(o.LastSuccessfulSync) { toSerialize["last_successful_sync"] = o.LastSuccessfulSync } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -1149,9 +1153,7 @@ func (o *Group) UnmarshalJSON(data []byte) (err error) { varGroup := _Group{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGroup) + err = json.Unmarshal(data, &varGroup) if err != nil { return err @@ -1159,6 +1161,41 @@ func (o *Group) UnmarshalJSON(data []byte) (err error) { *o = Group(varGroup) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "group_id") + delete(additionalProperties, "app_id") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "admin_owner_id") + delete(additionalProperties, "group_leader_user_ids") + delete(additionalProperties, "remote_id") + delete(additionalProperties, "remote_name") + delete(additionalProperties, "group_type") + delete(additionalProperties, "max_duration") + delete(additionalProperties, "recommended_duration") + delete(additionalProperties, "extensions_duration_in_minutes") + delete(additionalProperties, "require_manager_approval") + delete(additionalProperties, "require_support_ticket") + delete(additionalProperties, "require_mfa_to_approve") + delete(additionalProperties, "require_mfa_to_request") + delete(additionalProperties, "auto_approval") + delete(additionalProperties, "request_template_id") + delete(additionalProperties, "configuration_template_id") + delete(additionalProperties, "group_binding_id") + delete(additionalProperties, "is_requestable") + delete(additionalProperties, "request_configurations") + delete(additionalProperties, "request_configuration_list") + delete(additionalProperties, "metadata") + delete(additionalProperties, "remote_info") + delete(additionalProperties, "custom_request_notification") + delete(additionalProperties, "risk_sensitivity") + delete(additionalProperties, "risk_sensitivity_override") + delete(additionalProperties, "last_successful_sync") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_group_access_level.go b/model_group_access_level.go index 431067d..79f5e7f 100644 --- a/model_group_access_level.go +++ b/model_group_access_level.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -26,6 +25,7 @@ type GroupAccessLevel struct { AccessLevelName string `json:"access_level_name"` // The machine-readable identifier of the access level. AccessLevelRemoteId string `json:"access_level_remote_id"` + AdditionalProperties map[string]interface{} } type _GroupAccessLevel GroupAccessLevel @@ -109,6 +109,11 @@ func (o GroupAccessLevel) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["access_level_name"] = o.AccessLevelName toSerialize["access_level_remote_id"] = o.AccessLevelRemoteId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -137,9 +142,7 @@ func (o *GroupAccessLevel) UnmarshalJSON(data []byte) (err error) { varGroupAccessLevel := _GroupAccessLevel{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGroupAccessLevel) + err = json.Unmarshal(data, &varGroupAccessLevel) if err != nil { return err @@ -147,6 +150,14 @@ func (o *GroupAccessLevel) UnmarshalJSON(data []byte) (err error) { *o = GroupAccessLevel(varGroupAccessLevel) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "access_level_name") + delete(additionalProperties, "access_level_remote_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_group_binding.go b/model_group_binding.go index e760a58..076d1e5 100644 --- a/model_group_binding.go +++ b/model_group_binding.go @@ -14,7 +14,6 @@ package opal import ( "encoding/json" "time" - "bytes" "fmt" ) @@ -33,6 +32,7 @@ type GroupBinding struct { SourceGroupId string `json:"source_group_id"` // The list of groups. Groups []GroupBindingGroup `json:"groups"` + AdditionalProperties map[string]interface{} } type _GroupBinding GroupBinding @@ -194,6 +194,11 @@ func (o GroupBinding) ToMap() (map[string]interface{}, error) { toSerialize["created_at"] = o.CreatedAt toSerialize["source_group_id"] = o.SourceGroupId toSerialize["groups"] = o.Groups + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -225,9 +230,7 @@ func (o *GroupBinding) UnmarshalJSON(data []byte) (err error) { varGroupBinding := _GroupBinding{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGroupBinding) + err = json.Unmarshal(data, &varGroupBinding) if err != nil { return err @@ -235,6 +238,17 @@ func (o *GroupBinding) UnmarshalJSON(data []byte) (err error) { *o = GroupBinding(varGroupBinding) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "group_binding_id") + delete(additionalProperties, "created_by_id") + delete(additionalProperties, "created_at") + delete(additionalProperties, "source_group_id") + delete(additionalProperties, "groups") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_group_binding_group.go b/model_group_binding_group.go index 6207e64..3e77f2e 100644 --- a/model_group_binding_group.go +++ b/model_group_binding_group.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -25,6 +24,7 @@ type GroupBindingGroup struct { // The ID of the group. GroupId string `json:"group_id"` GroupType GroupTypeEnum `json:"group_type"` + AdditionalProperties map[string]interface{} } type _GroupBindingGroup GroupBindingGroup @@ -108,6 +108,11 @@ func (o GroupBindingGroup) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["group_id"] = o.GroupId toSerialize["group_type"] = o.GroupType + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -136,9 +141,7 @@ func (o *GroupBindingGroup) UnmarshalJSON(data []byte) (err error) { varGroupBindingGroup := _GroupBindingGroup{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGroupBindingGroup) + err = json.Unmarshal(data, &varGroupBindingGroup) if err != nil { return err @@ -146,6 +149,14 @@ func (o *GroupBindingGroup) UnmarshalJSON(data []byte) (err error) { *o = GroupBindingGroup(varGroupBindingGroup) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "group_id") + delete(additionalProperties, "group_type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_group_containing_group.go b/model_group_containing_group.go index 0cd9b3e..6df2bf6 100644 --- a/model_group_containing_group.go +++ b/model_group_containing_group.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -24,6 +23,7 @@ var _ MappedNullable = &GroupContainingGroup{} type GroupContainingGroup struct { // The groupID of the containing group. ContainingGroupId string `json:"containing_group_id"` + AdditionalProperties map[string]interface{} } type _GroupContainingGroup GroupContainingGroup @@ -81,6 +81,11 @@ func (o GroupContainingGroup) MarshalJSON() ([]byte, error) { func (o GroupContainingGroup) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["containing_group_id"] = o.ContainingGroupId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -108,9 +113,7 @@ func (o *GroupContainingGroup) UnmarshalJSON(data []byte) (err error) { varGroupContainingGroup := _GroupContainingGroup{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGroupContainingGroup) + err = json.Unmarshal(data, &varGroupContainingGroup) if err != nil { return err @@ -118,6 +121,13 @@ func (o *GroupContainingGroup) UnmarshalJSON(data []byte) (err error) { *o = GroupContainingGroup(varGroupContainingGroup) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "containing_group_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_group_containing_group_list.go b/model_group_containing_group_list.go index 3555068..fc71997 100644 --- a/model_group_containing_group_list.go +++ b/model_group_containing_group_list.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -23,6 +22,7 @@ var _ MappedNullable = &GroupContainingGroupList{} // GroupContainingGroupList struct for GroupContainingGroupList type GroupContainingGroupList struct { ContainingGroups []GroupContainingGroup `json:"containing_groups"` + AdditionalProperties map[string]interface{} } type _GroupContainingGroupList GroupContainingGroupList @@ -80,6 +80,11 @@ func (o GroupContainingGroupList) MarshalJSON() ([]byte, error) { func (o GroupContainingGroupList) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["containing_groups"] = o.ContainingGroups + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -107,9 +112,7 @@ func (o *GroupContainingGroupList) UnmarshalJSON(data []byte) (err error) { varGroupContainingGroupList := _GroupContainingGroupList{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGroupContainingGroupList) + err = json.Unmarshal(data, &varGroupContainingGroupList) if err != nil { return err @@ -117,6 +120,13 @@ func (o *GroupContainingGroupList) UnmarshalJSON(data []byte) (err error) { *o = GroupContainingGroupList(varGroupContainingGroupList) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "containing_groups") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_group_remote_info.go b/model_group_remote_info.go index cf73cb5..577b832 100644 --- a/model_group_remote_info.go +++ b/model_group_remote_info.go @@ -32,8 +32,11 @@ type GroupRemoteInfo struct { SnowflakeRole *GroupRemoteInfoSnowflakeRole `json:"snowflake_role,omitempty"` OktaGroupRule *GroupRemoteInfoOktaGroupRule `json:"okta_group_rule,omitempty"` WorkdayUserSecurityGroup *GroupRemoteInfoWorkdayUserSecurityGroup `json:"workday_user_security_group,omitempty"` + AdditionalProperties map[string]interface{} } +type _GroupRemoteInfo GroupRemoteInfo + // NewGroupRemoteInfo instantiates a new GroupRemoteInfo 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 @@ -481,9 +484,46 @@ func (o GroupRemoteInfo) ToMap() (map[string]interface{}, error) { if !IsNil(o.WorkdayUserSecurityGroup) { toSerialize["workday_user_security_group"] = o.WorkdayUserSecurityGroup } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *GroupRemoteInfo) UnmarshalJSON(data []byte) (err error) { + varGroupRemoteInfo := _GroupRemoteInfo{} + + err = json.Unmarshal(data, &varGroupRemoteInfo) + + if err != nil { + return err + } + + *o = GroupRemoteInfo(varGroupRemoteInfo) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "active_directory_group") + delete(additionalProperties, "github_team") + delete(additionalProperties, "gitlab_group") + delete(additionalProperties, "google_group") + delete(additionalProperties, "ldap_group") + delete(additionalProperties, "okta_group") + delete(additionalProperties, "duo_group") + delete(additionalProperties, "azure_ad_security_group") + delete(additionalProperties, "azure_ad_microsoft_365_group") + delete(additionalProperties, "snowflake_role") + delete(additionalProperties, "okta_group_rule") + delete(additionalProperties, "workday_user_security_group") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableGroupRemoteInfo struct { value *GroupRemoteInfo isSet bool diff --git a/model_group_remote_info_active_directory_group.go b/model_group_remote_info_active_directory_group.go index ab5059d..15ab64a 100644 --- a/model_group_remote_info_active_directory_group.go +++ b/model_group_remote_info_active_directory_group.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -24,6 +23,7 @@ var _ MappedNullable = &GroupRemoteInfoActiveDirectoryGroup{} type GroupRemoteInfoActiveDirectoryGroup struct { // The id of the Google group. GroupId string `json:"group_id"` + AdditionalProperties map[string]interface{} } type _GroupRemoteInfoActiveDirectoryGroup GroupRemoteInfoActiveDirectoryGroup @@ -81,6 +81,11 @@ func (o GroupRemoteInfoActiveDirectoryGroup) MarshalJSON() ([]byte, error) { func (o GroupRemoteInfoActiveDirectoryGroup) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["group_id"] = o.GroupId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -108,9 +113,7 @@ func (o *GroupRemoteInfoActiveDirectoryGroup) UnmarshalJSON(data []byte) (err er varGroupRemoteInfoActiveDirectoryGroup := _GroupRemoteInfoActiveDirectoryGroup{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGroupRemoteInfoActiveDirectoryGroup) + err = json.Unmarshal(data, &varGroupRemoteInfoActiveDirectoryGroup) if err != nil { return err @@ -118,6 +121,13 @@ func (o *GroupRemoteInfoActiveDirectoryGroup) UnmarshalJSON(data []byte) (err er *o = GroupRemoteInfoActiveDirectoryGroup(varGroupRemoteInfoActiveDirectoryGroup) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "group_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_group_remote_info_azure_ad_microsoft_365_group.go b/model_group_remote_info_azure_ad_microsoft_365_group.go index ba433c9..32c93d4 100644 --- a/model_group_remote_info_azure_ad_microsoft_365_group.go +++ b/model_group_remote_info_azure_ad_microsoft_365_group.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -24,6 +23,7 @@ var _ MappedNullable = &GroupRemoteInfoAzureAdMicrosoft365Group{} type GroupRemoteInfoAzureAdMicrosoft365Group struct { // The id of the Microsoft Entra ID Microsoft 365 group. GroupId string `json:"group_id"` + AdditionalProperties map[string]interface{} } type _GroupRemoteInfoAzureAdMicrosoft365Group GroupRemoteInfoAzureAdMicrosoft365Group @@ -81,6 +81,11 @@ func (o GroupRemoteInfoAzureAdMicrosoft365Group) MarshalJSON() ([]byte, error) { func (o GroupRemoteInfoAzureAdMicrosoft365Group) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["group_id"] = o.GroupId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -108,9 +113,7 @@ func (o *GroupRemoteInfoAzureAdMicrosoft365Group) UnmarshalJSON(data []byte) (er varGroupRemoteInfoAzureAdMicrosoft365Group := _GroupRemoteInfoAzureAdMicrosoft365Group{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGroupRemoteInfoAzureAdMicrosoft365Group) + err = json.Unmarshal(data, &varGroupRemoteInfoAzureAdMicrosoft365Group) if err != nil { return err @@ -118,6 +121,13 @@ func (o *GroupRemoteInfoAzureAdMicrosoft365Group) UnmarshalJSON(data []byte) (er *o = GroupRemoteInfoAzureAdMicrosoft365Group(varGroupRemoteInfoAzureAdMicrosoft365Group) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "group_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_group_remote_info_azure_ad_security_group.go b/model_group_remote_info_azure_ad_security_group.go index 9cd5426..f6a05fa 100644 --- a/model_group_remote_info_azure_ad_security_group.go +++ b/model_group_remote_info_azure_ad_security_group.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -24,6 +23,7 @@ var _ MappedNullable = &GroupRemoteInfoAzureAdSecurityGroup{} type GroupRemoteInfoAzureAdSecurityGroup struct { // The id of the Microsoft Entra ID Security group. GroupId string `json:"group_id"` + AdditionalProperties map[string]interface{} } type _GroupRemoteInfoAzureAdSecurityGroup GroupRemoteInfoAzureAdSecurityGroup @@ -81,6 +81,11 @@ func (o GroupRemoteInfoAzureAdSecurityGroup) MarshalJSON() ([]byte, error) { func (o GroupRemoteInfoAzureAdSecurityGroup) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["group_id"] = o.GroupId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -108,9 +113,7 @@ func (o *GroupRemoteInfoAzureAdSecurityGroup) UnmarshalJSON(data []byte) (err er varGroupRemoteInfoAzureAdSecurityGroup := _GroupRemoteInfoAzureAdSecurityGroup{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGroupRemoteInfoAzureAdSecurityGroup) + err = json.Unmarshal(data, &varGroupRemoteInfoAzureAdSecurityGroup) if err != nil { return err @@ -118,6 +121,13 @@ func (o *GroupRemoteInfoAzureAdSecurityGroup) UnmarshalJSON(data []byte) (err er *o = GroupRemoteInfoAzureAdSecurityGroup(varGroupRemoteInfoAzureAdSecurityGroup) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "group_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_group_remote_info_duo_group.go b/model_group_remote_info_duo_group.go index 4de6ced..7e1e0f4 100644 --- a/model_group_remote_info_duo_group.go +++ b/model_group_remote_info_duo_group.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -24,6 +23,7 @@ var _ MappedNullable = &GroupRemoteInfoDuoGroup{} type GroupRemoteInfoDuoGroup struct { // The id of the Duo Security group. GroupId string `json:"group_id"` + AdditionalProperties map[string]interface{} } type _GroupRemoteInfoDuoGroup GroupRemoteInfoDuoGroup @@ -81,6 +81,11 @@ func (o GroupRemoteInfoDuoGroup) MarshalJSON() ([]byte, error) { func (o GroupRemoteInfoDuoGroup) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["group_id"] = o.GroupId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -108,9 +113,7 @@ func (o *GroupRemoteInfoDuoGroup) UnmarshalJSON(data []byte) (err error) { varGroupRemoteInfoDuoGroup := _GroupRemoteInfoDuoGroup{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGroupRemoteInfoDuoGroup) + err = json.Unmarshal(data, &varGroupRemoteInfoDuoGroup) if err != nil { return err @@ -118,6 +121,13 @@ func (o *GroupRemoteInfoDuoGroup) UnmarshalJSON(data []byte) (err error) { *o = GroupRemoteInfoDuoGroup(varGroupRemoteInfoDuoGroup) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "group_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_group_remote_info_github_team.go b/model_group_remote_info_github_team.go index ab25238..44bd2df 100644 --- a/model_group_remote_info_github_team.go +++ b/model_group_remote_info_github_team.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -27,6 +26,7 @@ type GroupRemoteInfoGithubTeam struct { TeamId *string `json:"team_id,omitempty"` // The slug of the GitHub team. TeamSlug string `json:"team_slug"` + AdditionalProperties map[string]interface{} } type _GroupRemoteInfoGithubTeam GroupRemoteInfoGithubTeam @@ -122,6 +122,11 @@ func (o GroupRemoteInfoGithubTeam) ToMap() (map[string]interface{}, error) { toSerialize["team_id"] = o.TeamId } toSerialize["team_slug"] = o.TeamSlug + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -149,9 +154,7 @@ func (o *GroupRemoteInfoGithubTeam) UnmarshalJSON(data []byte) (err error) { varGroupRemoteInfoGithubTeam := _GroupRemoteInfoGithubTeam{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGroupRemoteInfoGithubTeam) + err = json.Unmarshal(data, &varGroupRemoteInfoGithubTeam) if err != nil { return err @@ -159,6 +162,14 @@ func (o *GroupRemoteInfoGithubTeam) UnmarshalJSON(data []byte) (err error) { *o = GroupRemoteInfoGithubTeam(varGroupRemoteInfoGithubTeam) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "team_id") + delete(additionalProperties, "team_slug") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_group_remote_info_gitlab_group.go b/model_group_remote_info_gitlab_group.go index f98e24e..c47ba8a 100644 --- a/model_group_remote_info_gitlab_group.go +++ b/model_group_remote_info_gitlab_group.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -24,6 +23,7 @@ var _ MappedNullable = &GroupRemoteInfoGitlabGroup{} type GroupRemoteInfoGitlabGroup struct { // The id of the Gitlab group. GroupId string `json:"group_id"` + AdditionalProperties map[string]interface{} } type _GroupRemoteInfoGitlabGroup GroupRemoteInfoGitlabGroup @@ -81,6 +81,11 @@ func (o GroupRemoteInfoGitlabGroup) MarshalJSON() ([]byte, error) { func (o GroupRemoteInfoGitlabGroup) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["group_id"] = o.GroupId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -108,9 +113,7 @@ func (o *GroupRemoteInfoGitlabGroup) UnmarshalJSON(data []byte) (err error) { varGroupRemoteInfoGitlabGroup := _GroupRemoteInfoGitlabGroup{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGroupRemoteInfoGitlabGroup) + err = json.Unmarshal(data, &varGroupRemoteInfoGitlabGroup) if err != nil { return err @@ -118,6 +121,13 @@ func (o *GroupRemoteInfoGitlabGroup) UnmarshalJSON(data []byte) (err error) { *o = GroupRemoteInfoGitlabGroup(varGroupRemoteInfoGitlabGroup) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "group_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_group_remote_info_google_group.go b/model_group_remote_info_google_group.go index c937832..f958461 100644 --- a/model_group_remote_info_google_group.go +++ b/model_group_remote_info_google_group.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -24,6 +23,7 @@ var _ MappedNullable = &GroupRemoteInfoGoogleGroup{} type GroupRemoteInfoGoogleGroup struct { // The id of the Google group. GroupId string `json:"group_id"` + AdditionalProperties map[string]interface{} } type _GroupRemoteInfoGoogleGroup GroupRemoteInfoGoogleGroup @@ -81,6 +81,11 @@ func (o GroupRemoteInfoGoogleGroup) MarshalJSON() ([]byte, error) { func (o GroupRemoteInfoGoogleGroup) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["group_id"] = o.GroupId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -108,9 +113,7 @@ func (o *GroupRemoteInfoGoogleGroup) UnmarshalJSON(data []byte) (err error) { varGroupRemoteInfoGoogleGroup := _GroupRemoteInfoGoogleGroup{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGroupRemoteInfoGoogleGroup) + err = json.Unmarshal(data, &varGroupRemoteInfoGoogleGroup) if err != nil { return err @@ -118,6 +121,13 @@ func (o *GroupRemoteInfoGoogleGroup) UnmarshalJSON(data []byte) (err error) { *o = GroupRemoteInfoGoogleGroup(varGroupRemoteInfoGoogleGroup) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "group_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_group_remote_info_ldap_group.go b/model_group_remote_info_ldap_group.go index d14ad48..794af4c 100644 --- a/model_group_remote_info_ldap_group.go +++ b/model_group_remote_info_ldap_group.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -24,6 +23,7 @@ var _ MappedNullable = &GroupRemoteInfoLdapGroup{} type GroupRemoteInfoLdapGroup struct { // The id of the LDAP group. GroupId string `json:"group_id"` + AdditionalProperties map[string]interface{} } type _GroupRemoteInfoLdapGroup GroupRemoteInfoLdapGroup @@ -81,6 +81,11 @@ func (o GroupRemoteInfoLdapGroup) MarshalJSON() ([]byte, error) { func (o GroupRemoteInfoLdapGroup) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["group_id"] = o.GroupId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -108,9 +113,7 @@ func (o *GroupRemoteInfoLdapGroup) UnmarshalJSON(data []byte) (err error) { varGroupRemoteInfoLdapGroup := _GroupRemoteInfoLdapGroup{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGroupRemoteInfoLdapGroup) + err = json.Unmarshal(data, &varGroupRemoteInfoLdapGroup) if err != nil { return err @@ -118,6 +121,13 @@ func (o *GroupRemoteInfoLdapGroup) UnmarshalJSON(data []byte) (err error) { *o = GroupRemoteInfoLdapGroup(varGroupRemoteInfoLdapGroup) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "group_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_group_remote_info_okta_group.go b/model_group_remote_info_okta_group.go index 43b279e..9d83f7d 100644 --- a/model_group_remote_info_okta_group.go +++ b/model_group_remote_info_okta_group.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -24,6 +23,7 @@ var _ MappedNullable = &GroupRemoteInfoOktaGroup{} type GroupRemoteInfoOktaGroup struct { // The id of the Okta Directory group. GroupId string `json:"group_id"` + AdditionalProperties map[string]interface{} } type _GroupRemoteInfoOktaGroup GroupRemoteInfoOktaGroup @@ -81,6 +81,11 @@ func (o GroupRemoteInfoOktaGroup) MarshalJSON() ([]byte, error) { func (o GroupRemoteInfoOktaGroup) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["group_id"] = o.GroupId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -108,9 +113,7 @@ func (o *GroupRemoteInfoOktaGroup) UnmarshalJSON(data []byte) (err error) { varGroupRemoteInfoOktaGroup := _GroupRemoteInfoOktaGroup{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGroupRemoteInfoOktaGroup) + err = json.Unmarshal(data, &varGroupRemoteInfoOktaGroup) if err != nil { return err @@ -118,6 +121,13 @@ func (o *GroupRemoteInfoOktaGroup) UnmarshalJSON(data []byte) (err error) { *o = GroupRemoteInfoOktaGroup(varGroupRemoteInfoOktaGroup) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "group_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_group_remote_info_okta_group_rule.go b/model_group_remote_info_okta_group_rule.go index d5e6d2a..03f51cc 100644 --- a/model_group_remote_info_okta_group_rule.go +++ b/model_group_remote_info_okta_group_rule.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -24,6 +23,7 @@ var _ MappedNullable = &GroupRemoteInfoOktaGroupRule{} type GroupRemoteInfoOktaGroupRule struct { // The id of the Okta group rule. RuleId string `json:"rule_id"` + AdditionalProperties map[string]interface{} } type _GroupRemoteInfoOktaGroupRule GroupRemoteInfoOktaGroupRule @@ -81,6 +81,11 @@ func (o GroupRemoteInfoOktaGroupRule) MarshalJSON() ([]byte, error) { func (o GroupRemoteInfoOktaGroupRule) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["rule_id"] = o.RuleId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -108,9 +113,7 @@ func (o *GroupRemoteInfoOktaGroupRule) UnmarshalJSON(data []byte) (err error) { varGroupRemoteInfoOktaGroupRule := _GroupRemoteInfoOktaGroupRule{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGroupRemoteInfoOktaGroupRule) + err = json.Unmarshal(data, &varGroupRemoteInfoOktaGroupRule) if err != nil { return err @@ -118,6 +121,13 @@ func (o *GroupRemoteInfoOktaGroupRule) UnmarshalJSON(data []byte) (err error) { *o = GroupRemoteInfoOktaGroupRule(varGroupRemoteInfoOktaGroupRule) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "rule_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_group_remote_info_snowflake_role.go b/model_group_remote_info_snowflake_role.go index 4b111f8..a5bee31 100644 --- a/model_group_remote_info_snowflake_role.go +++ b/model_group_remote_info_snowflake_role.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -24,6 +23,7 @@ var _ MappedNullable = &GroupRemoteInfoSnowflakeRole{} type GroupRemoteInfoSnowflakeRole struct { // The id of the Snowflake role. RoleId string `json:"role_id"` + AdditionalProperties map[string]interface{} } type _GroupRemoteInfoSnowflakeRole GroupRemoteInfoSnowflakeRole @@ -81,6 +81,11 @@ func (o GroupRemoteInfoSnowflakeRole) MarshalJSON() ([]byte, error) { func (o GroupRemoteInfoSnowflakeRole) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["role_id"] = o.RoleId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -108,9 +113,7 @@ func (o *GroupRemoteInfoSnowflakeRole) UnmarshalJSON(data []byte) (err error) { varGroupRemoteInfoSnowflakeRole := _GroupRemoteInfoSnowflakeRole{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGroupRemoteInfoSnowflakeRole) + err = json.Unmarshal(data, &varGroupRemoteInfoSnowflakeRole) if err != nil { return err @@ -118,6 +121,13 @@ func (o *GroupRemoteInfoSnowflakeRole) UnmarshalJSON(data []byte) (err error) { *o = GroupRemoteInfoSnowflakeRole(varGroupRemoteInfoSnowflakeRole) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "role_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_group_remote_info_workday_user_security_group.go b/model_group_remote_info_workday_user_security_group.go index fa34c82..d32d0f6 100644 --- a/model_group_remote_info_workday_user_security_group.go +++ b/model_group_remote_info_workday_user_security_group.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -24,6 +23,7 @@ var _ MappedNullable = &GroupRemoteInfoWorkdayUserSecurityGroup{} type GroupRemoteInfoWorkdayUserSecurityGroup struct { // The id of the Workday User Security group. GroupId string `json:"group_id"` + AdditionalProperties map[string]interface{} } type _GroupRemoteInfoWorkdayUserSecurityGroup GroupRemoteInfoWorkdayUserSecurityGroup @@ -81,6 +81,11 @@ func (o GroupRemoteInfoWorkdayUserSecurityGroup) MarshalJSON() ([]byte, error) { func (o GroupRemoteInfoWorkdayUserSecurityGroup) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["group_id"] = o.GroupId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -108,9 +113,7 @@ func (o *GroupRemoteInfoWorkdayUserSecurityGroup) UnmarshalJSON(data []byte) (er varGroupRemoteInfoWorkdayUserSecurityGroup := _GroupRemoteInfoWorkdayUserSecurityGroup{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGroupRemoteInfoWorkdayUserSecurityGroup) + err = json.Unmarshal(data, &varGroupRemoteInfoWorkdayUserSecurityGroup) if err != nil { return err @@ -118,6 +121,13 @@ func (o *GroupRemoteInfoWorkdayUserSecurityGroup) UnmarshalJSON(data []byte) (er *o = GroupRemoteInfoWorkdayUserSecurityGroup(varGroupRemoteInfoWorkdayUserSecurityGroup) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "group_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_group_resource.go b/model_group_resource.go index 073965c..f6f6429 100644 --- a/model_group_resource.go +++ b/model_group_resource.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -27,6 +26,7 @@ type GroupResource struct { // The ID of the resource. ResourceId string `json:"resource_id"` AccessLevel ResourceAccessLevel `json:"access_level"` + AdditionalProperties map[string]interface{} } type _GroupResource GroupResource @@ -136,6 +136,11 @@ func (o GroupResource) ToMap() (map[string]interface{}, error) { toSerialize["group_id"] = o.GroupId toSerialize["resource_id"] = o.ResourceId toSerialize["access_level"] = o.AccessLevel + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -165,9 +170,7 @@ func (o *GroupResource) UnmarshalJSON(data []byte) (err error) { varGroupResource := _GroupResource{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGroupResource) + err = json.Unmarshal(data, &varGroupResource) if err != nil { return err @@ -175,6 +178,15 @@ func (o *GroupResource) UnmarshalJSON(data []byte) (err error) { *o = GroupResource(varGroupResource) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "group_id") + delete(additionalProperties, "resource_id") + delete(additionalProperties, "access_level") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_group_resource_list.go b/model_group_resource_list.go index 01bfe54..046230b 100644 --- a/model_group_resource_list.go +++ b/model_group_resource_list.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -23,6 +22,7 @@ var _ MappedNullable = &GroupResourceList{} // GroupResourceList struct for GroupResourceList type GroupResourceList struct { GroupResources []GroupResource `json:"group_resources"` + AdditionalProperties map[string]interface{} } type _GroupResourceList GroupResourceList @@ -80,6 +80,11 @@ func (o GroupResourceList) MarshalJSON() ([]byte, error) { func (o GroupResourceList) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["group_resources"] = o.GroupResources + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -107,9 +112,7 @@ func (o *GroupResourceList) UnmarshalJSON(data []byte) (err error) { varGroupResourceList := _GroupResourceList{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGroupResourceList) + err = json.Unmarshal(data, &varGroupResourceList) if err != nil { return err @@ -117,6 +120,13 @@ func (o *GroupResourceList) UnmarshalJSON(data []byte) (err error) { *o = GroupResourceList(varGroupResourceList) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "group_resources") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_group_user.go b/model_group_user.go index 16ed243..a587914 100644 --- a/model_group_user.go +++ b/model_group_user.go @@ -14,7 +14,6 @@ package opal import ( "encoding/json" "time" - "bytes" "fmt" ) @@ -35,6 +34,7 @@ type GroupUser struct { // The day and time the user's access will expire. ExpirationDate *time.Time `json:"expiration_date,omitempty"` PropagationStatus *PropagationStatus `json:"propagation_status,omitempty"` + AdditionalProperties map[string]interface{} } type _GroupUser GroupUser @@ -275,6 +275,11 @@ func (o GroupUser) ToMap() (map[string]interface{}, error) { if !IsNil(o.PropagationStatus) { toSerialize["propagation_status"] = o.PropagationStatus } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -305,9 +310,7 @@ func (o *GroupUser) UnmarshalJSON(data []byte) (err error) { varGroupUser := _GroupUser{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGroupUser) + err = json.Unmarshal(data, &varGroupUser) if err != nil { return err @@ -315,6 +318,19 @@ func (o *GroupUser) UnmarshalJSON(data []byte) (err error) { *o = GroupUser(varGroupUser) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "group_id") + delete(additionalProperties, "user_id") + delete(additionalProperties, "access_level") + delete(additionalProperties, "full_name") + delete(additionalProperties, "email") + delete(additionalProperties, "expiration_date") + delete(additionalProperties, "propagation_status") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_group_user_list.go b/model_group_user_list.go index 9d54072..fd3f715 100644 --- a/model_group_user_list.go +++ b/model_group_user_list.go @@ -25,8 +25,11 @@ type GroupUserList struct { Next *string `json:"next,omitempty"` // The cursor used to obtain the current result page. Previous *string `json:"previous,omitempty"` + AdditionalProperties map[string]interface{} } +type _GroupUserList GroupUserList + // NewGroupUserList instantiates a new GroupUserList 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 @@ -159,9 +162,37 @@ func (o GroupUserList) ToMap() (map[string]interface{}, error) { if !IsNil(o.Previous) { toSerialize["previous"] = o.Previous } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *GroupUserList) UnmarshalJSON(data []byte) (err error) { + varGroupUserList := _GroupUserList{} + + err = json.Unmarshal(data, &varGroupUserList) + + if err != nil { + return err + } + + *o = GroupUserList(varGroupUserList) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "results") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableGroupUserList struct { value *GroupUserList isSet bool diff --git a/model_group_with_access_level.go b/model_group_with_access_level.go index 96932f7..aadb2d3 100644 --- a/model_group_with_access_level.go +++ b/model_group_with_access_level.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -26,6 +25,7 @@ type GroupWithAccessLevel struct { GroupId string `json:"group_id"` // The ID of the resource. AccessLevelRemoteId *string `json:"access_level_remote_id,omitempty"` + AdditionalProperties map[string]interface{} } type _GroupWithAccessLevel GroupWithAccessLevel @@ -118,6 +118,11 @@ func (o GroupWithAccessLevel) ToMap() (map[string]interface{}, error) { if !IsNil(o.AccessLevelRemoteId) { toSerialize["access_level_remote_id"] = o.AccessLevelRemoteId } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -145,9 +150,7 @@ func (o *GroupWithAccessLevel) UnmarshalJSON(data []byte) (err error) { varGroupWithAccessLevel := _GroupWithAccessLevel{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGroupWithAccessLevel) + err = json.Unmarshal(data, &varGroupWithAccessLevel) if err != nil { return err @@ -155,6 +158,14 @@ func (o *GroupWithAccessLevel) UnmarshalJSON(data []byte) (err error) { *o = GroupWithAccessLevel(varGroupWithAccessLevel) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "group_id") + delete(additionalProperties, "access_level_remote_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_idp_group_mapping.go b/model_idp_group_mapping.go index cdb8fb5..c9776c2 100644 --- a/model_idp_group_mapping.go +++ b/model_idp_group_mapping.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -30,6 +29,7 @@ type IdpGroupMapping struct { Alias *string `json:"alias,omitempty"` // A bool representing whether or not the group is hidden from the end user. HiddenFromEndUser bool `json:"hidden_from_end_user"` + AdditionalProperties map[string]interface{} } type _IdpGroupMapping IdpGroupMapping @@ -183,6 +183,11 @@ func (o IdpGroupMapping) ToMap() (map[string]interface{}, error) { toSerialize["alias"] = o.Alias } toSerialize["hidden_from_end_user"] = o.HiddenFromEndUser + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -211,9 +216,7 @@ func (o *IdpGroupMapping) UnmarshalJSON(data []byte) (err error) { varIdpGroupMapping := _IdpGroupMapping{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varIdpGroupMapping) + err = json.Unmarshal(data, &varIdpGroupMapping) if err != nil { return err @@ -221,6 +224,16 @@ func (o *IdpGroupMapping) UnmarshalJSON(data []byte) (err error) { *o = IdpGroupMapping(varIdpGroupMapping) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "app_resource_id") + delete(additionalProperties, "group_id") + delete(additionalProperties, "alias") + delete(additionalProperties, "hidden_from_end_user") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_idp_group_mapping_list.go b/model_idp_group_mapping_list.go index 65a0c01..2d2fc40 100644 --- a/model_idp_group_mapping_list.go +++ b/model_idp_group_mapping_list.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -23,6 +22,7 @@ var _ MappedNullable = &IdpGroupMappingList{} // IdpGroupMappingList struct for IdpGroupMappingList type IdpGroupMappingList struct { Mappings []IdpGroupMapping `json:"mappings"` + AdditionalProperties map[string]interface{} } type _IdpGroupMappingList IdpGroupMappingList @@ -80,6 +80,11 @@ func (o IdpGroupMappingList) MarshalJSON() ([]byte, error) { func (o IdpGroupMappingList) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["mappings"] = o.Mappings + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -107,9 +112,7 @@ func (o *IdpGroupMappingList) UnmarshalJSON(data []byte) (err error) { varIdpGroupMappingList := _IdpGroupMappingList{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varIdpGroupMappingList) + err = json.Unmarshal(data, &varIdpGroupMappingList) if err != nil { return err @@ -117,6 +120,13 @@ func (o *IdpGroupMappingList) UnmarshalJSON(data []byte) (err error) { *o = IdpGroupMappingList(varIdpGroupMappingList) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "mappings") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_message_channel.go b/model_message_channel.go index 02012a8..f997e36 100644 --- a/model_message_channel.go +++ b/model_message_channel.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -31,6 +30,7 @@ type MessageChannel struct { Name *string `json:"name,omitempty"` // A bool representing whether or not the message channel is private. IsPrivate *bool `json:"is_private,omitempty"` + AdditionalProperties map[string]interface{} } type _MessageChannel MessageChannel @@ -228,6 +228,11 @@ func (o MessageChannel) ToMap() (map[string]interface{}, error) { if !IsNil(o.IsPrivate) { toSerialize["is_private"] = o.IsPrivate } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -255,9 +260,7 @@ func (o *MessageChannel) UnmarshalJSON(data []byte) (err error) { varMessageChannel := _MessageChannel{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varMessageChannel) + err = json.Unmarshal(data, &varMessageChannel) if err != nil { return err @@ -265,6 +268,17 @@ func (o *MessageChannel) UnmarshalJSON(data []byte) (err error) { *o = MessageChannel(varMessageChannel) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "message_channel_id") + delete(additionalProperties, "third_party_provider") + delete(additionalProperties, "remote_id") + delete(additionalProperties, "name") + delete(additionalProperties, "is_private") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_message_channel_id_list.go b/model_message_channel_id_list.go index 0a8b315..d8087c0 100644 --- a/model_message_channel_id_list.go +++ b/model_message_channel_id_list.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -23,6 +22,7 @@ var _ MappedNullable = &MessageChannelIDList{} // MessageChannelIDList A list of message channel IDs. type MessageChannelIDList struct { MessageChannelIds []string `json:"message_channel_ids"` + AdditionalProperties map[string]interface{} } type _MessageChannelIDList MessageChannelIDList @@ -80,6 +80,11 @@ func (o MessageChannelIDList) MarshalJSON() ([]byte, error) { func (o MessageChannelIDList) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["message_channel_ids"] = o.MessageChannelIds + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -107,9 +112,7 @@ func (o *MessageChannelIDList) UnmarshalJSON(data []byte) (err error) { varMessageChannelIDList := _MessageChannelIDList{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varMessageChannelIDList) + err = json.Unmarshal(data, &varMessageChannelIDList) if err != nil { return err @@ -117,6 +120,13 @@ func (o *MessageChannelIDList) UnmarshalJSON(data []byte) (err error) { *o = MessageChannelIDList(varMessageChannelIDList) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "message_channel_ids") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_message_channel_list.go b/model_message_channel_list.go index 76ab924..eb443fe 100644 --- a/model_message_channel_list.go +++ b/model_message_channel_list.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -23,6 +22,7 @@ var _ MappedNullable = &MessageChannelList{} // MessageChannelList struct for MessageChannelList type MessageChannelList struct { Channels []MessageChannel `json:"channels"` + AdditionalProperties map[string]interface{} } type _MessageChannelList MessageChannelList @@ -80,6 +80,11 @@ func (o MessageChannelList) MarshalJSON() ([]byte, error) { func (o MessageChannelList) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["channels"] = o.Channels + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -107,9 +112,7 @@ func (o *MessageChannelList) UnmarshalJSON(data []byte) (err error) { varMessageChannelList := _MessageChannelList{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varMessageChannelList) + err = json.Unmarshal(data, &varMessageChannelList) if err != nil { return err @@ -117,6 +120,13 @@ func (o *MessageChannelList) UnmarshalJSON(data []byte) (err error) { *o = MessageChannelList(varMessageChannelList) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "channels") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_on_call_schedule.go b/model_on_call_schedule.go index e226bca..dfe638a 100644 --- a/model_on_call_schedule.go +++ b/model_on_call_schedule.go @@ -27,8 +27,11 @@ type OnCallSchedule struct { RemoteId *string `json:"remote_id,omitempty"` // The name of the on call schedule. Name *string `json:"name,omitempty"` + AdditionalProperties map[string]interface{} } +type _OnCallSchedule OnCallSchedule + // NewOnCallSchedule instantiates a new OnCallSchedule 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 @@ -196,9 +199,38 @@ func (o OnCallSchedule) ToMap() (map[string]interface{}, error) { if !IsNil(o.Name) { toSerialize["name"] = o.Name } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *OnCallSchedule) UnmarshalJSON(data []byte) (err error) { + varOnCallSchedule := _OnCallSchedule{} + + err = json.Unmarshal(data, &varOnCallSchedule) + + if err != nil { + return err + } + + *o = OnCallSchedule(varOnCallSchedule) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "on_call_schedule_id") + delete(additionalProperties, "third_party_provider") + delete(additionalProperties, "remote_id") + delete(additionalProperties, "name") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableOnCallSchedule struct { value *OnCallSchedule isSet bool diff --git a/model_on_call_schedule_id_list.go b/model_on_call_schedule_id_list.go index 6f92da3..2fcc65f 100644 --- a/model_on_call_schedule_id_list.go +++ b/model_on_call_schedule_id_list.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -23,6 +22,7 @@ var _ MappedNullable = &OnCallScheduleIDList{} // OnCallScheduleIDList A list of on call schedule Opal UUIDs. To get the matching remote IDs, use the /on-call-schedules endpoints. type OnCallScheduleIDList struct { OnCallScheduleIds []string `json:"on_call_schedule_ids"` + AdditionalProperties map[string]interface{} } type _OnCallScheduleIDList OnCallScheduleIDList @@ -80,6 +80,11 @@ func (o OnCallScheduleIDList) MarshalJSON() ([]byte, error) { func (o OnCallScheduleIDList) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["on_call_schedule_ids"] = o.OnCallScheduleIds + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -107,9 +112,7 @@ func (o *OnCallScheduleIDList) UnmarshalJSON(data []byte) (err error) { varOnCallScheduleIDList := _OnCallScheduleIDList{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varOnCallScheduleIDList) + err = json.Unmarshal(data, &varOnCallScheduleIDList) if err != nil { return err @@ -117,6 +120,13 @@ func (o *OnCallScheduleIDList) UnmarshalJSON(data []byte) (err error) { *o = OnCallScheduleIDList(varOnCallScheduleIDList) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "on_call_schedule_ids") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_on_call_schedule_list.go b/model_on_call_schedule_list.go index 87bbb2e..ee6ce49 100644 --- a/model_on_call_schedule_list.go +++ b/model_on_call_schedule_list.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -23,6 +22,7 @@ var _ MappedNullable = &OnCallScheduleList{} // OnCallScheduleList struct for OnCallScheduleList type OnCallScheduleList struct { OnCallSchedules []OnCallSchedule `json:"on_call_schedules"` + AdditionalProperties map[string]interface{} } type _OnCallScheduleList OnCallScheduleList @@ -80,6 +80,11 @@ func (o OnCallScheduleList) MarshalJSON() ([]byte, error) { func (o OnCallScheduleList) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["on_call_schedules"] = o.OnCallSchedules + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -107,9 +112,7 @@ func (o *OnCallScheduleList) UnmarshalJSON(data []byte) (err error) { varOnCallScheduleList := _OnCallScheduleList{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varOnCallScheduleList) + err = json.Unmarshal(data, &varOnCallScheduleList) if err != nil { return err @@ -117,6 +120,13 @@ func (o *OnCallScheduleList) UnmarshalJSON(data []byte) (err error) { *o = OnCallScheduleList(varOnCallScheduleList) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "on_call_schedules") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_owner.go b/model_owner.go index 88aa36b..89304e1 100644 --- a/model_owner.go +++ b/model_owner.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -32,6 +31,7 @@ type Owner struct { AccessRequestEscalationPeriod *int32 `json:"access_request_escalation_period,omitempty"` ReviewerMessageChannelId *string `json:"reviewer_message_channel_id,omitempty"` SourceGroupId *string `json:"source_group_id,omitempty"` + AdditionalProperties map[string]interface{} } type _Owner Owner @@ -264,6 +264,11 @@ func (o Owner) ToMap() (map[string]interface{}, error) { if !IsNil(o.SourceGroupId) { toSerialize["source_group_id"] = o.SourceGroupId } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -291,9 +296,7 @@ func (o *Owner) UnmarshalJSON(data []byte) (err error) { varOwner := _Owner{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varOwner) + err = json.Unmarshal(data, &varOwner) if err != nil { return err @@ -301,6 +304,18 @@ func (o *Owner) UnmarshalJSON(data []byte) (err error) { *o = Owner(varOwner) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "owner_id") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "access_request_escalation_period") + delete(additionalProperties, "reviewer_message_channel_id") + delete(additionalProperties, "source_group_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_page_info.go b/model_page_info.go index d2e8b3f..4eb84da 100644 --- a/model_page_info.go +++ b/model_page_info.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -30,6 +29,7 @@ type PageInfo struct { HasPreviousPage bool `json:"hasPreviousPage"` // The cursor to continue pagination backwards StartCursor string `json:"startCursor"` + AdditionalProperties map[string]interface{} } type _PageInfo PageInfo @@ -165,6 +165,11 @@ func (o PageInfo) ToMap() (map[string]interface{}, error) { toSerialize["endCursor"] = o.EndCursor toSerialize["hasPreviousPage"] = o.HasPreviousPage toSerialize["startCursor"] = o.StartCursor + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -195,9 +200,7 @@ func (o *PageInfo) UnmarshalJSON(data []byte) (err error) { varPageInfo := _PageInfo{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varPageInfo) + err = json.Unmarshal(data, &varPageInfo) if err != nil { return err @@ -205,6 +208,16 @@ func (o *PageInfo) UnmarshalJSON(data []byte) (err error) { *o = PageInfo(varPageInfo) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "hasNextPage") + delete(additionalProperties, "endCursor") + delete(additionalProperties, "hasPreviousPage") + delete(additionalProperties, "startCursor") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_paginated_assigned_request_list.go b/model_paginated_assigned_request_list.go index 7c33dc5..5c4a1b5 100644 --- a/model_paginated_assigned_request_list.go +++ b/model_paginated_assigned_request_list.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -25,6 +24,7 @@ type PaginatedAssignedRequestList struct { Requests []Request `json:"requests"` // The cursor to continue pagination Cursor string `json:"cursor"` + AdditionalProperties map[string]interface{} } type _PaginatedAssignedRequestList PaginatedAssignedRequestList @@ -108,6 +108,11 @@ func (o PaginatedAssignedRequestList) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["requests"] = o.Requests toSerialize["cursor"] = o.Cursor + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -136,9 +141,7 @@ func (o *PaginatedAssignedRequestList) UnmarshalJSON(data []byte) (err error) { varPaginatedAssignedRequestList := _PaginatedAssignedRequestList{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varPaginatedAssignedRequestList) + err = json.Unmarshal(data, &varPaginatedAssignedRequestList) if err != nil { return err @@ -146,6 +149,14 @@ func (o *PaginatedAssignedRequestList) UnmarshalJSON(data []byte) (err error) { *o = PaginatedAssignedRequestList(varPaginatedAssignedRequestList) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "requests") + delete(additionalProperties, "cursor") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_paginated_bundle_group_list.go b/model_paginated_bundle_group_list.go index 574340d..dd861de 100644 --- a/model_paginated_bundle_group_list.go +++ b/model_paginated_bundle_group_list.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -29,6 +28,7 @@ type PaginatedBundleGroupList struct { // The total number of items in the result set. TotalCount *int32 `json:"total_count,omitempty"` BundleGroups []BundleGroup `json:"bundle_groups"` + AdditionalProperties map[string]interface{} } type _PaginatedBundleGroupList PaginatedBundleGroupList @@ -191,6 +191,11 @@ func (o PaginatedBundleGroupList) ToMap() (map[string]interface{}, error) { toSerialize["total_count"] = o.TotalCount } toSerialize["bundle_groups"] = o.BundleGroups + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -218,9 +223,7 @@ func (o *PaginatedBundleGroupList) UnmarshalJSON(data []byte) (err error) { varPaginatedBundleGroupList := _PaginatedBundleGroupList{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varPaginatedBundleGroupList) + err = json.Unmarshal(data, &varPaginatedBundleGroupList) if err != nil { return err @@ -228,6 +231,16 @@ func (o *PaginatedBundleGroupList) UnmarshalJSON(data []byte) (err error) { *o = PaginatedBundleGroupList(varPaginatedBundleGroupList) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "previous") + delete(additionalProperties, "next") + delete(additionalProperties, "total_count") + delete(additionalProperties, "bundle_groups") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_paginated_bundle_list.go b/model_paginated_bundle_list.go index 59d6217..f88c377 100644 --- a/model_paginated_bundle_list.go +++ b/model_paginated_bundle_list.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -29,6 +28,7 @@ type PaginatedBundleList struct { // The total number of items in the result set. TotalCount *int32 `json:"total_count,omitempty"` Bundles []Bundle `json:"bundles"` + AdditionalProperties map[string]interface{} } type _PaginatedBundleList PaginatedBundleList @@ -191,6 +191,11 @@ func (o PaginatedBundleList) ToMap() (map[string]interface{}, error) { toSerialize["total_count"] = o.TotalCount } toSerialize["bundles"] = o.Bundles + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -218,9 +223,7 @@ func (o *PaginatedBundleList) UnmarshalJSON(data []byte) (err error) { varPaginatedBundleList := _PaginatedBundleList{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varPaginatedBundleList) + err = json.Unmarshal(data, &varPaginatedBundleList) if err != nil { return err @@ -228,6 +231,16 @@ func (o *PaginatedBundleList) UnmarshalJSON(data []byte) (err error) { *o = PaginatedBundleList(varPaginatedBundleList) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "previous") + delete(additionalProperties, "next") + delete(additionalProperties, "total_count") + delete(additionalProperties, "bundles") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_paginated_bundle_resource_list.go b/model_paginated_bundle_resource_list.go index 8a0e7eb..4ab6699 100644 --- a/model_paginated_bundle_resource_list.go +++ b/model_paginated_bundle_resource_list.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -29,6 +28,7 @@ type PaginatedBundleResourceList struct { // The total number of items in the result set. TotalCount *int32 `json:"total_count,omitempty"` BundleResources []BundleResource `json:"bundle_resources"` + AdditionalProperties map[string]interface{} } type _PaginatedBundleResourceList PaginatedBundleResourceList @@ -191,6 +191,11 @@ func (o PaginatedBundleResourceList) ToMap() (map[string]interface{}, error) { toSerialize["total_count"] = o.TotalCount } toSerialize["bundle_resources"] = o.BundleResources + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -218,9 +223,7 @@ func (o *PaginatedBundleResourceList) UnmarshalJSON(data []byte) (err error) { varPaginatedBundleResourceList := _PaginatedBundleResourceList{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varPaginatedBundleResourceList) + err = json.Unmarshal(data, &varPaginatedBundleResourceList) if err != nil { return err @@ -228,6 +231,16 @@ func (o *PaginatedBundleResourceList) UnmarshalJSON(data []byte) (err error) { *o = PaginatedBundleResourceList(varPaginatedBundleResourceList) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "previous") + delete(additionalProperties, "next") + delete(additionalProperties, "total_count") + delete(additionalProperties, "bundle_resources") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_paginated_configuration_template_list.go b/model_paginated_configuration_template_list.go index 72ee0e5..686c78d 100644 --- a/model_paginated_configuration_template_list.go +++ b/model_paginated_configuration_template_list.go @@ -21,8 +21,11 @@ var _ MappedNullable = &PaginatedConfigurationTemplateList{} // PaginatedConfigurationTemplateList # PaginatedConfigurationTemplateList Object ### Description The `PaginatedConfigurationTemplateList` object is used to store a list of configuration templates. ### Usage Example Returned from the `GET Configuration Templates` endpoint. type PaginatedConfigurationTemplateList struct { Results []ConfigurationTemplate `json:"results,omitempty"` + AdditionalProperties map[string]interface{} } +type _PaginatedConfigurationTemplateList PaginatedConfigurationTemplateList + // NewPaginatedConfigurationTemplateList instantiates a new PaginatedConfigurationTemplateList 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 @@ -85,9 +88,35 @@ func (o PaginatedConfigurationTemplateList) ToMap() (map[string]interface{}, err if !IsNil(o.Results) { toSerialize["results"] = o.Results } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *PaginatedConfigurationTemplateList) UnmarshalJSON(data []byte) (err error) { + varPaginatedConfigurationTemplateList := _PaginatedConfigurationTemplateList{} + + err = json.Unmarshal(data, &varPaginatedConfigurationTemplateList) + + if err != nil { + return err + } + + *o = PaginatedConfigurationTemplateList(varPaginatedConfigurationTemplateList) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullablePaginatedConfigurationTemplateList struct { value *PaginatedConfigurationTemplateList isSet bool diff --git a/model_paginated_delegations_list.go b/model_paginated_delegations_list.go index 772f255..6b2eadd 100644 --- a/model_paginated_delegations_list.go +++ b/model_paginated_delegations_list.go @@ -28,8 +28,11 @@ type PaginatedDelegationsList struct { Previous *string `json:"previous,omitempty"` // The total number of items in the result set. TotalCount *int32 `json:"total_count,omitempty"` + AdditionalProperties map[string]interface{} } +type _PaginatedDelegationsList PaginatedDelegationsList + // NewPaginatedDelegationsList instantiates a new PaginatedDelegationsList 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 @@ -197,9 +200,38 @@ func (o PaginatedDelegationsList) ToMap() (map[string]interface{}, error) { if !IsNil(o.TotalCount) { toSerialize["total_count"] = o.TotalCount } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *PaginatedDelegationsList) UnmarshalJSON(data []byte) (err error) { + varPaginatedDelegationsList := _PaginatedDelegationsList{} + + err = json.Unmarshal(data, &varPaginatedDelegationsList) + + if err != nil { + return err + } + + *o = PaginatedDelegationsList(varPaginatedDelegationsList) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "results") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "total_count") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullablePaginatedDelegationsList struct { value *PaginatedDelegationsList isSet bool diff --git a/model_paginated_event_list.go b/model_paginated_event_list.go index e886e0a..cd67e08 100644 --- a/model_paginated_event_list.go +++ b/model_paginated_event_list.go @@ -25,8 +25,11 @@ type PaginatedEventList struct { // The cursor used to obtain the current result page. Previous *string `json:"previous,omitempty"` Results []Event `json:"results,omitempty"` + AdditionalProperties map[string]interface{} } +type _PaginatedEventList PaginatedEventList + // NewPaginatedEventList instantiates a new PaginatedEventList 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 @@ -159,9 +162,37 @@ func (o PaginatedEventList) ToMap() (map[string]interface{}, error) { if !IsNil(o.Results) { toSerialize["results"] = o.Results } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *PaginatedEventList) UnmarshalJSON(data []byte) (err error) { + varPaginatedEventList := _PaginatedEventList{} + + err = json.Unmarshal(data, &varPaginatedEventList) + + if err != nil { + return err + } + + *o = PaginatedEventList(varPaginatedEventList) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullablePaginatedEventList struct { value *PaginatedEventList isSet bool diff --git a/model_paginated_group_bindings_list.go b/model_paginated_group_bindings_list.go index 8c1c897..d3d999e 100644 --- a/model_paginated_group_bindings_list.go +++ b/model_paginated_group_bindings_list.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -27,6 +26,7 @@ type PaginatedGroupBindingsList struct { // The cursor used to obtain the current result page. Previous *string `json:"previous,omitempty"` Results []GroupBinding `json:"results"` + AdditionalProperties map[string]interface{} } type _PaginatedGroupBindingsList PaginatedGroupBindingsList @@ -154,6 +154,11 @@ func (o PaginatedGroupBindingsList) ToMap() (map[string]interface{}, error) { toSerialize["previous"] = o.Previous } toSerialize["results"] = o.Results + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -181,9 +186,7 @@ func (o *PaginatedGroupBindingsList) UnmarshalJSON(data []byte) (err error) { varPaginatedGroupBindingsList := _PaginatedGroupBindingsList{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varPaginatedGroupBindingsList) + err = json.Unmarshal(data, &varPaginatedGroupBindingsList) if err != nil { return err @@ -191,6 +194,15 @@ func (o *PaginatedGroupBindingsList) UnmarshalJSON(data []byte) (err error) { *o = PaginatedGroupBindingsList(varPaginatedGroupBindingsList) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_paginated_groups_list.go b/model_paginated_groups_list.go index 5dfd34c..28bad27 100644 --- a/model_paginated_groups_list.go +++ b/model_paginated_groups_list.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -27,6 +26,7 @@ type PaginatedGroupsList struct { // The cursor used to obtain the current result page. Previous *string `json:"previous,omitempty"` Results []Group `json:"results"` + AdditionalProperties map[string]interface{} } type _PaginatedGroupsList PaginatedGroupsList @@ -154,6 +154,11 @@ func (o PaginatedGroupsList) ToMap() (map[string]interface{}, error) { toSerialize["previous"] = o.Previous } toSerialize["results"] = o.Results + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -181,9 +186,7 @@ func (o *PaginatedGroupsList) UnmarshalJSON(data []byte) (err error) { varPaginatedGroupsList := _PaginatedGroupsList{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varPaginatedGroupsList) + err = json.Unmarshal(data, &varPaginatedGroupsList) if err != nil { return err @@ -191,6 +194,15 @@ func (o *PaginatedGroupsList) UnmarshalJSON(data []byte) (err error) { *o = PaginatedGroupsList(varPaginatedGroupsList) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_paginated_owners_list.go b/model_paginated_owners_list.go index 2cd16fc..e300b92 100644 --- a/model_paginated_owners_list.go +++ b/model_paginated_owners_list.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -27,6 +26,7 @@ type PaginatedOwnersList struct { // The cursor used to obtain the current result page. Previous *string `json:"previous,omitempty"` Results []Owner `json:"results"` + AdditionalProperties map[string]interface{} } type _PaginatedOwnersList PaginatedOwnersList @@ -154,6 +154,11 @@ func (o PaginatedOwnersList) ToMap() (map[string]interface{}, error) { toSerialize["previous"] = o.Previous } toSerialize["results"] = o.Results + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -181,9 +186,7 @@ func (o *PaginatedOwnersList) UnmarshalJSON(data []byte) (err error) { varPaginatedOwnersList := _PaginatedOwnersList{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varPaginatedOwnersList) + err = json.Unmarshal(data, &varPaginatedOwnersList) if err != nil { return err @@ -191,6 +194,15 @@ func (o *PaginatedOwnersList) UnmarshalJSON(data []byte) (err error) { *o = PaginatedOwnersList(varPaginatedOwnersList) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_paginated_remote_users_list.go b/model_paginated_remote_users_list.go index cc3e57a..c36b7e7 100644 --- a/model_paginated_remote_users_list.go +++ b/model_paginated_remote_users_list.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -27,6 +26,7 @@ type PaginatedRemoteUsersList struct { // The cursor used to obtain the current result page. Previous *string `json:"previous,omitempty"` Results []RemoteUser `json:"results"` + AdditionalProperties map[string]interface{} } type _PaginatedRemoteUsersList PaginatedRemoteUsersList @@ -154,6 +154,11 @@ func (o PaginatedRemoteUsersList) ToMap() (map[string]interface{}, error) { toSerialize["previous"] = o.Previous } toSerialize["results"] = o.Results + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -181,9 +186,7 @@ func (o *PaginatedRemoteUsersList) UnmarshalJSON(data []byte) (err error) { varPaginatedRemoteUsersList := _PaginatedRemoteUsersList{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varPaginatedRemoteUsersList) + err = json.Unmarshal(data, &varPaginatedRemoteUsersList) if err != nil { return err @@ -191,6 +194,15 @@ func (o *PaginatedRemoteUsersList) UnmarshalJSON(data []byte) (err error) { *o = PaginatedRemoteUsersList(varPaginatedRemoteUsersList) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_paginated_resources_list.go b/model_paginated_resources_list.go index a6d225f..1fb5a19 100644 --- a/model_paginated_resources_list.go +++ b/model_paginated_resources_list.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -27,6 +26,7 @@ type PaginatedResourcesList struct { // The cursor used to obtain the current result page. Previous *string `json:"previous,omitempty"` Results []Resource `json:"results"` + AdditionalProperties map[string]interface{} } type _PaginatedResourcesList PaginatedResourcesList @@ -154,6 +154,11 @@ func (o PaginatedResourcesList) ToMap() (map[string]interface{}, error) { toSerialize["previous"] = o.Previous } toSerialize["results"] = o.Results + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -181,9 +186,7 @@ func (o *PaginatedResourcesList) UnmarshalJSON(data []byte) (err error) { varPaginatedResourcesList := _PaginatedResourcesList{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varPaginatedResourcesList) + err = json.Unmarshal(data, &varPaginatedResourcesList) if err != nil { return err @@ -191,6 +194,15 @@ func (o *PaginatedResourcesList) UnmarshalJSON(data []byte) (err error) { *o = PaginatedResourcesList(varPaginatedResourcesList) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_paginated_tags_list.go b/model_paginated_tags_list.go index 454a3e3..b9c3ca9 100644 --- a/model_paginated_tags_list.go +++ b/model_paginated_tags_list.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -27,6 +26,7 @@ type PaginatedTagsList struct { // The cursor used to obtain the current result page. Previous *string `json:"previous,omitempty"` Results []Tag `json:"results"` + AdditionalProperties map[string]interface{} } type _PaginatedTagsList PaginatedTagsList @@ -154,6 +154,11 @@ func (o PaginatedTagsList) ToMap() (map[string]interface{}, error) { toSerialize["previous"] = o.Previous } toSerialize["results"] = o.Results + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -181,9 +186,7 @@ func (o *PaginatedTagsList) UnmarshalJSON(data []byte) (err error) { varPaginatedTagsList := _PaginatedTagsList{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varPaginatedTagsList) + err = json.Unmarshal(data, &varPaginatedTagsList) if err != nil { return err @@ -191,6 +194,15 @@ func (o *PaginatedTagsList) UnmarshalJSON(data []byte) (err error) { *o = PaginatedTagsList(varPaginatedTagsList) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_paginated_uars_list.go b/model_paginated_uars_list.go index 1f72857..84ee438 100644 --- a/model_paginated_uars_list.go +++ b/model_paginated_uars_list.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -27,6 +26,7 @@ type PaginatedUARsList struct { // The cursor used to obtain the current result page. Previous *string `json:"previous,omitempty"` Results []UAR `json:"results"` + AdditionalProperties map[string]interface{} } type _PaginatedUARsList PaginatedUARsList @@ -154,6 +154,11 @@ func (o PaginatedUARsList) ToMap() (map[string]interface{}, error) { toSerialize["previous"] = o.Previous } toSerialize["results"] = o.Results + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -181,9 +186,7 @@ func (o *PaginatedUARsList) UnmarshalJSON(data []byte) (err error) { varPaginatedUARsList := _PaginatedUARsList{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varPaginatedUARsList) + err = json.Unmarshal(data, &varPaginatedUARsList) if err != nil { return err @@ -191,6 +194,15 @@ func (o *PaginatedUARsList) UnmarshalJSON(data []byte) (err error) { *o = PaginatedUARsList(varPaginatedUARsList) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_paginated_users_list.go b/model_paginated_users_list.go index 82d2d23..ed26cf8 100644 --- a/model_paginated_users_list.go +++ b/model_paginated_users_list.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -27,6 +26,7 @@ type PaginatedUsersList struct { // The cursor used to obtain the current result page. Previous *string `json:"previous,omitempty"` Results []User `json:"results"` + AdditionalProperties map[string]interface{} } type _PaginatedUsersList PaginatedUsersList @@ -154,6 +154,11 @@ func (o PaginatedUsersList) ToMap() (map[string]interface{}, error) { toSerialize["previous"] = o.Previous } toSerialize["results"] = o.Results + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -181,9 +186,7 @@ func (o *PaginatedUsersList) UnmarshalJSON(data []byte) (err error) { varPaginatedUsersList := _PaginatedUsersList{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varPaginatedUsersList) + err = json.Unmarshal(data, &varPaginatedUsersList) if err != nil { return err @@ -191,6 +194,15 @@ func (o *PaginatedUsersList) UnmarshalJSON(data []byte) (err error) { *o = PaginatedUsersList(varPaginatedUsersList) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_propagation_status.go b/model_propagation_status.go index d346c0e..30a8d56 100644 --- a/model_propagation_status.go +++ b/model_propagation_status.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -23,6 +22,7 @@ var _ MappedNullable = &PropagationStatus{} // PropagationStatus The state of whether the push action was propagated to the remote system. If this is null, the access was synced from the remote system. type PropagationStatus struct { Status PropagationStatusEnum `json:"status"` + AdditionalProperties map[string]interface{} } type _PropagationStatus PropagationStatus @@ -80,6 +80,11 @@ func (o PropagationStatus) MarshalJSON() ([]byte, error) { func (o PropagationStatus) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["status"] = o.Status + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -107,9 +112,7 @@ func (o *PropagationStatus) UnmarshalJSON(data []byte) (err error) { varPropagationStatus := _PropagationStatus{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varPropagationStatus) + err = json.Unmarshal(data, &varPropagationStatus) if err != nil { return err @@ -117,6 +120,13 @@ func (o *PropagationStatus) UnmarshalJSON(data []byte) (err error) { *o = PropagationStatus(varPropagationStatus) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "status") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_remote_user.go b/model_remote_user.go index 0f33aa8..d6bf4d9 100644 --- a/model_remote_user.go +++ b/model_remote_user.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -26,8 +25,8 @@ type RemoteUser struct { UserId string `json:"user_id"` // The ID of the remote user. RemoteId string `json:"remote_id"` - // The third party provider of the remote user. ThirdPartyProvider ThirdPartyProviderEnum `json:"third_party_provider"` + AdditionalProperties map[string]interface{} } type _RemoteUser RemoteUser @@ -137,6 +136,11 @@ func (o RemoteUser) ToMap() (map[string]interface{}, error) { toSerialize["user_id"] = o.UserId toSerialize["remote_id"] = o.RemoteId toSerialize["third_party_provider"] = o.ThirdPartyProvider + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -166,9 +170,7 @@ func (o *RemoteUser) UnmarshalJSON(data []byte) (err error) { varRemoteUser := _RemoteUser{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varRemoteUser) + err = json.Unmarshal(data, &varRemoteUser) if err != nil { return err @@ -176,6 +178,15 @@ func (o *RemoteUser) UnmarshalJSON(data []byte) (err error) { *o = RemoteUser(varRemoteUser) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "user_id") + delete(additionalProperties, "remote_id") + delete(additionalProperties, "third_party_provider") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_request.go b/model_request.go index 53854c9..0efe6f1 100644 --- a/model_request.go +++ b/model_request.go @@ -14,7 +14,6 @@ package opal import ( "encoding/json" "time" - "bytes" "fmt" ) @@ -35,7 +34,6 @@ type Request struct { TargetUserId *string `json:"target_user_id,omitempty"` // The unique identifier of the group who is the target of the request. TargetGroupId *string `json:"target_group_id,omitempty"` - // The status of the request. Status RequestStatusEnum `json:"status"` // The reason for the request. Reason string `json:"reason"` @@ -45,11 +43,11 @@ type Request struct { RequestedItemsList []RequestedItem `json:"requested_items_list,omitempty"` // The responses given to the custom fields associated to the request CustomFieldsResponses []RequestCustomFieldResponse `json:"custom_fields_responses,omitempty"` - // The stages configuration for this request // Deprecated Stages *RequestItemStages `json:"stages,omitempty"` // The configured reviewer stages for every item in this request ReviewerStages []RequestReviewerStages `json:"reviewer_stages,omitempty"` + AdditionalProperties map[string]interface{} } type _Request Request @@ -485,6 +483,11 @@ func (o Request) ToMap() (map[string]interface{}, error) { if !IsNil(o.ReviewerStages) { toSerialize["reviewer_stages"] = o.ReviewerStages } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -517,9 +520,7 @@ func (o *Request) UnmarshalJSON(data []byte) (err error) { varRequest := _Request{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varRequest) + err = json.Unmarshal(data, &varRequest) if err != nil { return err @@ -527,6 +528,25 @@ func (o *Request) UnmarshalJSON(data []byte) (err error) { *o = Request(varRequest) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "id") + delete(additionalProperties, "created_at") + delete(additionalProperties, "updated_at") + delete(additionalProperties, "requester_id") + delete(additionalProperties, "target_user_id") + delete(additionalProperties, "target_group_id") + delete(additionalProperties, "status") + delete(additionalProperties, "reason") + delete(additionalProperties, "duration_minutes") + delete(additionalProperties, "requested_items_list") + delete(additionalProperties, "custom_fields_responses") + delete(additionalProperties, "stages") + delete(additionalProperties, "reviewer_stages") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_request_comment.go b/model_request_comment.go index 1245464..a347304 100644 --- a/model_request_comment.go +++ b/model_request_comment.go @@ -14,7 +14,6 @@ package opal import ( "encoding/json" "time" - "bytes" "fmt" ) @@ -35,6 +34,7 @@ type RequestComment struct { UserEmail *string `json:"user_email,omitempty"` // The content of the comment. Comment string `json:"comment"` + AdditionalProperties map[string]interface{} } type _RequestComment RequestComment @@ -240,6 +240,11 @@ func (o RequestComment) ToMap() (map[string]interface{}, error) { toSerialize["user_email"] = o.UserEmail } toSerialize["comment"] = o.Comment + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -270,9 +275,7 @@ func (o *RequestComment) UnmarshalJSON(data []byte) (err error) { varRequestComment := _RequestComment{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varRequestComment) + err = json.Unmarshal(data, &varRequestComment) if err != nil { return err @@ -280,6 +283,18 @@ func (o *RequestComment) UnmarshalJSON(data []byte) (err error) { *o = RequestComment(varRequestComment) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "created_at") + delete(additionalProperties, "request_id") + delete(additionalProperties, "user_id") + delete(additionalProperties, "user_full_name") + delete(additionalProperties, "user_email") + delete(additionalProperties, "comment") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_request_comment_list.go b/model_request_comment_list.go index ff8b4d1..9866905 100644 --- a/model_request_comment_list.go +++ b/model_request_comment_list.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -23,6 +22,7 @@ var _ MappedNullable = &RequestCommentList{} // RequestCommentList A paginated list of request comments type RequestCommentList struct { Comments []RequestComment `json:"comments"` + AdditionalProperties map[string]interface{} } type _RequestCommentList RequestCommentList @@ -80,6 +80,11 @@ func (o RequestCommentList) MarshalJSON() ([]byte, error) { func (o RequestCommentList) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["comments"] = o.Comments + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -107,9 +112,7 @@ func (o *RequestCommentList) UnmarshalJSON(data []byte) (err error) { varRequestCommentList := _RequestCommentList{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varRequestCommentList) + err = json.Unmarshal(data, &varRequestCommentList) if err != nil { return err @@ -117,6 +120,13 @@ func (o *RequestCommentList) UnmarshalJSON(data []byte) (err error) { *o = RequestCommentList(varRequestCommentList) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "comments") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_request_configuration.go b/model_request_configuration.go index 35d1920..84f0eb8 100644 --- a/model_request_configuration.go +++ b/model_request_configuration.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -22,7 +21,6 @@ var _ MappedNullable = &RequestConfiguration{} // RequestConfiguration # Request Configuration Object ### Description The `RequestConfiguration` object is used to represent a request configuration. ### Usage Example Returned from the `GET Request Configurations` endpoint. type RequestConfiguration struct { - // The condition for the request configuration. Condition *Condition `json:"condition,omitempty"` // A bool representing whether or not to allow requests for this resource. AllowRequests bool `json:"allow_requests"` @@ -44,6 +42,7 @@ type RequestConfiguration struct { ReviewerStages []ReviewerStage `json:"reviewer_stages,omitempty"` // The priority of the request configuration. Priority int32 `json:"priority"` + AdditionalProperties map[string]interface{} } type _RequestConfiguration RequestConfiguration @@ -415,6 +414,11 @@ func (o RequestConfiguration) ToMap() (map[string]interface{}, error) { toSerialize["reviewer_stages"] = o.ReviewerStages } toSerialize["priority"] = o.Priority + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -446,9 +450,7 @@ func (o *RequestConfiguration) UnmarshalJSON(data []byte) (err error) { varRequestConfiguration := _RequestConfiguration{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varRequestConfiguration) + err = json.Unmarshal(data, &varRequestConfiguration) if err != nil { return err @@ -456,6 +458,23 @@ func (o *RequestConfiguration) UnmarshalJSON(data []byte) (err error) { *o = RequestConfiguration(varRequestConfiguration) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "condition") + delete(additionalProperties, "allow_requests") + delete(additionalProperties, "auto_approval") + delete(additionalProperties, "require_mfa_to_request") + delete(additionalProperties, "max_duration_minutes") + delete(additionalProperties, "recommended_duration_minutes") + delete(additionalProperties, "require_support_ticket") + delete(additionalProperties, "extensions_duration_in_minutes") + delete(additionalProperties, "request_template_id") + delete(additionalProperties, "reviewer_stages") + delete(additionalProperties, "priority") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_request_connection.go b/model_request_connection.go index 655eef1..5b82562 100644 --- a/model_request_connection.go +++ b/model_request_connection.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -26,6 +25,7 @@ type RequestConnection struct { PageInfo PageInfo `json:"pageInfo"` // The total number of items available TotalCount int32 `json:"totalCount"` + AdditionalProperties map[string]interface{} } type _RequestConnection RequestConnection @@ -135,6 +135,11 @@ func (o RequestConnection) ToMap() (map[string]interface{}, error) { toSerialize["edges"] = o.Edges toSerialize["pageInfo"] = o.PageInfo toSerialize["totalCount"] = o.TotalCount + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -164,9 +169,7 @@ func (o *RequestConnection) UnmarshalJSON(data []byte) (err error) { varRequestConnection := _RequestConnection{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varRequestConnection) + err = json.Unmarshal(data, &varRequestConnection) if err != nil { return err @@ -174,6 +177,15 @@ func (o *RequestConnection) UnmarshalJSON(data []byte) (err error) { *o = RequestConnection(varRequestConnection) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "edges") + delete(additionalProperties, "pageInfo") + delete(additionalProperties, "totalCount") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_request_custom_field_response.go b/model_request_custom_field_response.go index adf8f8e..9219925 100644 --- a/model_request_custom_field_response.go +++ b/model_request_custom_field_response.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -25,6 +24,7 @@ type RequestCustomFieldResponse struct { FieldName string `json:"field_name"` FieldType RequestTemplateCustomFieldTypeEnum `json:"field_type"` FieldValue RequestCustomFieldResponseFieldValue `json:"field_value"` + AdditionalProperties map[string]interface{} } type _RequestCustomFieldResponse RequestCustomFieldResponse @@ -134,6 +134,11 @@ func (o RequestCustomFieldResponse) ToMap() (map[string]interface{}, error) { toSerialize["field_name"] = o.FieldName toSerialize["field_type"] = o.FieldType toSerialize["field_value"] = o.FieldValue + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -163,9 +168,7 @@ func (o *RequestCustomFieldResponse) UnmarshalJSON(data []byte) (err error) { varRequestCustomFieldResponse := _RequestCustomFieldResponse{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varRequestCustomFieldResponse) + err = json.Unmarshal(data, &varRequestCustomFieldResponse) if err != nil { return err @@ -173,6 +176,15 @@ func (o *RequestCustomFieldResponse) UnmarshalJSON(data []byte) (err error) { *o = RequestCustomFieldResponse(varRequestCustomFieldResponse) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "field_name") + delete(additionalProperties, "field_type") + delete(additionalProperties, "field_value") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_request_edge.go b/model_request_edge.go index 7695166..65f4175 100644 --- a/model_request_edge.go +++ b/model_request_edge.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -25,6 +24,7 @@ type RequestEdge struct { Node Request `json:"node"` // The cursor for this request edge Cursor string `json:"cursor"` + AdditionalProperties map[string]interface{} } type _RequestEdge RequestEdge @@ -108,6 +108,11 @@ func (o RequestEdge) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["node"] = o.Node toSerialize["cursor"] = o.Cursor + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -136,9 +141,7 @@ func (o *RequestEdge) UnmarshalJSON(data []byte) (err error) { varRequestEdge := _RequestEdge{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varRequestEdge) + err = json.Unmarshal(data, &varRequestEdge) if err != nil { return err @@ -146,6 +149,14 @@ func (o *RequestEdge) UnmarshalJSON(data []byte) (err error) { *o = RequestEdge(varRequestEdge) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "node") + delete(additionalProperties, "cursor") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_request_item_stages.go b/model_request_item_stages.go index 7132a83..4fd8877 100644 --- a/model_request_item_stages.go +++ b/model_request_item_stages.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -28,6 +27,7 @@ type RequestItemStages struct { RequestedItemName string `json:"requestedItemName"` // The stages of review for this request Stages []RequestStage `json:"stages"` + AdditionalProperties map[string]interface{} } type _RequestItemStages RequestItemStages @@ -146,6 +146,11 @@ func (o RequestItemStages) ToMap() (map[string]interface{}, error) { } toSerialize["requestedItemName"] = o.RequestedItemName toSerialize["stages"] = o.Stages + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -174,9 +179,7 @@ func (o *RequestItemStages) UnmarshalJSON(data []byte) (err error) { varRequestItemStages := _RequestItemStages{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varRequestItemStages) + err = json.Unmarshal(data, &varRequestItemStages) if err != nil { return err @@ -184,6 +187,15 @@ func (o *RequestItemStages) UnmarshalJSON(data []byte) (err error) { *o = RequestItemStages(varRequestItemStages) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "requestedRoleName") + delete(additionalProperties, "requestedItemName") + delete(additionalProperties, "stages") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_request_list.go b/model_request_list.go index fe9047e..976b9a8 100644 --- a/model_request_list.go +++ b/model_request_list.go @@ -24,8 +24,11 @@ type RequestList struct { Requests []Request `json:"requests,omitempty"` // The cursor to use in the next request to get the next page of results. Cursor *string `json:"cursor,omitempty"` + AdditionalProperties map[string]interface{} } +type _RequestList RequestList + // NewRequestList instantiates a new RequestList 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 @@ -123,9 +126,36 @@ func (o RequestList) ToMap() (map[string]interface{}, error) { if !IsNil(o.Cursor) { toSerialize["cursor"] = o.Cursor } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *RequestList) UnmarshalJSON(data []byte) (err error) { + varRequestList := _RequestList{} + + err = json.Unmarshal(data, &varRequestList) + + if err != nil { + return err + } + + *o = RequestList(varRequestList) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "requests") + delete(additionalProperties, "cursor") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableRequestList struct { value *RequestList isSet bool diff --git a/model_request_reviewer.go b/model_request_reviewer.go index 41bcd69..e1861e4 100644 --- a/model_request_reviewer.go +++ b/model_request_reviewer.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -28,6 +27,7 @@ type RequestReviewer struct { FullName *string `json:"full_name,omitempty"` // The status of this reviewer's review Status string `json:"status"` + AdditionalProperties map[string]interface{} } type _RequestReviewer RequestReviewer @@ -146,6 +146,11 @@ func (o RequestReviewer) ToMap() (map[string]interface{}, error) { toSerialize["full_name"] = o.FullName } toSerialize["status"] = o.Status + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -174,9 +179,7 @@ func (o *RequestReviewer) UnmarshalJSON(data []byte) (err error) { varRequestReviewer := _RequestReviewer{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varRequestReviewer) + err = json.Unmarshal(data, &varRequestReviewer) if err != nil { return err @@ -184,6 +187,15 @@ func (o *RequestReviewer) UnmarshalJSON(data []byte) (err error) { *o = RequestReviewer(varRequestReviewer) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "id") + delete(additionalProperties, "full_name") + delete(additionalProperties, "status") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_request_reviewer_stages.go b/model_request_reviewer_stages.go index 04905e1..a320e25 100644 --- a/model_request_reviewer_stages.go +++ b/model_request_reviewer_stages.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -32,6 +31,7 @@ type RequestReviewerStages struct { ItemId string `json:"item_id"` // The stages of review for this request Stages []RequestStage `json:"stages"` + AdditionalProperties map[string]interface{} } type _RequestReviewerStages RequestReviewerStages @@ -211,6 +211,11 @@ func (o RequestReviewerStages) ToMap() (map[string]interface{}, error) { toSerialize["item_name"] = o.ItemName toSerialize["item_id"] = o.ItemId toSerialize["stages"] = o.Stages + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -240,9 +245,7 @@ func (o *RequestReviewerStages) UnmarshalJSON(data []byte) (err error) { varRequestReviewerStages := _RequestReviewerStages{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varRequestReviewerStages) + err = json.Unmarshal(data, &varRequestReviewerStages) if err != nil { return err @@ -250,6 +253,17 @@ func (o *RequestReviewerStages) UnmarshalJSON(data []byte) (err error) { *o = RequestReviewerStages(varRequestReviewerStages) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "access_level_name") + delete(additionalProperties, "access_level_remote_id") + delete(additionalProperties, "item_name") + delete(additionalProperties, "item_id") + delete(additionalProperties, "stages") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_request_stage.go b/model_request_stage.go index c4de37c..27eea2c 100644 --- a/model_request_stage.go +++ b/model_request_stage.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -24,10 +23,10 @@ var _ MappedNullable = &RequestStage{} type RequestStage struct { // The stage number Stage int32 `json:"stage"` - // The operator to apply to reviewers in this stage Operator ReviewStageOperator `json:"operator"` // The reviewers for this stage Reviewers []RequestReviewer `json:"reviewers"` + AdditionalProperties map[string]interface{} } type _RequestStage RequestStage @@ -137,6 +136,11 @@ func (o RequestStage) ToMap() (map[string]interface{}, error) { toSerialize["stage"] = o.Stage toSerialize["operator"] = o.Operator toSerialize["reviewers"] = o.Reviewers + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -166,9 +170,7 @@ func (o *RequestStage) UnmarshalJSON(data []byte) (err error) { varRequestStage := _RequestStage{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varRequestStage) + err = json.Unmarshal(data, &varRequestStage) if err != nil { return err @@ -176,6 +178,15 @@ func (o *RequestStage) UnmarshalJSON(data []byte) (err error) { *o = RequestStage(varRequestStage) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "stage") + delete(additionalProperties, "operator") + delete(additionalProperties, "reviewers") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_requested_item.go b/model_requested_item.go index cc00de9..204255b 100644 --- a/model_requested_item.go +++ b/model_requested_item.go @@ -34,8 +34,11 @@ type RequestedItem struct { RemoteId *string `json:"remote_id,omitempty"` // The name of the target on the remote system. RemoteName *string `json:"remote_name,omitempty"` + AdditionalProperties map[string]interface{} } +type _RequestedItem RequestedItem + // NewRequestedItem instantiates a new RequestedItem 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 @@ -308,9 +311,41 @@ func (o RequestedItem) ToMap() (map[string]interface{}, error) { if !IsNil(o.RemoteName) { toSerialize["remote_name"] = o.RemoteName } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *RequestedItem) UnmarshalJSON(data []byte) (err error) { + varRequestedItem := _RequestedItem{} + + err = json.Unmarshal(data, &varRequestedItem) + + if err != nil { + return err + } + + *o = RequestedItem(varRequestedItem) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "resource_id") + delete(additionalProperties, "group_id") + delete(additionalProperties, "access_level_name") + delete(additionalProperties, "access_level_remote_id") + delete(additionalProperties, "name") + delete(additionalProperties, "remote_id") + delete(additionalProperties, "remote_name") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableRequestedItem struct { value *RequestedItem isSet bool diff --git a/model_resource.go b/model_resource.go index ed12f25..7a8442f 100644 --- a/model_resource.go +++ b/model_resource.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -82,8 +81,8 @@ type Resource struct { AncestorResourceIds []string `json:"ancestor_resource_ids,omitempty"` // List of resource IDs that are descendants of this resource. DescendantResourceIds []string `json:"descendant_resource_ids,omitempty"` - // Information about the last successful sync of this resource. LastSuccessfulSync *SyncTask `json:"last_successful_sync,omitempty"` + AdditionalProperties map[string]interface{} } type _Resource Resource @@ -1232,6 +1231,11 @@ func (o Resource) ToMap() (map[string]interface{}, error) { if !IsNil(o.LastSuccessfulSync) { toSerialize["last_successful_sync"] = o.LastSuccessfulSync } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -1259,9 +1263,7 @@ func (o *Resource) UnmarshalJSON(data []byte) (err error) { varResource := _Resource{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varResource) + err = json.Unmarshal(data, &varResource) if err != nil { return err @@ -1269,6 +1271,44 @@ func (o *Resource) UnmarshalJSON(data []byte) (err error) { *o = Resource(varResource) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "resource_id") + delete(additionalProperties, "app_id") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "admin_owner_id") + delete(additionalProperties, "remote_resource_id") + delete(additionalProperties, "remote_resource_name") + delete(additionalProperties, "resource_type") + delete(additionalProperties, "max_duration") + delete(additionalProperties, "recommended_duration") + delete(additionalProperties, "extensions_duration_in_minutes") + delete(additionalProperties, "require_manager_approval") + delete(additionalProperties, "require_support_ticket") + delete(additionalProperties, "require_mfa_to_approve") + delete(additionalProperties, "require_mfa_to_request") + delete(additionalProperties, "require_mfa_to_connect") + delete(additionalProperties, "auto_approval") + delete(additionalProperties, "request_template_id") + delete(additionalProperties, "is_requestable") + delete(additionalProperties, "parent_resource_id") + delete(additionalProperties, "configuration_template_id") + delete(additionalProperties, "request_configurations") + delete(additionalProperties, "request_configuration_list") + delete(additionalProperties, "ticket_propagation") + delete(additionalProperties, "custom_request_notification") + delete(additionalProperties, "risk_sensitivity") + delete(additionalProperties, "risk_sensitivity_override") + delete(additionalProperties, "metadata") + delete(additionalProperties, "remote_info") + delete(additionalProperties, "ancestor_resource_ids") + delete(additionalProperties, "descendant_resource_ids") + delete(additionalProperties, "last_successful_sync") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_resource_access_level.go b/model_resource_access_level.go index 52620c1..902ddcb 100644 --- a/model_resource_access_level.go +++ b/model_resource_access_level.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -26,6 +25,7 @@ type ResourceAccessLevel struct { AccessLevelName string `json:"access_level_name"` // The machine-readable identifier of the access level. AccessLevelRemoteId string `json:"access_level_remote_id"` + AdditionalProperties map[string]interface{} } type _ResourceAccessLevel ResourceAccessLevel @@ -109,6 +109,11 @@ func (o ResourceAccessLevel) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["access_level_name"] = o.AccessLevelName toSerialize["access_level_remote_id"] = o.AccessLevelRemoteId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -137,9 +142,7 @@ func (o *ResourceAccessLevel) UnmarshalJSON(data []byte) (err error) { varResourceAccessLevel := _ResourceAccessLevel{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varResourceAccessLevel) + err = json.Unmarshal(data, &varResourceAccessLevel) if err != nil { return err @@ -147,6 +150,14 @@ func (o *ResourceAccessLevel) UnmarshalJSON(data []byte) (err error) { *o = ResourceAccessLevel(varResourceAccessLevel) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "access_level_name") + delete(additionalProperties, "access_level_remote_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_resource_access_user.go b/model_resource_access_user.go index f806187..253b65b 100644 --- a/model_resource_access_user.go +++ b/model_resource_access_user.go @@ -14,7 +14,6 @@ package opal import ( "encoding/json" "time" - "bytes" "fmt" ) @@ -39,6 +38,7 @@ type ResourceAccessUser struct { // The number of ways in which the user has access through this resource (directly and indirectly). NumAccessPaths int32 `json:"num_access_paths"` PropagationStatus *PropagationStatus `json:"propagation_status,omitempty"` + AdditionalProperties map[string]interface{} } type _ResourceAccessUser ResourceAccessUser @@ -322,6 +322,11 @@ func (o ResourceAccessUser) ToMap() (map[string]interface{}, error) { if !IsNil(o.PropagationStatus) { toSerialize["propagation_status"] = o.PropagationStatus } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -355,9 +360,7 @@ func (o *ResourceAccessUser) UnmarshalJSON(data []byte) (err error) { varResourceAccessUser := _ResourceAccessUser{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varResourceAccessUser) + err = json.Unmarshal(data, &varResourceAccessUser) if err != nil { return err @@ -365,6 +368,21 @@ func (o *ResourceAccessUser) UnmarshalJSON(data []byte) (err error) { *o = ResourceAccessUser(varResourceAccessUser) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "resource_id") + delete(additionalProperties, "user_id") + delete(additionalProperties, "access_level") + delete(additionalProperties, "full_name") + delete(additionalProperties, "email") + delete(additionalProperties, "expiration_date") + delete(additionalProperties, "has_direct_access") + delete(additionalProperties, "num_access_paths") + delete(additionalProperties, "propagation_status") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_resource_access_user_list.go b/model_resource_access_user_list.go index ab52a63..da5f0bc 100644 --- a/model_resource_access_user_list.go +++ b/model_resource_access_user_list.go @@ -25,8 +25,11 @@ type ResourceAccessUserList struct { // The cursor used to obtain the current result page. Previous *string `json:"previous,omitempty"` Results []ResourceAccessUser `json:"results,omitempty"` + AdditionalProperties map[string]interface{} } +type _ResourceAccessUserList ResourceAccessUserList + // NewResourceAccessUserList instantiates a new ResourceAccessUserList 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 @@ -159,9 +162,37 @@ func (o ResourceAccessUserList) ToMap() (map[string]interface{}, error) { if !IsNil(o.Results) { toSerialize["results"] = o.Results } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *ResourceAccessUserList) UnmarshalJSON(data []byte) (err error) { + varResourceAccessUserList := _ResourceAccessUserList{} + + err = json.Unmarshal(data, &varResourceAccessUserList) + + if err != nil { + return err + } + + *o = ResourceAccessUserList(varResourceAccessUserList) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableResourceAccessUserList struct { value *ResourceAccessUserList isSet bool diff --git a/model_resource_nhi.go b/model_resource_nhi.go index 95a3703..673b0bb 100644 --- a/model_resource_nhi.go +++ b/model_resource_nhi.go @@ -14,7 +14,6 @@ package opal import ( "encoding/json" "time" - "bytes" "fmt" ) @@ -30,6 +29,7 @@ type ResourceNHI struct { AccessLevel *ResourceAccessLevel `json:"access_level,omitempty"` // The day and time the non-human identity's access will expire. ExpirationDate *time.Time `json:"expiration_date,omitempty"` + AdditionalProperties map[string]interface{} } type _ResourceNHI ResourceNHI @@ -183,6 +183,11 @@ func (o ResourceNHI) ToMap() (map[string]interface{}, error) { if !IsNil(o.ExpirationDate) { toSerialize["expiration_date"] = o.ExpirationDate } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -211,9 +216,7 @@ func (o *ResourceNHI) UnmarshalJSON(data []byte) (err error) { varResourceNHI := _ResourceNHI{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varResourceNHI) + err = json.Unmarshal(data, &varResourceNHI) if err != nil { return err @@ -221,6 +224,16 @@ func (o *ResourceNHI) UnmarshalJSON(data []byte) (err error) { *o = ResourceNHI(varResourceNHI) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "resource_id") + delete(additionalProperties, "non_human_identity_id") + delete(additionalProperties, "access_level") + delete(additionalProperties, "expiration_date") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_resource_remote_info.go b/model_resource_remote_info.go index 2db6e09..0eb46cb 100644 --- a/model_resource_remote_info.go +++ b/model_resource_remote_info.go @@ -52,8 +52,11 @@ type ResourceRemoteInfo struct { TeleportRole *ResourceRemoteInfoTeleportRole `json:"teleport_role,omitempty"` DatastaxAstraRole *ResourceRemoteInfoDatastaxAstraRole `json:"datastax_astra_role,omitempty"` CoupaRole *ResourceRemoteInfoCoupaRole `json:"coupa_role,omitempty"` + AdditionalProperties map[string]interface{} } +type _ResourceRemoteInfo ResourceRemoteInfo + // NewResourceRemoteInfo instantiates a new ResourceRemoteInfo 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 @@ -1201,9 +1204,66 @@ func (o ResourceRemoteInfo) ToMap() (map[string]interface{}, error) { if !IsNil(o.CoupaRole) { toSerialize["coupa_role"] = o.CoupaRole } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *ResourceRemoteInfo) UnmarshalJSON(data []byte) (err error) { + varResourceRemoteInfo := _ResourceRemoteInfo{} + + err = json.Unmarshal(data, &varResourceRemoteInfo) + + if err != nil { + return err + } + + *o = ResourceRemoteInfo(varResourceRemoteInfo) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "aws_organizational_unit") + delete(additionalProperties, "aws_account") + delete(additionalProperties, "aws_permission_set") + delete(additionalProperties, "aws_iam_role") + delete(additionalProperties, "aws_ec2_instance") + delete(additionalProperties, "aws_rds_instance") + delete(additionalProperties, "aws_eks_cluster") + delete(additionalProperties, "custom_connector") + delete(additionalProperties, "gcp_organization") + delete(additionalProperties, "gcp_bucket") + delete(additionalProperties, "gcp_compute_instance") + delete(additionalProperties, "gcp_big_query_dataset") + delete(additionalProperties, "gcp_big_query_table") + delete(additionalProperties, "gcp_folder") + delete(additionalProperties, "gcp_gke_cluster") + delete(additionalProperties, "gcp_project") + delete(additionalProperties, "gcp_sql_instance") + delete(additionalProperties, "gcp_service_account") + delete(additionalProperties, "google_workspace_role") + delete(additionalProperties, "github_repo") + delete(additionalProperties, "github_org_role") + delete(additionalProperties, "gitlab_project") + delete(additionalProperties, "okta_app") + delete(additionalProperties, "okta_standard_role") + delete(additionalProperties, "okta_custom_role") + delete(additionalProperties, "pagerduty_role") + delete(additionalProperties, "salesforce_permission_set") + delete(additionalProperties, "salesforce_profile") + delete(additionalProperties, "salesforce_role") + delete(additionalProperties, "teleport_role") + delete(additionalProperties, "datastax_astra_role") + delete(additionalProperties, "coupa_role") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableResourceRemoteInfo struct { value *ResourceRemoteInfo isSet bool diff --git a/model_resource_remote_info_aws_account.go b/model_resource_remote_info_aws_account.go index 7e9be4c..46cfb22 100644 --- a/model_resource_remote_info_aws_account.go +++ b/model_resource_remote_info_aws_account.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -26,6 +25,7 @@ type ResourceRemoteInfoAwsAccount struct { AccountId string `json:"account_id"` // The id of the AWS organizational unit. Required only if customer has OUs enabled. OrganizationalUnitId *string `json:"organizational_unit_id,omitempty"` + AdditionalProperties map[string]interface{} } type _ResourceRemoteInfoAwsAccount ResourceRemoteInfoAwsAccount @@ -118,6 +118,11 @@ func (o ResourceRemoteInfoAwsAccount) ToMap() (map[string]interface{}, error) { if !IsNil(o.OrganizationalUnitId) { toSerialize["organizational_unit_id"] = o.OrganizationalUnitId } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -145,9 +150,7 @@ func (o *ResourceRemoteInfoAwsAccount) UnmarshalJSON(data []byte) (err error) { varResourceRemoteInfoAwsAccount := _ResourceRemoteInfoAwsAccount{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varResourceRemoteInfoAwsAccount) + err = json.Unmarshal(data, &varResourceRemoteInfoAwsAccount) if err != nil { return err @@ -155,6 +158,14 @@ func (o *ResourceRemoteInfoAwsAccount) UnmarshalJSON(data []byte) (err error) { *o = ResourceRemoteInfoAwsAccount(varResourceRemoteInfoAwsAccount) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "account_id") + delete(additionalProperties, "organizational_unit_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_resource_remote_info_aws_ec2_instance.go b/model_resource_remote_info_aws_ec2_instance.go index 029e4ab..13eda33 100644 --- a/model_resource_remote_info_aws_ec2_instance.go +++ b/model_resource_remote_info_aws_ec2_instance.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -28,6 +27,7 @@ type ResourceRemoteInfoAwsEc2Instance struct { Region string `json:"region"` // The id of the AWS account. Required for AWS Organizations. AccountId *string `json:"account_id,omitempty"` + AdditionalProperties map[string]interface{} } type _ResourceRemoteInfoAwsEc2Instance ResourceRemoteInfoAwsEc2Instance @@ -146,6 +146,11 @@ func (o ResourceRemoteInfoAwsEc2Instance) ToMap() (map[string]interface{}, error if !IsNil(o.AccountId) { toSerialize["account_id"] = o.AccountId } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -174,9 +179,7 @@ func (o *ResourceRemoteInfoAwsEc2Instance) UnmarshalJSON(data []byte) (err error varResourceRemoteInfoAwsEc2Instance := _ResourceRemoteInfoAwsEc2Instance{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varResourceRemoteInfoAwsEc2Instance) + err = json.Unmarshal(data, &varResourceRemoteInfoAwsEc2Instance) if err != nil { return err @@ -184,6 +187,15 @@ func (o *ResourceRemoteInfoAwsEc2Instance) UnmarshalJSON(data []byte) (err error *o = ResourceRemoteInfoAwsEc2Instance(varResourceRemoteInfoAwsEc2Instance) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "instance_id") + delete(additionalProperties, "region") + delete(additionalProperties, "account_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_resource_remote_info_aws_eks_cluster.go b/model_resource_remote_info_aws_eks_cluster.go index 2ce2a19..c5a343a 100644 --- a/model_resource_remote_info_aws_eks_cluster.go +++ b/model_resource_remote_info_aws_eks_cluster.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -26,6 +25,7 @@ type ResourceRemoteInfoAwsEksCluster struct { Arn string `json:"arn"` // The id of the AWS account. Required for AWS Organizations. AccountId *string `json:"account_id,omitempty"` + AdditionalProperties map[string]interface{} } type _ResourceRemoteInfoAwsEksCluster ResourceRemoteInfoAwsEksCluster @@ -118,6 +118,11 @@ func (o ResourceRemoteInfoAwsEksCluster) ToMap() (map[string]interface{}, error) if !IsNil(o.AccountId) { toSerialize["account_id"] = o.AccountId } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -145,9 +150,7 @@ func (o *ResourceRemoteInfoAwsEksCluster) UnmarshalJSON(data []byte) (err error) varResourceRemoteInfoAwsEksCluster := _ResourceRemoteInfoAwsEksCluster{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varResourceRemoteInfoAwsEksCluster) + err = json.Unmarshal(data, &varResourceRemoteInfoAwsEksCluster) if err != nil { return err @@ -155,6 +158,14 @@ func (o *ResourceRemoteInfoAwsEksCluster) UnmarshalJSON(data []byte) (err error) *o = ResourceRemoteInfoAwsEksCluster(varResourceRemoteInfoAwsEksCluster) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "arn") + delete(additionalProperties, "account_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_resource_remote_info_aws_iam_role.go b/model_resource_remote_info_aws_iam_role.go index 24605e3..557d1e5 100644 --- a/model_resource_remote_info_aws_iam_role.go +++ b/model_resource_remote_info_aws_iam_role.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -26,6 +25,7 @@ type ResourceRemoteInfoAwsIamRole struct { Arn string `json:"arn"` // The id of the AWS account. Required for AWS Organizations. AccountId *string `json:"account_id,omitempty"` + AdditionalProperties map[string]interface{} } type _ResourceRemoteInfoAwsIamRole ResourceRemoteInfoAwsIamRole @@ -118,6 +118,11 @@ func (o ResourceRemoteInfoAwsIamRole) ToMap() (map[string]interface{}, error) { if !IsNil(o.AccountId) { toSerialize["account_id"] = o.AccountId } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -145,9 +150,7 @@ func (o *ResourceRemoteInfoAwsIamRole) UnmarshalJSON(data []byte) (err error) { varResourceRemoteInfoAwsIamRole := _ResourceRemoteInfoAwsIamRole{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varResourceRemoteInfoAwsIamRole) + err = json.Unmarshal(data, &varResourceRemoteInfoAwsIamRole) if err != nil { return err @@ -155,6 +158,14 @@ func (o *ResourceRemoteInfoAwsIamRole) UnmarshalJSON(data []byte) (err error) { *o = ResourceRemoteInfoAwsIamRole(varResourceRemoteInfoAwsIamRole) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "arn") + delete(additionalProperties, "account_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_resource_remote_info_aws_organizational_unit.go b/model_resource_remote_info_aws_organizational_unit.go index b3b6c25..5245119 100644 --- a/model_resource_remote_info_aws_organizational_unit.go +++ b/model_resource_remote_info_aws_organizational_unit.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -26,6 +25,7 @@ type ResourceRemoteInfoAwsOrganizationalUnit struct { ParentId *string `json:"parent_id,omitempty"` // The id of the AWS organizational unit that is being created. OrganizationalUnitId string `json:"organizational_unit_id"` + AdditionalProperties map[string]interface{} } type _ResourceRemoteInfoAwsOrganizationalUnit ResourceRemoteInfoAwsOrganizationalUnit @@ -118,6 +118,11 @@ func (o ResourceRemoteInfoAwsOrganizationalUnit) ToMap() (map[string]interface{} toSerialize["parent_id"] = o.ParentId } toSerialize["organizational_unit_id"] = o.OrganizationalUnitId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -145,9 +150,7 @@ func (o *ResourceRemoteInfoAwsOrganizationalUnit) UnmarshalJSON(data []byte) (er varResourceRemoteInfoAwsOrganizationalUnit := _ResourceRemoteInfoAwsOrganizationalUnit{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varResourceRemoteInfoAwsOrganizationalUnit) + err = json.Unmarshal(data, &varResourceRemoteInfoAwsOrganizationalUnit) if err != nil { return err @@ -155,6 +158,14 @@ func (o *ResourceRemoteInfoAwsOrganizationalUnit) UnmarshalJSON(data []byte) (er *o = ResourceRemoteInfoAwsOrganizationalUnit(varResourceRemoteInfoAwsOrganizationalUnit) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "parent_id") + delete(additionalProperties, "organizational_unit_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_resource_remote_info_aws_permission_set.go b/model_resource_remote_info_aws_permission_set.go index cf19814..0c4a66d 100644 --- a/model_resource_remote_info_aws_permission_set.go +++ b/model_resource_remote_info_aws_permission_set.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -26,6 +25,7 @@ type ResourceRemoteInfoAwsPermissionSet struct { Arn string `json:"arn"` // The ID of an AWS account to which this permission set is provisioned. AccountId string `json:"account_id"` + AdditionalProperties map[string]interface{} } type _ResourceRemoteInfoAwsPermissionSet ResourceRemoteInfoAwsPermissionSet @@ -109,6 +109,11 @@ func (o ResourceRemoteInfoAwsPermissionSet) ToMap() (map[string]interface{}, err toSerialize := map[string]interface{}{} toSerialize["arn"] = o.Arn toSerialize["account_id"] = o.AccountId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -137,9 +142,7 @@ func (o *ResourceRemoteInfoAwsPermissionSet) UnmarshalJSON(data []byte) (err err varResourceRemoteInfoAwsPermissionSet := _ResourceRemoteInfoAwsPermissionSet{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varResourceRemoteInfoAwsPermissionSet) + err = json.Unmarshal(data, &varResourceRemoteInfoAwsPermissionSet) if err != nil { return err @@ -147,6 +150,14 @@ func (o *ResourceRemoteInfoAwsPermissionSet) UnmarshalJSON(data []byte) (err err *o = ResourceRemoteInfoAwsPermissionSet(varResourceRemoteInfoAwsPermissionSet) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "arn") + delete(additionalProperties, "account_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_resource_remote_info_aws_rds_instance.go b/model_resource_remote_info_aws_rds_instance.go index 148c58e..f240cb7 100644 --- a/model_resource_remote_info_aws_rds_instance.go +++ b/model_resource_remote_info_aws_rds_instance.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -30,6 +29,7 @@ type ResourceRemoteInfoAwsRdsInstance struct { ResourceId string `json:"resource_id"` // The id of the AWS account. Required for AWS Organizations. AccountId *string `json:"account_id,omitempty"` + AdditionalProperties map[string]interface{} } type _ResourceRemoteInfoAwsRdsInstance ResourceRemoteInfoAwsRdsInstance @@ -174,6 +174,11 @@ func (o ResourceRemoteInfoAwsRdsInstance) ToMap() (map[string]interface{}, error if !IsNil(o.AccountId) { toSerialize["account_id"] = o.AccountId } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -203,9 +208,7 @@ func (o *ResourceRemoteInfoAwsRdsInstance) UnmarshalJSON(data []byte) (err error varResourceRemoteInfoAwsRdsInstance := _ResourceRemoteInfoAwsRdsInstance{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varResourceRemoteInfoAwsRdsInstance) + err = json.Unmarshal(data, &varResourceRemoteInfoAwsRdsInstance) if err != nil { return err @@ -213,6 +216,16 @@ func (o *ResourceRemoteInfoAwsRdsInstance) UnmarshalJSON(data []byte) (err error *o = ResourceRemoteInfoAwsRdsInstance(varResourceRemoteInfoAwsRdsInstance) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "instance_id") + delete(additionalProperties, "region") + delete(additionalProperties, "resource_id") + delete(additionalProperties, "account_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_resource_remote_info_coupa_role.go b/model_resource_remote_info_coupa_role.go index 2a71383..01f181c 100644 --- a/model_resource_remote_info_coupa_role.go +++ b/model_resource_remote_info_coupa_role.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -24,6 +23,7 @@ var _ MappedNullable = &ResourceRemoteInfoCoupaRole{} type ResourceRemoteInfoCoupaRole struct { // The id of the role. RoleId string `json:"role_id"` + AdditionalProperties map[string]interface{} } type _ResourceRemoteInfoCoupaRole ResourceRemoteInfoCoupaRole @@ -81,6 +81,11 @@ func (o ResourceRemoteInfoCoupaRole) MarshalJSON() ([]byte, error) { func (o ResourceRemoteInfoCoupaRole) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["role_id"] = o.RoleId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -108,9 +113,7 @@ func (o *ResourceRemoteInfoCoupaRole) UnmarshalJSON(data []byte) (err error) { varResourceRemoteInfoCoupaRole := _ResourceRemoteInfoCoupaRole{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varResourceRemoteInfoCoupaRole) + err = json.Unmarshal(data, &varResourceRemoteInfoCoupaRole) if err != nil { return err @@ -118,6 +121,13 @@ func (o *ResourceRemoteInfoCoupaRole) UnmarshalJSON(data []byte) (err error) { *o = ResourceRemoteInfoCoupaRole(varResourceRemoteInfoCoupaRole) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "role_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_resource_remote_info_custom_connector.go b/model_resource_remote_info_custom_connector.go index 278c7a6..c9bab0e 100644 --- a/model_resource_remote_info_custom_connector.go +++ b/model_resource_remote_info_custom_connector.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -26,6 +25,7 @@ type ResourceRemoteInfoCustomConnector struct { RemoteResourceId string `json:"remote_resource_id"` // A bool representing whether or not the resource can have usage data. CanHaveUsageEvents bool `json:"can_have_usage_events"` + AdditionalProperties map[string]interface{} } type _ResourceRemoteInfoCustomConnector ResourceRemoteInfoCustomConnector @@ -109,6 +109,11 @@ func (o ResourceRemoteInfoCustomConnector) ToMap() (map[string]interface{}, erro toSerialize := map[string]interface{}{} toSerialize["remote_resource_id"] = o.RemoteResourceId toSerialize["can_have_usage_events"] = o.CanHaveUsageEvents + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -137,9 +142,7 @@ func (o *ResourceRemoteInfoCustomConnector) UnmarshalJSON(data []byte) (err erro varResourceRemoteInfoCustomConnector := _ResourceRemoteInfoCustomConnector{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varResourceRemoteInfoCustomConnector) + err = json.Unmarshal(data, &varResourceRemoteInfoCustomConnector) if err != nil { return err @@ -147,6 +150,14 @@ func (o *ResourceRemoteInfoCustomConnector) UnmarshalJSON(data []byte) (err erro *o = ResourceRemoteInfoCustomConnector(varResourceRemoteInfoCustomConnector) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "remote_resource_id") + delete(additionalProperties, "can_have_usage_events") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_resource_remote_info_datastax_astra_role.go b/model_resource_remote_info_datastax_astra_role.go index 6516a3c..e9258dd 100644 --- a/model_resource_remote_info_datastax_astra_role.go +++ b/model_resource_remote_info_datastax_astra_role.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -24,6 +23,7 @@ var _ MappedNullable = &ResourceRemoteInfoDatastaxAstraRole{} type ResourceRemoteInfoDatastaxAstraRole struct { // The id of the role. RoleId string `json:"role_id"` + AdditionalProperties map[string]interface{} } type _ResourceRemoteInfoDatastaxAstraRole ResourceRemoteInfoDatastaxAstraRole @@ -81,6 +81,11 @@ func (o ResourceRemoteInfoDatastaxAstraRole) MarshalJSON() ([]byte, error) { func (o ResourceRemoteInfoDatastaxAstraRole) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["role_id"] = o.RoleId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -108,9 +113,7 @@ func (o *ResourceRemoteInfoDatastaxAstraRole) UnmarshalJSON(data []byte) (err er varResourceRemoteInfoDatastaxAstraRole := _ResourceRemoteInfoDatastaxAstraRole{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varResourceRemoteInfoDatastaxAstraRole) + err = json.Unmarshal(data, &varResourceRemoteInfoDatastaxAstraRole) if err != nil { return err @@ -118,6 +121,13 @@ func (o *ResourceRemoteInfoDatastaxAstraRole) UnmarshalJSON(data []byte) (err er *o = ResourceRemoteInfoDatastaxAstraRole(varResourceRemoteInfoDatastaxAstraRole) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "role_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_resource_remote_info_gcp_big_query_dataset.go b/model_resource_remote_info_gcp_big_query_dataset.go index 92527e7..0109e99 100644 --- a/model_resource_remote_info_gcp_big_query_dataset.go +++ b/model_resource_remote_info_gcp_big_query_dataset.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -26,6 +25,7 @@ type ResourceRemoteInfoGcpBigQueryDataset struct { ProjectId string `json:"project_id"` // The id of the dataset. DatasetId string `json:"dataset_id"` + AdditionalProperties map[string]interface{} } type _ResourceRemoteInfoGcpBigQueryDataset ResourceRemoteInfoGcpBigQueryDataset @@ -109,6 +109,11 @@ func (o ResourceRemoteInfoGcpBigQueryDataset) ToMap() (map[string]interface{}, e toSerialize := map[string]interface{}{} toSerialize["project_id"] = o.ProjectId toSerialize["dataset_id"] = o.DatasetId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -137,9 +142,7 @@ func (o *ResourceRemoteInfoGcpBigQueryDataset) UnmarshalJSON(data []byte) (err e varResourceRemoteInfoGcpBigQueryDataset := _ResourceRemoteInfoGcpBigQueryDataset{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varResourceRemoteInfoGcpBigQueryDataset) + err = json.Unmarshal(data, &varResourceRemoteInfoGcpBigQueryDataset) if err != nil { return err @@ -147,6 +150,14 @@ func (o *ResourceRemoteInfoGcpBigQueryDataset) UnmarshalJSON(data []byte) (err e *o = ResourceRemoteInfoGcpBigQueryDataset(varResourceRemoteInfoGcpBigQueryDataset) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "project_id") + delete(additionalProperties, "dataset_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_resource_remote_info_gcp_big_query_table.go b/model_resource_remote_info_gcp_big_query_table.go index 307d0b0..c79bb3d 100644 --- a/model_resource_remote_info_gcp_big_query_table.go +++ b/model_resource_remote_info_gcp_big_query_table.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -28,6 +27,7 @@ type ResourceRemoteInfoGcpBigQueryTable struct { DatasetId string `json:"dataset_id"` // The id of the table. TableId string `json:"table_id"` + AdditionalProperties map[string]interface{} } type _ResourceRemoteInfoGcpBigQueryTable ResourceRemoteInfoGcpBigQueryTable @@ -137,6 +137,11 @@ func (o ResourceRemoteInfoGcpBigQueryTable) ToMap() (map[string]interface{}, err toSerialize["project_id"] = o.ProjectId toSerialize["dataset_id"] = o.DatasetId toSerialize["table_id"] = o.TableId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -166,9 +171,7 @@ func (o *ResourceRemoteInfoGcpBigQueryTable) UnmarshalJSON(data []byte) (err err varResourceRemoteInfoGcpBigQueryTable := _ResourceRemoteInfoGcpBigQueryTable{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varResourceRemoteInfoGcpBigQueryTable) + err = json.Unmarshal(data, &varResourceRemoteInfoGcpBigQueryTable) if err != nil { return err @@ -176,6 +179,15 @@ func (o *ResourceRemoteInfoGcpBigQueryTable) UnmarshalJSON(data []byte) (err err *o = ResourceRemoteInfoGcpBigQueryTable(varResourceRemoteInfoGcpBigQueryTable) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "project_id") + delete(additionalProperties, "dataset_id") + delete(additionalProperties, "table_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_resource_remote_info_gcp_bucket.go b/model_resource_remote_info_gcp_bucket.go index 970478f..1330949 100644 --- a/model_resource_remote_info_gcp_bucket.go +++ b/model_resource_remote_info_gcp_bucket.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -24,6 +23,7 @@ var _ MappedNullable = &ResourceRemoteInfoGcpBucket{} type ResourceRemoteInfoGcpBucket struct { // The id of the bucket. BucketId string `json:"bucket_id"` + AdditionalProperties map[string]interface{} } type _ResourceRemoteInfoGcpBucket ResourceRemoteInfoGcpBucket @@ -81,6 +81,11 @@ func (o ResourceRemoteInfoGcpBucket) MarshalJSON() ([]byte, error) { func (o ResourceRemoteInfoGcpBucket) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["bucket_id"] = o.BucketId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -108,9 +113,7 @@ func (o *ResourceRemoteInfoGcpBucket) UnmarshalJSON(data []byte) (err error) { varResourceRemoteInfoGcpBucket := _ResourceRemoteInfoGcpBucket{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varResourceRemoteInfoGcpBucket) + err = json.Unmarshal(data, &varResourceRemoteInfoGcpBucket) if err != nil { return err @@ -118,6 +121,13 @@ func (o *ResourceRemoteInfoGcpBucket) UnmarshalJSON(data []byte) (err error) { *o = ResourceRemoteInfoGcpBucket(varResourceRemoteInfoGcpBucket) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "bucket_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_resource_remote_info_gcp_compute_instance.go b/model_resource_remote_info_gcp_compute_instance.go index 77c5d6d..09ac6d4 100644 --- a/model_resource_remote_info_gcp_compute_instance.go +++ b/model_resource_remote_info_gcp_compute_instance.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -28,6 +27,7 @@ type ResourceRemoteInfoGcpComputeInstance struct { ProjectId string `json:"project_id"` // The zone the instance is in. Zone string `json:"zone"` + AdditionalProperties map[string]interface{} } type _ResourceRemoteInfoGcpComputeInstance ResourceRemoteInfoGcpComputeInstance @@ -137,6 +137,11 @@ func (o ResourceRemoteInfoGcpComputeInstance) ToMap() (map[string]interface{}, e toSerialize["instance_id"] = o.InstanceId toSerialize["project_id"] = o.ProjectId toSerialize["zone"] = o.Zone + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -166,9 +171,7 @@ func (o *ResourceRemoteInfoGcpComputeInstance) UnmarshalJSON(data []byte) (err e varResourceRemoteInfoGcpComputeInstance := _ResourceRemoteInfoGcpComputeInstance{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varResourceRemoteInfoGcpComputeInstance) + err = json.Unmarshal(data, &varResourceRemoteInfoGcpComputeInstance) if err != nil { return err @@ -176,6 +179,15 @@ func (o *ResourceRemoteInfoGcpComputeInstance) UnmarshalJSON(data []byte) (err e *o = ResourceRemoteInfoGcpComputeInstance(varResourceRemoteInfoGcpComputeInstance) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "instance_id") + delete(additionalProperties, "project_id") + delete(additionalProperties, "zone") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_resource_remote_info_gcp_folder.go b/model_resource_remote_info_gcp_folder.go index 1e1ce9c..a5a3e13 100644 --- a/model_resource_remote_info_gcp_folder.go +++ b/model_resource_remote_info_gcp_folder.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -24,6 +23,7 @@ var _ MappedNullable = &ResourceRemoteInfoGcpFolder{} type ResourceRemoteInfoGcpFolder struct { // The id of the folder. FolderId string `json:"folder_id"` + AdditionalProperties map[string]interface{} } type _ResourceRemoteInfoGcpFolder ResourceRemoteInfoGcpFolder @@ -81,6 +81,11 @@ func (o ResourceRemoteInfoGcpFolder) MarshalJSON() ([]byte, error) { func (o ResourceRemoteInfoGcpFolder) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["folder_id"] = o.FolderId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -108,9 +113,7 @@ func (o *ResourceRemoteInfoGcpFolder) UnmarshalJSON(data []byte) (err error) { varResourceRemoteInfoGcpFolder := _ResourceRemoteInfoGcpFolder{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varResourceRemoteInfoGcpFolder) + err = json.Unmarshal(data, &varResourceRemoteInfoGcpFolder) if err != nil { return err @@ -118,6 +121,13 @@ func (o *ResourceRemoteInfoGcpFolder) UnmarshalJSON(data []byte) (err error) { *o = ResourceRemoteInfoGcpFolder(varResourceRemoteInfoGcpFolder) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "folder_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_resource_remote_info_gcp_gke_cluster.go b/model_resource_remote_info_gcp_gke_cluster.go index 8bd028a..50317af 100644 --- a/model_resource_remote_info_gcp_gke_cluster.go +++ b/model_resource_remote_info_gcp_gke_cluster.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -24,6 +23,7 @@ var _ MappedNullable = &ResourceRemoteInfoGcpGkeCluster{} type ResourceRemoteInfoGcpGkeCluster struct { // The name of the GKE cluster. ClusterName string `json:"cluster_name"` + AdditionalProperties map[string]interface{} } type _ResourceRemoteInfoGcpGkeCluster ResourceRemoteInfoGcpGkeCluster @@ -81,6 +81,11 @@ func (o ResourceRemoteInfoGcpGkeCluster) MarshalJSON() ([]byte, error) { func (o ResourceRemoteInfoGcpGkeCluster) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["cluster_name"] = o.ClusterName + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -108,9 +113,7 @@ func (o *ResourceRemoteInfoGcpGkeCluster) UnmarshalJSON(data []byte) (err error) varResourceRemoteInfoGcpGkeCluster := _ResourceRemoteInfoGcpGkeCluster{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varResourceRemoteInfoGcpGkeCluster) + err = json.Unmarshal(data, &varResourceRemoteInfoGcpGkeCluster) if err != nil { return err @@ -118,6 +121,13 @@ func (o *ResourceRemoteInfoGcpGkeCluster) UnmarshalJSON(data []byte) (err error) *o = ResourceRemoteInfoGcpGkeCluster(varResourceRemoteInfoGcpGkeCluster) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "cluster_name") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_resource_remote_info_gcp_organization.go b/model_resource_remote_info_gcp_organization.go index 2eafe87..631017e 100644 --- a/model_resource_remote_info_gcp_organization.go +++ b/model_resource_remote_info_gcp_organization.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -24,6 +23,7 @@ var _ MappedNullable = &ResourceRemoteInfoGcpOrganization{} type ResourceRemoteInfoGcpOrganization struct { // The id of the organization. OrganizationId string `json:"organization_id"` + AdditionalProperties map[string]interface{} } type _ResourceRemoteInfoGcpOrganization ResourceRemoteInfoGcpOrganization @@ -81,6 +81,11 @@ func (o ResourceRemoteInfoGcpOrganization) MarshalJSON() ([]byte, error) { func (o ResourceRemoteInfoGcpOrganization) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["organization_id"] = o.OrganizationId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -108,9 +113,7 @@ func (o *ResourceRemoteInfoGcpOrganization) UnmarshalJSON(data []byte) (err erro varResourceRemoteInfoGcpOrganization := _ResourceRemoteInfoGcpOrganization{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varResourceRemoteInfoGcpOrganization) + err = json.Unmarshal(data, &varResourceRemoteInfoGcpOrganization) if err != nil { return err @@ -118,6 +121,13 @@ func (o *ResourceRemoteInfoGcpOrganization) UnmarshalJSON(data []byte) (err erro *o = ResourceRemoteInfoGcpOrganization(varResourceRemoteInfoGcpOrganization) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "organization_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_resource_remote_info_gcp_project.go b/model_resource_remote_info_gcp_project.go index 74b8414..176f62b 100644 --- a/model_resource_remote_info_gcp_project.go +++ b/model_resource_remote_info_gcp_project.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -24,6 +23,7 @@ var _ MappedNullable = &ResourceRemoteInfoGcpProject{} type ResourceRemoteInfoGcpProject struct { // The id of the project. ProjectId string `json:"project_id"` + AdditionalProperties map[string]interface{} } type _ResourceRemoteInfoGcpProject ResourceRemoteInfoGcpProject @@ -81,6 +81,11 @@ func (o ResourceRemoteInfoGcpProject) MarshalJSON() ([]byte, error) { func (o ResourceRemoteInfoGcpProject) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["project_id"] = o.ProjectId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -108,9 +113,7 @@ func (o *ResourceRemoteInfoGcpProject) UnmarshalJSON(data []byte) (err error) { varResourceRemoteInfoGcpProject := _ResourceRemoteInfoGcpProject{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varResourceRemoteInfoGcpProject) + err = json.Unmarshal(data, &varResourceRemoteInfoGcpProject) if err != nil { return err @@ -118,6 +121,13 @@ func (o *ResourceRemoteInfoGcpProject) UnmarshalJSON(data []byte) (err error) { *o = ResourceRemoteInfoGcpProject(varResourceRemoteInfoGcpProject) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "project_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_resource_remote_info_gcp_service_account.go b/model_resource_remote_info_gcp_service_account.go index 6adb898..0e5a442 100644 --- a/model_resource_remote_info_gcp_service_account.go +++ b/model_resource_remote_info_gcp_service_account.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -28,6 +27,7 @@ type ResourceRemoteInfoGcpServiceAccount struct { ServiceAccountId string `json:"service_account_id"` // The id of the project the service account is in. ProjectId string `json:"project_id"` + AdditionalProperties map[string]interface{} } type _ResourceRemoteInfoGcpServiceAccount ResourceRemoteInfoGcpServiceAccount @@ -137,6 +137,11 @@ func (o ResourceRemoteInfoGcpServiceAccount) ToMap() (map[string]interface{}, er toSerialize["email"] = o.Email toSerialize["service_account_id"] = o.ServiceAccountId toSerialize["project_id"] = o.ProjectId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -166,9 +171,7 @@ func (o *ResourceRemoteInfoGcpServiceAccount) UnmarshalJSON(data []byte) (err er varResourceRemoteInfoGcpServiceAccount := _ResourceRemoteInfoGcpServiceAccount{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varResourceRemoteInfoGcpServiceAccount) + err = json.Unmarshal(data, &varResourceRemoteInfoGcpServiceAccount) if err != nil { return err @@ -176,6 +179,15 @@ func (o *ResourceRemoteInfoGcpServiceAccount) UnmarshalJSON(data []byte) (err er *o = ResourceRemoteInfoGcpServiceAccount(varResourceRemoteInfoGcpServiceAccount) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "email") + delete(additionalProperties, "service_account_id") + delete(additionalProperties, "project_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_resource_remote_info_gcp_sql_instance.go b/model_resource_remote_info_gcp_sql_instance.go index 790a7cd..ff308fe 100644 --- a/model_resource_remote_info_gcp_sql_instance.go +++ b/model_resource_remote_info_gcp_sql_instance.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -26,6 +25,7 @@ type ResourceRemoteInfoGcpSqlInstance struct { InstanceId string `json:"instance_id"` // The id of the project the instance is in. ProjectId string `json:"project_id"` + AdditionalProperties map[string]interface{} } type _ResourceRemoteInfoGcpSqlInstance ResourceRemoteInfoGcpSqlInstance @@ -109,6 +109,11 @@ func (o ResourceRemoteInfoGcpSqlInstance) ToMap() (map[string]interface{}, error toSerialize := map[string]interface{}{} toSerialize["instance_id"] = o.InstanceId toSerialize["project_id"] = o.ProjectId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -137,9 +142,7 @@ func (o *ResourceRemoteInfoGcpSqlInstance) UnmarshalJSON(data []byte) (err error varResourceRemoteInfoGcpSqlInstance := _ResourceRemoteInfoGcpSqlInstance{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varResourceRemoteInfoGcpSqlInstance) + err = json.Unmarshal(data, &varResourceRemoteInfoGcpSqlInstance) if err != nil { return err @@ -147,6 +150,14 @@ func (o *ResourceRemoteInfoGcpSqlInstance) UnmarshalJSON(data []byte) (err error *o = ResourceRemoteInfoGcpSqlInstance(varResourceRemoteInfoGcpSqlInstance) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "instance_id") + delete(additionalProperties, "project_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_resource_remote_info_github_org_role.go b/model_resource_remote_info_github_org_role.go index aba4ddd..9393b3c 100644 --- a/model_resource_remote_info_github_org_role.go +++ b/model_resource_remote_info_github_org_role.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -24,6 +23,7 @@ var _ MappedNullable = &ResourceRemoteInfoGithubOrgRole{} type ResourceRemoteInfoGithubOrgRole struct { // The id of the role. RoleId string `json:"role_id"` + AdditionalProperties map[string]interface{} } type _ResourceRemoteInfoGithubOrgRole ResourceRemoteInfoGithubOrgRole @@ -81,6 +81,11 @@ func (o ResourceRemoteInfoGithubOrgRole) MarshalJSON() ([]byte, error) { func (o ResourceRemoteInfoGithubOrgRole) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["role_id"] = o.RoleId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -108,9 +113,7 @@ func (o *ResourceRemoteInfoGithubOrgRole) UnmarshalJSON(data []byte) (err error) varResourceRemoteInfoGithubOrgRole := _ResourceRemoteInfoGithubOrgRole{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varResourceRemoteInfoGithubOrgRole) + err = json.Unmarshal(data, &varResourceRemoteInfoGithubOrgRole) if err != nil { return err @@ -118,6 +121,13 @@ func (o *ResourceRemoteInfoGithubOrgRole) UnmarshalJSON(data []byte) (err error) *o = ResourceRemoteInfoGithubOrgRole(varResourceRemoteInfoGithubOrgRole) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "role_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_resource_remote_info_github_repo.go b/model_resource_remote_info_github_repo.go index 45181c4..ac9b857 100644 --- a/model_resource_remote_info_github_repo.go +++ b/model_resource_remote_info_github_repo.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -27,6 +26,7 @@ type ResourceRemoteInfoGithubRepo struct { RepoId *string `json:"repo_id,omitempty"` // The name of the repository. RepoName string `json:"repo_name"` + AdditionalProperties map[string]interface{} } type _ResourceRemoteInfoGithubRepo ResourceRemoteInfoGithubRepo @@ -122,6 +122,11 @@ func (o ResourceRemoteInfoGithubRepo) ToMap() (map[string]interface{}, error) { toSerialize["repo_id"] = o.RepoId } toSerialize["repo_name"] = o.RepoName + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -149,9 +154,7 @@ func (o *ResourceRemoteInfoGithubRepo) UnmarshalJSON(data []byte) (err error) { varResourceRemoteInfoGithubRepo := _ResourceRemoteInfoGithubRepo{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varResourceRemoteInfoGithubRepo) + err = json.Unmarshal(data, &varResourceRemoteInfoGithubRepo) if err != nil { return err @@ -159,6 +162,14 @@ func (o *ResourceRemoteInfoGithubRepo) UnmarshalJSON(data []byte) (err error) { *o = ResourceRemoteInfoGithubRepo(varResourceRemoteInfoGithubRepo) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "repo_id") + delete(additionalProperties, "repo_name") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_resource_remote_info_gitlab_project.go b/model_resource_remote_info_gitlab_project.go index 4ff9e08..bc510f9 100644 --- a/model_resource_remote_info_gitlab_project.go +++ b/model_resource_remote_info_gitlab_project.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -24,6 +23,7 @@ var _ MappedNullable = &ResourceRemoteInfoGitlabProject{} type ResourceRemoteInfoGitlabProject struct { // The id of the project. ProjectId string `json:"project_id"` + AdditionalProperties map[string]interface{} } type _ResourceRemoteInfoGitlabProject ResourceRemoteInfoGitlabProject @@ -81,6 +81,11 @@ func (o ResourceRemoteInfoGitlabProject) MarshalJSON() ([]byte, error) { func (o ResourceRemoteInfoGitlabProject) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["project_id"] = o.ProjectId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -108,9 +113,7 @@ func (o *ResourceRemoteInfoGitlabProject) UnmarshalJSON(data []byte) (err error) varResourceRemoteInfoGitlabProject := _ResourceRemoteInfoGitlabProject{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varResourceRemoteInfoGitlabProject) + err = json.Unmarshal(data, &varResourceRemoteInfoGitlabProject) if err != nil { return err @@ -118,6 +121,13 @@ func (o *ResourceRemoteInfoGitlabProject) UnmarshalJSON(data []byte) (err error) *o = ResourceRemoteInfoGitlabProject(varResourceRemoteInfoGitlabProject) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "project_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_resource_remote_info_google_workspace_role.go b/model_resource_remote_info_google_workspace_role.go index 735b135..135db0c 100644 --- a/model_resource_remote_info_google_workspace_role.go +++ b/model_resource_remote_info_google_workspace_role.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -24,6 +23,7 @@ var _ MappedNullable = &ResourceRemoteInfoGoogleWorkspaceRole{} type ResourceRemoteInfoGoogleWorkspaceRole struct { // The id of the role. RoleId string `json:"role_id"` + AdditionalProperties map[string]interface{} } type _ResourceRemoteInfoGoogleWorkspaceRole ResourceRemoteInfoGoogleWorkspaceRole @@ -81,6 +81,11 @@ func (o ResourceRemoteInfoGoogleWorkspaceRole) MarshalJSON() ([]byte, error) { func (o ResourceRemoteInfoGoogleWorkspaceRole) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["role_id"] = o.RoleId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -108,9 +113,7 @@ func (o *ResourceRemoteInfoGoogleWorkspaceRole) UnmarshalJSON(data []byte) (err varResourceRemoteInfoGoogleWorkspaceRole := _ResourceRemoteInfoGoogleWorkspaceRole{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varResourceRemoteInfoGoogleWorkspaceRole) + err = json.Unmarshal(data, &varResourceRemoteInfoGoogleWorkspaceRole) if err != nil { return err @@ -118,6 +121,13 @@ func (o *ResourceRemoteInfoGoogleWorkspaceRole) UnmarshalJSON(data []byte) (err *o = ResourceRemoteInfoGoogleWorkspaceRole(varResourceRemoteInfoGoogleWorkspaceRole) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "role_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_resource_remote_info_okta_app.go b/model_resource_remote_info_okta_app.go index e95508b..65288fb 100644 --- a/model_resource_remote_info_okta_app.go +++ b/model_resource_remote_info_okta_app.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -24,6 +23,7 @@ var _ MappedNullable = &ResourceRemoteInfoOktaApp{} type ResourceRemoteInfoOktaApp struct { // The id of the app. AppId string `json:"app_id"` + AdditionalProperties map[string]interface{} } type _ResourceRemoteInfoOktaApp ResourceRemoteInfoOktaApp @@ -81,6 +81,11 @@ func (o ResourceRemoteInfoOktaApp) MarshalJSON() ([]byte, error) { func (o ResourceRemoteInfoOktaApp) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["app_id"] = o.AppId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -108,9 +113,7 @@ func (o *ResourceRemoteInfoOktaApp) UnmarshalJSON(data []byte) (err error) { varResourceRemoteInfoOktaApp := _ResourceRemoteInfoOktaApp{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varResourceRemoteInfoOktaApp) + err = json.Unmarshal(data, &varResourceRemoteInfoOktaApp) if err != nil { return err @@ -118,6 +121,13 @@ func (o *ResourceRemoteInfoOktaApp) UnmarshalJSON(data []byte) (err error) { *o = ResourceRemoteInfoOktaApp(varResourceRemoteInfoOktaApp) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "app_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_resource_remote_info_okta_custom_role.go b/model_resource_remote_info_okta_custom_role.go index ba7125e..3b65b02 100644 --- a/model_resource_remote_info_okta_custom_role.go +++ b/model_resource_remote_info_okta_custom_role.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -24,6 +23,7 @@ var _ MappedNullable = &ResourceRemoteInfoOktaCustomRole{} type ResourceRemoteInfoOktaCustomRole struct { // The id of the custom role. RoleId string `json:"role_id"` + AdditionalProperties map[string]interface{} } type _ResourceRemoteInfoOktaCustomRole ResourceRemoteInfoOktaCustomRole @@ -81,6 +81,11 @@ func (o ResourceRemoteInfoOktaCustomRole) MarshalJSON() ([]byte, error) { func (o ResourceRemoteInfoOktaCustomRole) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["role_id"] = o.RoleId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -108,9 +113,7 @@ func (o *ResourceRemoteInfoOktaCustomRole) UnmarshalJSON(data []byte) (err error varResourceRemoteInfoOktaCustomRole := _ResourceRemoteInfoOktaCustomRole{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varResourceRemoteInfoOktaCustomRole) + err = json.Unmarshal(data, &varResourceRemoteInfoOktaCustomRole) if err != nil { return err @@ -118,6 +121,13 @@ func (o *ResourceRemoteInfoOktaCustomRole) UnmarshalJSON(data []byte) (err error *o = ResourceRemoteInfoOktaCustomRole(varResourceRemoteInfoOktaCustomRole) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "role_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_resource_remote_info_okta_standard_role.go b/model_resource_remote_info_okta_standard_role.go index db8c102..a8a7a35 100644 --- a/model_resource_remote_info_okta_standard_role.go +++ b/model_resource_remote_info_okta_standard_role.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -24,6 +23,7 @@ var _ MappedNullable = &ResourceRemoteInfoOktaStandardRole{} type ResourceRemoteInfoOktaStandardRole struct { // The type of the standard role. RoleType string `json:"role_type"` + AdditionalProperties map[string]interface{} } type _ResourceRemoteInfoOktaStandardRole ResourceRemoteInfoOktaStandardRole @@ -81,6 +81,11 @@ func (o ResourceRemoteInfoOktaStandardRole) MarshalJSON() ([]byte, error) { func (o ResourceRemoteInfoOktaStandardRole) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["role_type"] = o.RoleType + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -108,9 +113,7 @@ func (o *ResourceRemoteInfoOktaStandardRole) UnmarshalJSON(data []byte) (err err varResourceRemoteInfoOktaStandardRole := _ResourceRemoteInfoOktaStandardRole{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varResourceRemoteInfoOktaStandardRole) + err = json.Unmarshal(data, &varResourceRemoteInfoOktaStandardRole) if err != nil { return err @@ -118,6 +121,13 @@ func (o *ResourceRemoteInfoOktaStandardRole) UnmarshalJSON(data []byte) (err err *o = ResourceRemoteInfoOktaStandardRole(varResourceRemoteInfoOktaStandardRole) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "role_type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_resource_remote_info_pagerduty_role.go b/model_resource_remote_info_pagerduty_role.go index dd15f2f..2a97309 100644 --- a/model_resource_remote_info_pagerduty_role.go +++ b/model_resource_remote_info_pagerduty_role.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -24,6 +23,7 @@ var _ MappedNullable = &ResourceRemoteInfoPagerdutyRole{} type ResourceRemoteInfoPagerdutyRole struct { // The name of the role. RoleName string `json:"role_name"` + AdditionalProperties map[string]interface{} } type _ResourceRemoteInfoPagerdutyRole ResourceRemoteInfoPagerdutyRole @@ -81,6 +81,11 @@ func (o ResourceRemoteInfoPagerdutyRole) MarshalJSON() ([]byte, error) { func (o ResourceRemoteInfoPagerdutyRole) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["role_name"] = o.RoleName + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -108,9 +113,7 @@ func (o *ResourceRemoteInfoPagerdutyRole) UnmarshalJSON(data []byte) (err error) varResourceRemoteInfoPagerdutyRole := _ResourceRemoteInfoPagerdutyRole{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varResourceRemoteInfoPagerdutyRole) + err = json.Unmarshal(data, &varResourceRemoteInfoPagerdutyRole) if err != nil { return err @@ -118,6 +121,13 @@ func (o *ResourceRemoteInfoPagerdutyRole) UnmarshalJSON(data []byte) (err error) *o = ResourceRemoteInfoPagerdutyRole(varResourceRemoteInfoPagerdutyRole) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "role_name") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_resource_remote_info_salesforce_permission_set.go b/model_resource_remote_info_salesforce_permission_set.go index f1080ad..f11b15c 100644 --- a/model_resource_remote_info_salesforce_permission_set.go +++ b/model_resource_remote_info_salesforce_permission_set.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -24,6 +23,7 @@ var _ MappedNullable = &ResourceRemoteInfoSalesforcePermissionSet{} type ResourceRemoteInfoSalesforcePermissionSet struct { // The id of the permission set. PermissionSetId string `json:"permission_set_id"` + AdditionalProperties map[string]interface{} } type _ResourceRemoteInfoSalesforcePermissionSet ResourceRemoteInfoSalesforcePermissionSet @@ -81,6 +81,11 @@ func (o ResourceRemoteInfoSalesforcePermissionSet) MarshalJSON() ([]byte, error) func (o ResourceRemoteInfoSalesforcePermissionSet) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["permission_set_id"] = o.PermissionSetId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -108,9 +113,7 @@ func (o *ResourceRemoteInfoSalesforcePermissionSet) UnmarshalJSON(data []byte) ( varResourceRemoteInfoSalesforcePermissionSet := _ResourceRemoteInfoSalesforcePermissionSet{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varResourceRemoteInfoSalesforcePermissionSet) + err = json.Unmarshal(data, &varResourceRemoteInfoSalesforcePermissionSet) if err != nil { return err @@ -118,6 +121,13 @@ func (o *ResourceRemoteInfoSalesforcePermissionSet) UnmarshalJSON(data []byte) ( *o = ResourceRemoteInfoSalesforcePermissionSet(varResourceRemoteInfoSalesforcePermissionSet) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "permission_set_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_resource_remote_info_salesforce_profile.go b/model_resource_remote_info_salesforce_profile.go index 1f5350a..053d0a5 100644 --- a/model_resource_remote_info_salesforce_profile.go +++ b/model_resource_remote_info_salesforce_profile.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -26,6 +25,7 @@ type ResourceRemoteInfoSalesforceProfile struct { ProfileId string `json:"profile_id"` // The id of the user license. UserLicenseId string `json:"user_license_id"` + AdditionalProperties map[string]interface{} } type _ResourceRemoteInfoSalesforceProfile ResourceRemoteInfoSalesforceProfile @@ -109,6 +109,11 @@ func (o ResourceRemoteInfoSalesforceProfile) ToMap() (map[string]interface{}, er toSerialize := map[string]interface{}{} toSerialize["profile_id"] = o.ProfileId toSerialize["user_license_id"] = o.UserLicenseId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -137,9 +142,7 @@ func (o *ResourceRemoteInfoSalesforceProfile) UnmarshalJSON(data []byte) (err er varResourceRemoteInfoSalesforceProfile := _ResourceRemoteInfoSalesforceProfile{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varResourceRemoteInfoSalesforceProfile) + err = json.Unmarshal(data, &varResourceRemoteInfoSalesforceProfile) if err != nil { return err @@ -147,6 +150,14 @@ func (o *ResourceRemoteInfoSalesforceProfile) UnmarshalJSON(data []byte) (err er *o = ResourceRemoteInfoSalesforceProfile(varResourceRemoteInfoSalesforceProfile) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "profile_id") + delete(additionalProperties, "user_license_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_resource_remote_info_salesforce_role.go b/model_resource_remote_info_salesforce_role.go index 6117925..76c1afd 100644 --- a/model_resource_remote_info_salesforce_role.go +++ b/model_resource_remote_info_salesforce_role.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -24,6 +23,7 @@ var _ MappedNullable = &ResourceRemoteInfoSalesforceRole{} type ResourceRemoteInfoSalesforceRole struct { // The id of the role. RoleId string `json:"role_id"` + AdditionalProperties map[string]interface{} } type _ResourceRemoteInfoSalesforceRole ResourceRemoteInfoSalesforceRole @@ -81,6 +81,11 @@ func (o ResourceRemoteInfoSalesforceRole) MarshalJSON() ([]byte, error) { func (o ResourceRemoteInfoSalesforceRole) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["role_id"] = o.RoleId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -108,9 +113,7 @@ func (o *ResourceRemoteInfoSalesforceRole) UnmarshalJSON(data []byte) (err error varResourceRemoteInfoSalesforceRole := _ResourceRemoteInfoSalesforceRole{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varResourceRemoteInfoSalesforceRole) + err = json.Unmarshal(data, &varResourceRemoteInfoSalesforceRole) if err != nil { return err @@ -118,6 +121,13 @@ func (o *ResourceRemoteInfoSalesforceRole) UnmarshalJSON(data []byte) (err error *o = ResourceRemoteInfoSalesforceRole(varResourceRemoteInfoSalesforceRole) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "role_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_resource_remote_info_teleport_role.go b/model_resource_remote_info_teleport_role.go index 7214d2f..377e754 100644 --- a/model_resource_remote_info_teleport_role.go +++ b/model_resource_remote_info_teleport_role.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -24,6 +23,7 @@ var _ MappedNullable = &ResourceRemoteInfoTeleportRole{} type ResourceRemoteInfoTeleportRole struct { // The name role. RoleName string `json:"role_name"` + AdditionalProperties map[string]interface{} } type _ResourceRemoteInfoTeleportRole ResourceRemoteInfoTeleportRole @@ -81,6 +81,11 @@ func (o ResourceRemoteInfoTeleportRole) MarshalJSON() ([]byte, error) { func (o ResourceRemoteInfoTeleportRole) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["role_name"] = o.RoleName + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -108,9 +113,7 @@ func (o *ResourceRemoteInfoTeleportRole) UnmarshalJSON(data []byte) (err error) varResourceRemoteInfoTeleportRole := _ResourceRemoteInfoTeleportRole{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varResourceRemoteInfoTeleportRole) + err = json.Unmarshal(data, &varResourceRemoteInfoTeleportRole) if err != nil { return err @@ -118,6 +121,13 @@ func (o *ResourceRemoteInfoTeleportRole) UnmarshalJSON(data []byte) (err error) *o = ResourceRemoteInfoTeleportRole(varResourceRemoteInfoTeleportRole) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "role_name") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_resource_user.go b/model_resource_user.go index 72f4c5a..6cb34f7 100644 --- a/model_resource_user.go +++ b/model_resource_user.go @@ -14,7 +14,6 @@ package opal import ( "encoding/json" "time" - "bytes" "fmt" ) @@ -34,6 +33,7 @@ type ResourceUser struct { Email string `json:"email"` // The day and time the user's access will expire. ExpirationDate *time.Time `json:"expiration_date,omitempty"` + AdditionalProperties map[string]interface{} } type _ResourceUser ResourceUser @@ -230,6 +230,11 @@ func (o ResourceUser) ToMap() (map[string]interface{}, error) { if !IsNil(o.ExpirationDate) { toSerialize["expiration_date"] = o.ExpirationDate } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -261,9 +266,7 @@ func (o *ResourceUser) UnmarshalJSON(data []byte) (err error) { varResourceUser := _ResourceUser{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varResourceUser) + err = json.Unmarshal(data, &varResourceUser) if err != nil { return err @@ -271,6 +274,18 @@ func (o *ResourceUser) UnmarshalJSON(data []byte) (err error) { *o = ResourceUser(varResourceUser) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "resource_id") + delete(additionalProperties, "user_id") + delete(additionalProperties, "access_level") + delete(additionalProperties, "full_name") + delete(additionalProperties, "email") + delete(additionalProperties, "expiration_date") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_resource_user_access_status.go b/model_resource_user_access_status.go index 997b3d5..e4557fe 100644 --- a/model_resource_user_access_status.go +++ b/model_resource_user_access_status.go @@ -14,7 +14,6 @@ package opal import ( "encoding/json" "time" - "bytes" "fmt" ) @@ -31,6 +30,7 @@ type ResourceUserAccessStatus struct { Status ResourceUserAccessStatusEnum `json:"status"` // The day and time the user's access will expire. ExpirationDate *time.Time `json:"expiration_date,omitempty"` + AdditionalProperties map[string]interface{} } type _ResourceUserAccessStatus ResourceUserAccessStatus @@ -210,6 +210,11 @@ func (o ResourceUserAccessStatus) ToMap() (map[string]interface{}, error) { if !IsNil(o.ExpirationDate) { toSerialize["expiration_date"] = o.ExpirationDate } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -239,9 +244,7 @@ func (o *ResourceUserAccessStatus) UnmarshalJSON(data []byte) (err error) { varResourceUserAccessStatus := _ResourceUserAccessStatus{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varResourceUserAccessStatus) + err = json.Unmarshal(data, &varResourceUserAccessStatus) if err != nil { return err @@ -249,6 +252,17 @@ func (o *ResourceUserAccessStatus) UnmarshalJSON(data []byte) (err error) { *o = ResourceUserAccessStatus(varResourceUserAccessStatus) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "resource_id") + delete(additionalProperties, "user_id") + delete(additionalProperties, "access_level") + delete(additionalProperties, "status") + delete(additionalProperties, "expiration_date") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_resource_with_access_level.go b/model_resource_with_access_level.go index f94166a..8c40bbd 100644 --- a/model_resource_with_access_level.go +++ b/model_resource_with_access_level.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -26,6 +25,7 @@ type ResourceWithAccessLevel struct { ResourceId string `json:"resource_id"` // The ID of the resource. AccessLevelRemoteId *string `json:"access_level_remote_id,omitempty"` + AdditionalProperties map[string]interface{} } type _ResourceWithAccessLevel ResourceWithAccessLevel @@ -118,6 +118,11 @@ func (o ResourceWithAccessLevel) ToMap() (map[string]interface{}, error) { if !IsNil(o.AccessLevelRemoteId) { toSerialize["access_level_remote_id"] = o.AccessLevelRemoteId } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -145,9 +150,7 @@ func (o *ResourceWithAccessLevel) UnmarshalJSON(data []byte) (err error) { varResourceWithAccessLevel := _ResourceWithAccessLevel{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varResourceWithAccessLevel) + err = json.Unmarshal(data, &varResourceWithAccessLevel) if err != nil { return err @@ -155,6 +158,14 @@ func (o *ResourceWithAccessLevel) UnmarshalJSON(data []byte) (err error) { *o = ResourceWithAccessLevel(varResourceWithAccessLevel) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "resource_id") + delete(additionalProperties, "access_level_remote_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_reviewer_id_list.go b/model_reviewer_id_list.go index 072b7e7..e42afdb 100644 --- a/model_reviewer_id_list.go +++ b/model_reviewer_id_list.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -23,6 +22,7 @@ var _ MappedNullable = &ReviewerIDList{} // ReviewerIDList A list of reviewer IDs. type ReviewerIDList struct { ReviewerIds []string `json:"reviewer_ids"` + AdditionalProperties map[string]interface{} } type _ReviewerIDList ReviewerIDList @@ -80,6 +80,11 @@ func (o ReviewerIDList) MarshalJSON() ([]byte, error) { func (o ReviewerIDList) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["reviewer_ids"] = o.ReviewerIds + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -107,9 +112,7 @@ func (o *ReviewerIDList) UnmarshalJSON(data []byte) (err error) { varReviewerIDList := _ReviewerIDList{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varReviewerIDList) + err = json.Unmarshal(data, &varReviewerIDList) if err != nil { return err @@ -117,6 +120,13 @@ func (o *ReviewerIDList) UnmarshalJSON(data []byte) (err error) { *o = ReviewerIDList(varReviewerIDList) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "reviewer_ids") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_reviewer_stage.go b/model_reviewer_stage.go index 993e83b..e65c19b 100644 --- a/model_reviewer_stage.go +++ b/model_reviewer_stage.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -29,6 +28,7 @@ type ReviewerStage struct { // The operator of the reviewer stage. Admin and manager approval are also treated as reviewers. Operator string `json:"operator"` OwnerIds []string `json:"owner_ids"` + AdditionalProperties map[string]interface{} } type _ReviewerStage ReviewerStage @@ -173,6 +173,11 @@ func (o ReviewerStage) ToMap() (map[string]interface{}, error) { } toSerialize["operator"] = o.Operator toSerialize["owner_ids"] = o.OwnerIds + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -202,9 +207,7 @@ func (o *ReviewerStage) UnmarshalJSON(data []byte) (err error) { varReviewerStage := _ReviewerStage{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varReviewerStage) + err = json.Unmarshal(data, &varReviewerStage) if err != nil { return err @@ -212,6 +215,16 @@ func (o *ReviewerStage) UnmarshalJSON(data []byte) (err error) { *o = ReviewerStage(varReviewerStage) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "require_manager_approval") + delete(additionalProperties, "require_admin_approval") + delete(additionalProperties, "operator") + delete(additionalProperties, "owner_ids") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_reviewer_stage_list.go b/model_reviewer_stage_list.go index 97e67df..97adcd5 100644 --- a/model_reviewer_stage_list.go +++ b/model_reviewer_stage_list.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -24,6 +23,7 @@ var _ MappedNullable = &ReviewerStageList{} type ReviewerStageList struct { // A list of reviewer stages. Stages []ReviewerStage `json:"stages"` + AdditionalProperties map[string]interface{} } type _ReviewerStageList ReviewerStageList @@ -81,6 +81,11 @@ func (o ReviewerStageList) MarshalJSON() ([]byte, error) { func (o ReviewerStageList) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["stages"] = o.Stages + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -108,9 +113,7 @@ func (o *ReviewerStageList) UnmarshalJSON(data []byte) (err error) { varReviewerStageList := _ReviewerStageList{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varReviewerStageList) + err = json.Unmarshal(data, &varReviewerStageList) if err != nil { return err @@ -118,6 +121,13 @@ func (o *ReviewerStageList) UnmarshalJSON(data []byte) (err error) { *o = ReviewerStageList(varReviewerStageList) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "stages") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_rule_clauses.go b/model_rule_clauses.go index 639ce38..67a83db 100644 --- a/model_rule_clauses.go +++ b/model_rule_clauses.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -24,6 +23,7 @@ var _ MappedNullable = &RuleClauses{} type RuleClauses struct { When RuleConjunction `json:"when"` Unless *RuleConjunction `json:"unless,omitempty"` + AdditionalProperties map[string]interface{} } type _RuleClauses RuleClauses @@ -116,6 +116,11 @@ func (o RuleClauses) ToMap() (map[string]interface{}, error) { if !IsNil(o.Unless) { toSerialize["unless"] = o.Unless } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -143,9 +148,7 @@ func (o *RuleClauses) UnmarshalJSON(data []byte) (err error) { varRuleClauses := _RuleClauses{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varRuleClauses) + err = json.Unmarshal(data, &varRuleClauses) if err != nil { return err @@ -153,6 +156,14 @@ func (o *RuleClauses) UnmarshalJSON(data []byte) (err error) { *o = RuleClauses(varRuleClauses) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "when") + delete(additionalProperties, "unless") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_rule_conjunction.go b/model_rule_conjunction.go index ca5472d..d5bfbfc 100644 --- a/model_rule_conjunction.go +++ b/model_rule_conjunction.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -23,6 +22,7 @@ var _ MappedNullable = &RuleConjunction{} // RuleConjunction struct for RuleConjunction type RuleConjunction struct { Clauses []RuleDisjunction `json:"clauses"` + AdditionalProperties map[string]interface{} } type _RuleConjunction RuleConjunction @@ -80,6 +80,11 @@ func (o RuleConjunction) MarshalJSON() ([]byte, error) { func (o RuleConjunction) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["clauses"] = o.Clauses + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -107,9 +112,7 @@ func (o *RuleConjunction) UnmarshalJSON(data []byte) (err error) { varRuleConjunction := _RuleConjunction{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varRuleConjunction) + err = json.Unmarshal(data, &varRuleConjunction) if err != nil { return err @@ -117,6 +120,13 @@ func (o *RuleConjunction) UnmarshalJSON(data []byte) (err error) { *o = RuleConjunction(varRuleConjunction) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "clauses") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_rule_disjunction.go b/model_rule_disjunction.go index b865db3..480fdf7 100644 --- a/model_rule_disjunction.go +++ b/model_rule_disjunction.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -23,6 +22,7 @@ var _ MappedNullable = &RuleDisjunction{} // RuleDisjunction struct for RuleDisjunction type RuleDisjunction struct { Selectors []TagSelector `json:"selectors"` + AdditionalProperties map[string]interface{} } type _RuleDisjunction RuleDisjunction @@ -80,6 +80,11 @@ func (o RuleDisjunction) MarshalJSON() ([]byte, error) { func (o RuleDisjunction) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["selectors"] = o.Selectors + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -107,9 +112,7 @@ func (o *RuleDisjunction) UnmarshalJSON(data []byte) (err error) { varRuleDisjunction := _RuleDisjunction{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varRuleDisjunction) + err = json.Unmarshal(data, &varRuleDisjunction) if err != nil { return err @@ -117,6 +120,13 @@ func (o *RuleDisjunction) UnmarshalJSON(data []byte) (err error) { *o = RuleDisjunction(varRuleDisjunction) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "selectors") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_scoped_role_permission.go b/model_scoped_role_permission.go index 56879d5..256609c 100644 --- a/model_scoped_role_permission.go +++ b/model_scoped_role_permission.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -27,6 +26,7 @@ type ScopedRolePermission struct { TargetType RolePermissionTargetTypeEnum `json:"target_type"` PermissionName RolePermissionNameEnum `json:"permission_name"` AllowAll bool `json:"allow_all"` + AdditionalProperties map[string]interface{} } type _ScopedRolePermission ScopedRolePermission @@ -171,6 +171,11 @@ func (o ScopedRolePermission) ToMap() (map[string]interface{}, error) { toSerialize["target_type"] = o.TargetType toSerialize["permission_name"] = o.PermissionName toSerialize["allow_all"] = o.AllowAll + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -200,9 +205,7 @@ func (o *ScopedRolePermission) UnmarshalJSON(data []byte) (err error) { varScopedRolePermission := _ScopedRolePermission{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varScopedRolePermission) + err = json.Unmarshal(data, &varScopedRolePermission) if err != nil { return err @@ -210,6 +213,16 @@ func (o *ScopedRolePermission) UnmarshalJSON(data []byte) (err error) { *o = ScopedRolePermission(varScopedRolePermission) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "target_ids") + delete(additionalProperties, "target_type") + delete(additionalProperties, "permission_name") + delete(additionalProperties, "allow_all") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_scoped_role_permission_list.go b/model_scoped_role_permission_list.go index bc76d44..6fa2980 100644 --- a/model_scoped_role_permission_list.go +++ b/model_scoped_role_permission_list.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -23,6 +22,7 @@ var _ MappedNullable = &ScopedRolePermissionList{} // ScopedRolePermissionList struct for ScopedRolePermissionList type ScopedRolePermissionList struct { Permissions []ScopedRolePermission `json:"permissions"` + AdditionalProperties map[string]interface{} } type _ScopedRolePermissionList ScopedRolePermissionList @@ -80,6 +80,11 @@ func (o ScopedRolePermissionList) MarshalJSON() ([]byte, error) { func (o ScopedRolePermissionList) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["permissions"] = o.Permissions + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -107,9 +112,7 @@ func (o *ScopedRolePermissionList) UnmarshalJSON(data []byte) (err error) { varScopedRolePermissionList := _ScopedRolePermissionList{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varScopedRolePermissionList) + err = json.Unmarshal(data, &varScopedRolePermissionList) if err != nil { return err @@ -117,6 +120,13 @@ func (o *ScopedRolePermissionList) UnmarshalJSON(data []byte) (err error) { *o = ScopedRolePermissionList(varScopedRolePermissionList) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "permissions") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_session.go b/model_session.go index 7d1b0ec..5dd1c73 100644 --- a/model_session.go +++ b/model_session.go @@ -14,7 +14,6 @@ package opal import ( "encoding/json" "time" - "bytes" "fmt" ) @@ -32,6 +31,7 @@ type Session struct { AccessLevel ResourceAccessLevel `json:"access_level"` // The day and time the user's access will expire. ExpirationDate time.Time `json:"expiration_date"` + AdditionalProperties map[string]interface{} } type _Session Session @@ -193,6 +193,11 @@ func (o Session) ToMap() (map[string]interface{}, error) { toSerialize["resource_id"] = o.ResourceId toSerialize["access_level"] = o.AccessLevel toSerialize["expiration_date"] = o.ExpirationDate + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -224,9 +229,7 @@ func (o *Session) UnmarshalJSON(data []byte) (err error) { varSession := _Session{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varSession) + err = json.Unmarshal(data, &varSession) if err != nil { return err @@ -234,6 +237,17 @@ func (o *Session) UnmarshalJSON(data []byte) (err error) { *o = Session(varSession) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "connection_id") + delete(additionalProperties, "user_id") + delete(additionalProperties, "resource_id") + delete(additionalProperties, "access_level") + delete(additionalProperties, "expiration_date") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_sessions_list.go b/model_sessions_list.go index eb69546..1023c5e 100644 --- a/model_sessions_list.go +++ b/model_sessions_list.go @@ -25,8 +25,11 @@ type SessionsList struct { // The cursor used to obtain the current result page. Previous *string `json:"previous,omitempty"` Results []Session `json:"results,omitempty"` + AdditionalProperties map[string]interface{} } +type _SessionsList SessionsList + // NewSessionsList instantiates a new SessionsList 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 @@ -159,9 +162,37 @@ func (o SessionsList) ToMap() (map[string]interface{}, error) { if !IsNil(o.Results) { toSerialize["results"] = o.Results } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *SessionsList) UnmarshalJSON(data []byte) (err error) { + varSessionsList := _SessionsList{} + + err = json.Unmarshal(data, &varSessionsList) + + if err != nil { + return err + } + + *o = SessionsList(varSessionsList) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableSessionsList struct { value *SessionsList isSet bool diff --git a/model_sync_error.go b/model_sync_error.go index 1d7e6b6..6038cca 100644 --- a/model_sync_error.go +++ b/model_sync_error.go @@ -14,7 +14,6 @@ package opal import ( "encoding/json" "time" - "bytes" "fmt" ) @@ -31,6 +30,7 @@ type SyncError struct { ErrorMessage string `json:"error_message"` // The ID of the app that the error occured for. AppId *string `json:"app_id,omitempty"` + AdditionalProperties map[string]interface{} } type _SyncError SyncError @@ -175,6 +175,11 @@ func (o SyncError) ToMap() (map[string]interface{}, error) { if !IsNil(o.AppId) { toSerialize["app_id"] = o.AppId } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -204,9 +209,7 @@ func (o *SyncError) UnmarshalJSON(data []byte) (err error) { varSyncError := _SyncError{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varSyncError) + err = json.Unmarshal(data, &varSyncError) if err != nil { return err @@ -214,6 +217,16 @@ func (o *SyncError) UnmarshalJSON(data []byte) (err error) { *o = SyncError(varSyncError) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "first_seen") + delete(additionalProperties, "last_seen") + delete(additionalProperties, "error_message") + delete(additionalProperties, "app_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_sync_error_list.go b/model_sync_error_list.go index e178607..0beaa2b 100644 --- a/model_sync_error_list.go +++ b/model_sync_error_list.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -23,6 +22,7 @@ var _ MappedNullable = &SyncErrorList{} // SyncErrorList struct for SyncErrorList type SyncErrorList struct { SyncErrors []SyncError `json:"sync_errors"` + AdditionalProperties map[string]interface{} } type _SyncErrorList SyncErrorList @@ -80,6 +80,11 @@ func (o SyncErrorList) MarshalJSON() ([]byte, error) { func (o SyncErrorList) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["sync_errors"] = o.SyncErrors + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -107,9 +112,7 @@ func (o *SyncErrorList) UnmarshalJSON(data []byte) (err error) { varSyncErrorList := _SyncErrorList{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varSyncErrorList) + err = json.Unmarshal(data, &varSyncErrorList) if err != nil { return err @@ -117,6 +120,13 @@ func (o *SyncErrorList) UnmarshalJSON(data []byte) (err error) { *o = SyncErrorList(varSyncErrorList) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "sync_errors") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_sync_task.go b/model_sync_task.go index 587ea15..a25cb99 100644 --- a/model_sync_task.go +++ b/model_sync_task.go @@ -14,7 +14,6 @@ package opal import ( "encoding/json" "time" - "bytes" "fmt" ) @@ -27,6 +26,7 @@ type SyncTask struct { Id string `json:"id"` // The time when the sync task was completed. CompletedAt time.Time `json:"completed_at"` + AdditionalProperties map[string]interface{} } type _SyncTask SyncTask @@ -110,6 +110,11 @@ func (o SyncTask) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["id"] = o.Id toSerialize["completed_at"] = o.CompletedAt + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -138,9 +143,7 @@ func (o *SyncTask) UnmarshalJSON(data []byte) (err error) { varSyncTask := _SyncTask{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varSyncTask) + err = json.Unmarshal(data, &varSyncTask) if err != nil { return err @@ -148,6 +151,14 @@ func (o *SyncTask) UnmarshalJSON(data []byte) (err error) { *o = SyncTask(varSyncTask) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "id") + delete(additionalProperties, "completed_at") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_tag.go b/model_tag.go index 5d9f2fd..77cfaf3 100644 --- a/model_tag.go +++ b/model_tag.go @@ -14,7 +14,6 @@ package opal import ( "encoding/json" "time" - "bytes" "fmt" ) @@ -35,6 +34,7 @@ type Tag struct { Key *string `json:"key,omitempty"` // The value of the tag. Value *string `json:"value,omitempty"` + AdditionalProperties map[string]interface{} } type _Tag Tag @@ -267,6 +267,11 @@ func (o Tag) ToMap() (map[string]interface{}, error) { if !IsNil(o.Value) { toSerialize["value"] = o.Value } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -294,9 +299,7 @@ func (o *Tag) UnmarshalJSON(data []byte) (err error) { varTag := _Tag{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varTag) + err = json.Unmarshal(data, &varTag) if err != nil { return err @@ -304,6 +307,18 @@ func (o *Tag) UnmarshalJSON(data []byte) (err error) { *o = Tag(varTag) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "tag_id") + delete(additionalProperties, "created_at") + delete(additionalProperties, "updated_at") + delete(additionalProperties, "user_creator_id") + delete(additionalProperties, "key") + delete(additionalProperties, "value") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_tag_filter.go b/model_tag_filter.go index f347c1e..1b2148f 100644 --- a/model_tag_filter.go +++ b/model_tag_filter.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -26,6 +25,7 @@ type TagFilter struct { Key string `json:"key"` // The value of the tag. Value *string `json:"value,omitempty"` + AdditionalProperties map[string]interface{} } type _TagFilter TagFilter @@ -118,6 +118,11 @@ func (o TagFilter) ToMap() (map[string]interface{}, error) { if !IsNil(o.Value) { toSerialize["value"] = o.Value } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -145,9 +150,7 @@ func (o *TagFilter) UnmarshalJSON(data []byte) (err error) { varTagFilter := _TagFilter{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varTagFilter) + err = json.Unmarshal(data, &varTagFilter) if err != nil { return err @@ -155,6 +158,14 @@ func (o *TagFilter) UnmarshalJSON(data []byte) (err error) { *o = TagFilter(varTagFilter) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "key") + delete(additionalProperties, "value") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_tag_selector.go b/model_tag_selector.go index 4d71b45..49289e1 100644 --- a/model_tag_selector.go +++ b/model_tag_selector.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -25,6 +24,7 @@ type TagSelector struct { Key string `json:"key"` Value string `json:"value"` ConnectionId string `json:"connection_id"` + AdditionalProperties map[string]interface{} } type _TagSelector TagSelector @@ -134,6 +134,11 @@ func (o TagSelector) ToMap() (map[string]interface{}, error) { toSerialize["key"] = o.Key toSerialize["value"] = o.Value toSerialize["connection_id"] = o.ConnectionId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -163,9 +168,7 @@ func (o *TagSelector) UnmarshalJSON(data []byte) (err error) { varTagSelector := _TagSelector{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varTagSelector) + err = json.Unmarshal(data, &varTagSelector) if err != nil { return err @@ -173,6 +176,15 @@ func (o *TagSelector) UnmarshalJSON(data []byte) (err error) { *o = TagSelector(varTagSelector) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "key") + delete(additionalProperties, "value") + delete(additionalProperties, "connection_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_tags_list.go b/model_tags_list.go index ee0c155..59d7ad1 100644 --- a/model_tags_list.go +++ b/model_tags_list.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -23,6 +22,7 @@ var _ MappedNullable = &TagsList{} // TagsList struct for TagsList type TagsList struct { Tags []Tag `json:"tags"` + AdditionalProperties map[string]interface{} } type _TagsList TagsList @@ -80,6 +80,11 @@ func (o TagsList) MarshalJSON() ([]byte, error) { func (o TagsList) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["tags"] = o.Tags + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -107,9 +112,7 @@ func (o *TagsList) UnmarshalJSON(data []byte) (err error) { varTagsList := _TagsList{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varTagsList) + err = json.Unmarshal(data, &varTagsList) if err != nil { return err @@ -117,6 +120,13 @@ func (o *TagsList) UnmarshalJSON(data []byte) (err error) { *o = TagsList(varTagsList) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "tags") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_ticket_propagation_configuration.go b/model_ticket_propagation_configuration.go index 72e1efb..a6cdb31 100644 --- a/model_ticket_propagation_configuration.go +++ b/model_ticket_propagation_configuration.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -26,6 +25,7 @@ type TicketPropagationConfiguration struct { EnabledOnRevocation bool `json:"enabled_on_revocation"` TicketProvider *TicketingProviderEnum `json:"ticket_provider,omitempty"` TicketProjectId *string `json:"ticket_project_id,omitempty"` + AdditionalProperties map[string]interface{} } type _TicketPropagationConfiguration TicketPropagationConfiguration @@ -179,6 +179,11 @@ func (o TicketPropagationConfiguration) ToMap() (map[string]interface{}, error) if !IsNil(o.TicketProjectId) { toSerialize["ticket_project_id"] = o.TicketProjectId } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -207,9 +212,7 @@ func (o *TicketPropagationConfiguration) UnmarshalJSON(data []byte) (err error) varTicketPropagationConfiguration := _TicketPropagationConfiguration{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varTicketPropagationConfiguration) + err = json.Unmarshal(data, &varTicketPropagationConfiguration) if err != nil { return err @@ -217,6 +220,16 @@ func (o *TicketPropagationConfiguration) UnmarshalJSON(data []byte) (err error) *o = TicketPropagationConfiguration(varTicketPropagationConfiguration) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "enabled_on_grant") + delete(additionalProperties, "enabled_on_revocation") + delete(additionalProperties, "ticket_provider") + delete(additionalProperties, "ticket_project_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_uar.go b/model_uar.go index 175a2ea..3638f41 100644 --- a/model_uar.go +++ b/model_uar.go @@ -14,7 +14,6 @@ package opal import ( "encoding/json" "time" - "bytes" "fmt" ) @@ -37,6 +36,7 @@ type UAR struct { // A bool representing whether to present a warning when a user is the only reviewer for themself. Default is False. SelfReviewAllowed bool `json:"self_review_allowed"` UarScope *UARScope `json:"uar_scope,omitempty"` + AdditionalProperties map[string]interface{} } type _UAR UAR @@ -285,6 +285,11 @@ func (o UAR) ToMap() (map[string]interface{}, error) { if !IsNil(o.UarScope) { toSerialize["uar_scope"] = o.UarScope } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -318,9 +323,7 @@ func (o *UAR) UnmarshalJSON(data []byte) (err error) { varUAR := _UAR{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varUAR) + err = json.Unmarshal(data, &varUAR) if err != nil { return err @@ -328,6 +331,20 @@ func (o *UAR) UnmarshalJSON(data []byte) (err error) { *o = UAR(varUAR) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "uar_id") + delete(additionalProperties, "name") + delete(additionalProperties, "reviewer_assignment_policy") + delete(additionalProperties, "send_reviewer_assignment_notification") + delete(additionalProperties, "deadline") + delete(additionalProperties, "time_zone") + delete(additionalProperties, "self_review_allowed") + delete(additionalProperties, "uar_scope") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_uar_scope.go b/model_uar_scope.go index e63c4ee..e5f38a2 100644 --- a/model_uar_scope.go +++ b/model_uar_scope.go @@ -41,8 +41,11 @@ type UARScope struct { Tags []TagFilter `json:"tags,omitempty"` // This access review will include resources and groups whose name contains one of the given strings. Names []string `json:"names,omitempty"` + AdditionalProperties map[string]interface{} } +type _UARScope UARScope + // NewUARScope instantiates a new UARScope 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 @@ -455,9 +458,45 @@ func (o UARScope) ToMap() (map[string]interface{}, error) { if !IsNil(o.Names) { toSerialize["names"] = o.Names } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *UARScope) UnmarshalJSON(data []byte) (err error) { + varUARScope := _UARScope{} + + err = json.Unmarshal(data, &varUARScope) + + if err != nil { + return err + } + + *o = UARScope(varUARScope) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "group_visibility") + delete(additionalProperties, "users") + delete(additionalProperties, "filter_operator") + delete(additionalProperties, "entities") + delete(additionalProperties, "apps") + delete(additionalProperties, "admins") + delete(additionalProperties, "group_types") + delete(additionalProperties, "resource_types") + delete(additionalProperties, "include_group_bindings") + delete(additionalProperties, "tags") + delete(additionalProperties, "names") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableUARScope struct { value *UARScope isSet bool diff --git a/model_update_access_rule_info.go b/model_update_access_rule_info.go index bf8c725..49880aa 100644 --- a/model_update_access_rule_info.go +++ b/model_update_access_rule_info.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -31,6 +30,7 @@ type UpdateAccessRuleInfo struct { // The status of the access rule. Status string `json:"status"` RuleClauses RuleClauses `json:"ruleClauses"` + AdditionalProperties map[string]interface{} } type _UpdateAccessRuleInfo UpdateAccessRuleInfo @@ -192,6 +192,11 @@ func (o UpdateAccessRuleInfo) ToMap() (map[string]interface{}, error) { toSerialize["admin_owner_id"] = o.AdminOwnerId toSerialize["status"] = o.Status toSerialize["ruleClauses"] = o.RuleClauses + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -223,9 +228,7 @@ func (o *UpdateAccessRuleInfo) UnmarshalJSON(data []byte) (err error) { varUpdateAccessRuleInfo := _UpdateAccessRuleInfo{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varUpdateAccessRuleInfo) + err = json.Unmarshal(data, &varUpdateAccessRuleInfo) if err != nil { return err @@ -233,6 +236,17 @@ func (o *UpdateAccessRuleInfo) UnmarshalJSON(data []byte) (err error) { *o = UpdateAccessRuleInfo(varUpdateAccessRuleInfo) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "admin_owner_id") + delete(additionalProperties, "status") + delete(additionalProperties, "ruleClauses") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_update_configuration_template_info.go b/model_update_configuration_template_info.go index 880f2bc..5ddbfec 100644 --- a/model_update_configuration_template_info.go +++ b/model_update_configuration_template_info.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -28,14 +27,11 @@ type UpdateConfigurationTemplateInfo struct { Name *string `json:"name,omitempty"` // The ID of the owner of the configuration template. AdminOwnerId *string `json:"admin_owner_id,omitempty"` - // The visibility info of the configuration template. Visibility *VisibilityInfo `json:"visibility,omitempty"` // The IDs of the audit message channels linked to the configuration template. LinkedAuditMessageChannelIds []string `json:"linked_audit_message_channel_ids,omitempty"` // The request configuration list linked to the configuration template. RequestConfigurations []RequestConfiguration `json:"request_configurations,omitempty"` - // The request configuration list linked to the configuration template. Deprecated in favor of `request_configurations`. - // Deprecated RequestConfigurationList *CreateRequestConfigurationInfoList `json:"request_configuration_list,omitempty"` // The IDs of the on-call schedules linked to the configuration template. MemberOncallScheduleIds []string `json:"member_oncall_schedule_ids,omitempty"` @@ -48,6 +44,7 @@ type UpdateConfigurationTemplateInfo struct { TicketPropagation *TicketPropagationConfiguration `json:"ticket_propagation,omitempty"` // Custom request notification sent upon request approval for this configuration template. CustomRequestNotification *string `json:"custom_request_notification,omitempty"` + AdditionalProperties map[string]interface{} } type _UpdateConfigurationTemplateInfo UpdateConfigurationTemplateInfo @@ -255,7 +252,6 @@ func (o *UpdateConfigurationTemplateInfo) SetRequestConfigurations(v []RequestCo } // GetRequestConfigurationList returns the RequestConfigurationList field value if set, zero value otherwise. -// Deprecated func (o *UpdateConfigurationTemplateInfo) GetRequestConfigurationList() CreateRequestConfigurationInfoList { if o == nil || IsNil(o.RequestConfigurationList) { var ret CreateRequestConfigurationInfoList @@ -266,7 +262,6 @@ func (o *UpdateConfigurationTemplateInfo) GetRequestConfigurationList() CreateRe // GetRequestConfigurationListOk returns a tuple with the RequestConfigurationList field value if set, nil otherwise // and a boolean to check if the value has been set. -// Deprecated func (o *UpdateConfigurationTemplateInfo) GetRequestConfigurationListOk() (*CreateRequestConfigurationInfoList, bool) { if o == nil || IsNil(o.RequestConfigurationList) { return nil, false @@ -284,7 +279,6 @@ func (o *UpdateConfigurationTemplateInfo) HasRequestConfigurationList() bool { } // SetRequestConfigurationList gets a reference to the given CreateRequestConfigurationInfoList and assigns it to the RequestConfigurationList field. -// Deprecated func (o *UpdateConfigurationTemplateInfo) SetRequestConfigurationList(v CreateRequestConfigurationInfoList) { o.RequestConfigurationList = &v } @@ -528,6 +522,11 @@ func (o UpdateConfigurationTemplateInfo) ToMap() (map[string]interface{}, error) if !IsNil(o.CustomRequestNotification) { toSerialize["custom_request_notification"] = o.CustomRequestNotification } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -555,9 +554,7 @@ func (o *UpdateConfigurationTemplateInfo) UnmarshalJSON(data []byte) (err error) varUpdateConfigurationTemplateInfo := _UpdateConfigurationTemplateInfo{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varUpdateConfigurationTemplateInfo) + err = json.Unmarshal(data, &varUpdateConfigurationTemplateInfo) if err != nil { return err @@ -565,6 +562,25 @@ func (o *UpdateConfigurationTemplateInfo) UnmarshalJSON(data []byte) (err error) *o = UpdateConfigurationTemplateInfo(varUpdateConfigurationTemplateInfo) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "configuration_template_id") + delete(additionalProperties, "name") + delete(additionalProperties, "admin_owner_id") + delete(additionalProperties, "visibility") + delete(additionalProperties, "linked_audit_message_channel_ids") + delete(additionalProperties, "request_configurations") + delete(additionalProperties, "request_configuration_list") + delete(additionalProperties, "member_oncall_schedule_ids") + delete(additionalProperties, "break_glass_user_ids") + delete(additionalProperties, "require_mfa_to_approve") + delete(additionalProperties, "require_mfa_to_connect") + delete(additionalProperties, "ticket_propagation") + delete(additionalProperties, "custom_request_notification") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_update_group_binding_info.go b/model_update_group_binding_info.go index 3b99713..f49c64c 100644 --- a/model_update_group_binding_info.go +++ b/model_update_group_binding_info.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -28,6 +27,7 @@ type UpdateGroupBindingInfo struct { SourceGroupId string `json:"source_group_id"` // The list of groups. Groups []CreateGroupBindingInfoGroupsInner `json:"groups"` + AdditionalProperties map[string]interface{} } type _UpdateGroupBindingInfo UpdateGroupBindingInfo @@ -137,6 +137,11 @@ func (o UpdateGroupBindingInfo) ToMap() (map[string]interface{}, error) { toSerialize["group_binding_id"] = o.GroupBindingId toSerialize["source_group_id"] = o.SourceGroupId toSerialize["groups"] = o.Groups + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -166,9 +171,7 @@ func (o *UpdateGroupBindingInfo) UnmarshalJSON(data []byte) (err error) { varUpdateGroupBindingInfo := _UpdateGroupBindingInfo{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varUpdateGroupBindingInfo) + err = json.Unmarshal(data, &varUpdateGroupBindingInfo) if err != nil { return err @@ -176,6 +179,15 @@ func (o *UpdateGroupBindingInfo) UnmarshalJSON(data []byte) (err error) { *o = UpdateGroupBindingInfo(varUpdateGroupBindingInfo) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "group_binding_id") + delete(additionalProperties, "source_group_id") + delete(additionalProperties, "groups") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_update_group_binding_info_list.go b/model_update_group_binding_info_list.go index 2a45f26..f24ee4e 100644 --- a/model_update_group_binding_info_list.go +++ b/model_update_group_binding_info_list.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -24,6 +23,7 @@ var _ MappedNullable = &UpdateGroupBindingInfoList{} type UpdateGroupBindingInfoList struct { // A list of group bindings with information to update. GroupBindings []UpdateGroupBindingInfo `json:"group_bindings"` + AdditionalProperties map[string]interface{} } type _UpdateGroupBindingInfoList UpdateGroupBindingInfoList @@ -81,6 +81,11 @@ func (o UpdateGroupBindingInfoList) MarshalJSON() ([]byte, error) { func (o UpdateGroupBindingInfoList) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["group_bindings"] = o.GroupBindings + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -108,9 +113,7 @@ func (o *UpdateGroupBindingInfoList) UnmarshalJSON(data []byte) (err error) { varUpdateGroupBindingInfoList := _UpdateGroupBindingInfoList{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varUpdateGroupBindingInfoList) + err = json.Unmarshal(data, &varUpdateGroupBindingInfoList) if err != nil { return err @@ -118,6 +121,13 @@ func (o *UpdateGroupBindingInfoList) UnmarshalJSON(data []byte) (err error) { *o = UpdateGroupBindingInfoList(varUpdateGroupBindingInfoList) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "group_bindings") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_update_group_info.go b/model_update_group_info.go index 4cc8ebf..3afcd14 100644 --- a/model_update_group_info.go +++ b/model_update_group_info.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -68,12 +67,11 @@ type UpdateGroupInfo struct { ExtensionsDurationInMinutes *int32 `json:"extensions_duration_in_minutes,omitempty"` // The request configuration list of the configuration template. If not provided, the default request configuration will be used. RequestConfigurations []RequestConfiguration `json:"request_configurations,omitempty"` - // The request configuration list of the configuration template. If not provided, the default request configuration will be used. Deprecated in favor of `request_configurations`. - // Deprecated RequestConfigurationList *CreateRequestConfigurationInfoList `json:"request_configuration_list,omitempty"` // Custom request notification sent to the requester when the request is approved. CustomRequestNotification *string `json:"custom_request_notification,omitempty"` RiskSensitivityOverride *RiskSensitivityEnum `json:"risk_sensitivity_override,omitempty"` + AdditionalProperties map[string]interface{} } type _UpdateGroupInfo UpdateGroupInfo @@ -695,7 +693,6 @@ func (o *UpdateGroupInfo) SetRequestConfigurations(v []RequestConfiguration) { } // GetRequestConfigurationList returns the RequestConfigurationList field value if set, zero value otherwise. -// Deprecated func (o *UpdateGroupInfo) GetRequestConfigurationList() CreateRequestConfigurationInfoList { if o == nil || IsNil(o.RequestConfigurationList) { var ret CreateRequestConfigurationInfoList @@ -706,7 +703,6 @@ func (o *UpdateGroupInfo) GetRequestConfigurationList() CreateRequestConfigurati // GetRequestConfigurationListOk returns a tuple with the RequestConfigurationList field value if set, nil otherwise // and a boolean to check if the value has been set. -// Deprecated func (o *UpdateGroupInfo) GetRequestConfigurationListOk() (*CreateRequestConfigurationInfoList, bool) { if o == nil || IsNil(o.RequestConfigurationList) { return nil, false @@ -724,7 +720,6 @@ func (o *UpdateGroupInfo) HasRequestConfigurationList() bool { } // SetRequestConfigurationList gets a reference to the given CreateRequestConfigurationInfoList and assigns it to the RequestConfigurationList field. -// Deprecated func (o *UpdateGroupInfo) SetRequestConfigurationList(v CreateRequestConfigurationInfoList) { o.RequestConfigurationList = &v } @@ -864,6 +859,11 @@ func (o UpdateGroupInfo) ToMap() (map[string]interface{}, error) { if !IsNil(o.RiskSensitivityOverride) { toSerialize["risk_sensitivity_override"] = o.RiskSensitivityOverride } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -891,9 +891,7 @@ func (o *UpdateGroupInfo) UnmarshalJSON(data []byte) (err error) { varUpdateGroupInfo := _UpdateGroupInfo{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varUpdateGroupInfo) + err = json.Unmarshal(data, &varUpdateGroupInfo) if err != nil { return err @@ -901,6 +899,33 @@ func (o *UpdateGroupInfo) UnmarshalJSON(data []byte) (err error) { *o = UpdateGroupInfo(varUpdateGroupInfo) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "group_id") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "admin_owner_id") + delete(additionalProperties, "max_duration") + delete(additionalProperties, "recommended_duration") + delete(additionalProperties, "require_manager_approval") + delete(additionalProperties, "require_support_ticket") + delete(additionalProperties, "folder_id") + delete(additionalProperties, "require_mfa_to_approve") + delete(additionalProperties, "require_mfa_to_request") + delete(additionalProperties, "auto_approval") + delete(additionalProperties, "configuration_template_id") + delete(additionalProperties, "request_template_id") + delete(additionalProperties, "is_requestable") + delete(additionalProperties, "group_leader_user_ids") + delete(additionalProperties, "extensions_duration_in_minutes") + delete(additionalProperties, "request_configurations") + delete(additionalProperties, "request_configuration_list") + delete(additionalProperties, "custom_request_notification") + delete(additionalProperties, "risk_sensitivity_override") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_update_group_info_list.go b/model_update_group_info_list.go index ea0491e..2750111 100644 --- a/model_update_group_info_list.go +++ b/model_update_group_info_list.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -24,6 +23,7 @@ var _ MappedNullable = &UpdateGroupInfoList{} type UpdateGroupInfoList struct { // A list of groups with information to update. Groups []UpdateGroupInfo `json:"groups"` + AdditionalProperties map[string]interface{} } type _UpdateGroupInfoList UpdateGroupInfoList @@ -81,6 +81,11 @@ func (o UpdateGroupInfoList) MarshalJSON() ([]byte, error) { func (o UpdateGroupInfoList) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["groups"] = o.Groups + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -108,9 +113,7 @@ func (o *UpdateGroupInfoList) UnmarshalJSON(data []byte) (err error) { varUpdateGroupInfoList := _UpdateGroupInfoList{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varUpdateGroupInfoList) + err = json.Unmarshal(data, &varUpdateGroupInfoList) if err != nil { return err @@ -118,6 +121,13 @@ func (o *UpdateGroupInfoList) UnmarshalJSON(data []byte) (err error) { *o = UpdateGroupInfoList(varUpdateGroupInfoList) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "groups") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_update_group_resources_info.go b/model_update_group_resources_info.go index 197e07b..0e434e4 100644 --- a/model_update_group_resources_info.go +++ b/model_update_group_resources_info.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -23,6 +22,7 @@ var _ MappedNullable = &UpdateGroupResourcesInfo{} // UpdateGroupResourcesInfo struct for UpdateGroupResourcesInfo type UpdateGroupResourcesInfo struct { Resources []ResourceWithAccessLevel `json:"resources"` + AdditionalProperties map[string]interface{} } type _UpdateGroupResourcesInfo UpdateGroupResourcesInfo @@ -80,6 +80,11 @@ func (o UpdateGroupResourcesInfo) MarshalJSON() ([]byte, error) { func (o UpdateGroupResourcesInfo) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["resources"] = o.Resources + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -107,9 +112,7 @@ func (o *UpdateGroupResourcesInfo) UnmarshalJSON(data []byte) (err error) { varUpdateGroupResourcesInfo := _UpdateGroupResourcesInfo{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varUpdateGroupResourcesInfo) + err = json.Unmarshal(data, &varUpdateGroupResourcesInfo) if err != nil { return err @@ -117,6 +120,13 @@ func (o *UpdateGroupResourcesInfo) UnmarshalJSON(data []byte) (err error) { *o = UpdateGroupResourcesInfo(varUpdateGroupResourcesInfo) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "resources") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_update_group_user_request.go b/model_update_group_user_request.go index 3a3c6d6..aed0731 100644 --- a/model_update_group_user_request.go +++ b/model_update_group_user_request.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -26,6 +25,7 @@ type UpdateGroupUserRequest struct { DurationMinutes int32 `json:"duration_minutes"` // The updated remote ID of the access level granted to this user. AccessLevelRemoteId *string `json:"access_level_remote_id,omitempty"` + AdditionalProperties map[string]interface{} } type _UpdateGroupUserRequest UpdateGroupUserRequest @@ -118,6 +118,11 @@ func (o UpdateGroupUserRequest) ToMap() (map[string]interface{}, error) { if !IsNil(o.AccessLevelRemoteId) { toSerialize["access_level_remote_id"] = o.AccessLevelRemoteId } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -145,9 +150,7 @@ func (o *UpdateGroupUserRequest) UnmarshalJSON(data []byte) (err error) { varUpdateGroupUserRequest := _UpdateGroupUserRequest{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varUpdateGroupUserRequest) + err = json.Unmarshal(data, &varUpdateGroupUserRequest) if err != nil { return err @@ -155,6 +158,14 @@ func (o *UpdateGroupUserRequest) UnmarshalJSON(data []byte) (err error) { *o = UpdateGroupUserRequest(varUpdateGroupUserRequest) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "duration_minutes") + delete(additionalProperties, "access_level_remote_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_update_idp_group_mappings_request.go b/model_update_idp_group_mappings_request.go index f64b48a..839d509 100644 --- a/model_update_idp_group_mappings_request.go +++ b/model_update_idp_group_mappings_request.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -23,6 +22,7 @@ var _ MappedNullable = &UpdateIdpGroupMappingsRequest{} // UpdateIdpGroupMappingsRequest struct for UpdateIdpGroupMappingsRequest type UpdateIdpGroupMappingsRequest struct { Mappings []UpdateIdpGroupMappingsRequestMappingsInner `json:"mappings"` + AdditionalProperties map[string]interface{} } type _UpdateIdpGroupMappingsRequest UpdateIdpGroupMappingsRequest @@ -80,6 +80,11 @@ func (o UpdateIdpGroupMappingsRequest) MarshalJSON() ([]byte, error) { func (o UpdateIdpGroupMappingsRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["mappings"] = o.Mappings + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -107,9 +112,7 @@ func (o *UpdateIdpGroupMappingsRequest) UnmarshalJSON(data []byte) (err error) { varUpdateIdpGroupMappingsRequest := _UpdateIdpGroupMappingsRequest{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varUpdateIdpGroupMappingsRequest) + err = json.Unmarshal(data, &varUpdateIdpGroupMappingsRequest) if err != nil { return err @@ -117,6 +120,13 @@ func (o *UpdateIdpGroupMappingsRequest) UnmarshalJSON(data []byte) (err error) { *o = UpdateIdpGroupMappingsRequest(varUpdateIdpGroupMappingsRequest) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "mappings") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_update_idp_group_mappings_request_mappings_inner.go b/model_update_idp_group_mappings_request_mappings_inner.go index 4cd83b9..cfce39e 100644 --- a/model_update_idp_group_mappings_request_mappings_inner.go +++ b/model_update_idp_group_mappings_request_mappings_inner.go @@ -23,8 +23,11 @@ type UpdateIdpGroupMappingsRequestMappingsInner struct { GroupId *string `json:"group_id,omitempty"` Alias *string `json:"alias,omitempty"` HiddenFromEndUser *bool `json:"hidden_from_end_user,omitempty"` + AdditionalProperties map[string]interface{} } +type _UpdateIdpGroupMappingsRequestMappingsInner UpdateIdpGroupMappingsRequestMappingsInner + // NewUpdateIdpGroupMappingsRequestMappingsInner instantiates a new UpdateIdpGroupMappingsRequestMappingsInner 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 @@ -157,9 +160,37 @@ func (o UpdateIdpGroupMappingsRequestMappingsInner) ToMap() (map[string]interfac if !IsNil(o.HiddenFromEndUser) { toSerialize["hidden_from_end_user"] = o.HiddenFromEndUser } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *UpdateIdpGroupMappingsRequestMappingsInner) UnmarshalJSON(data []byte) (err error) { + varUpdateIdpGroupMappingsRequestMappingsInner := _UpdateIdpGroupMappingsRequestMappingsInner{} + + err = json.Unmarshal(data, &varUpdateIdpGroupMappingsRequestMappingsInner) + + if err != nil { + return err + } + + *o = UpdateIdpGroupMappingsRequestMappingsInner(varUpdateIdpGroupMappingsRequestMappingsInner) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "group_id") + delete(additionalProperties, "alias") + delete(additionalProperties, "hidden_from_end_user") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableUpdateIdpGroupMappingsRequestMappingsInner struct { value *UpdateIdpGroupMappingsRequestMappingsInner isSet bool diff --git a/model_update_owner_info.go b/model_update_owner_info.go index 45756a0..dce5abd 100644 --- a/model_update_owner_info.go +++ b/model_update_owner_info.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -34,6 +33,7 @@ type UpdateOwnerInfo struct { ReviewerMessageChannelId *string `json:"reviewer_message_channel_id,omitempty"` // Sync this owner's user list with a source group. Use \"\" to remove an existing source group. SourceGroupId *string `json:"source_group_id,omitempty"` + AdditionalProperties map[string]interface{} } type _UpdateOwnerInfo UpdateOwnerInfo @@ -266,6 +266,11 @@ func (o UpdateOwnerInfo) ToMap() (map[string]interface{}, error) { if !IsNil(o.SourceGroupId) { toSerialize["source_group_id"] = o.SourceGroupId } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -293,9 +298,7 @@ func (o *UpdateOwnerInfo) UnmarshalJSON(data []byte) (err error) { varUpdateOwnerInfo := _UpdateOwnerInfo{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varUpdateOwnerInfo) + err = json.Unmarshal(data, &varUpdateOwnerInfo) if err != nil { return err @@ -303,6 +306,18 @@ func (o *UpdateOwnerInfo) UnmarshalJSON(data []byte) (err error) { *o = UpdateOwnerInfo(varUpdateOwnerInfo) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "owner_id") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "access_request_escalation_period") + delete(additionalProperties, "reviewer_message_channel_id") + delete(additionalProperties, "source_group_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_update_owner_info_list.go b/model_update_owner_info_list.go index 3b9a9c8..a379a54 100644 --- a/model_update_owner_info_list.go +++ b/model_update_owner_info_list.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -24,6 +23,7 @@ var _ MappedNullable = &UpdateOwnerInfoList{} type UpdateOwnerInfoList struct { // A list of owners with information to update. Owners []UpdateOwnerInfo `json:"owners"` + AdditionalProperties map[string]interface{} } type _UpdateOwnerInfoList UpdateOwnerInfoList @@ -81,6 +81,11 @@ func (o UpdateOwnerInfoList) MarshalJSON() ([]byte, error) { func (o UpdateOwnerInfoList) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["owners"] = o.Owners + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -108,9 +113,7 @@ func (o *UpdateOwnerInfoList) UnmarshalJSON(data []byte) (err error) { varUpdateOwnerInfoList := _UpdateOwnerInfoList{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varUpdateOwnerInfoList) + err = json.Unmarshal(data, &varUpdateOwnerInfoList) if err != nil { return err @@ -118,6 +121,13 @@ func (o *UpdateOwnerInfoList) UnmarshalJSON(data []byte) (err error) { *o = UpdateOwnerInfoList(varUpdateOwnerInfoList) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "owners") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_update_resource_info.go b/model_update_resource_info.go index 2b1ef23..2ce3ed1 100644 --- a/model_update_resource_info.go +++ b/model_update_resource_info.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -72,9 +71,8 @@ type UpdateResourceInfo struct { ExtensionsDurationInMinutes *int32 `json:"extensions_duration_in_minutes,omitempty"` // A list of configurations for requests to this resource. If not provided, the default request configuration will be used. RequestConfigurations []RequestConfiguration `json:"request_configurations,omitempty"` - // A list of configurations for requests to this resource. If not provided, the default request configuration will be used. Deprecated in favor of `request_configurations`. - // Deprecated RequestConfigurationList *CreateRequestConfigurationInfoList `json:"request_configuration_list,omitempty"` + AdditionalProperties map[string]interface{} } type _UpdateResourceInfo UpdateResourceInfo @@ -792,7 +790,6 @@ func (o *UpdateResourceInfo) SetRequestConfigurations(v []RequestConfiguration) } // GetRequestConfigurationList returns the RequestConfigurationList field value if set, zero value otherwise. -// Deprecated func (o *UpdateResourceInfo) GetRequestConfigurationList() CreateRequestConfigurationInfoList { if o == nil || IsNil(o.RequestConfigurationList) { var ret CreateRequestConfigurationInfoList @@ -803,7 +800,6 @@ func (o *UpdateResourceInfo) GetRequestConfigurationList() CreateRequestConfigur // GetRequestConfigurationListOk returns a tuple with the RequestConfigurationList field value if set, nil otherwise // and a boolean to check if the value has been set. -// Deprecated func (o *UpdateResourceInfo) GetRequestConfigurationListOk() (*CreateRequestConfigurationInfoList, bool) { if o == nil || IsNil(o.RequestConfigurationList) { return nil, false @@ -821,7 +817,6 @@ func (o *UpdateResourceInfo) HasRequestConfigurationList() bool { } // SetRequestConfigurationList gets a reference to the given CreateRequestConfigurationInfoList and assigns it to the RequestConfigurationList field. -// Deprecated func (o *UpdateResourceInfo) SetRequestConfigurationList(v CreateRequestConfigurationInfoList) { o.RequestConfigurationList = &v } @@ -900,6 +895,11 @@ func (o UpdateResourceInfo) ToMap() (map[string]interface{}, error) { if !IsNil(o.RequestConfigurationList) { toSerialize["request_configuration_list"] = o.RequestConfigurationList } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -927,9 +927,7 @@ func (o *UpdateResourceInfo) UnmarshalJSON(data []byte) (err error) { varUpdateResourceInfo := _UpdateResourceInfo{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varUpdateResourceInfo) + err = json.Unmarshal(data, &varUpdateResourceInfo) if err != nil { return err @@ -937,6 +935,34 @@ func (o *UpdateResourceInfo) UnmarshalJSON(data []byte) (err error) { *o = UpdateResourceInfo(varUpdateResourceInfo) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "resource_id") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "admin_owner_id") + delete(additionalProperties, "max_duration") + delete(additionalProperties, "recommended_duration") + delete(additionalProperties, "require_manager_approval") + delete(additionalProperties, "require_support_ticket") + delete(additionalProperties, "folder_id") + delete(additionalProperties, "require_mfa_to_approve") + delete(additionalProperties, "require_mfa_to_request") + delete(additionalProperties, "require_mfa_to_connect") + delete(additionalProperties, "auto_approval") + delete(additionalProperties, "ticket_propagation") + delete(additionalProperties, "custom_request_notification") + delete(additionalProperties, "risk_sensitivity_override") + delete(additionalProperties, "configuration_template_id") + delete(additionalProperties, "request_template_id") + delete(additionalProperties, "is_requestable") + delete(additionalProperties, "extensions_duration_in_minutes") + delete(additionalProperties, "request_configurations") + delete(additionalProperties, "request_configuration_list") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_update_resource_info_list.go b/model_update_resource_info_list.go index a1b1c43..1c32c77 100644 --- a/model_update_resource_info_list.go +++ b/model_update_resource_info_list.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -24,6 +23,7 @@ var _ MappedNullable = &UpdateResourceInfoList{} type UpdateResourceInfoList struct { // A list of resources with information to update. Resources []UpdateResourceInfo `json:"resources"` + AdditionalProperties map[string]interface{} } type _UpdateResourceInfoList UpdateResourceInfoList @@ -81,6 +81,11 @@ func (o UpdateResourceInfoList) MarshalJSON() ([]byte, error) { func (o UpdateResourceInfoList) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["resources"] = o.Resources + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -108,9 +113,7 @@ func (o *UpdateResourceInfoList) UnmarshalJSON(data []byte) (err error) { varUpdateResourceInfoList := _UpdateResourceInfoList{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varUpdateResourceInfoList) + err = json.Unmarshal(data, &varUpdateResourceInfoList) if err != nil { return err @@ -118,6 +121,13 @@ func (o *UpdateResourceInfoList) UnmarshalJSON(data []byte) (err error) { *o = UpdateResourceInfoList(varUpdateResourceInfoList) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "resources") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_update_resource_user_request.go b/model_update_resource_user_request.go index c53a22b..f70abf3 100644 --- a/model_update_resource_user_request.go +++ b/model_update_resource_user_request.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -26,6 +25,7 @@ type UpdateResourceUserRequest struct { DurationMinutes int32 `json:"duration_minutes"` // The updated remote ID of the access level granted to this user. AccessLevelRemoteId *string `json:"access_level_remote_id,omitempty"` + AdditionalProperties map[string]interface{} } type _UpdateResourceUserRequest UpdateResourceUserRequest @@ -118,6 +118,11 @@ func (o UpdateResourceUserRequest) ToMap() (map[string]interface{}, error) { if !IsNil(o.AccessLevelRemoteId) { toSerialize["access_level_remote_id"] = o.AccessLevelRemoteId } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -145,9 +150,7 @@ func (o *UpdateResourceUserRequest) UnmarshalJSON(data []byte) (err error) { varUpdateResourceUserRequest := _UpdateResourceUserRequest{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varUpdateResourceUserRequest) + err = json.Unmarshal(data, &varUpdateResourceUserRequest) if err != nil { return err @@ -155,6 +158,14 @@ func (o *UpdateResourceUserRequest) UnmarshalJSON(data []byte) (err error) { *o = UpdateResourceUserRequest(varUpdateResourceUserRequest) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "duration_minutes") + delete(additionalProperties, "access_level_remote_id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_user.go b/model_user.go index 7327fd4..a823f6a 100644 --- a/model_user.go +++ b/model_user.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -35,6 +34,7 @@ type User struct { // The user's position. Position string `json:"position"` HrIdpStatus *UserHrIdpStatusEnum `json:"hr_idp_status,omitempty"` + AdditionalProperties map[string]interface{} } type _User User @@ -257,6 +257,11 @@ func (o User) ToMap() (map[string]interface{}, error) { if !IsNil(o.HrIdpStatus) { toSerialize["hr_idp_status"] = o.HrIdpStatus } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -289,9 +294,7 @@ func (o *User) UnmarshalJSON(data []byte) (err error) { varUser := _User{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varUser) + err = json.Unmarshal(data, &varUser) if err != nil { return err @@ -299,6 +302,19 @@ func (o *User) UnmarshalJSON(data []byte) (err error) { *o = User(varUser) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "user_id") + delete(additionalProperties, "email") + delete(additionalProperties, "full_name") + delete(additionalProperties, "first_name") + delete(additionalProperties, "last_name") + delete(additionalProperties, "position") + delete(additionalProperties, "hr_idp_status") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_user_id_list.go b/model_user_id_list.go index 014367e..c205724 100644 --- a/model_user_id_list.go +++ b/model_user_id_list.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -23,6 +22,7 @@ var _ MappedNullable = &UserIDList{} // UserIDList A list of user IDs. type UserIDList struct { UserIds []string `json:"user_ids"` + AdditionalProperties map[string]interface{} } type _UserIDList UserIDList @@ -80,6 +80,11 @@ func (o UserIDList) MarshalJSON() ([]byte, error) { func (o UserIDList) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["user_ids"] = o.UserIds + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -107,9 +112,7 @@ func (o *UserIDList) UnmarshalJSON(data []byte) (err error) { varUserIDList := _UserIDList{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varUserIDList) + err = json.Unmarshal(data, &varUserIDList) if err != nil { return err @@ -117,6 +120,13 @@ func (o *UserIDList) UnmarshalJSON(data []byte) (err error) { *o = UserIDList(varUserIDList) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "user_ids") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_user_list.go b/model_user_list.go index 8b8402d..f0dd190 100644 --- a/model_user_list.go +++ b/model_user_list.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -23,6 +22,7 @@ var _ MappedNullable = &UserList{} // UserList A list of users. type UserList struct { Users []User `json:"users"` + AdditionalProperties map[string]interface{} } type _UserList UserList @@ -80,6 +80,11 @@ func (o UserList) MarshalJSON() ([]byte, error) { func (o UserList) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["users"] = o.Users + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -107,9 +112,7 @@ func (o *UserList) UnmarshalJSON(data []byte) (err error) { varUserList := _UserList{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varUserList) + err = json.Unmarshal(data, &varUserList) if err != nil { return err @@ -117,6 +120,13 @@ func (o *UserList) UnmarshalJSON(data []byte) (err error) { *o = UserList(varUserList) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "users") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/model_visibility_info.go b/model_visibility_info.go index 73327fa..46e5a8a 100644 --- a/model_visibility_info.go +++ b/model_visibility_info.go @@ -13,7 +13,6 @@ package opal import ( "encoding/json" - "bytes" "fmt" ) @@ -24,6 +23,7 @@ var _ MappedNullable = &VisibilityInfo{} type VisibilityInfo struct { Visibility VisibilityTypeEnum `json:"visibility"` VisibilityGroupIds []string `json:"visibility_group_ids,omitempty"` + AdditionalProperties map[string]interface{} } type _VisibilityInfo VisibilityInfo @@ -116,6 +116,11 @@ func (o VisibilityInfo) ToMap() (map[string]interface{}, error) { if !IsNil(o.VisibilityGroupIds) { toSerialize["visibility_group_ids"] = o.VisibilityGroupIds } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -143,9 +148,7 @@ func (o *VisibilityInfo) UnmarshalJSON(data []byte) (err error) { varVisibilityInfo := _VisibilityInfo{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varVisibilityInfo) + err = json.Unmarshal(data, &varVisibilityInfo) if err != nil { return err @@ -153,6 +156,14 @@ func (o *VisibilityInfo) UnmarshalJSON(data []byte) (err error) { *o = VisibilityInfo(varVisibilityInfo) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "visibility") + delete(additionalProperties, "visibility_group_ids") + o.AdditionalProperties = additionalProperties + } + return err }