diff --git a/services/cdn/api_default.go b/services/cdn/api_default.go index 9fe281a1a..cc47dc80d 100644 --- a/services/cdn/api_default.go +++ b/services/cdn/api_default.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/client.go b/services/cdn/client.go index d8ff32a85..1c42aea0c 100644 --- a/services/cdn/client.go +++ b/services/cdn/client.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -43,7 +43,7 @@ var ( queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]") ) -// APIClient manages communication with the CDN API API v1.0.0 +// APIClient manages communication with the STACKIT CDN API API v1.0.0 // In most cases there should be only one, shared, APIClient. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type APIClient struct { diff --git a/services/cdn/configuration.go b/services/cdn/configuration.go index 3d9b31c6a..4e8c71202 100644 --- a/services/cdn/configuration.go +++ b/services/cdn/configuration.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_bucket_backend.go b/services/cdn/model_bucket_backend.go index b15194260..f7c91f9a1 100644 --- a/services/cdn/model_bucket_backend.go +++ b/services/cdn/model_bucket_backend.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_bucket_backend_create.go b/services/cdn/model_bucket_backend_create.go index d27e07fbd..845ad4034 100644 --- a/services/cdn/model_bucket_backend_create.go +++ b/services/cdn/model_bucket_backend_create.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_bucket_backend_create_test.go b/services/cdn/model_bucket_backend_create_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_bucket_backend_create_test.go +++ b/services/cdn/model_bucket_backend_create_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_bucket_backend_patch.go b/services/cdn/model_bucket_backend_patch.go index 826af4196..5ff895972 100644 --- a/services/cdn/model_bucket_backend_patch.go +++ b/services/cdn/model_bucket_backend_patch.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_bucket_backend_patch_test.go b/services/cdn/model_bucket_backend_patch_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_bucket_backend_patch_test.go +++ b/services/cdn/model_bucket_backend_patch_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_bucket_backend_test.go b/services/cdn/model_bucket_backend_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_bucket_backend_test.go +++ b/services/cdn/model_bucket_backend_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_bucket_credentials.go b/services/cdn/model_bucket_credentials.go index 70484e4de..f44e8aad8 100644 --- a/services/cdn/model_bucket_credentials.go +++ b/services/cdn/model_bucket_credentials.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_bucket_credentials_test.go b/services/cdn/model_bucket_credentials_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_bucket_credentials_test.go +++ b/services/cdn/model_bucket_credentials_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_config.go b/services/cdn/model_config.go index 30da85a73..3bcd684a0 100644 --- a/services/cdn/model_config.go +++ b/services/cdn/model_config.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_config_backend.go b/services/cdn/model_config_backend.go index ad297927c..27271d9c4 100644 --- a/services/cdn/model_config_backend.go +++ b/services/cdn/model_config_backend.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_config_backend_test.go b/services/cdn/model_config_backend_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_config_backend_test.go +++ b/services/cdn/model_config_backend_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_config_log_sink.go b/services/cdn/model_config_log_sink.go index c46a9caa0..0681e4ebf 100644 --- a/services/cdn/model_config_log_sink.go +++ b/services/cdn/model_config_log_sink.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_config_log_sink_test.go b/services/cdn/model_config_log_sink_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_config_log_sink_test.go +++ b/services/cdn/model_config_log_sink_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_config_patch.go b/services/cdn/model_config_patch.go index 6d856bb5f..91bf72457 100644 --- a/services/cdn/model_config_patch.go +++ b/services/cdn/model_config_patch.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_config_patch_backend.go b/services/cdn/model_config_patch_backend.go index b40e76426..44a9b45c5 100644 --- a/services/cdn/model_config_patch_backend.go +++ b/services/cdn/model_config_patch_backend.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_config_patch_backend_test.go b/services/cdn/model_config_patch_backend_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_config_patch_backend_test.go +++ b/services/cdn/model_config_patch_backend_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_config_patch_log_sink.go b/services/cdn/model_config_patch_log_sink.go index 5186f8b7e..f43741be9 100644 --- a/services/cdn/model_config_patch_log_sink.go +++ b/services/cdn/model_config_patch_log_sink.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_config_patch_log_sink_test.go b/services/cdn/model_config_patch_log_sink_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_config_patch_log_sink_test.go +++ b/services/cdn/model_config_patch_log_sink_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_config_patch_test.go b/services/cdn/model_config_patch_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_config_patch_test.go +++ b/services/cdn/model_config_patch_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_config_test.go b/services/cdn/model_config_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_config_test.go +++ b/services/cdn/model_config_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_create_distribution_payload.go b/services/cdn/model_create_distribution_payload.go index e9bf22a50..9b951a234 100644 --- a/services/cdn/model_create_distribution_payload.go +++ b/services/cdn/model_create_distribution_payload.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_create_distribution_payload_backend.go b/services/cdn/model_create_distribution_payload_backend.go index bccb5cb2d..110023585 100644 --- a/services/cdn/model_create_distribution_payload_backend.go +++ b/services/cdn/model_create_distribution_payload_backend.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_create_distribution_payload_backend_test.go b/services/cdn/model_create_distribution_payload_backend_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_create_distribution_payload_backend_test.go +++ b/services/cdn/model_create_distribution_payload_backend_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_create_distribution_payload_log_sink.go b/services/cdn/model_create_distribution_payload_log_sink.go index 34100f763..6dfcf59ff 100644 --- a/services/cdn/model_create_distribution_payload_log_sink.go +++ b/services/cdn/model_create_distribution_payload_log_sink.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_create_distribution_payload_log_sink_test.go b/services/cdn/model_create_distribution_payload_log_sink_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_create_distribution_payload_log_sink_test.go +++ b/services/cdn/model_create_distribution_payload_log_sink_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_create_distribution_payload_test.go b/services/cdn/model_create_distribution_payload_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_create_distribution_payload_test.go +++ b/services/cdn/model_create_distribution_payload_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_create_distribution_response.go b/services/cdn/model_create_distribution_response.go index a8f4e4f79..0b5a8f882 100644 --- a/services/cdn/model_create_distribution_response.go +++ b/services/cdn/model_create_distribution_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_create_distribution_response_test.go b/services/cdn/model_create_distribution_response_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_create_distribution_response_test.go +++ b/services/cdn/model_create_distribution_response_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_custom_domain.go b/services/cdn/model_custom_domain.go index 85dae7b64..4d9ad501d 100644 --- a/services/cdn/model_custom_domain.go +++ b/services/cdn/model_custom_domain.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_custom_domain_test.go b/services/cdn/model_custom_domain_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_custom_domain_test.go +++ b/services/cdn/model_custom_domain_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_delete_custom_domain_response.go b/services/cdn/model_delete_custom_domain_response.go index 705ac2b6b..4795f5f6c 100644 --- a/services/cdn/model_delete_custom_domain_response.go +++ b/services/cdn/model_delete_custom_domain_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_delete_custom_domain_response_test.go b/services/cdn/model_delete_custom_domain_response_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_delete_custom_domain_response_test.go +++ b/services/cdn/model_delete_custom_domain_response_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_delete_distribution_response.go b/services/cdn/model_delete_distribution_response.go index e94bd540d..089e61fe8 100644 --- a/services/cdn/model_delete_distribution_response.go +++ b/services/cdn/model_delete_distribution_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_delete_distribution_response_test.go b/services/cdn/model_delete_distribution_response_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_delete_distribution_response_test.go +++ b/services/cdn/model_delete_distribution_response_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_distribution.go b/services/cdn/model_distribution.go index a80392164..202770c42 100644 --- a/services/cdn/model_distribution.go +++ b/services/cdn/model_distribution.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_distribution_logs_record.go b/services/cdn/model_distribution_logs_record.go index c81c5fe69..0ba4a0b01 100644 --- a/services/cdn/model_distribution_logs_record.go +++ b/services/cdn/model_distribution_logs_record.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_distribution_logs_record_test.go b/services/cdn/model_distribution_logs_record_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_distribution_logs_record_test.go +++ b/services/cdn/model_distribution_logs_record_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_distribution_statistics_record.go b/services/cdn/model_distribution_statistics_record.go index 8423259a6..3f5a799d1 100644 --- a/services/cdn/model_distribution_statistics_record.go +++ b/services/cdn/model_distribution_statistics_record.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_distribution_statistics_record_all_of.go b/services/cdn/model_distribution_statistics_record_all_of.go index f0dfc2302..d97267f5f 100644 --- a/services/cdn/model_distribution_statistics_record_all_of.go +++ b/services/cdn/model_distribution_statistics_record_all_of.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_distribution_statistics_record_all_of_test.go b/services/cdn/model_distribution_statistics_record_all_of_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_distribution_statistics_record_all_of_test.go +++ b/services/cdn/model_distribution_statistics_record_all_of_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_distribution_statistics_record_entry.go b/services/cdn/model_distribution_statistics_record_entry.go index ccdca9e7d..fc01dedd8 100644 --- a/services/cdn/model_distribution_statistics_record_entry.go +++ b/services/cdn/model_distribution_statistics_record_entry.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_distribution_statistics_record_entry_test.go b/services/cdn/model_distribution_statistics_record_entry_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_distribution_statistics_record_entry_test.go +++ b/services/cdn/model_distribution_statistics_record_entry_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_distribution_statistics_record_regions.go b/services/cdn/model_distribution_statistics_record_regions.go index c7260ba1a..d97b0bc56 100644 --- a/services/cdn/model_distribution_statistics_record_regions.go +++ b/services/cdn/model_distribution_statistics_record_regions.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_distribution_statistics_record_regions_test.go b/services/cdn/model_distribution_statistics_record_regions_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_distribution_statistics_record_regions_test.go +++ b/services/cdn/model_distribution_statistics_record_regions_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_distribution_statistics_record_test.go b/services/cdn/model_distribution_statistics_record_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_distribution_statistics_record_test.go +++ b/services/cdn/model_distribution_statistics_record_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_distribution_test.go b/services/cdn/model_distribution_test.go index 70fbc98b7..ec88c4f32 100644 --- a/services/cdn/model_distribution_test.go +++ b/services/cdn/model_distribution_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_distribution_waf.go b/services/cdn/model_distribution_waf.go index 332392afb..731dd35df 100644 --- a/services/cdn/model_distribution_waf.go +++ b/services/cdn/model_distribution_waf.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_distribution_waf_test.go b/services/cdn/model_distribution_waf_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_distribution_waf_test.go +++ b/services/cdn/model_distribution_waf_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_domain.go b/services/cdn/model_domain.go index 71d9e1208..f407e4142 100644 --- a/services/cdn/model_domain.go +++ b/services/cdn/model_domain.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -19,6 +19,153 @@ import ( // checks if the Domain type satisfies the MappedNullable interface at compile time var _ MappedNullable = &Domain{} +/* + types and functions for certificateType +*/ + +// isEnum + +// DomainCertificateType the model 'Domain' +// value type for enums +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DomainCertificateType string + +// List of CertificateType +const ( + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + DOMAINCERTIFICATE_TYPE_MANAGED DomainCertificateType = "managed" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + DOMAINCERTIFICATE_TYPE_CUSTOM DomainCertificateType = "custom" +) + +// All allowed values of Domain enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +var AllowedDomainCertificateTypeEnumValues = []DomainCertificateType{ + "managed", + "custom", +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *DomainCertificateType) UnmarshalJSON(src []byte) error { + // use a type alias to prevent infinite recursion during unmarshal, + // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers + type TmpJson DomainCertificateType + var value TmpJson + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + // Allow unmarshalling zero value for testing purposes + var zeroValue TmpJson + if value == zeroValue { + return nil + } + enumTypeValue := DomainCertificateType(value) + for _, existing := range AllowedDomainCertificateTypeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid Domain", value) +} + +// NewDomainCertificateTypeFromValue returns a pointer to a valid DomainCertificateType +// for the value passed as argument, or an error if the value passed is not allowed by the enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func NewDomainCertificateTypeFromValue(v DomainCertificateType) (*DomainCertificateType, error) { + ev := DomainCertificateType(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for DomainCertificateType: valid values are %v", v, AllowedDomainCertificateTypeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v DomainCertificateType) IsValid() bool { + for _, existing := range AllowedDomainCertificateTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to CertificateTypeCertificateType value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v DomainCertificateType) Ptr() *DomainCertificateType { + return &v +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NullableDomainCertificateType struct { + value *DomainCertificateType + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableDomainCertificateType) Get() *DomainCertificateType { + return v.value +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableDomainCertificateType) Set(val *DomainCertificateType) { + v.value = val + v.isSet = true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableDomainCertificateType) IsSet() bool { + return v.isSet +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableDomainCertificateType) Unset() { + v.value = nil + v.isSet = false +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func NewNullableDomainCertificateType(val *DomainCertificateType) *NullableDomainCertificateType { + return &NullableDomainCertificateType{value: val, isSet: true} +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableDomainCertificateType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableDomainCertificateType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DomainGetCertificateTypeAttributeType = *DomainCertificateType + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DomainGetCertificateTypeArgType = DomainCertificateType + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DomainGetCertificateTypeRetType = DomainCertificateType + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getDomainGetCertificateTypeAttributeTypeOk(arg DomainGetCertificateTypeAttributeType) (ret DomainGetCertificateTypeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setDomainGetCertificateTypeAttributeType(arg *DomainGetCertificateTypeAttributeType, val DomainGetCertificateTypeRetType) { + *arg = &val +} + /* types and functions for errors */ @@ -250,6 +397,8 @@ func setDomainGetTypeAttributeType(arg *DomainGetTypeAttributeType, val DomainGe // Domain Definition of a custom or managed domain without any certificates or keys // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type Domain struct { + // REQUIRED + CertificateType DomainGetCertificateTypeAttributeType `json:"certificateType" required:"true"` // This object is present if the custom domain has errors. Errors DomainGetErrorsAttributeType `json:"errors,omitempty"` // The domain. If this is a custom domain, you can call the GetCustomDomain Endpoint @@ -270,8 +419,9 @@ type _Domain Domain // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewDomain(name DomainGetNameArgType, status DomainGetStatusArgType, types DomainGetTypeArgType) *Domain { +func NewDomain(certificateType DomainGetCertificateTypeArgType, name DomainGetNameArgType, status DomainGetStatusArgType, types DomainGetTypeArgType) *Domain { this := Domain{} + setDomainGetCertificateTypeAttributeType(&this.CertificateType, certificateType) setDomainGetNameAttributeType(&this.Name, name) setDomainGetStatusAttributeType(&this.Status, status) setDomainGetTypeAttributeType(&this.Type, types) @@ -287,6 +437,26 @@ func NewDomainWithDefaults() *Domain { return &this } +// GetCertificateType returns the CertificateType field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Domain) GetCertificateType() (ret DomainGetCertificateTypeRetType) { + ret, _ = o.GetCertificateTypeOk() + return ret +} + +// GetCertificateTypeOk returns a tuple with the CertificateType field value +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Domain) GetCertificateTypeOk() (ret DomainGetCertificateTypeRetType, ok bool) { + return getDomainGetCertificateTypeAttributeTypeOk(o.CertificateType) +} + +// SetCertificateType sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Domain) SetCertificateType(v DomainGetCertificateTypeRetType) { + setDomainGetCertificateTypeAttributeType(&o.CertificateType, v) +} + // GetErrors returns the Errors field value if set, zero value otherwise. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Domain) GetErrors() (res DomainGetErrorsRetType) { @@ -377,6 +547,9 @@ func (o *Domain) SetType(v DomainGetTypeRetType) { // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o Domain) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if val, ok := getDomainGetCertificateTypeAttributeTypeOk(o.CertificateType); ok { + toSerialize["CertificateType"] = val + } if val, ok := getDomainGetErrorsAttributeTypeOk(o.Errors); ok { toSerialize["Errors"] = val } diff --git a/services/cdn/model_domain_status.go b/services/cdn/model_domain_status.go index 9e564a082..9f4b02505 100644 --- a/services/cdn/model_domain_status.go +++ b/services/cdn/model_domain_status.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_domain_status_test.go b/services/cdn/model_domain_status_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_domain_status_test.go +++ b/services/cdn/model_domain_status_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_domain_test.go b/services/cdn/model_domain_test.go index 460b95f8a..2a9c7e437 100644 --- a/services/cdn/model_domain_test.go +++ b/services/cdn/model_domain_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -16,6 +16,49 @@ import ( // isEnum +func TestDomainCertificateType_UnmarshalJSON(t *testing.T) { + type args struct { + src []byte + } + tests := []struct { + name string + args args + wantErr bool + }{ + { + name: `success - possible enum value no. 1`, + args: args{ + src: []byte(`"managed"`), + }, + wantErr: false, + }, + { + name: `success - possible enum value no. 2`, + args: args{ + src: []byte(`"custom"`), + }, + wantErr: false, + }, + { + name: "fail", + args: args{ + src: []byte("\"FOOBAR\""), + }, + wantErr: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + v := DomainCertificateType("") + if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { + t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) + } + }) + } +} + +// isEnum + func TestDomainTypes_UnmarshalJSON(t *testing.T) { type args struct { src []byte diff --git a/services/cdn/model_error_details.go b/services/cdn/model_error_details.go index f75eb73d7..bb4498de9 100644 --- a/services/cdn/model_error_details.go +++ b/services/cdn/model_error_details.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_error_details_test.go b/services/cdn/model_error_details_test.go index efebf13a4..fceacae40 100644 --- a/services/cdn/model_error_details_test.go +++ b/services/cdn/model_error_details_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_find_cache_paths_response.go b/services/cdn/model_find_cache_paths_response.go index a25a57579..6129bbfe2 100644 --- a/services/cdn/model_find_cache_paths_response.go +++ b/services/cdn/model_find_cache_paths_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_find_cache_paths_response_entry.go b/services/cdn/model_find_cache_paths_response_entry.go index 4b74f02c8..c16a61c5e 100644 --- a/services/cdn/model_find_cache_paths_response_entry.go +++ b/services/cdn/model_find_cache_paths_response_entry.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_find_cache_paths_response_entry_test.go b/services/cdn/model_find_cache_paths_response_entry_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_find_cache_paths_response_entry_test.go +++ b/services/cdn/model_find_cache_paths_response_entry_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_find_cache_paths_response_test.go b/services/cdn/model_find_cache_paths_response_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_find_cache_paths_response_test.go +++ b/services/cdn/model_find_cache_paths_response_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_generic_json_response.go b/services/cdn/model_generic_json_response.go index d72ee2bdf..fa765a827 100644 --- a/services/cdn/model_generic_json_response.go +++ b/services/cdn/model_generic_json_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_generic_json_response_test.go b/services/cdn/model_generic_json_response_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_generic_json_response_test.go +++ b/services/cdn/model_generic_json_response_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_get_cache_info_response.go b/services/cdn/model_get_cache_info_response.go index 0d74ceeb2..ad0e1c7f7 100644 --- a/services/cdn/model_get_cache_info_response.go +++ b/services/cdn/model_get_cache_info_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_get_cache_info_response_history_entry.go b/services/cdn/model_get_cache_info_response_history_entry.go index 6ea9625b5..31d819a66 100644 --- a/services/cdn/model_get_cache_info_response_history_entry.go +++ b/services/cdn/model_get_cache_info_response_history_entry.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_get_cache_info_response_history_entry_test.go b/services/cdn/model_get_cache_info_response_history_entry_test.go index a1f9f7227..3a5f13132 100644 --- a/services/cdn/model_get_cache_info_response_history_entry_test.go +++ b/services/cdn/model_get_cache_info_response_history_entry_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_get_cache_info_response_test.go b/services/cdn/model_get_cache_info_response_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_get_cache_info_response_test.go +++ b/services/cdn/model_get_cache_info_response_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_get_custom_domain_custom_certificate.go b/services/cdn/model_get_custom_domain_custom_certificate.go index e3c310cac..3ec4cd252 100644 --- a/services/cdn/model_get_custom_domain_custom_certificate.go +++ b/services/cdn/model_get_custom_domain_custom_certificate.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -18,6 +18,33 @@ import ( // checks if the GetCustomDomainCustomCertificate type satisfies the MappedNullable interface at compile time var _ MappedNullable = &GetCustomDomainCustomCertificate{} +/* + types and functions for skipDnsCheck +*/ + +// isBoolean +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetCustomDomainCustomCertificategetSkipDnsCheckAttributeType = *bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetCustomDomainCustomCertificategetSkipDnsCheckArgType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetCustomDomainCustomCertificategetSkipDnsCheckRetType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getGetCustomDomainCustomCertificategetSkipDnsCheckAttributeTypeOk(arg GetCustomDomainCustomCertificategetSkipDnsCheckAttributeType) (ret GetCustomDomainCustomCertificategetSkipDnsCheckRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setGetCustomDomainCustomCertificategetSkipDnsCheckAttributeType(arg *GetCustomDomainCustomCertificategetSkipDnsCheckAttributeType, val GetCustomDomainCustomCertificategetSkipDnsCheckRetType) { + *arg = &val +} + /* types and functions for type */ @@ -75,6 +102,9 @@ func setGetCustomDomainCustomCertificateGetVersionAttributeType(arg *GetCustomDo // GetCustomDomainCustomCertificate Returned if a custom certificate is used. Response does not contain the certificate or key. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetCustomDomainCustomCertificate struct { + // Returns if the CNAME Check has been disabled for this Custom Domain. This is usually set for migrations to allow for no downtime. + // REQUIRED + SkipDnsCheck GetCustomDomainCustomCertificategetSkipDnsCheckAttributeType `json:"skipDnsCheck" required:"true"` // REQUIRED Type GetCustomDomainCustomCertificateGetTypeAttributeType `json:"type" required:"true"` // Whenever a new custom certificate is added the version is increased by 1. @@ -91,8 +121,9 @@ type _GetCustomDomainCustomCertificate GetCustomDomainCustomCertificate // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewGetCustomDomainCustomCertificate(types GetCustomDomainCustomCertificateGetTypeArgType, version GetCustomDomainCustomCertificateGetVersionArgType) *GetCustomDomainCustomCertificate { +func NewGetCustomDomainCustomCertificate(skipDnsCheck GetCustomDomainCustomCertificategetSkipDnsCheckArgType, types GetCustomDomainCustomCertificateGetTypeArgType, version GetCustomDomainCustomCertificateGetVersionArgType) *GetCustomDomainCustomCertificate { this := GetCustomDomainCustomCertificate{} + setGetCustomDomainCustomCertificategetSkipDnsCheckAttributeType(&this.SkipDnsCheck, skipDnsCheck) setGetCustomDomainCustomCertificateGetTypeAttributeType(&this.Type, types) setGetCustomDomainCustomCertificateGetVersionAttributeType(&this.Version, version) return &this @@ -104,9 +135,31 @@ func NewGetCustomDomainCustomCertificate(types GetCustomDomainCustomCertificateG // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewGetCustomDomainCustomCertificateWithDefaults() *GetCustomDomainCustomCertificate { this := GetCustomDomainCustomCertificate{} + var skipDnsCheck bool = false + this.SkipDnsCheck = &skipDnsCheck return &this } +// GetSkipDnsCheck returns the SkipDnsCheck field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetCustomDomainCustomCertificate) GetSkipDnsCheck() (ret GetCustomDomainCustomCertificategetSkipDnsCheckRetType) { + ret, _ = o.GetSkipDnsCheckOk() + return ret +} + +// GetSkipDnsCheckOk returns a tuple with the SkipDnsCheck field value +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetCustomDomainCustomCertificate) GetSkipDnsCheckOk() (ret GetCustomDomainCustomCertificategetSkipDnsCheckRetType, ok bool) { + return getGetCustomDomainCustomCertificategetSkipDnsCheckAttributeTypeOk(o.SkipDnsCheck) +} + +// SetSkipDnsCheck sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetCustomDomainCustomCertificate) SetSkipDnsCheck(v GetCustomDomainCustomCertificategetSkipDnsCheckRetType) { + setGetCustomDomainCustomCertificategetSkipDnsCheckAttributeType(&o.SkipDnsCheck, v) +} + // GetType returns the Type field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetCustomDomainCustomCertificate) GetType() (ret GetCustomDomainCustomCertificateGetTypeRetType) { @@ -150,6 +203,9 @@ func (o *GetCustomDomainCustomCertificate) SetVersion(v GetCustomDomainCustomCer // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o GetCustomDomainCustomCertificate) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if val, ok := getGetCustomDomainCustomCertificategetSkipDnsCheckAttributeTypeOk(o.SkipDnsCheck); ok { + toSerialize["SkipDnsCheck"] = val + } if val, ok := getGetCustomDomainCustomCertificateGetTypeAttributeTypeOk(o.Type); ok { toSerialize["Type"] = val } diff --git a/services/cdn/model_get_custom_domain_custom_certificate_test.go b/services/cdn/model_get_custom_domain_custom_certificate_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_get_custom_domain_custom_certificate_test.go +++ b/services/cdn/model_get_custom_domain_custom_certificate_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_get_custom_domain_managed_certificate.go b/services/cdn/model_get_custom_domain_managed_certificate.go index 369cca18f..5ea759623 100644 --- a/services/cdn/model_get_custom_domain_managed_certificate.go +++ b/services/cdn/model_get_custom_domain_managed_certificate.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_get_custom_domain_managed_certificate_test.go b/services/cdn/model_get_custom_domain_managed_certificate_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_get_custom_domain_managed_certificate_test.go +++ b/services/cdn/model_get_custom_domain_managed_certificate_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_get_custom_domain_response.go b/services/cdn/model_get_custom_domain_response.go index b361c75aa..ee260a120 100644 --- a/services/cdn/model_get_custom_domain_response.go +++ b/services/cdn/model_get_custom_domain_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_get_custom_domain_response_certificate.go b/services/cdn/model_get_custom_domain_response_certificate.go index 8bea48148..2cfc5a522 100644 --- a/services/cdn/model_get_custom_domain_response_certificate.go +++ b/services/cdn/model_get_custom_domain_response_certificate.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_get_custom_domain_response_certificate_test.go b/services/cdn/model_get_custom_domain_response_certificate_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_get_custom_domain_response_certificate_test.go +++ b/services/cdn/model_get_custom_domain_response_certificate_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_get_custom_domain_response_test.go b/services/cdn/model_get_custom_domain_response_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_get_custom_domain_response_test.go +++ b/services/cdn/model_get_custom_domain_response_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_get_distribution_response.go b/services/cdn/model_get_distribution_response.go index da1055488..79fde7d31 100644 --- a/services/cdn/model_get_distribution_response.go +++ b/services/cdn/model_get_distribution_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_get_distribution_response_test.go b/services/cdn/model_get_distribution_response_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_get_distribution_response_test.go +++ b/services/cdn/model_get_distribution_response_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_get_logs_response.go b/services/cdn/model_get_logs_response.go index ad98da6cf..ec950a26f 100644 --- a/services/cdn/model_get_logs_response.go +++ b/services/cdn/model_get_logs_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_get_logs_response_test.go b/services/cdn/model_get_logs_response_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_get_logs_response_test.go +++ b/services/cdn/model_get_logs_response_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_get_logs_search_filters_response.go b/services/cdn/model_get_logs_search_filters_response.go index 331b7265c..49d7b59a3 100644 --- a/services/cdn/model_get_logs_search_filters_response.go +++ b/services/cdn/model_get_logs_search_filters_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_get_logs_search_filters_response_datacenter_block.go b/services/cdn/model_get_logs_search_filters_response_datacenter_block.go index 4932257dd..cfe773542 100644 --- a/services/cdn/model_get_logs_search_filters_response_datacenter_block.go +++ b/services/cdn/model_get_logs_search_filters_response_datacenter_block.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_get_logs_search_filters_response_datacenter_block_item.go b/services/cdn/model_get_logs_search_filters_response_datacenter_block_item.go index 405fb7b9d..a837410df 100644 --- a/services/cdn/model_get_logs_search_filters_response_datacenter_block_item.go +++ b/services/cdn/model_get_logs_search_filters_response_datacenter_block_item.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_get_logs_search_filters_response_datacenter_block_item_test.go b/services/cdn/model_get_logs_search_filters_response_datacenter_block_item_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_get_logs_search_filters_response_datacenter_block_item_test.go +++ b/services/cdn/model_get_logs_search_filters_response_datacenter_block_item_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_get_logs_search_filters_response_datacenter_block_test.go b/services/cdn/model_get_logs_search_filters_response_datacenter_block_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_get_logs_search_filters_response_datacenter_block_test.go +++ b/services/cdn/model_get_logs_search_filters_response_datacenter_block_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_get_logs_search_filters_response_test.go b/services/cdn/model_get_logs_search_filters_response_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_get_logs_search_filters_response_test.go +++ b/services/cdn/model_get_logs_search_filters_response_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_get_statistics_response.go b/services/cdn/model_get_statistics_response.go index cca6732a2..537379b90 100644 --- a/services/cdn/model_get_statistics_response.go +++ b/services/cdn/model_get_statistics_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_get_statistics_response_test.go b/services/cdn/model_get_statistics_response_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_get_statistics_response_test.go +++ b/services/cdn/model_get_statistics_response_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_http_backend.go b/services/cdn/model_http_backend.go index 0f144e5d9..3a6d51529 100644 --- a/services/cdn/model_http_backend.go +++ b/services/cdn/model_http_backend.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_http_backend_create.go b/services/cdn/model_http_backend_create.go index 702289d77..63c7b83e2 100644 --- a/services/cdn/model_http_backend_create.go +++ b/services/cdn/model_http_backend_create.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_http_backend_create_test.go b/services/cdn/model_http_backend_create_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_http_backend_create_test.go +++ b/services/cdn/model_http_backend_create_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_http_backend_patch.go b/services/cdn/model_http_backend_patch.go index 901f943e4..4fde8c6be 100644 --- a/services/cdn/model_http_backend_patch.go +++ b/services/cdn/model_http_backend_patch.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_http_backend_patch_test.go b/services/cdn/model_http_backend_patch_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_http_backend_patch_test.go +++ b/services/cdn/model_http_backend_patch_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_http_backend_test.go b/services/cdn/model_http_backend_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_http_backend_test.go +++ b/services/cdn/model_http_backend_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_list_distributions_response.go b/services/cdn/model_list_distributions_response.go index 07726de3f..c0da3464a 100644 --- a/services/cdn/model_list_distributions_response.go +++ b/services/cdn/model_list_distributions_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_list_distributions_response_test.go b/services/cdn/model_list_distributions_response_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_list_distributions_response_test.go +++ b/services/cdn/model_list_distributions_response_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_list_waf_collections_response.go b/services/cdn/model_list_waf_collections_response.go index 6e6c9de80..a9be43efb 100644 --- a/services/cdn/model_list_waf_collections_response.go +++ b/services/cdn/model_list_waf_collections_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_list_waf_collections_response_test.go b/services/cdn/model_list_waf_collections_response_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_list_waf_collections_response_test.go +++ b/services/cdn/model_list_waf_collections_response_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_loki_log_sink.go b/services/cdn/model_loki_log_sink.go index 09378e880..21ba413fd 100644 --- a/services/cdn/model_loki_log_sink.go +++ b/services/cdn/model_loki_log_sink.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_loki_log_sink_create.go b/services/cdn/model_loki_log_sink_create.go index 00fabe0ae..c5886588e 100644 --- a/services/cdn/model_loki_log_sink_create.go +++ b/services/cdn/model_loki_log_sink_create.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_loki_log_sink_create_test.go b/services/cdn/model_loki_log_sink_create_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_loki_log_sink_create_test.go +++ b/services/cdn/model_loki_log_sink_create_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_loki_log_sink_credentials.go b/services/cdn/model_loki_log_sink_credentials.go index 07d4721ab..96c142de4 100644 --- a/services/cdn/model_loki_log_sink_credentials.go +++ b/services/cdn/model_loki_log_sink_credentials.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_loki_log_sink_credentials_test.go b/services/cdn/model_loki_log_sink_credentials_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_loki_log_sink_credentials_test.go +++ b/services/cdn/model_loki_log_sink_credentials_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_loki_log_sink_patch.go b/services/cdn/model_loki_log_sink_patch.go index 399a52411..65b88f4f2 100644 --- a/services/cdn/model_loki_log_sink_patch.go +++ b/services/cdn/model_loki_log_sink_patch.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_loki_log_sink_patch_test.go b/services/cdn/model_loki_log_sink_patch_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_loki_log_sink_patch_test.go +++ b/services/cdn/model_loki_log_sink_patch_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_loki_log_sink_test.go b/services/cdn/model_loki_log_sink_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_loki_log_sink_test.go +++ b/services/cdn/model_loki_log_sink_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_match_condition.go b/services/cdn/model_match_condition.go index 245055b68..951c78d01 100644 --- a/services/cdn/model_match_condition.go +++ b/services/cdn/model_match_condition.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_match_condition_test.go b/services/cdn/model_match_condition_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_match_condition_test.go +++ b/services/cdn/model_match_condition_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_matcher.go b/services/cdn/model_matcher.go index ae6a0c81d..1bfec995f 100644 --- a/services/cdn/model_matcher.go +++ b/services/cdn/model_matcher.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_matcher_test.go b/services/cdn/model_matcher_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_matcher_test.go +++ b/services/cdn/model_matcher_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_optimizer.go b/services/cdn/model_optimizer.go index 8c6ddb814..f9bf0ec74 100644 --- a/services/cdn/model_optimizer.go +++ b/services/cdn/model_optimizer.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_optimizer_patch.go b/services/cdn/model_optimizer_patch.go index bbb6db904..c15bdd4a5 100644 --- a/services/cdn/model_optimizer_patch.go +++ b/services/cdn/model_optimizer_patch.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_optimizer_patch_test.go b/services/cdn/model_optimizer_patch_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_optimizer_patch_test.go +++ b/services/cdn/model_optimizer_patch_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_optimizer_test.go b/services/cdn/model_optimizer_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_optimizer_test.go +++ b/services/cdn/model_optimizer_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_patch_distribution_payload.go b/services/cdn/model_patch_distribution_payload.go index 7a5da9c17..984b9c9ea 100644 --- a/services/cdn/model_patch_distribution_payload.go +++ b/services/cdn/model_patch_distribution_payload.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_patch_distribution_payload_test.go b/services/cdn/model_patch_distribution_payload_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_patch_distribution_payload_test.go +++ b/services/cdn/model_patch_distribution_payload_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_patch_distribution_response.go b/services/cdn/model_patch_distribution_response.go index 0c290e35e..1ce74b770 100644 --- a/services/cdn/model_patch_distribution_response.go +++ b/services/cdn/model_patch_distribution_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_patch_distribution_response_test.go b/services/cdn/model_patch_distribution_response_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_patch_distribution_response_test.go +++ b/services/cdn/model_patch_distribution_response_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_purge_cache_payload.go b/services/cdn/model_purge_cache_payload.go index 5fcfb4cab..ecca505e8 100644 --- a/services/cdn/model_purge_cache_payload.go +++ b/services/cdn/model_purge_cache_payload.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_purge_cache_payload_test.go b/services/cdn/model_purge_cache_payload_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_purge_cache_payload_test.go +++ b/services/cdn/model_purge_cache_payload_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_put_custom_domain_custom_certificate.go b/services/cdn/model_put_custom_domain_custom_certificate.go index 1fecfd5e0..65a2119e9 100644 --- a/services/cdn/model_put_custom_domain_custom_certificate.go +++ b/services/cdn/model_put_custom_domain_custom_certificate.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -72,6 +72,33 @@ type PutCustomDomainCustomCertificateGetKeyArgType = string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PutCustomDomainCustomCertificateGetKeyRetType = string +/* + types and functions for skipDnsCheck +*/ + +// isBoolean +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type PutCustomDomainCustomCertificategetSkipDnsCheckAttributeType = *bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type PutCustomDomainCustomCertificategetSkipDnsCheckArgType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type PutCustomDomainCustomCertificategetSkipDnsCheckRetType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getPutCustomDomainCustomCertificategetSkipDnsCheckAttributeTypeOk(arg PutCustomDomainCustomCertificategetSkipDnsCheckAttributeType) (ret PutCustomDomainCustomCertificategetSkipDnsCheckRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setPutCustomDomainCustomCertificategetSkipDnsCheckAttributeType(arg *PutCustomDomainCustomCertificategetSkipDnsCheckAttributeType, val PutCustomDomainCustomCertificategetSkipDnsCheckRetType) { + *arg = &val +} + /* types and functions for type */ @@ -108,6 +135,8 @@ type PutCustomDomainCustomCertificate struct { // base64-encoded PEM encoded key // REQUIRED Key PutCustomDomainCustomCertificateGetKeyAttributeType `json:"key" required:"true"` + // When adding a new custom domain, we do a check to verify that your Domain points to the managed domain via a CNAME or ALIAS. If this is not the case, the call would usually reject. This additional property is an escape hatch to this functionality. It's useful for when you are migrating onto STACKIT CDN. It allows you to migrate without downtime. By providing a custom certificate with `skipDnsCheck` set to `true`, we will not check the Record for correctness. Then, once the CDN is set up, you can change the CNAME Record on your DNS and update the Custom Domain entry to disable this check, or switch to a managed certificate. This field is optional. If not set, the check is **not** skipped. + SkipDnsCheck PutCustomDomainCustomCertificategetSkipDnsCheckAttributeType `json:"skipDnsCheck,omitempty"` // REQUIRED Type PutCustomDomainCustomCertificateGetTypeAttributeType `json:"type" required:"true"` } @@ -177,6 +206,33 @@ func (o *PutCustomDomainCustomCertificate) SetKey(v PutCustomDomainCustomCertifi setPutCustomDomainCustomCertificateGetKeyAttributeType(&o.Key, v) } +// GetSkipDnsCheck returns the SkipDnsCheck field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *PutCustomDomainCustomCertificate) GetSkipDnsCheck() (res PutCustomDomainCustomCertificategetSkipDnsCheckRetType) { + res, _ = o.GetSkipDnsCheckOk() + return +} + +// GetSkipDnsCheckOk returns a tuple with the SkipDnsCheck field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *PutCustomDomainCustomCertificate) GetSkipDnsCheckOk() (ret PutCustomDomainCustomCertificategetSkipDnsCheckRetType, ok bool) { + return getPutCustomDomainCustomCertificategetSkipDnsCheckAttributeTypeOk(o.SkipDnsCheck) +} + +// HasSkipDnsCheck returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *PutCustomDomainCustomCertificate) HasSkipDnsCheck() bool { + _, ok := o.GetSkipDnsCheckOk() + return ok +} + +// SetSkipDnsCheck gets a reference to the given bool and assigns it to the SkipDnsCheck field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *PutCustomDomainCustomCertificate) SetSkipDnsCheck(v PutCustomDomainCustomCertificategetSkipDnsCheckRetType) { + setPutCustomDomainCustomCertificategetSkipDnsCheckAttributeType(&o.SkipDnsCheck, v) +} + // GetType returns the Type field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PutCustomDomainCustomCertificate) GetType() (ret PutCustomDomainCustomCertificateGetTypeRetType) { @@ -206,6 +262,9 @@ func (o PutCustomDomainCustomCertificate) ToMap() (map[string]interface{}, error if val, ok := getPutCustomDomainCustomCertificateGetKeyAttributeTypeOk(o.Key); ok { toSerialize["Key"] = val } + if val, ok := getPutCustomDomainCustomCertificategetSkipDnsCheckAttributeTypeOk(o.SkipDnsCheck); ok { + toSerialize["SkipDnsCheck"] = val + } if val, ok := getPutCustomDomainCustomCertificateGetTypeAttributeTypeOk(o.Type); ok { toSerialize["Type"] = val } diff --git a/services/cdn/model_put_custom_domain_custom_certificate_test.go b/services/cdn/model_put_custom_domain_custom_certificate_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_put_custom_domain_custom_certificate_test.go +++ b/services/cdn/model_put_custom_domain_custom_certificate_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_put_custom_domain_managed_certificate.go b/services/cdn/model_put_custom_domain_managed_certificate.go index 7a02888a8..3efdd8e37 100644 --- a/services/cdn/model_put_custom_domain_managed_certificate.go +++ b/services/cdn/model_put_custom_domain_managed_certificate.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_put_custom_domain_managed_certificate_test.go b/services/cdn/model_put_custom_domain_managed_certificate_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_put_custom_domain_managed_certificate_test.go +++ b/services/cdn/model_put_custom_domain_managed_certificate_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_put_custom_domain_payload.go b/services/cdn/model_put_custom_domain_payload.go index aa00c27b2..965a22415 100644 --- a/services/cdn/model_put_custom_domain_payload.go +++ b/services/cdn/model_put_custom_domain_payload.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_put_custom_domain_payload_certificate.go b/services/cdn/model_put_custom_domain_payload_certificate.go index 3abf8786b..810ec0aa7 100644 --- a/services/cdn/model_put_custom_domain_payload_certificate.go +++ b/services/cdn/model_put_custom_domain_payload_certificate.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_put_custom_domain_payload_certificate_test.go b/services/cdn/model_put_custom_domain_payload_certificate_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_put_custom_domain_payload_certificate_test.go +++ b/services/cdn/model_put_custom_domain_payload_certificate_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_put_custom_domain_payload_test.go b/services/cdn/model_put_custom_domain_payload_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_put_custom_domain_payload_test.go +++ b/services/cdn/model_put_custom_domain_payload_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_put_custom_domain_response.go b/services/cdn/model_put_custom_domain_response.go index 736db297f..54efae3a6 100644 --- a/services/cdn/model_put_custom_domain_response.go +++ b/services/cdn/model_put_custom_domain_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_put_custom_domain_response_certificate.go b/services/cdn/model_put_custom_domain_response_certificate.go index 80a6cac1e..b09c6fbc5 100644 --- a/services/cdn/model_put_custom_domain_response_certificate.go +++ b/services/cdn/model_put_custom_domain_response_certificate.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_put_custom_domain_response_certificate_test.go b/services/cdn/model_put_custom_domain_response_certificate_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_put_custom_domain_response_certificate_test.go +++ b/services/cdn/model_put_custom_domain_response_certificate_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_put_custom_domain_response_test.go b/services/cdn/model_put_custom_domain_response_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_put_custom_domain_response_test.go +++ b/services/cdn/model_put_custom_domain_response_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_redirect_config.go b/services/cdn/model_redirect_config.go index b8ac16840..01c0450d3 100644 --- a/services/cdn/model_redirect_config.go +++ b/services/cdn/model_redirect_config.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_redirect_config_test.go b/services/cdn/model_redirect_config_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_redirect_config_test.go +++ b/services/cdn/model_redirect_config_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_redirect_rule.go b/services/cdn/model_redirect_rule.go index 3e182114b..a84f53621 100644 --- a/services/cdn/model_redirect_rule.go +++ b/services/cdn/model_redirect_rule.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_redirect_rule_test.go b/services/cdn/model_redirect_rule_test.go index f91e38730..dab4b88d9 100644 --- a/services/cdn/model_redirect_rule_test.go +++ b/services/cdn/model_redirect_rule_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_region.go b/services/cdn/model_region.go index 19b4f794c..20983254e 100644 --- a/services/cdn/model_region.go +++ b/services/cdn/model_region.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_region_test.go b/services/cdn/model_region_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_region_test.go +++ b/services/cdn/model_region_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_status_error.go b/services/cdn/model_status_error.go index d7147144b..6cf2ae6bd 100644 --- a/services/cdn/model_status_error.go +++ b/services/cdn/model_status_error.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_status_error_test.go b/services/cdn/model_status_error_test.go index 7f9b99a13..7c2051f62 100644 --- a/services/cdn/model_status_error_test.go +++ b/services/cdn/model_status_error_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_waf_config.go b/services/cdn/model_waf_config.go index fd2a9302d..a6de725fe 100644 --- a/services/cdn/model_waf_config.go +++ b/services/cdn/model_waf_config.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_waf_config_patch.go b/services/cdn/model_waf_config_patch.go index 2ffc0e07b..a72d6adde 100644 --- a/services/cdn/model_waf_config_patch.go +++ b/services/cdn/model_waf_config_patch.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_waf_config_patch_test.go b/services/cdn/model_waf_config_patch_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_waf_config_patch_test.go +++ b/services/cdn/model_waf_config_patch_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_waf_config_test.go b/services/cdn/model_waf_config_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_waf_config_test.go +++ b/services/cdn/model_waf_config_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_waf_mode.go b/services/cdn/model_waf_mode.go index 5211a35fb..03afa404d 100644 --- a/services/cdn/model_waf_mode.go +++ b/services/cdn/model_waf_mode.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_waf_mode_test.go b/services/cdn/model_waf_mode_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_waf_mode_test.go +++ b/services/cdn/model_waf_mode_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_waf_paranoia_level.go b/services/cdn/model_waf_paranoia_level.go index dbd07141d..519f70e5e 100644 --- a/services/cdn/model_waf_paranoia_level.go +++ b/services/cdn/model_waf_paranoia_level.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_waf_paranoia_level_test.go b/services/cdn/model_waf_paranoia_level_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_waf_paranoia_level_test.go +++ b/services/cdn/model_waf_paranoia_level_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_waf_rule.go b/services/cdn/model_waf_rule.go index 98e43f6f6..d46437783 100644 --- a/services/cdn/model_waf_rule.go +++ b/services/cdn/model_waf_rule.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_waf_rule_action.go b/services/cdn/model_waf_rule_action.go index 3a3a74dd2..4553ff537 100644 --- a/services/cdn/model_waf_rule_action.go +++ b/services/cdn/model_waf_rule_action.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_waf_rule_action_test.go b/services/cdn/model_waf_rule_action_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_waf_rule_action_test.go +++ b/services/cdn/model_waf_rule_action_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_waf_rule_collection.go b/services/cdn/model_waf_rule_collection.go index 16702b207..b1bb08896 100644 --- a/services/cdn/model_waf_rule_collection.go +++ b/services/cdn/model_waf_rule_collection.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_waf_rule_collection_test.go b/services/cdn/model_waf_rule_collection_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_waf_rule_collection_test.go +++ b/services/cdn/model_waf_rule_collection_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_waf_rule_group.go b/services/cdn/model_waf_rule_group.go index d1b1b8b0a..ef9956c18 100644 --- a/services/cdn/model_waf_rule_group.go +++ b/services/cdn/model_waf_rule_group.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_waf_rule_group_test.go b/services/cdn/model_waf_rule_group_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_waf_rule_group_test.go +++ b/services/cdn/model_waf_rule_group_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_waf_rule_test.go b/services/cdn/model_waf_rule_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_waf_rule_test.go +++ b/services/cdn/model_waf_rule_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_waf_status_rule_block.go b/services/cdn/model_waf_status_rule_block.go index c1fb1c44c..019634cee 100644 --- a/services/cdn/model_waf_status_rule_block.go +++ b/services/cdn/model_waf_status_rule_block.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_waf_status_rule_block_reason.go b/services/cdn/model_waf_status_rule_block_reason.go index b5450799c..0291d5f17 100644 --- a/services/cdn/model_waf_status_rule_block_reason.go +++ b/services/cdn/model_waf_status_rule_block_reason.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_waf_status_rule_block_reason_directly_defined.go b/services/cdn/model_waf_status_rule_block_reason_directly_defined.go index 8b0e611c5..4b90ead08 100644 --- a/services/cdn/model_waf_status_rule_block_reason_directly_defined.go +++ b/services/cdn/model_waf_status_rule_block_reason_directly_defined.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_waf_status_rule_block_reason_directly_defined_test.go b/services/cdn/model_waf_status_rule_block_reason_directly_defined_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_waf_status_rule_block_reason_directly_defined_test.go +++ b/services/cdn/model_waf_status_rule_block_reason_directly_defined_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_waf_status_rule_block_reason_inherited_from_collection.go b/services/cdn/model_waf_status_rule_block_reason_inherited_from_collection.go index 3919c1360..45cb07478 100644 --- a/services/cdn/model_waf_status_rule_block_reason_inherited_from_collection.go +++ b/services/cdn/model_waf_status_rule_block_reason_inherited_from_collection.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_waf_status_rule_block_reason_inherited_from_collection_test.go b/services/cdn/model_waf_status_rule_block_reason_inherited_from_collection_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_waf_status_rule_block_reason_inherited_from_collection_test.go +++ b/services/cdn/model_waf_status_rule_block_reason_inherited_from_collection_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_waf_status_rule_block_reason_inherited_from_group.go b/services/cdn/model_waf_status_rule_block_reason_inherited_from_group.go index eb1f3b6fa..87680253b 100644 --- a/services/cdn/model_waf_status_rule_block_reason_inherited_from_group.go +++ b/services/cdn/model_waf_status_rule_block_reason_inherited_from_group.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_waf_status_rule_block_reason_inherited_from_group_test.go b/services/cdn/model_waf_status_rule_block_reason_inherited_from_group_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_waf_status_rule_block_reason_inherited_from_group_test.go +++ b/services/cdn/model_waf_status_rule_block_reason_inherited_from_group_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_waf_status_rule_block_reason_invalid_waf_type.go b/services/cdn/model_waf_status_rule_block_reason_invalid_waf_type.go index 03e5c800f..e8736b5b3 100644 --- a/services/cdn/model_waf_status_rule_block_reason_invalid_waf_type.go +++ b/services/cdn/model_waf_status_rule_block_reason_invalid_waf_type.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_waf_status_rule_block_reason_invalid_waf_type_test.go b/services/cdn/model_waf_status_rule_block_reason_invalid_waf_type_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_waf_status_rule_block_reason_invalid_waf_type_test.go +++ b/services/cdn/model_waf_status_rule_block_reason_invalid_waf_type_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_waf_status_rule_block_reason_never_defined.go b/services/cdn/model_waf_status_rule_block_reason_never_defined.go index 3c7052d11..8dd08ce31 100644 --- a/services/cdn/model_waf_status_rule_block_reason_never_defined.go +++ b/services/cdn/model_waf_status_rule_block_reason_never_defined.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_waf_status_rule_block_reason_never_defined_test.go b/services/cdn/model_waf_status_rule_block_reason_never_defined_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_waf_status_rule_block_reason_never_defined_test.go +++ b/services/cdn/model_waf_status_rule_block_reason_never_defined_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_waf_status_rule_block_reason_test.go b/services/cdn/model_waf_status_rule_block_reason_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_waf_status_rule_block_reason_test.go +++ b/services/cdn/model_waf_status_rule_block_reason_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_waf_status_rule_block_test.go b/services/cdn/model_waf_status_rule_block_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_waf_status_rule_block_test.go +++ b/services/cdn/model_waf_status_rule_block_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_waf_type.go b/services/cdn/model_waf_type.go index 87bba915f..347871ac1 100644 --- a/services/cdn/model_waf_type.go +++ b/services/cdn/model_waf_type.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_waf_type_test.go b/services/cdn/model_waf_type_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_waf_type_test.go +++ b/services/cdn/model_waf_type_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_waf_violation.go b/services/cdn/model_waf_violation.go index ee78fc7a7..fec006ee0 100644 --- a/services/cdn/model_waf_violation.go +++ b/services/cdn/model_waf_violation.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/model_waf_violation_test.go b/services/cdn/model_waf_violation_test.go index d7e05bb41..424823139 100644 --- a/services/cdn/model_waf_violation_test.go +++ b/services/cdn/model_waf_violation_test.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/oas_commit b/services/cdn/oas_commit index f5e4510f9..e3713dde3 100644 --- a/services/cdn/oas_commit +++ b/services/cdn/oas_commit @@ -1 +1 @@ -73b7457504497158e2836857f5ca4d2e6186ee5d +0e64886dd0847341800d7191ed193b75413be998 diff --git a/services/cdn/utils.go b/services/cdn/utils.go index 9968dd90b..316591f62 100644 --- a/services/cdn/utils.go +++ b/services/cdn/utils.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1api/api_default.go b/services/cdn/v1api/api_default.go index 395d4b863..c63716d83 100644 --- a/services/cdn/v1api/api_default.go +++ b/services/cdn/v1api/api_default.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1api/api_default_mock.go b/services/cdn/v1api/api_default_mock.go index 77605f861..0c76919be 100644 --- a/services/cdn/v1api/api_default_mock.go +++ b/services/cdn/v1api/api_default_mock.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1api/client.go b/services/cdn/v1api/client.go index 3fe0e2ac4..3b57fcf91 100644 --- a/services/cdn/v1api/client.go +++ b/services/cdn/v1api/client.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -42,7 +42,7 @@ var ( queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]") ) -// APIClient manages communication with the CDN API API v1.0.0 +// APIClient manages communication with the STACKIT CDN API API v1.0.0 // In most cases there should be only one, shared, APIClient. type APIClient struct { cfg *config.Configuration diff --git a/services/cdn/v1api/configuration.go b/services/cdn/v1api/configuration.go index b8c19f97a..2cc4c4b44 100644 --- a/services/cdn/v1api/configuration.go +++ b/services/cdn/v1api/configuration.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1api/model_bucket_backend.go b/services/cdn/v1api/model_bucket_backend.go index d38112115..e63b85c2d 100644 --- a/services/cdn/v1api/model_bucket_backend.go +++ b/services/cdn/v1api/model_bucket_backend.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,9 +20,10 @@ var _ MappedNullable = &BucketBackend{} // BucketBackend struct for BucketBackend type BucketBackend struct { - BucketUrl string `json:"bucketUrl"` - Region string `json:"region"` - Type string `json:"type"` + BucketUrl string `json:"bucketUrl"` + Region string `json:"region"` + Type string `json:"type"` + AdditionalProperties map[string]interface{} } type _BucketBackend BucketBackend @@ -133,6 +133,11 @@ func (o BucketBackend) ToMap() (map[string]interface{}, error) { toSerialize["bucketUrl"] = o.BucketUrl toSerialize["region"] = o.Region toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -162,9 +167,7 @@ func (o *BucketBackend) UnmarshalJSON(data []byte) (err error) { varBucketBackend := _BucketBackend{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varBucketBackend) + err = json.Unmarshal(data, &varBucketBackend) if err != nil { return err @@ -172,6 +175,15 @@ func (o *BucketBackend) UnmarshalJSON(data []byte) (err error) { *o = BucketBackend(varBucketBackend) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "bucketUrl") + delete(additionalProperties, "region") + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_bucket_backend_create.go b/services/cdn/v1api/model_bucket_backend_create.go index 953a7ac4b..67331da7f 100644 --- a/services/cdn/v1api/model_bucket_backend_create.go +++ b/services/cdn/v1api/model_bucket_backend_create.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,10 +20,11 @@ var _ MappedNullable = &BucketBackendCreate{} // BucketBackendCreate struct for BucketBackendCreate type BucketBackendCreate struct { - BucketUrl string `json:"bucketUrl"` - Credentials BucketCredentials `json:"credentials"` - Region string `json:"region"` - Type string `json:"type"` + BucketUrl string `json:"bucketUrl"` + Credentials BucketCredentials `json:"credentials"` + Region string `json:"region"` + Type string `json:"type"` + AdditionalProperties map[string]interface{} } type _BucketBackendCreate BucketBackendCreate @@ -160,6 +160,11 @@ func (o BucketBackendCreate) ToMap() (map[string]interface{}, error) { toSerialize["credentials"] = o.Credentials toSerialize["region"] = o.Region toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -190,9 +195,7 @@ func (o *BucketBackendCreate) UnmarshalJSON(data []byte) (err error) { varBucketBackendCreate := _BucketBackendCreate{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varBucketBackendCreate) + err = json.Unmarshal(data, &varBucketBackendCreate) if err != nil { return err @@ -200,6 +203,16 @@ func (o *BucketBackendCreate) UnmarshalJSON(data []byte) (err error) { *o = BucketBackendCreate(varBucketBackendCreate) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "bucketUrl") + delete(additionalProperties, "credentials") + delete(additionalProperties, "region") + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_bucket_backend_patch.go b/services/cdn/v1api/model_bucket_backend_patch.go index 240b2dc48..55312728d 100644 --- a/services/cdn/v1api/model_bucket_backend_patch.go +++ b/services/cdn/v1api/model_bucket_backend_patch.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,10 +20,11 @@ var _ MappedNullable = &BucketBackendPatch{} // BucketBackendPatch struct for BucketBackendPatch type BucketBackendPatch struct { - BucketUrl *string `json:"bucketUrl,omitempty"` - Credentials *BucketCredentials `json:"credentials,omitempty"` - Region *string `json:"region,omitempty"` - Type string `json:"type"` + BucketUrl *string `json:"bucketUrl,omitempty"` + Credentials *BucketCredentials `json:"credentials,omitempty"` + Region *string `json:"region,omitempty"` + Type string `json:"type"` + AdditionalProperties map[string]interface{} } type _BucketBackendPatch BucketBackendPatch @@ -187,6 +187,11 @@ func (o BucketBackendPatch) ToMap() (map[string]interface{}, error) { toSerialize["region"] = o.Region } toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -214,9 +219,7 @@ func (o *BucketBackendPatch) UnmarshalJSON(data []byte) (err error) { varBucketBackendPatch := _BucketBackendPatch{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varBucketBackendPatch) + err = json.Unmarshal(data, &varBucketBackendPatch) if err != nil { return err @@ -224,6 +227,16 @@ func (o *BucketBackendPatch) UnmarshalJSON(data []byte) (err error) { *o = BucketBackendPatch(varBucketBackendPatch) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "bucketUrl") + delete(additionalProperties, "credentials") + delete(additionalProperties, "region") + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_bucket_credentials.go b/services/cdn/v1api/model_bucket_credentials.go index d8da028da..6673a8203 100644 --- a/services/cdn/v1api/model_bucket_credentials.go +++ b/services/cdn/v1api/model_bucket_credentials.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,8 +20,9 @@ var _ MappedNullable = &BucketCredentials{} // BucketCredentials struct for BucketCredentials type BucketCredentials struct { - AccessKeyId string `json:"accessKeyId"` - SecretAccessKey string `json:"secretAccessKey"` + AccessKeyId string `json:"accessKeyId"` + SecretAccessKey string `json:"secretAccessKey"` + AdditionalProperties map[string]interface{} } type _BucketCredentials BucketCredentials @@ -106,6 +106,11 @@ func (o BucketCredentials) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["accessKeyId"] = o.AccessKeyId toSerialize["secretAccessKey"] = o.SecretAccessKey + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -134,9 +139,7 @@ func (o *BucketCredentials) UnmarshalJSON(data []byte) (err error) { varBucketCredentials := _BucketCredentials{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varBucketCredentials) + err = json.Unmarshal(data, &varBucketCredentials) if err != nil { return err @@ -144,6 +147,14 @@ func (o *BucketCredentials) UnmarshalJSON(data []byte) (err error) { *o = BucketCredentials(varBucketCredentials) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "accessKeyId") + delete(additionalProperties, "secretAccessKey") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_config.go b/services/cdn/v1api/model_config.go index 03aab463f..1e3e45b83 100644 --- a/services/cdn/v1api/model_config.go +++ b/services/cdn/v1api/model_config.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -30,11 +29,12 @@ type Config struct { DefaultCacheDuration NullableString `json:"defaultCacheDuration,omitempty"` LogSink *LokiLogSink `json:"logSink,omitempty"` // Sets the monthly limit of bandwidth in bytes that the pullzone is allowed to use. - MonthlyLimitBytes NullableInt64 `json:"monthlyLimitBytes,omitempty"` - Optimizer *Optimizer `json:"optimizer,omitempty"` - Redirects *RedirectConfig `json:"redirects,omitempty"` - Regions []Region `json:"regions"` - Waf WafConfig `json:"waf"` + MonthlyLimitBytes NullableInt64 `json:"monthlyLimitBytes,omitempty"` + Optimizer *Optimizer `json:"optimizer,omitempty"` + Redirects *RedirectConfig `json:"redirects,omitempty"` + Regions []Region `json:"regions"` + Waf WafConfig `json:"waf"` + AdditionalProperties map[string]interface{} } type _Config Config @@ -393,6 +393,11 @@ func (o Config) ToMap() (map[string]interface{}, error) { } toSerialize["regions"] = o.Regions toSerialize["waf"] = o.Waf + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -424,9 +429,7 @@ func (o *Config) UnmarshalJSON(data []byte) (err error) { varConfig := _Config{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varConfig) + err = json.Unmarshal(data, &varConfig) if err != nil { return err @@ -434,6 +437,22 @@ func (o *Config) UnmarshalJSON(data []byte) (err error) { *o = Config(varConfig) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "backend") + delete(additionalProperties, "blockedCountries") + delete(additionalProperties, "blockedIps") + delete(additionalProperties, "defaultCacheDuration") + delete(additionalProperties, "logSink") + delete(additionalProperties, "monthlyLimitBytes") + delete(additionalProperties, "optimizer") + delete(additionalProperties, "redirects") + delete(additionalProperties, "regions") + delete(additionalProperties, "waf") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_config_backend.go b/services/cdn/v1api/model_config_backend.go index 3bf45639a..eb94e8444 100644 --- a/services/cdn/v1api/model_config_backend.go +++ b/services/cdn/v1api/model_config_backend.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1api/model_config_patch.go b/services/cdn/v1api/model_config_patch.go index 398e9c756..5c0dcd51b 100644 --- a/services/cdn/v1api/model_config_patch.go +++ b/services/cdn/v1api/model_config_patch.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -28,13 +28,16 @@ type ConfigPatch struct { DefaultCacheDuration NullableString `json:"defaultCacheDuration,omitempty"` LogSink NullableLokiLogSinkPatch `json:"logSink,omitempty"` // Sets the monthly limit of bandwidth in bytes that the pullzone is allowed to use. - MonthlyLimitBytes NullableInt64 `json:"monthlyLimitBytes,omitempty"` - Optimizer *OptimizerPatch `json:"optimizer,omitempty"` - Redirects *RedirectConfig `json:"redirects,omitempty"` - Regions []Region `json:"regions,omitempty"` - Waf *WafConfigPatch `json:"waf,omitempty"` + MonthlyLimitBytes NullableInt64 `json:"monthlyLimitBytes,omitempty"` + Optimizer *OptimizerPatch `json:"optimizer,omitempty"` + Redirects *RedirectConfig `json:"redirects,omitempty"` + Regions []Region `json:"regions,omitempty"` + Waf *WafConfigPatch `json:"waf,omitempty"` + AdditionalProperties map[string]interface{} } +type _ConfigPatch ConfigPatch + // NewConfigPatch instantiates a new ConfigPatch 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 @@ -445,9 +448,44 @@ func (o ConfigPatch) ToMap() (map[string]interface{}, error) { if !IsNil(o.Waf) { toSerialize["waf"] = o.Waf } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *ConfigPatch) UnmarshalJSON(data []byte) (err error) { + varConfigPatch := _ConfigPatch{} + + err = json.Unmarshal(data, &varConfigPatch) + + if err != nil { + return err + } + + *o = ConfigPatch(varConfigPatch) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "backend") + delete(additionalProperties, "blockedCountries") + delete(additionalProperties, "blockedIps") + delete(additionalProperties, "defaultCacheDuration") + delete(additionalProperties, "logSink") + delete(additionalProperties, "monthlyLimitBytes") + delete(additionalProperties, "optimizer") + delete(additionalProperties, "redirects") + delete(additionalProperties, "regions") + delete(additionalProperties, "waf") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableConfigPatch struct { value *ConfigPatch isSet bool diff --git a/services/cdn/v1api/model_config_patch_backend.go b/services/cdn/v1api/model_config_patch_backend.go index 75cba3c2b..15295afef 100644 --- a/services/cdn/v1api/model_config_patch_backend.go +++ b/services/cdn/v1api/model_config_patch_backend.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1api/model_create_distribution_payload.go b/services/cdn/v1api/model_create_distribution_payload.go index a8401c22d..8b4e76447 100644 --- a/services/cdn/v1api/model_create_distribution_payload.go +++ b/services/cdn/v1api/model_create_distribution_payload.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -36,8 +35,9 @@ type CreateDistributionPayload struct { Optimizer *Optimizer `json:"optimizer,omitempty"` Redirects *RedirectConfig `json:"redirects,omitempty"` // Define in which regions you would like your content to be cached. - Regions []Region `json:"regions"` - Waf *WafConfig `json:"waf,omitempty"` + Regions []Region `json:"regions"` + Waf *WafConfig `json:"waf,omitempty"` + AdditionalProperties map[string]interface{} } type _CreateDistributionPayload CreateDistributionPayload @@ -436,6 +436,11 @@ func (o CreateDistributionPayload) ToMap() (map[string]interface{}, error) { if !IsNil(o.Waf) { toSerialize["waf"] = o.Waf } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -464,9 +469,7 @@ func (o *CreateDistributionPayload) UnmarshalJSON(data []byte) (err error) { varCreateDistributionPayload := _CreateDistributionPayload{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varCreateDistributionPayload) + err = json.Unmarshal(data, &varCreateDistributionPayload) if err != nil { return err @@ -474,6 +477,23 @@ func (o *CreateDistributionPayload) UnmarshalJSON(data []byte) (err error) { *o = CreateDistributionPayload(varCreateDistributionPayload) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "backend") + delete(additionalProperties, "blockedCountries") + delete(additionalProperties, "blockedIps") + delete(additionalProperties, "defaultCacheDuration") + delete(additionalProperties, "intentId") + delete(additionalProperties, "logSink") + delete(additionalProperties, "monthlyLimitBytes") + delete(additionalProperties, "optimizer") + delete(additionalProperties, "redirects") + delete(additionalProperties, "regions") + delete(additionalProperties, "waf") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_create_distribution_payload_backend.go b/services/cdn/v1api/model_create_distribution_payload_backend.go index 6b8b56961..1509b8e74 100644 --- a/services/cdn/v1api/model_create_distribution_payload_backend.go +++ b/services/cdn/v1api/model_create_distribution_payload_backend.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1api/model_create_distribution_response.go b/services/cdn/v1api/model_create_distribution_response.go index a2d768dc5..c3d375805 100644 --- a/services/cdn/v1api/model_create_distribution_response.go +++ b/services/cdn/v1api/model_create_distribution_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,7 +20,8 @@ var _ MappedNullable = &CreateDistributionResponse{} // CreateDistributionResponse struct for CreateDistributionResponse type CreateDistributionResponse struct { - Distribution Distribution `json:"distribution"` + Distribution Distribution `json:"distribution"` + AdditionalProperties map[string]interface{} } type _CreateDistributionResponse CreateDistributionResponse @@ -79,6 +79,11 @@ func (o CreateDistributionResponse) MarshalJSON() ([]byte, error) { func (o CreateDistributionResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["distribution"] = o.Distribution + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -106,9 +111,7 @@ func (o *CreateDistributionResponse) UnmarshalJSON(data []byte) (err error) { varCreateDistributionResponse := _CreateDistributionResponse{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varCreateDistributionResponse) + err = json.Unmarshal(data, &varCreateDistributionResponse) if err != nil { return err @@ -116,6 +119,13 @@ func (o *CreateDistributionResponse) UnmarshalJSON(data []byte) (err error) { *o = CreateDistributionResponse(varCreateDistributionResponse) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "distribution") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_custom_domain.go b/services/cdn/v1api/model_custom_domain.go index 9bf8eebd4..863257e96 100644 --- a/services/cdn/v1api/model_custom_domain.go +++ b/services/cdn/v1api/model_custom_domain.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -24,8 +23,9 @@ type CustomDomain struct { // This object is present if the custom domain has errors. Errors []StatusError `json:"errors,omitempty"` // The domain. Can be used as input for the GetCustomDomain endpoint - Name string `json:"name"` - Status DomainStatus `json:"status"` + Name string `json:"name"` + Status DomainStatus `json:"status"` + AdditionalProperties map[string]interface{} } type _CustomDomain CustomDomain @@ -144,6 +144,11 @@ func (o CustomDomain) ToMap() (map[string]interface{}, error) { } toSerialize["name"] = o.Name toSerialize["status"] = o.Status + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -172,9 +177,7 @@ func (o *CustomDomain) UnmarshalJSON(data []byte) (err error) { varCustomDomain := _CustomDomain{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varCustomDomain) + err = json.Unmarshal(data, &varCustomDomain) if err != nil { return err @@ -182,6 +185,15 @@ func (o *CustomDomain) UnmarshalJSON(data []byte) (err error) { *o = CustomDomain(varCustomDomain) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "errors") + delete(additionalProperties, "name") + delete(additionalProperties, "status") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_delete_custom_domain_response.go b/services/cdn/v1api/model_delete_custom_domain_response.go index c86f99c86..163b09baf 100644 --- a/services/cdn/v1api/model_delete_custom_domain_response.go +++ b/services/cdn/v1api/model_delete_custom_domain_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -19,9 +19,12 @@ var _ MappedNullable = &DeleteCustomDomainResponse{} // DeleteCustomDomainResponse Returns the custom domain that was deleted while the deletion has not completed yet. After the deletion was successful the response will be empty. type DeleteCustomDomainResponse struct { - CustomDomain *CustomDomain `json:"customDomain,omitempty"` + CustomDomain *CustomDomain `json:"customDomain,omitempty"` + AdditionalProperties map[string]interface{} } +type _DeleteCustomDomainResponse DeleteCustomDomainResponse + // NewDeleteCustomDomainResponse instantiates a new DeleteCustomDomainResponse 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 @@ -84,9 +87,35 @@ func (o DeleteCustomDomainResponse) ToMap() (map[string]interface{}, error) { if !IsNil(o.CustomDomain) { toSerialize["customDomain"] = o.CustomDomain } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *DeleteCustomDomainResponse) UnmarshalJSON(data []byte) (err error) { + varDeleteCustomDomainResponse := _DeleteCustomDomainResponse{} + + err = json.Unmarshal(data, &varDeleteCustomDomainResponse) + + if err != nil { + return err + } + + *o = DeleteCustomDomainResponse(varDeleteCustomDomainResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "customDomain") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableDeleteCustomDomainResponse struct { value *DeleteCustomDomainResponse isSet bool diff --git a/services/cdn/v1api/model_delete_distribution_response.go b/services/cdn/v1api/model_delete_distribution_response.go index 482ee73a2..d28039e45 100644 --- a/services/cdn/v1api/model_delete_distribution_response.go +++ b/services/cdn/v1api/model_delete_distribution_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -19,9 +19,12 @@ var _ MappedNullable = &DeleteDistributionResponse{} // DeleteDistributionResponse struct for DeleteDistributionResponse type DeleteDistributionResponse struct { - Distribution *Distribution `json:"distribution,omitempty"` + Distribution *Distribution `json:"distribution,omitempty"` + AdditionalProperties map[string]interface{} } +type _DeleteDistributionResponse DeleteDistributionResponse + // NewDeleteDistributionResponse instantiates a new DeleteDistributionResponse 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 @@ -84,9 +87,35 @@ func (o DeleteDistributionResponse) ToMap() (map[string]interface{}, error) { if !IsNil(o.Distribution) { toSerialize["distribution"] = o.Distribution } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *DeleteDistributionResponse) UnmarshalJSON(data []byte) (err error) { + varDeleteDistributionResponse := _DeleteDistributionResponse{} + + err = json.Unmarshal(data, &varDeleteDistributionResponse) + + if err != nil { + return err + } + + *o = DeleteDistributionResponse(varDeleteDistributionResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "distribution") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableDeleteDistributionResponse struct { value *DeleteDistributionResponse isSet bool diff --git a/services/cdn/v1api/model_distribution.go b/services/cdn/v1api/model_distribution.go index dd12e55ee..a1a4d9e65 100644 --- a/services/cdn/v1api/model_distribution.go +++ b/services/cdn/v1api/model_distribution.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" "time" @@ -33,8 +32,9 @@ type Distribution struct { // - `CREATING`: The distribution was just created. All the relevant resources are created in the background. Once fully reconciled, this switches to `ACTIVE`. If there are any issues, the status changes to `ERROR`. You can look at the `errors` array to get more infos. - `ACTIVE`: The usual state. The desired configuration is synced, there are no errors - `UPDATING`: The state when there is a discrepancy between the desired and actual configuration state. This occurs right after an update. Will switch to `ACTIVE` or `ERROR`, depending on if synchronizing succeeds or not. - `DELETING`: The state right after a delete request was received. The distribution will stay in this status until all resources have been successfully removed, or until we encounter an `ERROR` state. **NOTE:** You can keep fetching the distribution while it is deleting. After successful deletion, trying to get a distribution will return a 404 Not Found response - `ERROR`: The error state. Look at the `errors` array for more info. Status string `json:"status"` // RFC3339 string which returns the last time the distribution configuration was modified. - UpdatedAt time.Time `json:"updatedAt"` - Waf *DistributionWaf `json:"waf,omitempty"` + UpdatedAt time.Time `json:"updatedAt"` + Waf *DistributionWaf `json:"waf,omitempty"` + AdditionalProperties map[string]interface{} } type _Distribution Distribution @@ -318,6 +318,11 @@ func (o Distribution) ToMap() (map[string]interface{}, error) { if !IsNil(o.Waf) { toSerialize["waf"] = o.Waf } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -351,9 +356,7 @@ func (o *Distribution) UnmarshalJSON(data []byte) (err error) { varDistribution := _Distribution{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varDistribution) + err = json.Unmarshal(data, &varDistribution) if err != nil { return err @@ -361,6 +364,21 @@ func (o *Distribution) UnmarshalJSON(data []byte) (err error) { *o = Distribution(varDistribution) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "config") + delete(additionalProperties, "createdAt") + delete(additionalProperties, "domains") + delete(additionalProperties, "errors") + delete(additionalProperties, "id") + delete(additionalProperties, "projectId") + delete(additionalProperties, "status") + delete(additionalProperties, "updatedAt") + delete(additionalProperties, "waf") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_distribution_logs_record.go b/services/cdn/v1api/model_distribution_logs_record.go index 243710349..0f1c44d3e 100644 --- a/services/cdn/v1api/model_distribution_logs_record.go +++ b/services/cdn/v1api/model_distribution_logs_record.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" "time" @@ -28,11 +27,12 @@ type DistributionLogsRecord struct { Host string `json:"host"` Path string `json:"path"` // ISO 3166-1 A2 compliant country code - RequestCountryCode string `json:"requestCountryCode"` - Size int64 `json:"size"` - StatusCode int32 `json:"statusCode"` - Timestamp time.Time `json:"timestamp"` - WafViolation *WAFViolation `json:"wafViolation,omitempty"` + RequestCountryCode string `json:"requestCountryCode"` + Size int64 `json:"size"` + StatusCode int32 `json:"statusCode"` + Timestamp time.Time `json:"timestamp"` + WafViolation *WAFViolation `json:"wafViolation,omitempty"` + AdditionalProperties map[string]interface{} } type _DistributionLogsRecord DistributionLogsRecord @@ -333,6 +333,11 @@ func (o DistributionLogsRecord) ToMap() (map[string]interface{}, error) { if !IsNil(o.WafViolation) { toSerialize["wafViolation"] = o.WafViolation } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -368,9 +373,7 @@ func (o *DistributionLogsRecord) UnmarshalJSON(data []byte) (err error) { varDistributionLogsRecord := _DistributionLogsRecord{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varDistributionLogsRecord) + err = json.Unmarshal(data, &varDistributionLogsRecord) if err != nil { return err @@ -378,6 +381,22 @@ func (o *DistributionLogsRecord) UnmarshalJSON(data []byte) (err error) { *o = DistributionLogsRecord(varDistributionLogsRecord) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "cacheHit") + delete(additionalProperties, "dataCenterRegion") + delete(additionalProperties, "distributionId") + delete(additionalProperties, "host") + delete(additionalProperties, "path") + delete(additionalProperties, "requestCountryCode") + delete(additionalProperties, "size") + delete(additionalProperties, "statusCode") + delete(additionalProperties, "timestamp") + delete(additionalProperties, "wafViolation") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_distribution_statistics_record.go b/services/cdn/v1api/model_distribution_statistics_record.go index 410767eda..30ab1ac8b 100644 --- a/services/cdn/v1api/model_distribution_statistics_record.go +++ b/services/cdn/v1api/model_distribution_statistics_record.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" "time" @@ -32,7 +31,8 @@ type DistributionStatisticsRecord struct { End time.Time `json:"end"` Regions DistributionStatisticsRecordRegions `json:"regions"` // Start of the time interval the statistics refer to - Start time.Time `json:"start"` + Start time.Time `json:"start"` + AdditionalProperties map[string]interface{} } type _DistributionStatisticsRecord DistributionStatisticsRecord @@ -220,6 +220,11 @@ func (o DistributionStatisticsRecord) ToMap() (map[string]interface{}, error) { toSerialize["end"] = o.End toSerialize["regions"] = o.Regions toSerialize["start"] = o.Start + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -252,9 +257,7 @@ func (o *DistributionStatisticsRecord) UnmarshalJSON(data []byte) (err error) { varDistributionStatisticsRecord := _DistributionStatisticsRecord{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varDistributionStatisticsRecord) + err = json.Unmarshal(data, &varDistributionStatisticsRecord) if err != nil { return err @@ -262,6 +265,18 @@ func (o *DistributionStatisticsRecord) UnmarshalJSON(data []byte) (err error) { *o = DistributionStatisticsRecord(varDistributionStatisticsRecord) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "cachedRequests") + delete(additionalProperties, "totalRequests") + delete(additionalProperties, "totalTrafficBytes") + delete(additionalProperties, "end") + delete(additionalProperties, "regions") + delete(additionalProperties, "start") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_distribution_statistics_record_entry.go b/services/cdn/v1api/model_distribution_statistics_record_entry.go index 073689162..1bb4a283e 100644 --- a/services/cdn/v1api/model_distribution_statistics_record_entry.go +++ b/services/cdn/v1api/model_distribution_statistics_record_entry.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -26,7 +25,8 @@ type DistributionStatisticsRecordEntry struct { // Total number of requests that were served TotalRequests int64 `json:"totalRequests"` // Total traffic in bytes that occurred during the time interval - TotalTrafficBytes int64 `json:"totalTrafficBytes"` + TotalTrafficBytes int64 `json:"totalTrafficBytes"` + AdditionalProperties map[string]interface{} } type _DistributionStatisticsRecordEntry DistributionStatisticsRecordEntry @@ -136,6 +136,11 @@ func (o DistributionStatisticsRecordEntry) ToMap() (map[string]interface{}, erro toSerialize["cachedRequests"] = o.CachedRequests toSerialize["totalRequests"] = o.TotalRequests toSerialize["totalTrafficBytes"] = o.TotalTrafficBytes + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -165,9 +170,7 @@ func (o *DistributionStatisticsRecordEntry) UnmarshalJSON(data []byte) (err erro varDistributionStatisticsRecordEntry := _DistributionStatisticsRecordEntry{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varDistributionStatisticsRecordEntry) + err = json.Unmarshal(data, &varDistributionStatisticsRecordEntry) if err != nil { return err @@ -175,6 +178,15 @@ func (o *DistributionStatisticsRecordEntry) UnmarshalJSON(data []byte) (err erro *o = DistributionStatisticsRecordEntry(varDistributionStatisticsRecordEntry) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "cachedRequests") + delete(additionalProperties, "totalRequests") + delete(additionalProperties, "totalTrafficBytes") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_distribution_statistics_record_regions.go b/services/cdn/v1api/model_distribution_statistics_record_regions.go index a54d6177f..5596df91a 100644 --- a/services/cdn/v1api/model_distribution_statistics_record_regions.go +++ b/services/cdn/v1api/model_distribution_statistics_record_regions.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,11 +20,12 @@ var _ MappedNullable = &DistributionStatisticsRecordRegions{} // DistributionStatisticsRecordRegions Mapping of regions to the metrics for this region for the defined time interval All regions are always present. If no traffic was reported for a region, it will still contain 0-filled properties type DistributionStatisticsRecordRegions struct { - AF DistributionStatisticsRecordEntry `json:"AF"` - ASIA DistributionStatisticsRecordEntry `json:"ASIA"` - EU DistributionStatisticsRecordEntry `json:"EU"` - SA DistributionStatisticsRecordEntry `json:"SA"` - US DistributionStatisticsRecordEntry `json:"US"` + AF DistributionStatisticsRecordEntry `json:"AF"` + ASIA DistributionStatisticsRecordEntry `json:"ASIA"` + EU DistributionStatisticsRecordEntry `json:"EU"` + SA DistributionStatisticsRecordEntry `json:"SA"` + US DistributionStatisticsRecordEntry `json:"US"` + AdditionalProperties map[string]interface{} } type _DistributionStatisticsRecordRegions DistributionStatisticsRecordRegions @@ -187,6 +187,11 @@ func (o DistributionStatisticsRecordRegions) ToMap() (map[string]interface{}, er toSerialize["EU"] = o.EU toSerialize["SA"] = o.SA toSerialize["US"] = o.US + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -218,9 +223,7 @@ func (o *DistributionStatisticsRecordRegions) UnmarshalJSON(data []byte) (err er varDistributionStatisticsRecordRegions := _DistributionStatisticsRecordRegions{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varDistributionStatisticsRecordRegions) + err = json.Unmarshal(data, &varDistributionStatisticsRecordRegions) if err != nil { return err @@ -228,6 +231,17 @@ func (o *DistributionStatisticsRecordRegions) UnmarshalJSON(data []byte) (err er *o = DistributionStatisticsRecordRegions(varDistributionStatisticsRecordRegions) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "AF") + delete(additionalProperties, "ASIA") + delete(additionalProperties, "EU") + delete(additionalProperties, "SA") + delete(additionalProperties, "US") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_distribution_waf.go b/services/cdn/v1api/model_distribution_waf.go index 6b42fa8ee..eb3b5a287 100644 --- a/services/cdn/v1api/model_distribution_waf.go +++ b/services/cdn/v1api/model_distribution_waf.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,9 +20,10 @@ var _ MappedNullable = &DistributionWaf{} // DistributionWaf For this property to be present two pre-conditions must be met: - the WAF was enabled at least once - the query parameter ?withWafStatus is truthy This property contains the waf Status. At this point in time, this contains all resolved rules. Rules are split into 3 groups: - enabledRules - logOnlyRules - disabledRules **Do note that the global waf mode (Disabled, LogOnly, Enabled) is *NOT* reflected in this list!** type DistributionWaf struct { - DisabledRules []WafStatusRuleBlock `json:"disabledRules"` - EnabledRules []WafStatusRuleBlock `json:"enabledRules"` - LogOnlyRules []WafStatusRuleBlock `json:"logOnlyRules"` + DisabledRules []WafStatusRuleBlock `json:"disabledRules"` + EnabledRules []WafStatusRuleBlock `json:"enabledRules"` + LogOnlyRules []WafStatusRuleBlock `json:"logOnlyRules"` + AdditionalProperties map[string]interface{} } type _DistributionWaf DistributionWaf @@ -133,6 +133,11 @@ func (o DistributionWaf) ToMap() (map[string]interface{}, error) { toSerialize["disabledRules"] = o.DisabledRules toSerialize["enabledRules"] = o.EnabledRules toSerialize["logOnlyRules"] = o.LogOnlyRules + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -162,9 +167,7 @@ func (o *DistributionWaf) UnmarshalJSON(data []byte) (err error) { varDistributionWaf := _DistributionWaf{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varDistributionWaf) + err = json.Unmarshal(data, &varDistributionWaf) if err != nil { return err @@ -172,6 +175,15 @@ func (o *DistributionWaf) UnmarshalJSON(data []byte) (err error) { *o = DistributionWaf(varDistributionWaf) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "disabledRules") + delete(additionalProperties, "enabledRules") + delete(additionalProperties, "logOnlyRules") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_domain.go b/services/cdn/v1api/model_domain.go index 384d139e6..d7e4f891c 100644 --- a/services/cdn/v1api/model_domain.go +++ b/services/cdn/v1api/model_domain.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,13 +20,15 @@ var _ MappedNullable = &Domain{} // Domain Definition of a custom or managed domain without any certificates or keys type Domain struct { + CertificateType string `json:"certificateType"` // This object is present if the custom domain has errors. Errors []StatusError `json:"errors,omitempty"` // The domain. If this is a custom domain, you can call the GetCustomDomain Endpoint Name string `json:"name"` Status DomainStatus `json:"status"` // Specifies the type of this Domain. Custom Domain can be further queries using the GetCustomDomain Endpoint - Type string `json:"type"` + Type string `json:"type"` + AdditionalProperties map[string]interface{} } type _Domain Domain @@ -36,8 +37,9 @@ type _Domain Domain // 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 NewDomain(name string, status DomainStatus, types string) *Domain { +func NewDomain(certificateType string, name string, status DomainStatus, types string) *Domain { this := Domain{} + this.CertificateType = certificateType this.Name = name this.Status = status this.Type = types @@ -52,6 +54,30 @@ func NewDomainWithDefaults() *Domain { return &this } +// GetCertificateType returns the CertificateType field value +func (o *Domain) GetCertificateType() string { + if o == nil { + var ret string + return ret + } + + return o.CertificateType +} + +// GetCertificateTypeOk returns a tuple with the CertificateType field value +// and a boolean to check if the value has been set. +func (o *Domain) GetCertificateTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CertificateType, true +} + +// SetCertificateType sets field value +func (o *Domain) SetCertificateType(v string) { + o.CertificateType = v +} + // GetErrors returns the Errors field value if set, zero value otherwise. func (o *Domain) GetErrors() []StatusError { if o == nil || IsNil(o.Errors) { @@ -166,12 +192,18 @@ func (o Domain) MarshalJSON() ([]byte, error) { func (o Domain) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + toSerialize["certificateType"] = o.CertificateType if !IsNil(o.Errors) { toSerialize["errors"] = o.Errors } toSerialize["name"] = o.Name toSerialize["status"] = o.Status toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -180,6 +212,7 @@ func (o *Domain) UnmarshalJSON(data []byte) (err error) { // 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{ + "certificateType", "name", "status", "type", @@ -201,9 +234,7 @@ func (o *Domain) UnmarshalJSON(data []byte) (err error) { varDomain := _Domain{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varDomain) + err = json.Unmarshal(data, &varDomain) if err != nil { return err @@ -211,6 +242,17 @@ func (o *Domain) UnmarshalJSON(data []byte) (err error) { *o = Domain(varDomain) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "certificateType") + delete(additionalProperties, "errors") + delete(additionalProperties, "name") + delete(additionalProperties, "status") + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_domain_status.go b/services/cdn/v1api/model_domain_status.go index 78d299be6..9e966bd07 100644 --- a/services/cdn/v1api/model_domain_status.go +++ b/services/cdn/v1api/model_domain_status.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1api/model_error_details.go b/services/cdn/v1api/model_error_details.go index f5af26c49..58569035c 100644 --- a/services/cdn/v1api/model_error_details.go +++ b/services/cdn/v1api/model_error_details.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -26,8 +25,9 @@ type ErrorDetails struct { // English description of the error En string `json:"en"` // Optional field in the request this error detail refers to - Field *string `json:"field,omitempty"` - Key string `json:"key"` + Field *string `json:"field,omitempty"` + Key string `json:"key"` + AdditionalProperties map[string]interface{} } type _ErrorDetails ErrorDetails @@ -181,6 +181,11 @@ func (o ErrorDetails) ToMap() (map[string]interface{}, error) { toSerialize["field"] = o.Field } toSerialize["key"] = o.Key + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -209,9 +214,7 @@ func (o *ErrorDetails) UnmarshalJSON(data []byte) (err error) { varErrorDetails := _ErrorDetails{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varErrorDetails) + err = json.Unmarshal(data, &varErrorDetails) if err != nil { return err @@ -219,6 +222,16 @@ func (o *ErrorDetails) UnmarshalJSON(data []byte) (err error) { *o = ErrorDetails(varErrorDetails) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "de") + delete(additionalProperties, "en") + delete(additionalProperties, "field") + delete(additionalProperties, "key") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_find_cache_paths_response.go b/services/cdn/v1api/model_find_cache_paths_response.go index 68eaf78b7..e71ffb42d 100644 --- a/services/cdn/v1api/model_find_cache_paths_response.go +++ b/services/cdn/v1api/model_find_cache_paths_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,7 +20,8 @@ var _ MappedNullable = &FindCachePathsResponse{} // FindCachePathsResponse struct for FindCachePathsResponse type FindCachePathsResponse struct { - Response []FindCachePathsResponseEntry `json:"response"` + Response []FindCachePathsResponseEntry `json:"response"` + AdditionalProperties map[string]interface{} } type _FindCachePathsResponse FindCachePathsResponse @@ -79,6 +79,11 @@ func (o FindCachePathsResponse) MarshalJSON() ([]byte, error) { func (o FindCachePathsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["response"] = o.Response + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -106,9 +111,7 @@ func (o *FindCachePathsResponse) UnmarshalJSON(data []byte) (err error) { varFindCachePathsResponse := _FindCachePathsResponse{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varFindCachePathsResponse) + err = json.Unmarshal(data, &varFindCachePathsResponse) if err != nil { return err @@ -116,6 +119,13 @@ func (o *FindCachePathsResponse) UnmarshalJSON(data []byte) (err error) { *o = FindCachePathsResponse(varFindCachePathsResponse) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "response") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_find_cache_paths_response_entry.go b/services/cdn/v1api/model_find_cache_paths_response_entry.go index 2315524d7..507bd39af 100644 --- a/services/cdn/v1api/model_find_cache_paths_response_entry.go +++ b/services/cdn/v1api/model_find_cache_paths_response_entry.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -22,7 +21,8 @@ var _ MappedNullable = &FindCachePathsResponseEntry{} // FindCachePathsResponseEntry struct for FindCachePathsResponseEntry type FindCachePathsResponseEntry struct { // Defines one path that was previously used as part of a granular purge - Path string `json:"path"` + Path string `json:"path"` + AdditionalProperties map[string]interface{} } type _FindCachePathsResponseEntry FindCachePathsResponseEntry @@ -80,6 +80,11 @@ func (o FindCachePathsResponseEntry) MarshalJSON() ([]byte, error) { func (o FindCachePathsResponseEntry) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["path"] = o.Path + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -107,9 +112,7 @@ func (o *FindCachePathsResponseEntry) UnmarshalJSON(data []byte) (err error) { varFindCachePathsResponseEntry := _FindCachePathsResponseEntry{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varFindCachePathsResponseEntry) + err = json.Unmarshal(data, &varFindCachePathsResponseEntry) if err != nil { return err @@ -117,6 +120,13 @@ func (o *FindCachePathsResponseEntry) UnmarshalJSON(data []byte) (err error) { *o = FindCachePathsResponseEntry(varFindCachePathsResponseEntry) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "path") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_generic_json_response.go b/services/cdn/v1api/model_generic_json_response.go index 1b9d5bae4..86d1dbe4b 100644 --- a/services/cdn/v1api/model_generic_json_response.go +++ b/services/cdn/v1api/model_generic_json_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -22,8 +21,9 @@ var _ MappedNullable = &GenericJsonResponse{} // GenericJsonResponse struct for GenericJsonResponse type GenericJsonResponse struct { // Listing of issues with your request - Details []ErrorDetails `json:"details,omitempty"` - Message string `json:"message"` + Details []ErrorDetails `json:"details,omitempty"` + Message string `json:"message"` + AdditionalProperties map[string]interface{} } type _GenericJsonResponse GenericJsonResponse @@ -116,6 +116,11 @@ func (o GenericJsonResponse) ToMap() (map[string]interface{}, error) { toSerialize["details"] = o.Details } toSerialize["message"] = o.Message + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -143,9 +148,7 @@ func (o *GenericJsonResponse) UnmarshalJSON(data []byte) (err error) { varGenericJsonResponse := _GenericJsonResponse{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGenericJsonResponse) + err = json.Unmarshal(data, &varGenericJsonResponse) if err != nil { return err @@ -153,6 +156,14 @@ func (o *GenericJsonResponse) UnmarshalJSON(data []byte) (err error) { *o = GenericJsonResponse(varGenericJsonResponse) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "details") + delete(additionalProperties, "message") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_get_cache_info_response.go b/services/cdn/v1api/model_get_cache_info_response.go index c26de81a0..488c2d25a 100644 --- a/services/cdn/v1api/model_get_cache_info_response.go +++ b/services/cdn/v1api/model_get_cache_info_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" "time" @@ -24,7 +23,8 @@ var _ MappedNullable = &GetCacheInfoResponse{} type GetCacheInfoResponse struct { History []GetCacheInfoResponseHistoryEntry `json:"history"` // Returns the last time the cache was purged by calling the PurgeCache endpoint. Time represented as RFC3339 compliant string. If the cache was never purged, this returns `null` - LastPurgeTime NullableTime `json:"lastPurgeTime"` + LastPurgeTime NullableTime `json:"lastPurgeTime"` + AdditionalProperties map[string]interface{} } type _GetCacheInfoResponse GetCacheInfoResponse @@ -110,6 +110,11 @@ func (o GetCacheInfoResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["history"] = o.History toSerialize["lastPurgeTime"] = o.LastPurgeTime.Get() + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -138,9 +143,7 @@ func (o *GetCacheInfoResponse) UnmarshalJSON(data []byte) (err error) { varGetCacheInfoResponse := _GetCacheInfoResponse{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGetCacheInfoResponse) + err = json.Unmarshal(data, &varGetCacheInfoResponse) if err != nil { return err @@ -148,6 +151,14 @@ func (o *GetCacheInfoResponse) UnmarshalJSON(data []byte) (err error) { *o = GetCacheInfoResponse(varGetCacheInfoResponse) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "history") + delete(additionalProperties, "lastPurgeTime") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_get_cache_info_response_history_entry.go b/services/cdn/v1api/model_get_cache_info_response_history_entry.go index df84cd3eb..f70b259cf 100644 --- a/services/cdn/v1api/model_get_cache_info_response_history_entry.go +++ b/services/cdn/v1api/model_get_cache_info_response_history_entry.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" "time" @@ -22,8 +21,9 @@ var _ MappedNullable = &GetCacheInfoResponseHistoryEntry{} // GetCacheInfoResponseHistoryEntry struct for GetCacheInfoResponseHistoryEntry type GetCacheInfoResponseHistoryEntry struct { - OccurredAt time.Time `json:"occurredAt"` - Type string `json:"type"` + OccurredAt time.Time `json:"occurredAt"` + Type string `json:"type"` + AdditionalProperties map[string]interface{} } type _GetCacheInfoResponseHistoryEntry GetCacheInfoResponseHistoryEntry @@ -107,6 +107,11 @@ func (o GetCacheInfoResponseHistoryEntry) ToMap() (map[string]interface{}, error toSerialize := map[string]interface{}{} toSerialize["occurredAt"] = o.OccurredAt toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -135,9 +140,7 @@ func (o *GetCacheInfoResponseHistoryEntry) UnmarshalJSON(data []byte) (err error varGetCacheInfoResponseHistoryEntry := _GetCacheInfoResponseHistoryEntry{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGetCacheInfoResponseHistoryEntry) + err = json.Unmarshal(data, &varGetCacheInfoResponseHistoryEntry) if err != nil { return err @@ -145,6 +148,14 @@ func (o *GetCacheInfoResponseHistoryEntry) UnmarshalJSON(data []byte) (err error *o = GetCacheInfoResponseHistoryEntry(varGetCacheInfoResponseHistoryEntry) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "occurredAt") + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_get_custom_domain_custom_certificate.go b/services/cdn/v1api/model_get_custom_domain_custom_certificate.go index 4f185426b..54021cd38 100644 --- a/services/cdn/v1api/model_get_custom_domain_custom_certificate.go +++ b/services/cdn/v1api/model_get_custom_domain_custom_certificate.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,9 +20,12 @@ var _ MappedNullable = &GetCustomDomainCustomCertificate{} // GetCustomDomainCustomCertificate Returned if a custom certificate is used. Response does not contain the certificate or key. type GetCustomDomainCustomCertificate struct { - Type string `json:"type"` + // Returns if the CNAME Check has been disabled for this Custom Domain. This is usually set for migrations to allow for no downtime. + SkipDnsCheck bool `json:"skipDnsCheck"` + Type string `json:"type"` // Whenever a new custom certificate is added the version is increased by 1. - Version int32 `json:"version"` + Version int32 `json:"version"` + AdditionalProperties map[string]interface{} } type _GetCustomDomainCustomCertificate GetCustomDomainCustomCertificate @@ -32,8 +34,9 @@ type _GetCustomDomainCustomCertificate GetCustomDomainCustomCertificate // 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 NewGetCustomDomainCustomCertificate(types string, version int32) *GetCustomDomainCustomCertificate { +func NewGetCustomDomainCustomCertificate(skipDnsCheck bool, types string, version int32) *GetCustomDomainCustomCertificate { this := GetCustomDomainCustomCertificate{} + this.SkipDnsCheck = skipDnsCheck this.Type = types this.Version = version return &this @@ -44,9 +47,35 @@ func NewGetCustomDomainCustomCertificate(types string, version int32) *GetCustom // but it doesn't guarantee that properties required by API are set func NewGetCustomDomainCustomCertificateWithDefaults() *GetCustomDomainCustomCertificate { this := GetCustomDomainCustomCertificate{} + var skipDnsCheck bool = false + this.SkipDnsCheck = skipDnsCheck return &this } +// GetSkipDnsCheck returns the SkipDnsCheck field value +func (o *GetCustomDomainCustomCertificate) GetSkipDnsCheck() bool { + if o == nil { + var ret bool + return ret + } + + return o.SkipDnsCheck +} + +// GetSkipDnsCheckOk returns a tuple with the SkipDnsCheck field value +// and a boolean to check if the value has been set. +func (o *GetCustomDomainCustomCertificate) GetSkipDnsCheckOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.SkipDnsCheck, true +} + +// SetSkipDnsCheck sets field value +func (o *GetCustomDomainCustomCertificate) SetSkipDnsCheck(v bool) { + o.SkipDnsCheck = v +} + // GetType returns the Type field value func (o *GetCustomDomainCustomCertificate) GetType() string { if o == nil { @@ -105,8 +134,14 @@ func (o GetCustomDomainCustomCertificate) MarshalJSON() ([]byte, error) { func (o GetCustomDomainCustomCertificate) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + toSerialize["skipDnsCheck"] = o.SkipDnsCheck toSerialize["type"] = o.Type toSerialize["version"] = o.Version + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -115,6 +150,7 @@ func (o *GetCustomDomainCustomCertificate) UnmarshalJSON(data []byte) (err error // 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{ + "skipDnsCheck", "type", "version", } @@ -135,9 +171,7 @@ func (o *GetCustomDomainCustomCertificate) UnmarshalJSON(data []byte) (err error varGetCustomDomainCustomCertificate := _GetCustomDomainCustomCertificate{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGetCustomDomainCustomCertificate) + err = json.Unmarshal(data, &varGetCustomDomainCustomCertificate) if err != nil { return err @@ -145,6 +179,15 @@ func (o *GetCustomDomainCustomCertificate) UnmarshalJSON(data []byte) (err error *o = GetCustomDomainCustomCertificate(varGetCustomDomainCustomCertificate) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "skipDnsCheck") + delete(additionalProperties, "type") + delete(additionalProperties, "version") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_get_custom_domain_managed_certificate.go b/services/cdn/v1api/model_get_custom_domain_managed_certificate.go index 377138997..9a582d078 100644 --- a/services/cdn/v1api/model_get_custom_domain_managed_certificate.go +++ b/services/cdn/v1api/model_get_custom_domain_managed_certificate.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,7 +20,8 @@ var _ MappedNullable = &GetCustomDomainManagedCertificate{} // GetCustomDomainManagedCertificate This is returned when no custom certificate is used. We provision and manage a Let's Encrypt Certificate for you type GetCustomDomainManagedCertificate struct { - Type string `json:"type"` + Type string `json:"type"` + AdditionalProperties map[string]interface{} } type _GetCustomDomainManagedCertificate GetCustomDomainManagedCertificate @@ -79,6 +79,11 @@ func (o GetCustomDomainManagedCertificate) MarshalJSON() ([]byte, error) { func (o GetCustomDomainManagedCertificate) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -106,9 +111,7 @@ func (o *GetCustomDomainManagedCertificate) UnmarshalJSON(data []byte) (err erro varGetCustomDomainManagedCertificate := _GetCustomDomainManagedCertificate{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGetCustomDomainManagedCertificate) + err = json.Unmarshal(data, &varGetCustomDomainManagedCertificate) if err != nil { return err @@ -116,6 +119,13 @@ func (o *GetCustomDomainManagedCertificate) UnmarshalJSON(data []byte) (err erro *o = GetCustomDomainManagedCertificate(varGetCustomDomainManagedCertificate) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_get_custom_domain_response.go b/services/cdn/v1api/model_get_custom_domain_response.go index 19a394ca2..8837c8c52 100644 --- a/services/cdn/v1api/model_get_custom_domain_response.go +++ b/services/cdn/v1api/model_get_custom_domain_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,8 +20,9 @@ var _ MappedNullable = &GetCustomDomainResponse{} // GetCustomDomainResponse struct for GetCustomDomainResponse type GetCustomDomainResponse struct { - Certificate GetCustomDomainResponseCertificate `json:"certificate"` - CustomDomain CustomDomain `json:"customDomain"` + Certificate GetCustomDomainResponseCertificate `json:"certificate"` + CustomDomain CustomDomain `json:"customDomain"` + AdditionalProperties map[string]interface{} } type _GetCustomDomainResponse GetCustomDomainResponse @@ -106,6 +106,11 @@ func (o GetCustomDomainResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["certificate"] = o.Certificate toSerialize["customDomain"] = o.CustomDomain + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -134,9 +139,7 @@ func (o *GetCustomDomainResponse) UnmarshalJSON(data []byte) (err error) { varGetCustomDomainResponse := _GetCustomDomainResponse{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGetCustomDomainResponse) + err = json.Unmarshal(data, &varGetCustomDomainResponse) if err != nil { return err @@ -144,6 +147,14 @@ func (o *GetCustomDomainResponse) UnmarshalJSON(data []byte) (err error) { *o = GetCustomDomainResponse(varGetCustomDomainResponse) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "certificate") + delete(additionalProperties, "customDomain") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_get_custom_domain_response_certificate.go b/services/cdn/v1api/model_get_custom_domain_response_certificate.go index b93bb63c6..b0bd58b7d 100644 --- a/services/cdn/v1api/model_get_custom_domain_response_certificate.go +++ b/services/cdn/v1api/model_get_custom_domain_response_certificate.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1api/model_get_distribution_response.go b/services/cdn/v1api/model_get_distribution_response.go index d29db5ce9..cd3e97d1a 100644 --- a/services/cdn/v1api/model_get_distribution_response.go +++ b/services/cdn/v1api/model_get_distribution_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,7 +20,8 @@ var _ MappedNullable = &GetDistributionResponse{} // GetDistributionResponse struct for GetDistributionResponse type GetDistributionResponse struct { - Distribution Distribution `json:"distribution"` + Distribution Distribution `json:"distribution"` + AdditionalProperties map[string]interface{} } type _GetDistributionResponse GetDistributionResponse @@ -79,6 +79,11 @@ func (o GetDistributionResponse) MarshalJSON() ([]byte, error) { func (o GetDistributionResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["distribution"] = o.Distribution + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -106,9 +111,7 @@ func (o *GetDistributionResponse) UnmarshalJSON(data []byte) (err error) { varGetDistributionResponse := _GetDistributionResponse{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGetDistributionResponse) + err = json.Unmarshal(data, &varGetDistributionResponse) if err != nil { return err @@ -116,6 +119,13 @@ func (o *GetDistributionResponse) UnmarshalJSON(data []byte) (err error) { *o = GetDistributionResponse(varGetDistributionResponse) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "distribution") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_get_logs_response.go b/services/cdn/v1api/model_get_logs_response.go index 36869b909..24bbada7f 100644 --- a/services/cdn/v1api/model_get_logs_response.go +++ b/services/cdn/v1api/model_get_logs_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,8 +20,9 @@ var _ MappedNullable = &GetLogsResponse{} // GetLogsResponse struct for GetLogsResponse type GetLogsResponse struct { - Logs []DistributionLogsRecord `json:"logs"` - NextPageIdentifier *string `json:"nextPageIdentifier,omitempty"` + Logs []DistributionLogsRecord `json:"logs"` + NextPageIdentifier *string `json:"nextPageIdentifier,omitempty"` + AdditionalProperties map[string]interface{} } type _GetLogsResponse GetLogsResponse @@ -115,6 +115,11 @@ func (o GetLogsResponse) ToMap() (map[string]interface{}, error) { if !IsNil(o.NextPageIdentifier) { toSerialize["nextPageIdentifier"] = o.NextPageIdentifier } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -142,9 +147,7 @@ func (o *GetLogsResponse) UnmarshalJSON(data []byte) (err error) { varGetLogsResponse := _GetLogsResponse{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGetLogsResponse) + err = json.Unmarshal(data, &varGetLogsResponse) if err != nil { return err @@ -152,6 +155,14 @@ func (o *GetLogsResponse) UnmarshalJSON(data []byte) (err error) { *o = GetLogsResponse(varGetLogsResponse) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "logs") + delete(additionalProperties, "nextPageIdentifier") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_get_logs_search_filters_response.go b/services/cdn/v1api/model_get_logs_search_filters_response.go index 2571cb8ef..81cc7d19c 100644 --- a/services/cdn/v1api/model_get_logs_search_filters_response.go +++ b/services/cdn/v1api/model_get_logs_search_filters_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -26,7 +25,8 @@ type GetLogsSearchFiltersResponse struct { // List of ISO-3166 Alpha2 Country Codes matching the input filter. Response is ordered in ascending order. For more Info about the country codes, see https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 RemoteCountry []string `json:"remoteCountry"` // List of Status Codes matching the input filter. Response is ordered in ascending order. - Status []int32 `json:"status"` + Status []int32 `json:"status"` + AdditionalProperties map[string]interface{} } type _GetLogsSearchFiltersResponse GetLogsSearchFiltersResponse @@ -162,6 +162,11 @@ func (o GetLogsSearchFiltersResponse) ToMap() (map[string]interface{}, error) { toSerialize["dataCenter"] = o.DataCenter toSerialize["remoteCountry"] = o.RemoteCountry toSerialize["status"] = o.Status + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -192,9 +197,7 @@ func (o *GetLogsSearchFiltersResponse) UnmarshalJSON(data []byte) (err error) { varGetLogsSearchFiltersResponse := _GetLogsSearchFiltersResponse{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGetLogsSearchFiltersResponse) + err = json.Unmarshal(data, &varGetLogsSearchFiltersResponse) if err != nil { return err @@ -202,6 +205,16 @@ func (o *GetLogsSearchFiltersResponse) UnmarshalJSON(data []byte) (err error) { *o = GetLogsSearchFiltersResponse(varGetLogsSearchFiltersResponse) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "cache") + delete(additionalProperties, "dataCenter") + delete(additionalProperties, "remoteCountry") + delete(additionalProperties, "status") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_get_logs_search_filters_response_datacenter_block.go b/services/cdn/v1api/model_get_logs_search_filters_response_datacenter_block.go index 8f2a5b4ba..5b60c59de 100644 --- a/services/cdn/v1api/model_get_logs_search_filters_response_datacenter_block.go +++ b/services/cdn/v1api/model_get_logs_search_filters_response_datacenter_block.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,11 +20,12 @@ var _ MappedNullable = &GetLogsSearchFiltersResponseDatacenterBlock{} // GetLogsSearchFiltersResponseDatacenterBlock Object containing Datacenters to filter for. Each datacenter is grouped to the respective region. type GetLogsSearchFiltersResponseDatacenterBlock struct { - AF []GetLogsSearchFiltersResponseDatacenterBlockItem `json:"AF"` - ASIA []GetLogsSearchFiltersResponseDatacenterBlockItem `json:"ASIA"` - EU []GetLogsSearchFiltersResponseDatacenterBlockItem `json:"EU"` - NA []GetLogsSearchFiltersResponseDatacenterBlockItem `json:"NA"` - SA []GetLogsSearchFiltersResponseDatacenterBlockItem `json:"SA"` + AF []GetLogsSearchFiltersResponseDatacenterBlockItem `json:"AF"` + ASIA []GetLogsSearchFiltersResponseDatacenterBlockItem `json:"ASIA"` + EU []GetLogsSearchFiltersResponseDatacenterBlockItem `json:"EU"` + NA []GetLogsSearchFiltersResponseDatacenterBlockItem `json:"NA"` + SA []GetLogsSearchFiltersResponseDatacenterBlockItem `json:"SA"` + AdditionalProperties map[string]interface{} } type _GetLogsSearchFiltersResponseDatacenterBlock GetLogsSearchFiltersResponseDatacenterBlock @@ -187,6 +187,11 @@ func (o GetLogsSearchFiltersResponseDatacenterBlock) ToMap() (map[string]interfa toSerialize["EU"] = o.EU toSerialize["NA"] = o.NA toSerialize["SA"] = o.SA + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -218,9 +223,7 @@ func (o *GetLogsSearchFiltersResponseDatacenterBlock) UnmarshalJSON(data []byte) varGetLogsSearchFiltersResponseDatacenterBlock := _GetLogsSearchFiltersResponseDatacenterBlock{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGetLogsSearchFiltersResponseDatacenterBlock) + err = json.Unmarshal(data, &varGetLogsSearchFiltersResponseDatacenterBlock) if err != nil { return err @@ -228,6 +231,17 @@ func (o *GetLogsSearchFiltersResponseDatacenterBlock) UnmarshalJSON(data []byte) *o = GetLogsSearchFiltersResponseDatacenterBlock(varGetLogsSearchFiltersResponseDatacenterBlock) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "AF") + delete(additionalProperties, "ASIA") + delete(additionalProperties, "EU") + delete(additionalProperties, "NA") + delete(additionalProperties, "SA") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_get_logs_search_filters_response_datacenter_block_item.go b/services/cdn/v1api/model_get_logs_search_filters_response_datacenter_block_item.go index f43d2efdd..32b093b65 100644 --- a/services/cdn/v1api/model_get_logs_search_filters_response_datacenter_block_item.go +++ b/services/cdn/v1api/model_get_logs_search_filters_response_datacenter_block_item.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,8 +20,9 @@ var _ MappedNullable = &GetLogsSearchFiltersResponseDatacenterBlockItem{} // GetLogsSearchFiltersResponseDatacenterBlockItem A datacenter. The `id` defines the key needed to filter against the logs endpoint, while the `displayName` defines a human-readable Name. type GetLogsSearchFiltersResponseDatacenterBlockItem struct { - DisplayName string `json:"displayName"` - Id string `json:"id"` + DisplayName string `json:"displayName"` + Id string `json:"id"` + AdditionalProperties map[string]interface{} } type _GetLogsSearchFiltersResponseDatacenterBlockItem GetLogsSearchFiltersResponseDatacenterBlockItem @@ -106,6 +106,11 @@ func (o GetLogsSearchFiltersResponseDatacenterBlockItem) ToMap() (map[string]int toSerialize := map[string]interface{}{} toSerialize["displayName"] = o.DisplayName toSerialize["id"] = o.Id + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -134,9 +139,7 @@ func (o *GetLogsSearchFiltersResponseDatacenterBlockItem) UnmarshalJSON(data []b varGetLogsSearchFiltersResponseDatacenterBlockItem := _GetLogsSearchFiltersResponseDatacenterBlockItem{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGetLogsSearchFiltersResponseDatacenterBlockItem) + err = json.Unmarshal(data, &varGetLogsSearchFiltersResponseDatacenterBlockItem) if err != nil { return err @@ -144,6 +147,14 @@ func (o *GetLogsSearchFiltersResponseDatacenterBlockItem) UnmarshalJSON(data []b *o = GetLogsSearchFiltersResponseDatacenterBlockItem(varGetLogsSearchFiltersResponseDatacenterBlockItem) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "displayName") + delete(additionalProperties, "id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_get_statistics_response.go b/services/cdn/v1api/model_get_statistics_response.go index f7fd3df32..2eebe2fe3 100644 --- a/services/cdn/v1api/model_get_statistics_response.go +++ b/services/cdn/v1api/model_get_statistics_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,7 +20,8 @@ var _ MappedNullable = &GetStatisticsResponse{} // GetStatisticsResponse struct for GetStatisticsResponse type GetStatisticsResponse struct { - Records []DistributionStatisticsRecord `json:"records"` + Records []DistributionStatisticsRecord `json:"records"` + AdditionalProperties map[string]interface{} } type _GetStatisticsResponse GetStatisticsResponse @@ -79,6 +79,11 @@ func (o GetStatisticsResponse) MarshalJSON() ([]byte, error) { func (o GetStatisticsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["records"] = o.Records + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -106,9 +111,7 @@ func (o *GetStatisticsResponse) UnmarshalJSON(data []byte) (err error) { varGetStatisticsResponse := _GetStatisticsResponse{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGetStatisticsResponse) + err = json.Unmarshal(data, &varGetStatisticsResponse) if err != nil { return err @@ -116,6 +119,13 @@ func (o *GetStatisticsResponse) UnmarshalJSON(data []byte) (err error) { *o = GetStatisticsResponse(varGetStatisticsResponse) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "records") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_http_backend.go b/services/cdn/v1api/model_http_backend.go index c9fc8b9e7..a9b2dd196 100644 --- a/services/cdn/v1api/model_http_backend.go +++ b/services/cdn/v1api/model_http_backend.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -26,8 +25,9 @@ type HttpBackend struct { // Headers that will be sent with every request to the configured origin. **WARNING**: Do not store sensitive values in the headers. The configuration is stored as plain text. OriginRequestHeaders map[string]string `json:"originRequestHeaders"` // The origin of the content that should be made available through the CDN. Note that the path and query parameters are ignored. Ports are allowed. If no protocol is provided, `https` is assumed. So `www.example.com:1234/somePath?q=123` is normalized to `https://www.example.com:1234` - OriginUrl string `json:"originUrl"` - Type string `json:"type"` + OriginUrl string `json:"originUrl"` + Type string `json:"type"` + AdditionalProperties map[string]interface{} } type _HttpBackend HttpBackend @@ -163,6 +163,11 @@ func (o HttpBackend) ToMap() (map[string]interface{}, error) { toSerialize["originRequestHeaders"] = o.OriginRequestHeaders toSerialize["originUrl"] = o.OriginUrl toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -193,9 +198,7 @@ func (o *HttpBackend) UnmarshalJSON(data []byte) (err error) { varHttpBackend := _HttpBackend{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varHttpBackend) + err = json.Unmarshal(data, &varHttpBackend) if err != nil { return err @@ -203,6 +206,16 @@ func (o *HttpBackend) UnmarshalJSON(data []byte) (err error) { *o = HttpBackend(varHttpBackend) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "geofencing") + delete(additionalProperties, "originRequestHeaders") + delete(additionalProperties, "originUrl") + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_http_backend_create.go b/services/cdn/v1api/model_http_backend_create.go index 1125a83e9..8c6644575 100644 --- a/services/cdn/v1api/model_http_backend_create.go +++ b/services/cdn/v1api/model_http_backend_create.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -26,8 +25,9 @@ type HttpBackendCreate struct { // Headers that will be sent with every request to the configured origin. **WARNING**: Do not store sensitive values in the headers. The configuration is stored as plain text. OriginRequestHeaders *map[string]string `json:"originRequestHeaders,omitempty"` // The origin of the content that should be made available through the CDN. Note that the path and query parameters are ignored. Ports are allowed. If no protocol is provided, `https` is assumed. So `www.example.com:1234/somePath?q=123` is normalized to `https://www.example.com:1234` - OriginUrl string `json:"originUrl"` - Type string `json:"type"` + OriginUrl string `json:"originUrl"` + Type string `json:"type"` + AdditionalProperties map[string]interface{} } type _HttpBackendCreate HttpBackendCreate @@ -181,6 +181,11 @@ func (o HttpBackendCreate) ToMap() (map[string]interface{}, error) { } toSerialize["originUrl"] = o.OriginUrl toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -209,9 +214,7 @@ func (o *HttpBackendCreate) UnmarshalJSON(data []byte) (err error) { varHttpBackendCreate := _HttpBackendCreate{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varHttpBackendCreate) + err = json.Unmarshal(data, &varHttpBackendCreate) if err != nil { return err @@ -219,6 +222,16 @@ func (o *HttpBackendCreate) UnmarshalJSON(data []byte) (err error) { *o = HttpBackendCreate(varHttpBackendCreate) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "geofencing") + delete(additionalProperties, "originRequestHeaders") + delete(additionalProperties, "originUrl") + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_http_backend_patch.go b/services/cdn/v1api/model_http_backend_patch.go index 574062bab..cd457aeb3 100644 --- a/services/cdn/v1api/model_http_backend_patch.go +++ b/services/cdn/v1api/model_http_backend_patch.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -27,7 +26,8 @@ type HttpBackendPatch struct { OriginRequestHeaders *map[string]string `json:"originRequestHeaders,omitempty"` OriginUrl *string `json:"originUrl,omitempty"` // This property is required to determine the used backend type. - Type string `json:"type"` + Type string `json:"type"` + AdditionalProperties map[string]interface{} } type _HttpBackendPatch HttpBackendPatch @@ -190,6 +190,11 @@ func (o HttpBackendPatch) ToMap() (map[string]interface{}, error) { toSerialize["originUrl"] = o.OriginUrl } toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -217,9 +222,7 @@ func (o *HttpBackendPatch) UnmarshalJSON(data []byte) (err error) { varHttpBackendPatch := _HttpBackendPatch{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varHttpBackendPatch) + err = json.Unmarshal(data, &varHttpBackendPatch) if err != nil { return err @@ -227,6 +230,16 @@ func (o *HttpBackendPatch) UnmarshalJSON(data []byte) (err error) { *o = HttpBackendPatch(varHttpBackendPatch) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "geofencing") + delete(additionalProperties, "originRequestHeaders") + delete(additionalProperties, "originUrl") + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_list_distributions_response.go b/services/cdn/v1api/model_list_distributions_response.go index 8d7df6078..a3c895e2f 100644 --- a/services/cdn/v1api/model_list_distributions_response.go +++ b/services/cdn/v1api/model_list_distributions_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,8 +20,9 @@ var _ MappedNullable = &ListDistributionsResponse{} // ListDistributionsResponse struct for ListDistributionsResponse type ListDistributionsResponse struct { - Distributions []Distribution `json:"distributions"` - NextPageIdentifier *string `json:"nextPageIdentifier,omitempty"` + Distributions []Distribution `json:"distributions"` + NextPageIdentifier *string `json:"nextPageIdentifier,omitempty"` + AdditionalProperties map[string]interface{} } type _ListDistributionsResponse ListDistributionsResponse @@ -115,6 +115,11 @@ func (o ListDistributionsResponse) ToMap() (map[string]interface{}, error) { if !IsNil(o.NextPageIdentifier) { toSerialize["nextPageIdentifier"] = o.NextPageIdentifier } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -142,9 +147,7 @@ func (o *ListDistributionsResponse) UnmarshalJSON(data []byte) (err error) { varListDistributionsResponse := _ListDistributionsResponse{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varListDistributionsResponse) + err = json.Unmarshal(data, &varListDistributionsResponse) if err != nil { return err @@ -152,6 +155,14 @@ func (o *ListDistributionsResponse) UnmarshalJSON(data []byte) (err error) { *o = ListDistributionsResponse(varListDistributionsResponse) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "distributions") + delete(additionalProperties, "nextPageIdentifier") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_list_waf_collections_response.go b/services/cdn/v1api/model_list_waf_collections_response.go index 926dda7c7..797d6b6df 100644 --- a/services/cdn/v1api/model_list_waf_collections_response.go +++ b/services/cdn/v1api/model_list_waf_collections_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,7 +20,8 @@ var _ MappedNullable = &ListWafCollectionsResponse{} // ListWafCollectionsResponse struct for ListWafCollectionsResponse type ListWafCollectionsResponse struct { - Collections []WafRuleCollection `json:"collections"` + Collections []WafRuleCollection `json:"collections"` + AdditionalProperties map[string]interface{} } type _ListWafCollectionsResponse ListWafCollectionsResponse @@ -79,6 +79,11 @@ func (o ListWafCollectionsResponse) MarshalJSON() ([]byte, error) { func (o ListWafCollectionsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["collections"] = o.Collections + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -106,9 +111,7 @@ func (o *ListWafCollectionsResponse) UnmarshalJSON(data []byte) (err error) { varListWafCollectionsResponse := _ListWafCollectionsResponse{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varListWafCollectionsResponse) + err = json.Unmarshal(data, &varListWafCollectionsResponse) if err != nil { return err @@ -116,6 +119,13 @@ func (o *ListWafCollectionsResponse) UnmarshalJSON(data []byte) (err error) { *o = ListWafCollectionsResponse(varListWafCollectionsResponse) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "collections") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_loki_log_sink.go b/services/cdn/v1api/model_loki_log_sink.go index cb53340a0..d380c1e06 100644 --- a/services/cdn/v1api/model_loki_log_sink.go +++ b/services/cdn/v1api/model_loki_log_sink.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,8 +20,9 @@ var _ MappedNullable = &LokiLogSink{} // LokiLogSink struct for LokiLogSink type LokiLogSink struct { - PushUrl string `json:"pushUrl"` - Type string `json:"type"` + PushUrl string `json:"pushUrl"` + Type string `json:"type"` + AdditionalProperties map[string]interface{} } type _LokiLogSink LokiLogSink @@ -106,6 +106,11 @@ func (o LokiLogSink) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["pushUrl"] = o.PushUrl toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -134,9 +139,7 @@ func (o *LokiLogSink) UnmarshalJSON(data []byte) (err error) { varLokiLogSink := _LokiLogSink{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varLokiLogSink) + err = json.Unmarshal(data, &varLokiLogSink) if err != nil { return err @@ -144,6 +147,14 @@ func (o *LokiLogSink) UnmarshalJSON(data []byte) (err error) { *o = LokiLogSink(varLokiLogSink) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "pushUrl") + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_loki_log_sink_create.go b/services/cdn/v1api/model_loki_log_sink_create.go index 29261debf..1081230ef 100644 --- a/services/cdn/v1api/model_loki_log_sink_create.go +++ b/services/cdn/v1api/model_loki_log_sink_create.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,9 +20,10 @@ var _ MappedNullable = &LokiLogSinkCreate{} // LokiLogSinkCreate struct for LokiLogSinkCreate type LokiLogSinkCreate struct { - Credentials LokiLogSinkCredentials `json:"credentials"` - PushUrl string `json:"pushUrl"` - Type string `json:"type"` + Credentials LokiLogSinkCredentials `json:"credentials"` + PushUrl string `json:"pushUrl"` + Type string `json:"type"` + AdditionalProperties map[string]interface{} } type _LokiLogSinkCreate LokiLogSinkCreate @@ -133,6 +133,11 @@ func (o LokiLogSinkCreate) ToMap() (map[string]interface{}, error) { toSerialize["credentials"] = o.Credentials toSerialize["pushUrl"] = o.PushUrl toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -162,9 +167,7 @@ func (o *LokiLogSinkCreate) UnmarshalJSON(data []byte) (err error) { varLokiLogSinkCreate := _LokiLogSinkCreate{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varLokiLogSinkCreate) + err = json.Unmarshal(data, &varLokiLogSinkCreate) if err != nil { return err @@ -172,6 +175,15 @@ func (o *LokiLogSinkCreate) UnmarshalJSON(data []byte) (err error) { *o = LokiLogSinkCreate(varLokiLogSinkCreate) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "credentials") + delete(additionalProperties, "pushUrl") + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_loki_log_sink_credentials.go b/services/cdn/v1api/model_loki_log_sink_credentials.go index ade42153f..5b246d570 100644 --- a/services/cdn/v1api/model_loki_log_sink_credentials.go +++ b/services/cdn/v1api/model_loki_log_sink_credentials.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,8 +20,9 @@ var _ MappedNullable = &LokiLogSinkCredentials{} // LokiLogSinkCredentials struct for LokiLogSinkCredentials type LokiLogSinkCredentials struct { - Password string `json:"password"` - Username string `json:"username"` + Password string `json:"password"` + Username string `json:"username"` + AdditionalProperties map[string]interface{} } type _LokiLogSinkCredentials LokiLogSinkCredentials @@ -106,6 +106,11 @@ func (o LokiLogSinkCredentials) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["password"] = o.Password toSerialize["username"] = o.Username + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -134,9 +139,7 @@ func (o *LokiLogSinkCredentials) UnmarshalJSON(data []byte) (err error) { varLokiLogSinkCredentials := _LokiLogSinkCredentials{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varLokiLogSinkCredentials) + err = json.Unmarshal(data, &varLokiLogSinkCredentials) if err != nil { return err @@ -144,6 +147,14 @@ func (o *LokiLogSinkCredentials) UnmarshalJSON(data []byte) (err error) { *o = LokiLogSinkCredentials(varLokiLogSinkCredentials) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "password") + delete(additionalProperties, "username") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_loki_log_sink_patch.go b/services/cdn/v1api/model_loki_log_sink_patch.go index 301b8dbb7..c2f49e913 100644 --- a/services/cdn/v1api/model_loki_log_sink_patch.go +++ b/services/cdn/v1api/model_loki_log_sink_patch.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,9 +20,10 @@ var _ MappedNullable = &LokiLogSinkPatch{} // LokiLogSinkPatch struct for LokiLogSinkPatch type LokiLogSinkPatch struct { - Credentials *LokiLogSinkCredentials `json:"credentials,omitempty"` - PushUrl *string `json:"pushUrl,omitempty"` - Type string `json:"type"` + Credentials *LokiLogSinkCredentials `json:"credentials,omitempty"` + PushUrl *string `json:"pushUrl,omitempty"` + Type string `json:"type"` + AdditionalProperties map[string]interface{} } type _LokiLogSinkPatch LokiLogSinkPatch @@ -151,6 +151,11 @@ func (o LokiLogSinkPatch) ToMap() (map[string]interface{}, error) { toSerialize["pushUrl"] = o.PushUrl } toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -178,9 +183,7 @@ func (o *LokiLogSinkPatch) UnmarshalJSON(data []byte) (err error) { varLokiLogSinkPatch := _LokiLogSinkPatch{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varLokiLogSinkPatch) + err = json.Unmarshal(data, &varLokiLogSinkPatch) if err != nil { return err @@ -188,6 +191,15 @@ func (o *LokiLogSinkPatch) UnmarshalJSON(data []byte) (err error) { *o = LokiLogSinkPatch(varLokiLogSinkPatch) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "credentials") + delete(additionalProperties, "pushUrl") + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_match_condition.go b/services/cdn/v1api/model_match_condition.go index d1f589967..17382475d 100644 --- a/services/cdn/v1api/model_match_condition.go +++ b/services/cdn/v1api/model_match_condition.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1api/model_matcher.go b/services/cdn/v1api/model_matcher.go index 291655e94..b1a536e8a 100644 --- a/services/cdn/v1api/model_matcher.go +++ b/services/cdn/v1api/model_matcher.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -23,7 +22,8 @@ var _ MappedNullable = &Matcher{} type Matcher struct { ValueMatchCondition *MatchCondition `json:"valueMatchCondition,omitempty"` // A list of glob patterns to match against the request path. At least one value is required. Examples: \"/shop/_*\" or \"*_/img/_*\" - Values []string `json:"values"` + Values []string `json:"values"` + AdditionalProperties map[string]interface{} } type _Matcher Matcher @@ -120,6 +120,11 @@ func (o Matcher) ToMap() (map[string]interface{}, error) { toSerialize["valueMatchCondition"] = o.ValueMatchCondition } toSerialize["values"] = o.Values + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -147,9 +152,7 @@ func (o *Matcher) UnmarshalJSON(data []byte) (err error) { varMatcher := _Matcher{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varMatcher) + err = json.Unmarshal(data, &varMatcher) if err != nil { return err @@ -157,6 +160,14 @@ func (o *Matcher) UnmarshalJSON(data []byte) (err error) { *o = Matcher(varMatcher) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "valueMatchCondition") + delete(additionalProperties, "values") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_optimizer.go b/services/cdn/v1api/model_optimizer.go index c69c1da24..dff5f5c8c 100644 --- a/services/cdn/v1api/model_optimizer.go +++ b/services/cdn/v1api/model_optimizer.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -22,7 +21,8 @@ var _ MappedNullable = &Optimizer{} // Optimizer Optimizer is paid feature, a real-time on the fly image manipulation and optimization service that automatically optimizes your images for faster image delivery. type Optimizer struct { // Determines if the optimizer should be enabled for this distribution and incurs a monthly fee - Enabled bool `json:"enabled"` + Enabled bool `json:"enabled"` + AdditionalProperties map[string]interface{} } type _Optimizer Optimizer @@ -80,6 +80,11 @@ func (o Optimizer) MarshalJSON() ([]byte, error) { func (o Optimizer) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["enabled"] = o.Enabled + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -107,9 +112,7 @@ func (o *Optimizer) UnmarshalJSON(data []byte) (err error) { varOptimizer := _Optimizer{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varOptimizer) + err = json.Unmarshal(data, &varOptimizer) if err != nil { return err @@ -117,6 +120,13 @@ func (o *Optimizer) UnmarshalJSON(data []byte) (err error) { *o = Optimizer(varOptimizer) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "enabled") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_optimizer_patch.go b/services/cdn/v1api/model_optimizer_patch.go index b1a88e0d8..2030c8b38 100644 --- a/services/cdn/v1api/model_optimizer_patch.go +++ b/services/cdn/v1api/model_optimizer_patch.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -19,9 +19,12 @@ var _ MappedNullable = &OptimizerPatch{} // OptimizerPatch struct for OptimizerPatch type OptimizerPatch struct { - Enabled *bool `json:"enabled,omitempty"` + Enabled *bool `json:"enabled,omitempty"` + AdditionalProperties map[string]interface{} } +type _OptimizerPatch OptimizerPatch + // NewOptimizerPatch instantiates a new OptimizerPatch 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 @@ -84,9 +87,35 @@ func (o OptimizerPatch) ToMap() (map[string]interface{}, error) { if !IsNil(o.Enabled) { toSerialize["enabled"] = o.Enabled } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *OptimizerPatch) UnmarshalJSON(data []byte) (err error) { + varOptimizerPatch := _OptimizerPatch{} + + err = json.Unmarshal(data, &varOptimizerPatch) + + if err != nil { + return err + } + + *o = OptimizerPatch(varOptimizerPatch) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "enabled") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableOptimizerPatch struct { value *OptimizerPatch isSet bool diff --git a/services/cdn/v1api/model_patch_distribution_payload.go b/services/cdn/v1api/model_patch_distribution_payload.go index c65650459..160f691b4 100644 --- a/services/cdn/v1api/model_patch_distribution_payload.go +++ b/services/cdn/v1api/model_patch_distribution_payload.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -21,9 +21,12 @@ var _ MappedNullable = &PatchDistributionPayload{} type PatchDistributionPayload struct { Config *ConfigPatch `json:"config,omitempty"` // While optional, it is greatly encouraged to provide an `intentId`. This is used to deduplicate requests. If multiple modifying requests with the same `intentId` for a given `projectId` are received, all but the first request are dropped. - IntentId *string `json:"intentId,omitempty"` + IntentId *string `json:"intentId,omitempty"` + AdditionalProperties map[string]interface{} } +type _PatchDistributionPayload PatchDistributionPayload + // NewPatchDistributionPayload instantiates a new PatchDistributionPayload 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 @@ -121,9 +124,36 @@ func (o PatchDistributionPayload) ToMap() (map[string]interface{}, error) { if !IsNil(o.IntentId) { toSerialize["intentId"] = o.IntentId } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *PatchDistributionPayload) UnmarshalJSON(data []byte) (err error) { + varPatchDistributionPayload := _PatchDistributionPayload{} + + err = json.Unmarshal(data, &varPatchDistributionPayload) + + if err != nil { + return err + } + + *o = PatchDistributionPayload(varPatchDistributionPayload) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "config") + delete(additionalProperties, "intentId") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullablePatchDistributionPayload struct { value *PatchDistributionPayload isSet bool diff --git a/services/cdn/v1api/model_patch_distribution_response.go b/services/cdn/v1api/model_patch_distribution_response.go index 1b344fe4e..c5c28105a 100644 --- a/services/cdn/v1api/model_patch_distribution_response.go +++ b/services/cdn/v1api/model_patch_distribution_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,7 +20,8 @@ var _ MappedNullable = &PatchDistributionResponse{} // PatchDistributionResponse struct for PatchDistributionResponse type PatchDistributionResponse struct { - Distribution Distribution `json:"distribution"` + Distribution Distribution `json:"distribution"` + AdditionalProperties map[string]interface{} } type _PatchDistributionResponse PatchDistributionResponse @@ -79,6 +79,11 @@ func (o PatchDistributionResponse) MarshalJSON() ([]byte, error) { func (o PatchDistributionResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["distribution"] = o.Distribution + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -106,9 +111,7 @@ func (o *PatchDistributionResponse) UnmarshalJSON(data []byte) (err error) { varPatchDistributionResponse := _PatchDistributionResponse{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varPatchDistributionResponse) + err = json.Unmarshal(data, &varPatchDistributionResponse) if err != nil { return err @@ -116,6 +119,13 @@ func (o *PatchDistributionResponse) UnmarshalJSON(data []byte) (err error) { *o = PatchDistributionResponse(varPatchDistributionResponse) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "distribution") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_purge_cache_payload.go b/services/cdn/v1api/model_purge_cache_payload.go index 9d05dcd99..5cd8d5bab 100644 --- a/services/cdn/v1api/model_purge_cache_payload.go +++ b/services/cdn/v1api/model_purge_cache_payload.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -20,9 +20,12 @@ var _ MappedNullable = &PurgeCachePayload{} // PurgeCachePayload struct for PurgeCachePayload type PurgeCachePayload struct { // Defines an optional path. If this is set, a granular purge is done. If missing, the entire cache is invalidated. During a granular cache purge, only the provided path is purged. Please do not that for example `/some/path` and `/some/path.txt` are considered different paths. - Path *string `json:"path,omitempty"` + Path *string `json:"path,omitempty"` + AdditionalProperties map[string]interface{} } +type _PurgeCachePayload PurgeCachePayload + // NewPurgeCachePayload instantiates a new PurgeCachePayload 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 PurgeCachePayload) ToMap() (map[string]interface{}, error) { if !IsNil(o.Path) { toSerialize["path"] = o.Path } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *PurgeCachePayload) UnmarshalJSON(data []byte) (err error) { + varPurgeCachePayload := _PurgeCachePayload{} + + err = json.Unmarshal(data, &varPurgeCachePayload) + + if err != nil { + return err + } + + *o = PurgeCachePayload(varPurgeCachePayload) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "path") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullablePurgeCachePayload struct { value *PurgeCachePayload isSet bool diff --git a/services/cdn/v1api/model_put_custom_domain_custom_certificate.go b/services/cdn/v1api/model_put_custom_domain_custom_certificate.go index 443d420af..0c0e23250 100644 --- a/services/cdn/v1api/model_put_custom_domain_custom_certificate.go +++ b/services/cdn/v1api/model_put_custom_domain_custom_certificate.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -24,8 +23,11 @@ type PutCustomDomainCustomCertificate struct { // base64-encoded PEM-encoded certificate Certificate string `json:"certificate"` // base64-encoded PEM encoded key - Key string `json:"key"` - Type string `json:"type"` + Key string `json:"key"` + // When adding a new custom domain, we do a check to verify that your Domain points to the managed domain via a CNAME or ALIAS. If this is not the case, the call would usually reject. This additional property is an escape hatch to this functionality. It's useful for when you are migrating onto STACKIT CDN. It allows you to migrate without downtime. By providing a custom certificate with `skipDnsCheck` set to `true`, we will not check the Record for correctness. Then, once the CDN is set up, you can change the CNAME Record on your DNS and update the Custom Domain entry to disable this check, or switch to a managed certificate. This field is optional. If not set, the check is **not** skipped. + SkipDnsCheck *bool `json:"skipDnsCheck,omitempty"` + Type string `json:"type"` + AdditionalProperties map[string]interface{} } type _PutCustomDomainCustomCertificate PutCustomDomainCustomCertificate @@ -98,6 +100,38 @@ func (o *PutCustomDomainCustomCertificate) SetKey(v string) { o.Key = v } +// GetSkipDnsCheck returns the SkipDnsCheck field value if set, zero value otherwise. +func (o *PutCustomDomainCustomCertificate) GetSkipDnsCheck() bool { + if o == nil || IsNil(o.SkipDnsCheck) { + var ret bool + return ret + } + return *o.SkipDnsCheck +} + +// GetSkipDnsCheckOk returns a tuple with the SkipDnsCheck field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PutCustomDomainCustomCertificate) GetSkipDnsCheckOk() (*bool, bool) { + if o == nil || IsNil(o.SkipDnsCheck) { + return nil, false + } + return o.SkipDnsCheck, true +} + +// HasSkipDnsCheck returns a boolean if a field has been set. +func (o *PutCustomDomainCustomCertificate) HasSkipDnsCheck() bool { + if o != nil && !IsNil(o.SkipDnsCheck) { + return true + } + + return false +} + +// SetSkipDnsCheck gets a reference to the given bool and assigns it to the SkipDnsCheck field. +func (o *PutCustomDomainCustomCertificate) SetSkipDnsCheck(v bool) { + o.SkipDnsCheck = &v +} + // GetType returns the Type field value func (o *PutCustomDomainCustomCertificate) GetType() string { if o == nil { @@ -134,7 +168,15 @@ func (o PutCustomDomainCustomCertificate) ToMap() (map[string]interface{}, error toSerialize := map[string]interface{}{} toSerialize["certificate"] = o.Certificate toSerialize["key"] = o.Key + if !IsNil(o.SkipDnsCheck) { + toSerialize["skipDnsCheck"] = o.SkipDnsCheck + } toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -164,9 +206,7 @@ func (o *PutCustomDomainCustomCertificate) UnmarshalJSON(data []byte) (err error varPutCustomDomainCustomCertificate := _PutCustomDomainCustomCertificate{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varPutCustomDomainCustomCertificate) + err = json.Unmarshal(data, &varPutCustomDomainCustomCertificate) if err != nil { return err @@ -174,6 +214,16 @@ func (o *PutCustomDomainCustomCertificate) UnmarshalJSON(data []byte) (err error *o = PutCustomDomainCustomCertificate(varPutCustomDomainCustomCertificate) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "certificate") + delete(additionalProperties, "key") + delete(additionalProperties, "skipDnsCheck") + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_put_custom_domain_managed_certificate.go b/services/cdn/v1api/model_put_custom_domain_managed_certificate.go index 9ee41a4d4..73e47a9df 100644 --- a/services/cdn/v1api/model_put_custom_domain_managed_certificate.go +++ b/services/cdn/v1api/model_put_custom_domain_managed_certificate.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,7 +20,8 @@ var _ MappedNullable = &PutCustomDomainManagedCertificate{} // PutCustomDomainManagedCertificate This is returned when no custom certificate is used. We provision and manage a Let's Encrypt Certificate for you type PutCustomDomainManagedCertificate struct { - Type string `json:"type"` + Type string `json:"type"` + AdditionalProperties map[string]interface{} } type _PutCustomDomainManagedCertificate PutCustomDomainManagedCertificate @@ -79,6 +79,11 @@ func (o PutCustomDomainManagedCertificate) MarshalJSON() ([]byte, error) { func (o PutCustomDomainManagedCertificate) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -106,9 +111,7 @@ func (o *PutCustomDomainManagedCertificate) UnmarshalJSON(data []byte) (err erro varPutCustomDomainManagedCertificate := _PutCustomDomainManagedCertificate{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varPutCustomDomainManagedCertificate) + err = json.Unmarshal(data, &varPutCustomDomainManagedCertificate) if err != nil { return err @@ -116,6 +119,13 @@ func (o *PutCustomDomainManagedCertificate) UnmarshalJSON(data []byte) (err erro *o = PutCustomDomainManagedCertificate(varPutCustomDomainManagedCertificate) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_put_custom_domain_payload.go b/services/cdn/v1api/model_put_custom_domain_payload.go index db0b7b90b..af5506a24 100644 --- a/services/cdn/v1api/model_put_custom_domain_payload.go +++ b/services/cdn/v1api/model_put_custom_domain_payload.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -21,9 +21,12 @@ var _ MappedNullable = &PutCustomDomainPayload{} type PutCustomDomainPayload struct { Certificate *PutCustomDomainPayloadCertificate `json:"certificate,omitempty"` // While optional, it is greatly encouraged to provide an `intentId`. This is used to deduplicate requests. If multiple modifying Requests with the same `intentId` for a given `projectId` are received, all but the first request are dropped. - IntentId *string `json:"intentId,omitempty"` + IntentId *string `json:"intentId,omitempty"` + AdditionalProperties map[string]interface{} } +type _PutCustomDomainPayload PutCustomDomainPayload + // NewPutCustomDomainPayload instantiates a new PutCustomDomainPayload 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 @@ -121,9 +124,36 @@ func (o PutCustomDomainPayload) ToMap() (map[string]interface{}, error) { if !IsNil(o.IntentId) { toSerialize["intentId"] = o.IntentId } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *PutCustomDomainPayload) UnmarshalJSON(data []byte) (err error) { + varPutCustomDomainPayload := _PutCustomDomainPayload{} + + err = json.Unmarshal(data, &varPutCustomDomainPayload) + + if err != nil { + return err + } + + *o = PutCustomDomainPayload(varPutCustomDomainPayload) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "certificate") + delete(additionalProperties, "intentId") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullablePutCustomDomainPayload struct { value *PutCustomDomainPayload isSet bool diff --git a/services/cdn/v1api/model_put_custom_domain_payload_certificate.go b/services/cdn/v1api/model_put_custom_domain_payload_certificate.go index deb09db47..f97b33488 100644 --- a/services/cdn/v1api/model_put_custom_domain_payload_certificate.go +++ b/services/cdn/v1api/model_put_custom_domain_payload_certificate.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1api/model_put_custom_domain_response.go b/services/cdn/v1api/model_put_custom_domain_response.go index 283bb7473..8f538fafc 100644 --- a/services/cdn/v1api/model_put_custom_domain_response.go +++ b/services/cdn/v1api/model_put_custom_domain_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,8 +20,9 @@ var _ MappedNullable = &PutCustomDomainResponse{} // PutCustomDomainResponse struct for PutCustomDomainResponse type PutCustomDomainResponse struct { - Certificate *PutCustomDomainResponseCertificate `json:"certificate,omitempty"` - CustomDomain CustomDomain `json:"customDomain"` + Certificate *PutCustomDomainResponseCertificate `json:"certificate,omitempty"` + CustomDomain CustomDomain `json:"customDomain"` + AdditionalProperties map[string]interface{} } type _PutCustomDomainResponse PutCustomDomainResponse @@ -115,6 +115,11 @@ func (o PutCustomDomainResponse) ToMap() (map[string]interface{}, error) { toSerialize["certificate"] = o.Certificate } toSerialize["customDomain"] = o.CustomDomain + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -142,9 +147,7 @@ func (o *PutCustomDomainResponse) UnmarshalJSON(data []byte) (err error) { varPutCustomDomainResponse := _PutCustomDomainResponse{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varPutCustomDomainResponse) + err = json.Unmarshal(data, &varPutCustomDomainResponse) if err != nil { return err @@ -152,6 +155,14 @@ func (o *PutCustomDomainResponse) UnmarshalJSON(data []byte) (err error) { *o = PutCustomDomainResponse(varPutCustomDomainResponse) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "certificate") + delete(additionalProperties, "customDomain") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_put_custom_domain_response_certificate.go b/services/cdn/v1api/model_put_custom_domain_response_certificate.go index 30074918e..d59510afa 100644 --- a/services/cdn/v1api/model_put_custom_domain_response_certificate.go +++ b/services/cdn/v1api/model_put_custom_domain_response_certificate.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1api/model_redirect_config.go b/services/cdn/v1api/model_redirect_config.go index 25d06e6d6..1781a5d2d 100644 --- a/services/cdn/v1api/model_redirect_config.go +++ b/services/cdn/v1api/model_redirect_config.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -20,9 +20,12 @@ var _ MappedNullable = &RedirectConfig{} // RedirectConfig A wrapper for a list of redirect rules that allows for redirect settings on a distribution. type RedirectConfig struct { // A list of redirect rules. The order of rules matters for evaluation. - Rules []RedirectRule `json:"rules,omitempty"` + Rules []RedirectRule `json:"rules,omitempty"` + AdditionalProperties map[string]interface{} } +type _RedirectConfig RedirectConfig + // NewRedirectConfig instantiates a new RedirectConfig 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 RedirectConfig) ToMap() (map[string]interface{}, error) { if !IsNil(o.Rules) { toSerialize["rules"] = o.Rules } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *RedirectConfig) UnmarshalJSON(data []byte) (err error) { + varRedirectConfig := _RedirectConfig{} + + err = json.Unmarshal(data, &varRedirectConfig) + + if err != nil { + return err + } + + *o = RedirectConfig(varRedirectConfig) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "rules") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableRedirectConfig struct { value *RedirectConfig isSet bool diff --git a/services/cdn/v1api/model_redirect_rule.go b/services/cdn/v1api/model_redirect_rule.go index d297b3fc3..fb4216c3d 100644 --- a/services/cdn/v1api/model_redirect_rule.go +++ b/services/cdn/v1api/model_redirect_rule.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -31,7 +30,8 @@ type RedirectRule struct { // The HTTP status code for the redirect. Must be one of 301, 302, 303, 307, or 308. StatusCode int32 `json:"statusCode"` // The target URL to redirect to. Must be a valid URI. - TargetUrl string `json:"targetUrl"` + TargetUrl string `json:"targetUrl"` + AdditionalProperties map[string]interface{} } type _RedirectRule RedirectRule @@ -254,6 +254,11 @@ func (o RedirectRule) ToMap() (map[string]interface{}, error) { } toSerialize["statusCode"] = o.StatusCode toSerialize["targetUrl"] = o.TargetUrl + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -283,9 +288,7 @@ func (o *RedirectRule) UnmarshalJSON(data []byte) (err error) { varRedirectRule := _RedirectRule{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varRedirectRule) + err = json.Unmarshal(data, &varRedirectRule) if err != nil { return err @@ -293,6 +296,18 @@ func (o *RedirectRule) UnmarshalJSON(data []byte) (err error) { *o = RedirectRule(varRedirectRule) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "description") + delete(additionalProperties, "enabled") + delete(additionalProperties, "matchers") + delete(additionalProperties, "ruleMatchCondition") + delete(additionalProperties, "statusCode") + delete(additionalProperties, "targetUrl") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_region.go b/services/cdn/v1api/model_region.go index 79c8f1c6c..272b82b8f 100644 --- a/services/cdn/v1api/model_region.go +++ b/services/cdn/v1api/model_region.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1api/model_status_error.go b/services/cdn/v1api/model_status_error.go index 3ced1d368..91b645d6a 100644 --- a/services/cdn/v1api/model_status_error.go +++ b/services/cdn/v1api/model_status_error.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -26,7 +25,8 @@ type StatusError struct { // An english translation string corresponding to the error key. An english translation key is always present. En string `json:"en"` // An enum value that describes a Status Error. - Key string `json:"key"` + Key string `json:"key"` + AdditionalProperties map[string]interface{} } type _StatusError StatusError @@ -145,6 +145,11 @@ func (o StatusError) ToMap() (map[string]interface{}, error) { } toSerialize["en"] = o.En toSerialize["key"] = o.Key + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -173,9 +178,7 @@ func (o *StatusError) UnmarshalJSON(data []byte) (err error) { varStatusError := _StatusError{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varStatusError) + err = json.Unmarshal(data, &varStatusError) if err != nil { return err @@ -183,6 +186,15 @@ func (o *StatusError) UnmarshalJSON(data []byte) (err error) { *o = StatusError(varStatusError) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "de") + delete(additionalProperties, "en") + delete(additionalProperties, "key") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_waf_config.go b/services/cdn/v1api/model_waf_config.go index 24b200254..d8c631457 100644 --- a/services/cdn/v1api/model_waf_config.go +++ b/services/cdn/v1api/model_waf_config.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -43,10 +42,11 @@ type WafConfig struct { // Ids of WAF Rule Groups to mark as log Only. LogOnlyRuleGroupIds []string `json:"logOnlyRuleGroupIds,omitempty"` // Ids of WAF Rules that are **explicitly** marked as Log Only for this distribution. - LogOnlyRuleIds []string `json:"logOnlyRuleIds,omitempty"` - Mode WafMode `json:"mode"` - ParanoiaLevel *WafParanoiaLevel `json:"paranoiaLevel,omitempty"` - Type WafType `json:"type"` + LogOnlyRuleIds []string `json:"logOnlyRuleIds,omitempty"` + Mode WafMode `json:"mode"` + ParanoiaLevel *WafParanoiaLevel `json:"paranoiaLevel,omitempty"` + Type WafType `json:"type"` + AdditionalProperties map[string]interface{} } type _WafConfig WafConfig @@ -576,6 +576,11 @@ func (o WafConfig) ToMap() (map[string]interface{}, error) { toSerialize["paranoiaLevel"] = o.ParanoiaLevel } toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -605,9 +610,7 @@ func (o *WafConfig) UnmarshalJSON(data []byte) (err error) { varWafConfig := _WafConfig{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varWafConfig) + err = json.Unmarshal(data, &varWafConfig) if err != nil { return err @@ -615,6 +618,27 @@ func (o *WafConfig) UnmarshalJSON(data []byte) (err error) { *o = WafConfig(varWafConfig) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "allowedHttpMethods") + delete(additionalProperties, "allowedHttpVersions") + delete(additionalProperties, "allowedRequestContentTypes") + delete(additionalProperties, "disabledRuleCollectionIds") + delete(additionalProperties, "disabledRuleGroupIds") + delete(additionalProperties, "disabledRuleIds") + delete(additionalProperties, "enabledRuleCollectionIds") + delete(additionalProperties, "enabledRuleGroupIds") + delete(additionalProperties, "enabledRuleIds") + delete(additionalProperties, "logOnlyRuleCollectionIds") + delete(additionalProperties, "logOnlyRuleGroupIds") + delete(additionalProperties, "logOnlyRuleIds") + delete(additionalProperties, "mode") + delete(additionalProperties, "paranoiaLevel") + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_waf_config_patch.go b/services/cdn/v1api/model_waf_config_patch.go index 5158dc33b..6d0dd8fc9 100644 --- a/services/cdn/v1api/model_waf_config_patch.go +++ b/services/cdn/v1api/model_waf_config_patch.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -39,12 +39,15 @@ type WafConfigPatch struct { // Ids of WAF Rule Groups to mark as log Only. LogOnlyRuleGroupIds []string `json:"logOnlyRuleGroupIds,omitempty"` // Ids of WAF Rules that are **explicitly** marked as Log Only for this distribution. - LogOnlyRuleIds []string `json:"logOnlyRuleIds,omitempty"` - Mode *WafMode `json:"mode,omitempty"` - ParanoiaLevel *WafParanoiaLevel `json:"paranoiaLevel,omitempty"` - Type *WafType `json:"type,omitempty"` + LogOnlyRuleIds []string `json:"logOnlyRuleIds,omitempty"` + Mode *WafMode `json:"mode,omitempty"` + ParanoiaLevel *WafParanoiaLevel `json:"paranoiaLevel,omitempty"` + Type *WafType `json:"type,omitempty"` + AdditionalProperties map[string]interface{} } +type _WafConfigPatch WafConfigPatch + // NewWafConfigPatch instantiates a new WafConfigPatch 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 @@ -597,9 +600,49 @@ func (o WafConfigPatch) ToMap() (map[string]interface{}, error) { if !IsNil(o.Type) { toSerialize["type"] = o.Type } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *WafConfigPatch) UnmarshalJSON(data []byte) (err error) { + varWafConfigPatch := _WafConfigPatch{} + + err = json.Unmarshal(data, &varWafConfigPatch) + + if err != nil { + return err + } + + *o = WafConfigPatch(varWafConfigPatch) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "allowedHttpMethods") + delete(additionalProperties, "allowedHttpVersions") + delete(additionalProperties, "allowedRequestContentTypes") + delete(additionalProperties, "disabledRuleCollectionIds") + delete(additionalProperties, "disabledRuleGroupIds") + delete(additionalProperties, "disabledRuleIds") + delete(additionalProperties, "enabledRuleCollectionIds") + delete(additionalProperties, "enabledRuleGroupIds") + delete(additionalProperties, "enabledRuleIds") + delete(additionalProperties, "logOnlyRuleCollectionIds") + delete(additionalProperties, "logOnlyRuleGroupIds") + delete(additionalProperties, "logOnlyRuleIds") + delete(additionalProperties, "mode") + delete(additionalProperties, "paranoiaLevel") + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableWafConfigPatch struct { value *WafConfigPatch isSet bool diff --git a/services/cdn/v1api/model_waf_mode.go b/services/cdn/v1api/model_waf_mode.go index c81e381e6..cb8afc640 100644 --- a/services/cdn/v1api/model_waf_mode.go +++ b/services/cdn/v1api/model_waf_mode.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1api/model_waf_paranoia_level.go b/services/cdn/v1api/model_waf_paranoia_level.go index 6b81197d5..95b44ed73 100644 --- a/services/cdn/v1api/model_waf_paranoia_level.go +++ b/services/cdn/v1api/model_waf_paranoia_level.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1api/model_waf_rule.go b/services/cdn/v1api/model_waf_rule.go index b6d0d3b9f..747ab5373 100644 --- a/services/cdn/v1api/model_waf_rule.go +++ b/services/cdn/v1api/model_waf_rule.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -24,8 +23,9 @@ type WafRule struct { // Optional CoreRuleSet rule Id in case this is a CRS rule Code *string `json:"code,omitempty"` // LocalizedString is a map from language to string value - Description map[string]string `json:"description"` - Id string `json:"id"` + Description map[string]string `json:"description"` + Id string `json:"id"` + AdditionalProperties map[string]interface{} } type _WafRule WafRule @@ -144,6 +144,11 @@ func (o WafRule) ToMap() (map[string]interface{}, error) { } toSerialize["description"] = o.Description toSerialize["id"] = o.Id + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -172,9 +177,7 @@ func (o *WafRule) UnmarshalJSON(data []byte) (err error) { varWafRule := _WafRule{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varWafRule) + err = json.Unmarshal(data, &varWafRule) if err != nil { return err @@ -182,6 +185,15 @@ func (o *WafRule) UnmarshalJSON(data []byte) (err error) { *o = WafRule(varWafRule) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "code") + delete(additionalProperties, "description") + delete(additionalProperties, "id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_waf_rule_action.go b/services/cdn/v1api/model_waf_rule_action.go index 7752a95a4..7ac1a0edf 100644 --- a/services/cdn/v1api/model_waf_rule_action.go +++ b/services/cdn/v1api/model_waf_rule_action.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1api/model_waf_rule_collection.go b/services/cdn/v1api/model_waf_rule_collection.go index a42f622cc..f6ff1175d 100644 --- a/services/cdn/v1api/model_waf_rule_collection.go +++ b/services/cdn/v1api/model_waf_rule_collection.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -24,7 +23,8 @@ type WafRuleCollection struct { Groups []WafRuleGroup `json:"groups"` Id string `json:"id"` // LocalizedString is a map from language to string value - Name map[string]string `json:"name"` + Name map[string]string `json:"name"` + AdditionalProperties map[string]interface{} } type _WafRuleCollection WafRuleCollection @@ -134,6 +134,11 @@ func (o WafRuleCollection) ToMap() (map[string]interface{}, error) { toSerialize["groups"] = o.Groups toSerialize["id"] = o.Id toSerialize["name"] = o.Name + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -163,9 +168,7 @@ func (o *WafRuleCollection) UnmarshalJSON(data []byte) (err error) { varWafRuleCollection := _WafRuleCollection{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varWafRuleCollection) + err = json.Unmarshal(data, &varWafRuleCollection) if err != nil { return err @@ -173,6 +176,15 @@ func (o *WafRuleCollection) UnmarshalJSON(data []byte) (err error) { *o = WafRuleCollection(varWafRuleCollection) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "groups") + delete(additionalProperties, "id") + delete(additionalProperties, "name") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_waf_rule_group.go b/services/cdn/v1api/model_waf_rule_group.go index d0e31e24a..c12cf42af 100644 --- a/services/cdn/v1api/model_waf_rule_group.go +++ b/services/cdn/v1api/model_waf_rule_group.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -24,8 +23,9 @@ type WafRuleGroup struct { // LocalizedString is a map from language to string value Description map[string]string `json:"description"` // LocalizedString is a map from language to string value - Name map[string]string `json:"name"` - Rules []WafRule `json:"rules"` + Name map[string]string `json:"name"` + Rules []WafRule `json:"rules"` + AdditionalProperties map[string]interface{} } type _WafRuleGroup WafRuleGroup @@ -135,6 +135,11 @@ func (o WafRuleGroup) ToMap() (map[string]interface{}, error) { toSerialize["description"] = o.Description toSerialize["name"] = o.Name toSerialize["rules"] = o.Rules + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -164,9 +169,7 @@ func (o *WafRuleGroup) UnmarshalJSON(data []byte) (err error) { varWafRuleGroup := _WafRuleGroup{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varWafRuleGroup) + err = json.Unmarshal(data, &varWafRuleGroup) if err != nil { return err @@ -174,6 +177,15 @@ func (o *WafRuleGroup) UnmarshalJSON(data []byte) (err error) { *o = WafRuleGroup(varWafRuleGroup) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "description") + delete(additionalProperties, "name") + delete(additionalProperties, "rules") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_waf_status_rule_block.go b/services/cdn/v1api/model_waf_status_rule_block.go index 8f5e2be2f..099f1bb1f 100644 --- a/services/cdn/v1api/model_waf_status_rule_block.go +++ b/services/cdn/v1api/model_waf_status_rule_block.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -22,8 +21,9 @@ var _ MappedNullable = &WafStatusRuleBlock{} // WafStatusRuleBlock struct for WafStatusRuleBlock type WafStatusRuleBlock struct { // Specifies the Id of the Rule. - Id string `json:"id"` - Reason WafStatusRuleBlockReason `json:"reason"` + Id string `json:"id"` + Reason WafStatusRuleBlockReason `json:"reason"` + AdditionalProperties map[string]interface{} } type _WafStatusRuleBlock WafStatusRuleBlock @@ -107,6 +107,11 @@ func (o WafStatusRuleBlock) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["id"] = o.Id toSerialize["reason"] = o.Reason + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -135,9 +140,7 @@ func (o *WafStatusRuleBlock) UnmarshalJSON(data []byte) (err error) { varWafStatusRuleBlock := _WafStatusRuleBlock{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varWafStatusRuleBlock) + err = json.Unmarshal(data, &varWafStatusRuleBlock) if err != nil { return err @@ -145,6 +148,14 @@ func (o *WafStatusRuleBlock) UnmarshalJSON(data []byte) (err error) { *o = WafStatusRuleBlock(varWafStatusRuleBlock) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "id") + delete(additionalProperties, "reason") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_waf_status_rule_block_reason.go b/services/cdn/v1api/model_waf_status_rule_block_reason.go index 23d7b8956..fe5399d8c 100644 --- a/services/cdn/v1api/model_waf_status_rule_block_reason.go +++ b/services/cdn/v1api/model_waf_status_rule_block_reason.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1api/model_waf_status_rule_block_reason_directly_defined.go b/services/cdn/v1api/model_waf_status_rule_block_reason_directly_defined.go index af97cf84c..763c6fb9b 100644 --- a/services/cdn/v1api/model_waf_status_rule_block_reason_directly_defined.go +++ b/services/cdn/v1api/model_waf_status_rule_block_reason_directly_defined.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -22,7 +21,8 @@ var _ MappedNullable = &WafStatusRuleBlockReasonDirectlyDefined{} // WafStatusRuleBlockReasonDirectlyDefined struct for WafStatusRuleBlockReasonDirectlyDefined type WafStatusRuleBlockReasonDirectlyDefined struct { // This is always `directlyDefined` - Type string `json:"type"` + Type string `json:"type"` + AdditionalProperties map[string]interface{} } type _WafStatusRuleBlockReasonDirectlyDefined WafStatusRuleBlockReasonDirectlyDefined @@ -80,6 +80,11 @@ func (o WafStatusRuleBlockReasonDirectlyDefined) MarshalJSON() ([]byte, error) { func (o WafStatusRuleBlockReasonDirectlyDefined) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -107,9 +112,7 @@ func (o *WafStatusRuleBlockReasonDirectlyDefined) UnmarshalJSON(data []byte) (er varWafStatusRuleBlockReasonDirectlyDefined := _WafStatusRuleBlockReasonDirectlyDefined{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varWafStatusRuleBlockReasonDirectlyDefined) + err = json.Unmarshal(data, &varWafStatusRuleBlockReasonDirectlyDefined) if err != nil { return err @@ -117,6 +120,13 @@ func (o *WafStatusRuleBlockReasonDirectlyDefined) UnmarshalJSON(data []byte) (er *o = WafStatusRuleBlockReasonDirectlyDefined(varWafStatusRuleBlockReasonDirectlyDefined) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_waf_status_rule_block_reason_inherited_from_collection.go b/services/cdn/v1api/model_waf_status_rule_block_reason_inherited_from_collection.go index 75a154913..42009afc1 100644 --- a/services/cdn/v1api/model_waf_status_rule_block_reason_inherited_from_collection.go +++ b/services/cdn/v1api/model_waf_status_rule_block_reason_inherited_from_collection.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -24,7 +23,8 @@ type WafStatusRuleBlockReasonInheritedFromCollection struct { // The Collection that caused this rule to be in its current state. CollectionId string `json:"collectionId"` // This is always `inheritedFromCollection` - Type string `json:"type"` + Type string `json:"type"` + AdditionalProperties map[string]interface{} } type _WafStatusRuleBlockReasonInheritedFromCollection WafStatusRuleBlockReasonInheritedFromCollection @@ -108,6 +108,11 @@ func (o WafStatusRuleBlockReasonInheritedFromCollection) ToMap() (map[string]int toSerialize := map[string]interface{}{} toSerialize["collectionId"] = o.CollectionId toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -136,9 +141,7 @@ func (o *WafStatusRuleBlockReasonInheritedFromCollection) UnmarshalJSON(data []b varWafStatusRuleBlockReasonInheritedFromCollection := _WafStatusRuleBlockReasonInheritedFromCollection{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varWafStatusRuleBlockReasonInheritedFromCollection) + err = json.Unmarshal(data, &varWafStatusRuleBlockReasonInheritedFromCollection) if err != nil { return err @@ -146,6 +149,14 @@ func (o *WafStatusRuleBlockReasonInheritedFromCollection) UnmarshalJSON(data []b *o = WafStatusRuleBlockReasonInheritedFromCollection(varWafStatusRuleBlockReasonInheritedFromCollection) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "collectionId") + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_waf_status_rule_block_reason_inherited_from_group.go b/services/cdn/v1api/model_waf_status_rule_block_reason_inherited_from_group.go index adde295c4..db559acfd 100644 --- a/services/cdn/v1api/model_waf_status_rule_block_reason_inherited_from_group.go +++ b/services/cdn/v1api/model_waf_status_rule_block_reason_inherited_from_group.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -24,7 +23,8 @@ type WafStatusRuleBlockReasonInheritedFromGroup struct { // The Group that caused this rule to be in its current state. GroupId string `json:"groupId"` // This is always `inheritedFromGroup` - Type string `json:"type"` + Type string `json:"type"` + AdditionalProperties map[string]interface{} } type _WafStatusRuleBlockReasonInheritedFromGroup WafStatusRuleBlockReasonInheritedFromGroup @@ -108,6 +108,11 @@ func (o WafStatusRuleBlockReasonInheritedFromGroup) ToMap() (map[string]interfac toSerialize := map[string]interface{}{} toSerialize["groupId"] = o.GroupId toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -136,9 +141,7 @@ func (o *WafStatusRuleBlockReasonInheritedFromGroup) UnmarshalJSON(data []byte) varWafStatusRuleBlockReasonInheritedFromGroup := _WafStatusRuleBlockReasonInheritedFromGroup{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varWafStatusRuleBlockReasonInheritedFromGroup) + err = json.Unmarshal(data, &varWafStatusRuleBlockReasonInheritedFromGroup) if err != nil { return err @@ -146,6 +149,14 @@ func (o *WafStatusRuleBlockReasonInheritedFromGroup) UnmarshalJSON(data []byte) *o = WafStatusRuleBlockReasonInheritedFromGroup(varWafStatusRuleBlockReasonInheritedFromGroup) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "groupId") + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_waf_status_rule_block_reason_invalid_waf_type.go b/services/cdn/v1api/model_waf_status_rule_block_reason_invalid_waf_type.go index 58175ffc5..f3127fd78 100644 --- a/services/cdn/v1api/model_waf_status_rule_block_reason_invalid_waf_type.go +++ b/services/cdn/v1api/model_waf_status_rule_block_reason_invalid_waf_type.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -24,7 +23,8 @@ type WafStatusRuleBlockReasonInvalidWafType struct { // A list containing all WAF Types which can use this Rule. You must patch you WAF to one of these WAF Types to make use of this rule. Rules show up with this state if they would have been enabled or logOnly otherwise. AllowedWafTypes []WafType `json:"allowedWafTypes"` // This is always `invalidWafType` - Type string `json:"type"` + Type string `json:"type"` + AdditionalProperties map[string]interface{} } type _WafStatusRuleBlockReasonInvalidWafType WafStatusRuleBlockReasonInvalidWafType @@ -108,6 +108,11 @@ func (o WafStatusRuleBlockReasonInvalidWafType) ToMap() (map[string]interface{}, toSerialize := map[string]interface{}{} toSerialize["allowedWafTypes"] = o.AllowedWafTypes toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -136,9 +141,7 @@ func (o *WafStatusRuleBlockReasonInvalidWafType) UnmarshalJSON(data []byte) (err varWafStatusRuleBlockReasonInvalidWafType := _WafStatusRuleBlockReasonInvalidWafType{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varWafStatusRuleBlockReasonInvalidWafType) + err = json.Unmarshal(data, &varWafStatusRuleBlockReasonInvalidWafType) if err != nil { return err @@ -146,6 +149,14 @@ func (o *WafStatusRuleBlockReasonInvalidWafType) UnmarshalJSON(data []byte) (err *o = WafStatusRuleBlockReasonInvalidWafType(varWafStatusRuleBlockReasonInvalidWafType) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "allowedWafTypes") + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_waf_status_rule_block_reason_never_defined.go b/services/cdn/v1api/model_waf_status_rule_block_reason_never_defined.go index 088c2069d..bd54e2274 100644 --- a/services/cdn/v1api/model_waf_status_rule_block_reason_never_defined.go +++ b/services/cdn/v1api/model_waf_status_rule_block_reason_never_defined.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -22,7 +21,8 @@ var _ MappedNullable = &WafStatusRuleBlockReasonNeverDefined{} // WafStatusRuleBlockReasonNeverDefined This object only ever shows up in the disabled rules section. If rules are never defined (e.g. no collection, rule group, or the rule itself is ever mentioned), they are implicitly disabled type WafStatusRuleBlockReasonNeverDefined struct { // This is always `neverDefined` - Type string `json:"type"` + Type string `json:"type"` + AdditionalProperties map[string]interface{} } type _WafStatusRuleBlockReasonNeverDefined WafStatusRuleBlockReasonNeverDefined @@ -80,6 +80,11 @@ func (o WafStatusRuleBlockReasonNeverDefined) MarshalJSON() ([]byte, error) { func (o WafStatusRuleBlockReasonNeverDefined) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -107,9 +112,7 @@ func (o *WafStatusRuleBlockReasonNeverDefined) UnmarshalJSON(data []byte) (err e varWafStatusRuleBlockReasonNeverDefined := _WafStatusRuleBlockReasonNeverDefined{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varWafStatusRuleBlockReasonNeverDefined) + err = json.Unmarshal(data, &varWafStatusRuleBlockReasonNeverDefined) if err != nil { return err @@ -117,6 +120,13 @@ func (o *WafStatusRuleBlockReasonNeverDefined) UnmarshalJSON(data []byte) (err e *o = WafStatusRuleBlockReasonNeverDefined(varWafStatusRuleBlockReasonNeverDefined) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/model_waf_type.go b/services/cdn/v1api/model_waf_type.go index 922d0dc5c..dee4ab6d8 100644 --- a/services/cdn/v1api/model_waf_type.go +++ b/services/cdn/v1api/model_waf_type.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1api/model_waf_violation.go b/services/cdn/v1api/model_waf_violation.go index c5fb04c97..e17e9947f 100644 --- a/services/cdn/v1api/model_waf_violation.go +++ b/services/cdn/v1api/model_waf_violation.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1.0.0 package v1api import ( - "bytes" "encoding/json" "fmt" ) @@ -30,7 +29,8 @@ type WAFViolation struct { Method string `json:"method"` RequestHeaders map[string]string `json:"requestHeaders"` // ID of the WAF rule that was triggered - RuleId string `json:"ruleId"` + RuleId string `json:"ruleId"` + AdditionalProperties map[string]interface{} } type _WAFViolation WAFViolation @@ -218,6 +218,11 @@ func (o WAFViolation) ToMap() (map[string]interface{}, error) { toSerialize["method"] = o.Method toSerialize["requestHeaders"] = o.RequestHeaders toSerialize["ruleId"] = o.RuleId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -250,9 +255,7 @@ func (o *WAFViolation) UnmarshalJSON(data []byte) (err error) { varWAFViolation := _WAFViolation{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varWAFViolation) + err = json.Unmarshal(data, &varWAFViolation) if err != nil { return err @@ -260,6 +263,18 @@ func (o *WAFViolation) UnmarshalJSON(data []byte) (err error) { *o = WAFViolation(varWAFViolation) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "action") + delete(additionalProperties, "asn") + delete(additionalProperties, "message") + delete(additionalProperties, "method") + delete(additionalProperties, "requestHeaders") + delete(additionalProperties, "ruleId") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1api/response.go b/services/cdn/v1api/response.go index 097f7bfb9..9efbbc505 100644 --- a/services/cdn/v1api/response.go +++ b/services/cdn/v1api/response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1api/utils.go b/services/cdn/v1api/utils.go index 5fc2645c6..16ccd5dda 100644 --- a/services/cdn/v1api/utils.go +++ b/services/cdn/v1api/utils.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1beta2api/api_default.go b/services/cdn/v1beta2api/api_default.go index bcfc96768..84501bd2d 100644 --- a/services/cdn/v1beta2api/api_default.go +++ b/services/cdn/v1beta2api/api_default.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1beta2api/api_default_mock.go b/services/cdn/v1beta2api/api_default_mock.go index 5ae3f8d4b..861dbf371 100644 --- a/services/cdn/v1beta2api/api_default_mock.go +++ b/services/cdn/v1beta2api/api_default_mock.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1beta2api/client.go b/services/cdn/v1beta2api/client.go index 373081350..e61760847 100644 --- a/services/cdn/v1beta2api/client.go +++ b/services/cdn/v1beta2api/client.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -42,7 +42,7 @@ var ( queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]") ) -// APIClient manages communication with the CDN API API v1beta2.0.0 +// APIClient manages communication with the STACKIT CDN API API v1beta2.0.0 // In most cases there should be only one, shared, APIClient. type APIClient struct { cfg *config.Configuration diff --git a/services/cdn/v1beta2api/configuration.go b/services/cdn/v1beta2api/configuration.go index 73db69ae0..76bbd7e88 100644 --- a/services/cdn/v1beta2api/configuration.go +++ b/services/cdn/v1beta2api/configuration.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1beta2api/model_bucket_backend.go b/services/cdn/v1beta2api/model_bucket_backend.go index 132248f42..d099da93e 100644 --- a/services/cdn/v1beta2api/model_bucket_backend.go +++ b/services/cdn/v1beta2api/model_bucket_backend.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,9 +20,10 @@ var _ MappedNullable = &BucketBackend{} // BucketBackend struct for BucketBackend type BucketBackend struct { - BucketUrl string `json:"bucketUrl"` - Region string `json:"region"` - Type string `json:"type"` + BucketUrl string `json:"bucketUrl"` + Region string `json:"region"` + Type string `json:"type"` + AdditionalProperties map[string]interface{} } type _BucketBackend BucketBackend @@ -133,6 +133,11 @@ func (o BucketBackend) ToMap() (map[string]interface{}, error) { toSerialize["bucketUrl"] = o.BucketUrl toSerialize["region"] = o.Region toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -162,9 +167,7 @@ func (o *BucketBackend) UnmarshalJSON(data []byte) (err error) { varBucketBackend := _BucketBackend{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varBucketBackend) + err = json.Unmarshal(data, &varBucketBackend) if err != nil { return err @@ -172,6 +175,15 @@ func (o *BucketBackend) UnmarshalJSON(data []byte) (err error) { *o = BucketBackend(varBucketBackend) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "bucketUrl") + delete(additionalProperties, "region") + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_bucket_backend_create.go b/services/cdn/v1beta2api/model_bucket_backend_create.go index e3e86649f..d3cb7380a 100644 --- a/services/cdn/v1beta2api/model_bucket_backend_create.go +++ b/services/cdn/v1beta2api/model_bucket_backend_create.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,10 +20,11 @@ var _ MappedNullable = &BucketBackendCreate{} // BucketBackendCreate struct for BucketBackendCreate type BucketBackendCreate struct { - BucketUrl string `json:"bucketUrl"` - Credentials BucketCredentials `json:"credentials"` - Region string `json:"region"` - Type string `json:"type"` + BucketUrl string `json:"bucketUrl"` + Credentials BucketCredentials `json:"credentials"` + Region string `json:"region"` + Type string `json:"type"` + AdditionalProperties map[string]interface{} } type _BucketBackendCreate BucketBackendCreate @@ -160,6 +160,11 @@ func (o BucketBackendCreate) ToMap() (map[string]interface{}, error) { toSerialize["credentials"] = o.Credentials toSerialize["region"] = o.Region toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -190,9 +195,7 @@ func (o *BucketBackendCreate) UnmarshalJSON(data []byte) (err error) { varBucketBackendCreate := _BucketBackendCreate{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varBucketBackendCreate) + err = json.Unmarshal(data, &varBucketBackendCreate) if err != nil { return err @@ -200,6 +203,16 @@ func (o *BucketBackendCreate) UnmarshalJSON(data []byte) (err error) { *o = BucketBackendCreate(varBucketBackendCreate) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "bucketUrl") + delete(additionalProperties, "credentials") + delete(additionalProperties, "region") + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_bucket_backend_patch.go b/services/cdn/v1beta2api/model_bucket_backend_patch.go index 34dd5aaa9..0bbe798b0 100644 --- a/services/cdn/v1beta2api/model_bucket_backend_patch.go +++ b/services/cdn/v1beta2api/model_bucket_backend_patch.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,10 +20,11 @@ var _ MappedNullable = &BucketBackendPatch{} // BucketBackendPatch struct for BucketBackendPatch type BucketBackendPatch struct { - BucketUrl *string `json:"bucketUrl,omitempty"` - Credentials *BucketCredentials `json:"credentials,omitempty"` - Region *string `json:"region,omitempty"` - Type string `json:"type"` + BucketUrl *string `json:"bucketUrl,omitempty"` + Credentials *BucketCredentials `json:"credentials,omitempty"` + Region *string `json:"region,omitempty"` + Type string `json:"type"` + AdditionalProperties map[string]interface{} } type _BucketBackendPatch BucketBackendPatch @@ -187,6 +187,11 @@ func (o BucketBackendPatch) ToMap() (map[string]interface{}, error) { toSerialize["region"] = o.Region } toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -214,9 +219,7 @@ func (o *BucketBackendPatch) UnmarshalJSON(data []byte) (err error) { varBucketBackendPatch := _BucketBackendPatch{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varBucketBackendPatch) + err = json.Unmarshal(data, &varBucketBackendPatch) if err != nil { return err @@ -224,6 +227,16 @@ func (o *BucketBackendPatch) UnmarshalJSON(data []byte) (err error) { *o = BucketBackendPatch(varBucketBackendPatch) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "bucketUrl") + delete(additionalProperties, "credentials") + delete(additionalProperties, "region") + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_bucket_credentials.go b/services/cdn/v1beta2api/model_bucket_credentials.go index bf6020a7a..85005c4ce 100644 --- a/services/cdn/v1beta2api/model_bucket_credentials.go +++ b/services/cdn/v1beta2api/model_bucket_credentials.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,8 +20,9 @@ var _ MappedNullable = &BucketCredentials{} // BucketCredentials struct for BucketCredentials type BucketCredentials struct { - AccessKeyId string `json:"accessKeyId"` - SecretAccessKey string `json:"secretAccessKey"` + AccessKeyId string `json:"accessKeyId"` + SecretAccessKey string `json:"secretAccessKey"` + AdditionalProperties map[string]interface{} } type _BucketCredentials BucketCredentials @@ -106,6 +106,11 @@ func (o BucketCredentials) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["accessKeyId"] = o.AccessKeyId toSerialize["secretAccessKey"] = o.SecretAccessKey + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -134,9 +139,7 @@ func (o *BucketCredentials) UnmarshalJSON(data []byte) (err error) { varBucketCredentials := _BucketCredentials{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varBucketCredentials) + err = json.Unmarshal(data, &varBucketCredentials) if err != nil { return err @@ -144,6 +147,14 @@ func (o *BucketCredentials) UnmarshalJSON(data []byte) (err error) { *o = BucketCredentials(varBucketCredentials) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "accessKeyId") + delete(additionalProperties, "secretAccessKey") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_config.go b/services/cdn/v1beta2api/model_config.go index d54ee3270..c4a3ae006 100644 --- a/services/cdn/v1beta2api/model_config.go +++ b/services/cdn/v1beta2api/model_config.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -30,10 +29,11 @@ type Config struct { DefaultCacheDuration NullableString `json:"defaultCacheDuration,omitempty"` LogSink *LokiLogSink `json:"logSink,omitempty"` // Sets the monthly limit of bandwidth in bytes that the pullzone is allowed to use. - MonthlyLimitBytes NullableInt64 `json:"monthlyLimitBytes,omitempty"` - Optimizer *Optimizer `json:"optimizer,omitempty"` - Regions []Region `json:"regions"` - Waf WafConfig `json:"waf"` + MonthlyLimitBytes NullableInt64 `json:"monthlyLimitBytes,omitempty"` + Optimizer *Optimizer `json:"optimizer,omitempty"` + Regions []Region `json:"regions"` + Waf WafConfig `json:"waf"` + AdditionalProperties map[string]interface{} } type _Config Config @@ -357,6 +357,11 @@ func (o Config) ToMap() (map[string]interface{}, error) { } toSerialize["regions"] = o.Regions toSerialize["waf"] = o.Waf + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -388,9 +393,7 @@ func (o *Config) UnmarshalJSON(data []byte) (err error) { varConfig := _Config{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varConfig) + err = json.Unmarshal(data, &varConfig) if err != nil { return err @@ -398,6 +401,21 @@ func (o *Config) UnmarshalJSON(data []byte) (err error) { *o = Config(varConfig) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "backend") + delete(additionalProperties, "blockedCountries") + delete(additionalProperties, "blockedIps") + delete(additionalProperties, "defaultCacheDuration") + delete(additionalProperties, "logSink") + delete(additionalProperties, "monthlyLimitBytes") + delete(additionalProperties, "optimizer") + delete(additionalProperties, "regions") + delete(additionalProperties, "waf") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_config_backend.go b/services/cdn/v1beta2api/model_config_backend.go index 3e82c3ad8..aba2f92be 100644 --- a/services/cdn/v1beta2api/model_config_backend.go +++ b/services/cdn/v1beta2api/model_config_backend.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1beta2api/model_config_patch.go b/services/cdn/v1beta2api/model_config_patch.go index 3d90febd2..a21e2ac1b 100644 --- a/services/cdn/v1beta2api/model_config_patch.go +++ b/services/cdn/v1beta2api/model_config_patch.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -28,12 +28,15 @@ type ConfigPatch struct { DefaultCacheDuration NullableString `json:"defaultCacheDuration,omitempty"` LogSink NullableLokiLogSinkPatch `json:"logSink,omitempty"` // Sets the monthly limit of bandwidth in bytes that the pullzone is allowed to use. - MonthlyLimitBytes NullableInt64 `json:"monthlyLimitBytes,omitempty"` - Optimizer *OptimizerPatch `json:"optimizer,omitempty"` - Regions []Region `json:"regions,omitempty"` - Waf *WafConfigPatch `json:"waf,omitempty"` + MonthlyLimitBytes NullableInt64 `json:"monthlyLimitBytes,omitempty"` + Optimizer *OptimizerPatch `json:"optimizer,omitempty"` + Regions []Region `json:"regions,omitempty"` + Waf *WafConfigPatch `json:"waf,omitempty"` + AdditionalProperties map[string]interface{} } +type _ConfigPatch ConfigPatch + // NewConfigPatch instantiates a new ConfigPatch 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 @@ -409,9 +412,43 @@ func (o ConfigPatch) ToMap() (map[string]interface{}, error) { if !IsNil(o.Waf) { toSerialize["waf"] = o.Waf } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *ConfigPatch) UnmarshalJSON(data []byte) (err error) { + varConfigPatch := _ConfigPatch{} + + err = json.Unmarshal(data, &varConfigPatch) + + if err != nil { + return err + } + + *o = ConfigPatch(varConfigPatch) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "backend") + delete(additionalProperties, "blockedCountries") + delete(additionalProperties, "blockedIps") + delete(additionalProperties, "defaultCacheDuration") + delete(additionalProperties, "logSink") + delete(additionalProperties, "monthlyLimitBytes") + delete(additionalProperties, "optimizer") + delete(additionalProperties, "regions") + delete(additionalProperties, "waf") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableConfigPatch struct { value *ConfigPatch isSet bool diff --git a/services/cdn/v1beta2api/model_config_patch_backend.go b/services/cdn/v1beta2api/model_config_patch_backend.go index a060a2c8d..5e0d7b4db 100644 --- a/services/cdn/v1beta2api/model_config_patch_backend.go +++ b/services/cdn/v1beta2api/model_config_patch_backend.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1beta2api/model_create_distribution_payload.go b/services/cdn/v1beta2api/model_create_distribution_payload.go index a98e89077..51fb43cec 100644 --- a/services/cdn/v1beta2api/model_create_distribution_payload.go +++ b/services/cdn/v1beta2api/model_create_distribution_payload.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -35,8 +34,9 @@ type CreateDistributionPayload struct { MonthlyLimitBytes *int64 `json:"monthlyLimitBytes,omitempty"` Optimizer *Optimizer `json:"optimizer,omitempty"` // Define in which regions you would like your content to be cached. - Regions []Region `json:"regions"` - Waf *WafConfig `json:"waf,omitempty"` + Regions []Region `json:"regions"` + Waf *WafConfig `json:"waf,omitempty"` + AdditionalProperties map[string]interface{} } type _CreateDistributionPayload CreateDistributionPayload @@ -400,6 +400,11 @@ func (o CreateDistributionPayload) ToMap() (map[string]interface{}, error) { if !IsNil(o.Waf) { toSerialize["waf"] = o.Waf } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -428,9 +433,7 @@ func (o *CreateDistributionPayload) UnmarshalJSON(data []byte) (err error) { varCreateDistributionPayload := _CreateDistributionPayload{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varCreateDistributionPayload) + err = json.Unmarshal(data, &varCreateDistributionPayload) if err != nil { return err @@ -438,6 +441,22 @@ func (o *CreateDistributionPayload) UnmarshalJSON(data []byte) (err error) { *o = CreateDistributionPayload(varCreateDistributionPayload) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "backend") + delete(additionalProperties, "blockedCountries") + delete(additionalProperties, "blockedIps") + delete(additionalProperties, "defaultCacheDuration") + delete(additionalProperties, "intentId") + delete(additionalProperties, "logSink") + delete(additionalProperties, "monthlyLimitBytes") + delete(additionalProperties, "optimizer") + delete(additionalProperties, "regions") + delete(additionalProperties, "waf") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_create_distribution_payload_backend.go b/services/cdn/v1beta2api/model_create_distribution_payload_backend.go index 6baa7d8e5..457482016 100644 --- a/services/cdn/v1beta2api/model_create_distribution_payload_backend.go +++ b/services/cdn/v1beta2api/model_create_distribution_payload_backend.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1beta2api/model_create_distribution_response.go b/services/cdn/v1beta2api/model_create_distribution_response.go index 227db7045..7b04b7b2c 100644 --- a/services/cdn/v1beta2api/model_create_distribution_response.go +++ b/services/cdn/v1beta2api/model_create_distribution_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,7 +20,8 @@ var _ MappedNullable = &CreateDistributionResponse{} // CreateDistributionResponse struct for CreateDistributionResponse type CreateDistributionResponse struct { - Distribution Distribution `json:"distribution"` + Distribution Distribution `json:"distribution"` + AdditionalProperties map[string]interface{} } type _CreateDistributionResponse CreateDistributionResponse @@ -79,6 +79,11 @@ func (o CreateDistributionResponse) MarshalJSON() ([]byte, error) { func (o CreateDistributionResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["distribution"] = o.Distribution + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -106,9 +111,7 @@ func (o *CreateDistributionResponse) UnmarshalJSON(data []byte) (err error) { varCreateDistributionResponse := _CreateDistributionResponse{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varCreateDistributionResponse) + err = json.Unmarshal(data, &varCreateDistributionResponse) if err != nil { return err @@ -116,6 +119,13 @@ func (o *CreateDistributionResponse) UnmarshalJSON(data []byte) (err error) { *o = CreateDistributionResponse(varCreateDistributionResponse) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "distribution") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_custom_domain.go b/services/cdn/v1beta2api/model_custom_domain.go index 3bcd1e34e..813d59e98 100644 --- a/services/cdn/v1beta2api/model_custom_domain.go +++ b/services/cdn/v1beta2api/model_custom_domain.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -24,8 +23,9 @@ type CustomDomain struct { // This object is present if the custom domain has errors. Errors []StatusError `json:"errors,omitempty"` // The domain. Can be used as input for the GetCustomDomain endpoint - Name string `json:"name"` - Status DomainStatus `json:"status"` + Name string `json:"name"` + Status DomainStatus `json:"status"` + AdditionalProperties map[string]interface{} } type _CustomDomain CustomDomain @@ -144,6 +144,11 @@ func (o CustomDomain) ToMap() (map[string]interface{}, error) { } toSerialize["name"] = o.Name toSerialize["status"] = o.Status + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -172,9 +177,7 @@ func (o *CustomDomain) UnmarshalJSON(data []byte) (err error) { varCustomDomain := _CustomDomain{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varCustomDomain) + err = json.Unmarshal(data, &varCustomDomain) if err != nil { return err @@ -182,6 +185,15 @@ func (o *CustomDomain) UnmarshalJSON(data []byte) (err error) { *o = CustomDomain(varCustomDomain) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "errors") + delete(additionalProperties, "name") + delete(additionalProperties, "status") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_delete_custom_domain_response.go b/services/cdn/v1beta2api/model_delete_custom_domain_response.go index 41364a7f4..eaecb3896 100644 --- a/services/cdn/v1beta2api/model_delete_custom_domain_response.go +++ b/services/cdn/v1beta2api/model_delete_custom_domain_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -19,9 +19,12 @@ var _ MappedNullable = &DeleteCustomDomainResponse{} // DeleteCustomDomainResponse Returns the custom domain that was deleted while the deletion has not completed yet. After the deletion was successful the response will be empty. type DeleteCustomDomainResponse struct { - CustomDomain *CustomDomain `json:"customDomain,omitempty"` + CustomDomain *CustomDomain `json:"customDomain,omitempty"` + AdditionalProperties map[string]interface{} } +type _DeleteCustomDomainResponse DeleteCustomDomainResponse + // NewDeleteCustomDomainResponse instantiates a new DeleteCustomDomainResponse 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 @@ -84,9 +87,35 @@ func (o DeleteCustomDomainResponse) ToMap() (map[string]interface{}, error) { if !IsNil(o.CustomDomain) { toSerialize["customDomain"] = o.CustomDomain } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *DeleteCustomDomainResponse) UnmarshalJSON(data []byte) (err error) { + varDeleteCustomDomainResponse := _DeleteCustomDomainResponse{} + + err = json.Unmarshal(data, &varDeleteCustomDomainResponse) + + if err != nil { + return err + } + + *o = DeleteCustomDomainResponse(varDeleteCustomDomainResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "customDomain") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableDeleteCustomDomainResponse struct { value *DeleteCustomDomainResponse isSet bool diff --git a/services/cdn/v1beta2api/model_delete_distribution_response.go b/services/cdn/v1beta2api/model_delete_distribution_response.go index d0d9d9717..1b59da3ba 100644 --- a/services/cdn/v1beta2api/model_delete_distribution_response.go +++ b/services/cdn/v1beta2api/model_delete_distribution_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -19,9 +19,12 @@ var _ MappedNullable = &DeleteDistributionResponse{} // DeleteDistributionResponse struct for DeleteDistributionResponse type DeleteDistributionResponse struct { - Distribution *Distribution `json:"distribution,omitempty"` + Distribution *Distribution `json:"distribution,omitempty"` + AdditionalProperties map[string]interface{} } +type _DeleteDistributionResponse DeleteDistributionResponse + // NewDeleteDistributionResponse instantiates a new DeleteDistributionResponse 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 @@ -84,9 +87,35 @@ func (o DeleteDistributionResponse) ToMap() (map[string]interface{}, error) { if !IsNil(o.Distribution) { toSerialize["distribution"] = o.Distribution } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *DeleteDistributionResponse) UnmarshalJSON(data []byte) (err error) { + varDeleteDistributionResponse := _DeleteDistributionResponse{} + + err = json.Unmarshal(data, &varDeleteDistributionResponse) + + if err != nil { + return err + } + + *o = DeleteDistributionResponse(varDeleteDistributionResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "distribution") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableDeleteDistributionResponse struct { value *DeleteDistributionResponse isSet bool diff --git a/services/cdn/v1beta2api/model_distribution.go b/services/cdn/v1beta2api/model_distribution.go index abd8d4aea..d7ff6881a 100644 --- a/services/cdn/v1beta2api/model_distribution.go +++ b/services/cdn/v1beta2api/model_distribution.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" "time" @@ -33,8 +32,9 @@ type Distribution struct { // - `CREATING`: The distribution was just created. All the relevant resources are created in the background. Once fully reconciled, this switches to `ACTIVE`. If there are any issues, the status changes to `ERROR`. You can look at the `errors` array to get more infos. - `ACTIVE`: The usual state. The desired configuration is synced, there are no errors - `UPDATING`: The state when there is a discrepancy between the desired and actual configuration state. This occurs right after an update. Will switch to `ACTIVE` or `ERROR`, depending on if synchronizing succeeds or not. - `DELETING`: The state right after a delete request was received. The distribution will stay in this status until all resources have been successfully removed, or until we encounter an `ERROR` state. **NOTE:** You can keep fetching the distribution while it is deleting. After successful deletion, trying to get a distribution will return a 404 Not Found response - `ERROR`: The error state. Look at the `errors` array for more info. Status string `json:"status"` // RFC3339 string which returns the last time the distribution configuration was modified. - UpdatedAt time.Time `json:"updatedAt"` - Waf *DistributionWaf `json:"waf,omitempty"` + UpdatedAt time.Time `json:"updatedAt"` + Waf *DistributionWaf `json:"waf,omitempty"` + AdditionalProperties map[string]interface{} } type _Distribution Distribution @@ -318,6 +318,11 @@ func (o Distribution) ToMap() (map[string]interface{}, error) { if !IsNil(o.Waf) { toSerialize["waf"] = o.Waf } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -351,9 +356,7 @@ func (o *Distribution) UnmarshalJSON(data []byte) (err error) { varDistribution := _Distribution{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varDistribution) + err = json.Unmarshal(data, &varDistribution) if err != nil { return err @@ -361,6 +364,21 @@ func (o *Distribution) UnmarshalJSON(data []byte) (err error) { *o = Distribution(varDistribution) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "config") + delete(additionalProperties, "createdAt") + delete(additionalProperties, "domains") + delete(additionalProperties, "errors") + delete(additionalProperties, "id") + delete(additionalProperties, "projectId") + delete(additionalProperties, "status") + delete(additionalProperties, "updatedAt") + delete(additionalProperties, "waf") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_distribution_logs_record.go b/services/cdn/v1beta2api/model_distribution_logs_record.go index 9e89b1b64..20ee9986a 100644 --- a/services/cdn/v1beta2api/model_distribution_logs_record.go +++ b/services/cdn/v1beta2api/model_distribution_logs_record.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" "time" @@ -28,11 +27,12 @@ type DistributionLogsRecord struct { Host string `json:"host"` Path string `json:"path"` // ISO 3166-1 A2 compliant country code - RequestCountryCode string `json:"requestCountryCode"` - Size int64 `json:"size"` - StatusCode int32 `json:"statusCode"` - Timestamp time.Time `json:"timestamp"` - WafViolation *WAFViolation `json:"wafViolation,omitempty"` + RequestCountryCode string `json:"requestCountryCode"` + Size int64 `json:"size"` + StatusCode int32 `json:"statusCode"` + Timestamp time.Time `json:"timestamp"` + WafViolation *WAFViolation `json:"wafViolation,omitempty"` + AdditionalProperties map[string]interface{} } type _DistributionLogsRecord DistributionLogsRecord @@ -333,6 +333,11 @@ func (o DistributionLogsRecord) ToMap() (map[string]interface{}, error) { if !IsNil(o.WafViolation) { toSerialize["wafViolation"] = o.WafViolation } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -368,9 +373,7 @@ func (o *DistributionLogsRecord) UnmarshalJSON(data []byte) (err error) { varDistributionLogsRecord := _DistributionLogsRecord{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varDistributionLogsRecord) + err = json.Unmarshal(data, &varDistributionLogsRecord) if err != nil { return err @@ -378,6 +381,22 @@ func (o *DistributionLogsRecord) UnmarshalJSON(data []byte) (err error) { *o = DistributionLogsRecord(varDistributionLogsRecord) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "cacheHit") + delete(additionalProperties, "dataCenterRegion") + delete(additionalProperties, "distributionId") + delete(additionalProperties, "host") + delete(additionalProperties, "path") + delete(additionalProperties, "requestCountryCode") + delete(additionalProperties, "size") + delete(additionalProperties, "statusCode") + delete(additionalProperties, "timestamp") + delete(additionalProperties, "wafViolation") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_distribution_statistics_record.go b/services/cdn/v1beta2api/model_distribution_statistics_record.go index a5baab869..a380c3f6e 100644 --- a/services/cdn/v1beta2api/model_distribution_statistics_record.go +++ b/services/cdn/v1beta2api/model_distribution_statistics_record.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" "time" @@ -32,7 +31,8 @@ type DistributionStatisticsRecord struct { End time.Time `json:"end"` Regions DistributionStatisticsRecordRegions `json:"regions"` // Start of the time interval the statistics refer to - Start time.Time `json:"start"` + Start time.Time `json:"start"` + AdditionalProperties map[string]interface{} } type _DistributionStatisticsRecord DistributionStatisticsRecord @@ -220,6 +220,11 @@ func (o DistributionStatisticsRecord) ToMap() (map[string]interface{}, error) { toSerialize["end"] = o.End toSerialize["regions"] = o.Regions toSerialize["start"] = o.Start + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -252,9 +257,7 @@ func (o *DistributionStatisticsRecord) UnmarshalJSON(data []byte) (err error) { varDistributionStatisticsRecord := _DistributionStatisticsRecord{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varDistributionStatisticsRecord) + err = json.Unmarshal(data, &varDistributionStatisticsRecord) if err != nil { return err @@ -262,6 +265,18 @@ func (o *DistributionStatisticsRecord) UnmarshalJSON(data []byte) (err error) { *o = DistributionStatisticsRecord(varDistributionStatisticsRecord) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "cachedRequests") + delete(additionalProperties, "totalRequests") + delete(additionalProperties, "totalTrafficBytes") + delete(additionalProperties, "end") + delete(additionalProperties, "regions") + delete(additionalProperties, "start") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_distribution_statistics_record_entry.go b/services/cdn/v1beta2api/model_distribution_statistics_record_entry.go index 953470fe6..73a9b7027 100644 --- a/services/cdn/v1beta2api/model_distribution_statistics_record_entry.go +++ b/services/cdn/v1beta2api/model_distribution_statistics_record_entry.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -26,7 +25,8 @@ type DistributionStatisticsRecordEntry struct { // Total number of requests that were served TotalRequests int64 `json:"totalRequests"` // Total traffic in bytes that occurred during the time interval - TotalTrafficBytes int64 `json:"totalTrafficBytes"` + TotalTrafficBytes int64 `json:"totalTrafficBytes"` + AdditionalProperties map[string]interface{} } type _DistributionStatisticsRecordEntry DistributionStatisticsRecordEntry @@ -136,6 +136,11 @@ func (o DistributionStatisticsRecordEntry) ToMap() (map[string]interface{}, erro toSerialize["cachedRequests"] = o.CachedRequests toSerialize["totalRequests"] = o.TotalRequests toSerialize["totalTrafficBytes"] = o.TotalTrafficBytes + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -165,9 +170,7 @@ func (o *DistributionStatisticsRecordEntry) UnmarshalJSON(data []byte) (err erro varDistributionStatisticsRecordEntry := _DistributionStatisticsRecordEntry{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varDistributionStatisticsRecordEntry) + err = json.Unmarshal(data, &varDistributionStatisticsRecordEntry) if err != nil { return err @@ -175,6 +178,15 @@ func (o *DistributionStatisticsRecordEntry) UnmarshalJSON(data []byte) (err erro *o = DistributionStatisticsRecordEntry(varDistributionStatisticsRecordEntry) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "cachedRequests") + delete(additionalProperties, "totalRequests") + delete(additionalProperties, "totalTrafficBytes") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_distribution_statistics_record_regions.go b/services/cdn/v1beta2api/model_distribution_statistics_record_regions.go index 0bff23445..aff4fa03c 100644 --- a/services/cdn/v1beta2api/model_distribution_statistics_record_regions.go +++ b/services/cdn/v1beta2api/model_distribution_statistics_record_regions.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,11 +20,12 @@ var _ MappedNullable = &DistributionStatisticsRecordRegions{} // DistributionStatisticsRecordRegions Mapping of regions to the metrics for this region for the defined time interval All regions are always present. If no traffic was reported for a region, it will still contain 0-filled properties type DistributionStatisticsRecordRegions struct { - AF DistributionStatisticsRecordEntry `json:"AF"` - ASIA DistributionStatisticsRecordEntry `json:"ASIA"` - EU DistributionStatisticsRecordEntry `json:"EU"` - SA DistributionStatisticsRecordEntry `json:"SA"` - US DistributionStatisticsRecordEntry `json:"US"` + AF DistributionStatisticsRecordEntry `json:"AF"` + ASIA DistributionStatisticsRecordEntry `json:"ASIA"` + EU DistributionStatisticsRecordEntry `json:"EU"` + SA DistributionStatisticsRecordEntry `json:"SA"` + US DistributionStatisticsRecordEntry `json:"US"` + AdditionalProperties map[string]interface{} } type _DistributionStatisticsRecordRegions DistributionStatisticsRecordRegions @@ -187,6 +187,11 @@ func (o DistributionStatisticsRecordRegions) ToMap() (map[string]interface{}, er toSerialize["EU"] = o.EU toSerialize["SA"] = o.SA toSerialize["US"] = o.US + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -218,9 +223,7 @@ func (o *DistributionStatisticsRecordRegions) UnmarshalJSON(data []byte) (err er varDistributionStatisticsRecordRegions := _DistributionStatisticsRecordRegions{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varDistributionStatisticsRecordRegions) + err = json.Unmarshal(data, &varDistributionStatisticsRecordRegions) if err != nil { return err @@ -228,6 +231,17 @@ func (o *DistributionStatisticsRecordRegions) UnmarshalJSON(data []byte) (err er *o = DistributionStatisticsRecordRegions(varDistributionStatisticsRecordRegions) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "AF") + delete(additionalProperties, "ASIA") + delete(additionalProperties, "EU") + delete(additionalProperties, "SA") + delete(additionalProperties, "US") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_distribution_waf.go b/services/cdn/v1beta2api/model_distribution_waf.go index c6b718c56..c9ee0979c 100644 --- a/services/cdn/v1beta2api/model_distribution_waf.go +++ b/services/cdn/v1beta2api/model_distribution_waf.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,9 +20,10 @@ var _ MappedNullable = &DistributionWaf{} // DistributionWaf For this property to be present two pre-conditions must be met: - the WAF was enabled at least once - the query parameter ?withWafStatus is truthy This property contains the waf Status. At this point in time, this contains all resolved rules. Rules are split into 3 groups: - enabledRules - logOnlyRules - disabledRules **Do note that the global waf mode (Disabled, LogOnly, Enabled) is *NOT* reflected in this list!** type DistributionWaf struct { - DisabledRules []WafStatusRuleBlock `json:"disabledRules"` - EnabledRules []WafStatusRuleBlock `json:"enabledRules"` - LogOnlyRules []WafStatusRuleBlock `json:"logOnlyRules"` + DisabledRules []WafStatusRuleBlock `json:"disabledRules"` + EnabledRules []WafStatusRuleBlock `json:"enabledRules"` + LogOnlyRules []WafStatusRuleBlock `json:"logOnlyRules"` + AdditionalProperties map[string]interface{} } type _DistributionWaf DistributionWaf @@ -133,6 +133,11 @@ func (o DistributionWaf) ToMap() (map[string]interface{}, error) { toSerialize["disabledRules"] = o.DisabledRules toSerialize["enabledRules"] = o.EnabledRules toSerialize["logOnlyRules"] = o.LogOnlyRules + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -162,9 +167,7 @@ func (o *DistributionWaf) UnmarshalJSON(data []byte) (err error) { varDistributionWaf := _DistributionWaf{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varDistributionWaf) + err = json.Unmarshal(data, &varDistributionWaf) if err != nil { return err @@ -172,6 +175,15 @@ func (o *DistributionWaf) UnmarshalJSON(data []byte) (err error) { *o = DistributionWaf(varDistributionWaf) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "disabledRules") + delete(additionalProperties, "enabledRules") + delete(additionalProperties, "logOnlyRules") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_domain.go b/services/cdn/v1beta2api/model_domain.go index 50e9d4f4d..82f2251fa 100644 --- a/services/cdn/v1beta2api/model_domain.go +++ b/services/cdn/v1beta2api/model_domain.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -27,7 +26,8 @@ type Domain struct { Name string `json:"name"` Status DomainStatus `json:"status"` // Specifies the type of this Domain. Custom Domain can be further queries using the GetCustomDomain Endpoint - Type string `json:"type"` + Type string `json:"type"` + AdditionalProperties map[string]interface{} } type _Domain Domain @@ -172,6 +172,11 @@ func (o Domain) ToMap() (map[string]interface{}, error) { toSerialize["name"] = o.Name toSerialize["status"] = o.Status toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -201,9 +206,7 @@ func (o *Domain) UnmarshalJSON(data []byte) (err error) { varDomain := _Domain{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varDomain) + err = json.Unmarshal(data, &varDomain) if err != nil { return err @@ -211,6 +214,16 @@ func (o *Domain) UnmarshalJSON(data []byte) (err error) { *o = Domain(varDomain) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "errors") + delete(additionalProperties, "name") + delete(additionalProperties, "status") + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_domain_status.go b/services/cdn/v1beta2api/model_domain_status.go index 1d411dd23..5aa86ce08 100644 --- a/services/cdn/v1beta2api/model_domain_status.go +++ b/services/cdn/v1beta2api/model_domain_status.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1beta2api/model_error_details.go b/services/cdn/v1beta2api/model_error_details.go index 63b16df4a..484c03705 100644 --- a/services/cdn/v1beta2api/model_error_details.go +++ b/services/cdn/v1beta2api/model_error_details.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -26,8 +25,9 @@ type ErrorDetails struct { // English description of the error En string `json:"en"` // Optional field in the request this error detail refers to - Field *string `json:"field,omitempty"` - Key string `json:"key"` + Field *string `json:"field,omitempty"` + Key string `json:"key"` + AdditionalProperties map[string]interface{} } type _ErrorDetails ErrorDetails @@ -181,6 +181,11 @@ func (o ErrorDetails) ToMap() (map[string]interface{}, error) { toSerialize["field"] = o.Field } toSerialize["key"] = o.Key + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -209,9 +214,7 @@ func (o *ErrorDetails) UnmarshalJSON(data []byte) (err error) { varErrorDetails := _ErrorDetails{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varErrorDetails) + err = json.Unmarshal(data, &varErrorDetails) if err != nil { return err @@ -219,6 +222,16 @@ func (o *ErrorDetails) UnmarshalJSON(data []byte) (err error) { *o = ErrorDetails(varErrorDetails) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "de") + delete(additionalProperties, "en") + delete(additionalProperties, "field") + delete(additionalProperties, "key") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_find_cache_paths_response.go b/services/cdn/v1beta2api/model_find_cache_paths_response.go index c94e679b0..60aa0a67a 100644 --- a/services/cdn/v1beta2api/model_find_cache_paths_response.go +++ b/services/cdn/v1beta2api/model_find_cache_paths_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,7 +20,8 @@ var _ MappedNullable = &FindCachePathsResponse{} // FindCachePathsResponse struct for FindCachePathsResponse type FindCachePathsResponse struct { - Response []FindCachePathsResponseEntry `json:"response"` + Response []FindCachePathsResponseEntry `json:"response"` + AdditionalProperties map[string]interface{} } type _FindCachePathsResponse FindCachePathsResponse @@ -79,6 +79,11 @@ func (o FindCachePathsResponse) MarshalJSON() ([]byte, error) { func (o FindCachePathsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["response"] = o.Response + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -106,9 +111,7 @@ func (o *FindCachePathsResponse) UnmarshalJSON(data []byte) (err error) { varFindCachePathsResponse := _FindCachePathsResponse{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varFindCachePathsResponse) + err = json.Unmarshal(data, &varFindCachePathsResponse) if err != nil { return err @@ -116,6 +119,13 @@ func (o *FindCachePathsResponse) UnmarshalJSON(data []byte) (err error) { *o = FindCachePathsResponse(varFindCachePathsResponse) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "response") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_find_cache_paths_response_entry.go b/services/cdn/v1beta2api/model_find_cache_paths_response_entry.go index f2e5ca01d..7cf9673a6 100644 --- a/services/cdn/v1beta2api/model_find_cache_paths_response_entry.go +++ b/services/cdn/v1beta2api/model_find_cache_paths_response_entry.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -22,7 +21,8 @@ var _ MappedNullable = &FindCachePathsResponseEntry{} // FindCachePathsResponseEntry struct for FindCachePathsResponseEntry type FindCachePathsResponseEntry struct { // Defines one path that was previously used as part of a granular purge - Path string `json:"path"` + Path string `json:"path"` + AdditionalProperties map[string]interface{} } type _FindCachePathsResponseEntry FindCachePathsResponseEntry @@ -80,6 +80,11 @@ func (o FindCachePathsResponseEntry) MarshalJSON() ([]byte, error) { func (o FindCachePathsResponseEntry) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["path"] = o.Path + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -107,9 +112,7 @@ func (o *FindCachePathsResponseEntry) UnmarshalJSON(data []byte) (err error) { varFindCachePathsResponseEntry := _FindCachePathsResponseEntry{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varFindCachePathsResponseEntry) + err = json.Unmarshal(data, &varFindCachePathsResponseEntry) if err != nil { return err @@ -117,6 +120,13 @@ func (o *FindCachePathsResponseEntry) UnmarshalJSON(data []byte) (err error) { *o = FindCachePathsResponseEntry(varFindCachePathsResponseEntry) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "path") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_generic_json_response.go b/services/cdn/v1beta2api/model_generic_json_response.go index 94290ab4d..45fee4159 100644 --- a/services/cdn/v1beta2api/model_generic_json_response.go +++ b/services/cdn/v1beta2api/model_generic_json_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -22,8 +21,9 @@ var _ MappedNullable = &GenericJsonResponse{} // GenericJsonResponse struct for GenericJsonResponse type GenericJsonResponse struct { // Listing of issues with your request - Details []ErrorDetails `json:"details,omitempty"` - Message string `json:"message"` + Details []ErrorDetails `json:"details,omitempty"` + Message string `json:"message"` + AdditionalProperties map[string]interface{} } type _GenericJsonResponse GenericJsonResponse @@ -116,6 +116,11 @@ func (o GenericJsonResponse) ToMap() (map[string]interface{}, error) { toSerialize["details"] = o.Details } toSerialize["message"] = o.Message + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -143,9 +148,7 @@ func (o *GenericJsonResponse) UnmarshalJSON(data []byte) (err error) { varGenericJsonResponse := _GenericJsonResponse{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGenericJsonResponse) + err = json.Unmarshal(data, &varGenericJsonResponse) if err != nil { return err @@ -153,6 +156,14 @@ func (o *GenericJsonResponse) UnmarshalJSON(data []byte) (err error) { *o = GenericJsonResponse(varGenericJsonResponse) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "details") + delete(additionalProperties, "message") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_get_cache_info_response.go b/services/cdn/v1beta2api/model_get_cache_info_response.go index 1640235b9..7656796fb 100644 --- a/services/cdn/v1beta2api/model_get_cache_info_response.go +++ b/services/cdn/v1beta2api/model_get_cache_info_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" "time" @@ -24,7 +23,8 @@ var _ MappedNullable = &GetCacheInfoResponse{} type GetCacheInfoResponse struct { History []GetCacheInfoResponseHistoryEntry `json:"history"` // Returns the last time the cache was purged by calling the PurgeCache endpoint. Time represented as RFC3339 compliant string. If the cache was never purged, this returns `null` - LastPurgeTime NullableTime `json:"lastPurgeTime"` + LastPurgeTime NullableTime `json:"lastPurgeTime"` + AdditionalProperties map[string]interface{} } type _GetCacheInfoResponse GetCacheInfoResponse @@ -110,6 +110,11 @@ func (o GetCacheInfoResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["history"] = o.History toSerialize["lastPurgeTime"] = o.LastPurgeTime.Get() + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -138,9 +143,7 @@ func (o *GetCacheInfoResponse) UnmarshalJSON(data []byte) (err error) { varGetCacheInfoResponse := _GetCacheInfoResponse{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGetCacheInfoResponse) + err = json.Unmarshal(data, &varGetCacheInfoResponse) if err != nil { return err @@ -148,6 +151,14 @@ func (o *GetCacheInfoResponse) UnmarshalJSON(data []byte) (err error) { *o = GetCacheInfoResponse(varGetCacheInfoResponse) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "history") + delete(additionalProperties, "lastPurgeTime") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_get_cache_info_response_history_entry.go b/services/cdn/v1beta2api/model_get_cache_info_response_history_entry.go index 47a6544c1..e73df6cea 100644 --- a/services/cdn/v1beta2api/model_get_cache_info_response_history_entry.go +++ b/services/cdn/v1beta2api/model_get_cache_info_response_history_entry.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" "time" @@ -22,8 +21,9 @@ var _ MappedNullable = &GetCacheInfoResponseHistoryEntry{} // GetCacheInfoResponseHistoryEntry struct for GetCacheInfoResponseHistoryEntry type GetCacheInfoResponseHistoryEntry struct { - OccurredAt time.Time `json:"occurredAt"` - Type string `json:"type"` + OccurredAt time.Time `json:"occurredAt"` + Type string `json:"type"` + AdditionalProperties map[string]interface{} } type _GetCacheInfoResponseHistoryEntry GetCacheInfoResponseHistoryEntry @@ -107,6 +107,11 @@ func (o GetCacheInfoResponseHistoryEntry) ToMap() (map[string]interface{}, error toSerialize := map[string]interface{}{} toSerialize["occurredAt"] = o.OccurredAt toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -135,9 +140,7 @@ func (o *GetCacheInfoResponseHistoryEntry) UnmarshalJSON(data []byte) (err error varGetCacheInfoResponseHistoryEntry := _GetCacheInfoResponseHistoryEntry{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGetCacheInfoResponseHistoryEntry) + err = json.Unmarshal(data, &varGetCacheInfoResponseHistoryEntry) if err != nil { return err @@ -145,6 +148,14 @@ func (o *GetCacheInfoResponseHistoryEntry) UnmarshalJSON(data []byte) (err error *o = GetCacheInfoResponseHistoryEntry(varGetCacheInfoResponseHistoryEntry) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "occurredAt") + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_get_custom_domain_custom_certificate.go b/services/cdn/v1beta2api/model_get_custom_domain_custom_certificate.go index d615e8c76..185c28eed 100644 --- a/services/cdn/v1beta2api/model_get_custom_domain_custom_certificate.go +++ b/services/cdn/v1beta2api/model_get_custom_domain_custom_certificate.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -23,7 +22,8 @@ var _ MappedNullable = &GetCustomDomainCustomCertificate{} type GetCustomDomainCustomCertificate struct { Type string `json:"type"` // Whenever a new custom certificate is added the version is increased by 1. - Version int32 `json:"version"` + Version int32 `json:"version"` + AdditionalProperties map[string]interface{} } type _GetCustomDomainCustomCertificate GetCustomDomainCustomCertificate @@ -107,6 +107,11 @@ func (o GetCustomDomainCustomCertificate) ToMap() (map[string]interface{}, error toSerialize := map[string]interface{}{} toSerialize["type"] = o.Type toSerialize["version"] = o.Version + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -135,9 +140,7 @@ func (o *GetCustomDomainCustomCertificate) UnmarshalJSON(data []byte) (err error varGetCustomDomainCustomCertificate := _GetCustomDomainCustomCertificate{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGetCustomDomainCustomCertificate) + err = json.Unmarshal(data, &varGetCustomDomainCustomCertificate) if err != nil { return err @@ -145,6 +148,14 @@ func (o *GetCustomDomainCustomCertificate) UnmarshalJSON(data []byte) (err error *o = GetCustomDomainCustomCertificate(varGetCustomDomainCustomCertificate) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + delete(additionalProperties, "version") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_get_custom_domain_managed_certificate.go b/services/cdn/v1beta2api/model_get_custom_domain_managed_certificate.go index 250e59b90..e0c6d69ea 100644 --- a/services/cdn/v1beta2api/model_get_custom_domain_managed_certificate.go +++ b/services/cdn/v1beta2api/model_get_custom_domain_managed_certificate.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,7 +20,8 @@ var _ MappedNullable = &GetCustomDomainManagedCertificate{} // GetCustomDomainManagedCertificate This is returned when no custom certificate is used. We provision and manage a Let's Encrypt Certificate for you type GetCustomDomainManagedCertificate struct { - Type string `json:"type"` + Type string `json:"type"` + AdditionalProperties map[string]interface{} } type _GetCustomDomainManagedCertificate GetCustomDomainManagedCertificate @@ -79,6 +79,11 @@ func (o GetCustomDomainManagedCertificate) MarshalJSON() ([]byte, error) { func (o GetCustomDomainManagedCertificate) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -106,9 +111,7 @@ func (o *GetCustomDomainManagedCertificate) UnmarshalJSON(data []byte) (err erro varGetCustomDomainManagedCertificate := _GetCustomDomainManagedCertificate{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGetCustomDomainManagedCertificate) + err = json.Unmarshal(data, &varGetCustomDomainManagedCertificate) if err != nil { return err @@ -116,6 +119,13 @@ func (o *GetCustomDomainManagedCertificate) UnmarshalJSON(data []byte) (err erro *o = GetCustomDomainManagedCertificate(varGetCustomDomainManagedCertificate) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_get_custom_domain_response.go b/services/cdn/v1beta2api/model_get_custom_domain_response.go index adc046bb6..53dc28718 100644 --- a/services/cdn/v1beta2api/model_get_custom_domain_response.go +++ b/services/cdn/v1beta2api/model_get_custom_domain_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,8 +20,9 @@ var _ MappedNullable = &GetCustomDomainResponse{} // GetCustomDomainResponse struct for GetCustomDomainResponse type GetCustomDomainResponse struct { - Certificate GetCustomDomainResponseCertificate `json:"certificate"` - CustomDomain CustomDomain `json:"customDomain"` + Certificate GetCustomDomainResponseCertificate `json:"certificate"` + CustomDomain CustomDomain `json:"customDomain"` + AdditionalProperties map[string]interface{} } type _GetCustomDomainResponse GetCustomDomainResponse @@ -106,6 +106,11 @@ func (o GetCustomDomainResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["certificate"] = o.Certificate toSerialize["customDomain"] = o.CustomDomain + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -134,9 +139,7 @@ func (o *GetCustomDomainResponse) UnmarshalJSON(data []byte) (err error) { varGetCustomDomainResponse := _GetCustomDomainResponse{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGetCustomDomainResponse) + err = json.Unmarshal(data, &varGetCustomDomainResponse) if err != nil { return err @@ -144,6 +147,14 @@ func (o *GetCustomDomainResponse) UnmarshalJSON(data []byte) (err error) { *o = GetCustomDomainResponse(varGetCustomDomainResponse) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "certificate") + delete(additionalProperties, "customDomain") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_get_custom_domain_response_certificate.go b/services/cdn/v1beta2api/model_get_custom_domain_response_certificate.go index d6f35c9cc..6ad963445 100644 --- a/services/cdn/v1beta2api/model_get_custom_domain_response_certificate.go +++ b/services/cdn/v1beta2api/model_get_custom_domain_response_certificate.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1beta2api/model_get_distribution_response.go b/services/cdn/v1beta2api/model_get_distribution_response.go index 0b5fd11ea..315ea19ff 100644 --- a/services/cdn/v1beta2api/model_get_distribution_response.go +++ b/services/cdn/v1beta2api/model_get_distribution_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,7 +20,8 @@ var _ MappedNullable = &GetDistributionResponse{} // GetDistributionResponse struct for GetDistributionResponse type GetDistributionResponse struct { - Distribution Distribution `json:"distribution"` + Distribution Distribution `json:"distribution"` + AdditionalProperties map[string]interface{} } type _GetDistributionResponse GetDistributionResponse @@ -79,6 +79,11 @@ func (o GetDistributionResponse) MarshalJSON() ([]byte, error) { func (o GetDistributionResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["distribution"] = o.Distribution + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -106,9 +111,7 @@ func (o *GetDistributionResponse) UnmarshalJSON(data []byte) (err error) { varGetDistributionResponse := _GetDistributionResponse{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGetDistributionResponse) + err = json.Unmarshal(data, &varGetDistributionResponse) if err != nil { return err @@ -116,6 +119,13 @@ func (o *GetDistributionResponse) UnmarshalJSON(data []byte) (err error) { *o = GetDistributionResponse(varGetDistributionResponse) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "distribution") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_get_logs_response.go b/services/cdn/v1beta2api/model_get_logs_response.go index 3d61552ad..9e9183d3e 100644 --- a/services/cdn/v1beta2api/model_get_logs_response.go +++ b/services/cdn/v1beta2api/model_get_logs_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,8 +20,9 @@ var _ MappedNullable = &GetLogsResponse{} // GetLogsResponse struct for GetLogsResponse type GetLogsResponse struct { - Logs []DistributionLogsRecord `json:"logs"` - NextPageIdentifier *string `json:"nextPageIdentifier,omitempty"` + Logs []DistributionLogsRecord `json:"logs"` + NextPageIdentifier *string `json:"nextPageIdentifier,omitempty"` + AdditionalProperties map[string]interface{} } type _GetLogsResponse GetLogsResponse @@ -115,6 +115,11 @@ func (o GetLogsResponse) ToMap() (map[string]interface{}, error) { if !IsNil(o.NextPageIdentifier) { toSerialize["nextPageIdentifier"] = o.NextPageIdentifier } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -142,9 +147,7 @@ func (o *GetLogsResponse) UnmarshalJSON(data []byte) (err error) { varGetLogsResponse := _GetLogsResponse{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGetLogsResponse) + err = json.Unmarshal(data, &varGetLogsResponse) if err != nil { return err @@ -152,6 +155,14 @@ func (o *GetLogsResponse) UnmarshalJSON(data []byte) (err error) { *o = GetLogsResponse(varGetLogsResponse) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "logs") + delete(additionalProperties, "nextPageIdentifier") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_get_logs_search_filters_response.go b/services/cdn/v1beta2api/model_get_logs_search_filters_response.go index e52f99a5f..486963e41 100644 --- a/services/cdn/v1beta2api/model_get_logs_search_filters_response.go +++ b/services/cdn/v1beta2api/model_get_logs_search_filters_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -26,7 +25,8 @@ type GetLogsSearchFiltersResponse struct { // List of ISO-3166 Alpha2 Country Codes matching the input filter. Response is ordered in ascending order. For more Info about the country codes, see https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 RemoteCountry []string `json:"remoteCountry"` // List of Status Codes matching the input filter. Response is ordered in ascending order. - Status []int32 `json:"status"` + Status []int32 `json:"status"` + AdditionalProperties map[string]interface{} } type _GetLogsSearchFiltersResponse GetLogsSearchFiltersResponse @@ -162,6 +162,11 @@ func (o GetLogsSearchFiltersResponse) ToMap() (map[string]interface{}, error) { toSerialize["dataCenter"] = o.DataCenter toSerialize["remoteCountry"] = o.RemoteCountry toSerialize["status"] = o.Status + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -192,9 +197,7 @@ func (o *GetLogsSearchFiltersResponse) UnmarshalJSON(data []byte) (err error) { varGetLogsSearchFiltersResponse := _GetLogsSearchFiltersResponse{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGetLogsSearchFiltersResponse) + err = json.Unmarshal(data, &varGetLogsSearchFiltersResponse) if err != nil { return err @@ -202,6 +205,16 @@ func (o *GetLogsSearchFiltersResponse) UnmarshalJSON(data []byte) (err error) { *o = GetLogsSearchFiltersResponse(varGetLogsSearchFiltersResponse) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "cache") + delete(additionalProperties, "dataCenter") + delete(additionalProperties, "remoteCountry") + delete(additionalProperties, "status") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_get_logs_search_filters_response_datacenter_block.go b/services/cdn/v1beta2api/model_get_logs_search_filters_response_datacenter_block.go index 42c5615f1..93595c0eb 100644 --- a/services/cdn/v1beta2api/model_get_logs_search_filters_response_datacenter_block.go +++ b/services/cdn/v1beta2api/model_get_logs_search_filters_response_datacenter_block.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,11 +20,12 @@ var _ MappedNullable = &GetLogsSearchFiltersResponseDatacenterBlock{} // GetLogsSearchFiltersResponseDatacenterBlock Object containing Datacenters to filter for. Each datacenter is grouped to the respective region. type GetLogsSearchFiltersResponseDatacenterBlock struct { - AF []GetLogsSearchFiltersResponseDatacenterBlockItem `json:"AF"` - ASIA []GetLogsSearchFiltersResponseDatacenterBlockItem `json:"ASIA"` - EU []GetLogsSearchFiltersResponseDatacenterBlockItem `json:"EU"` - NA []GetLogsSearchFiltersResponseDatacenterBlockItem `json:"NA"` - SA []GetLogsSearchFiltersResponseDatacenterBlockItem `json:"SA"` + AF []GetLogsSearchFiltersResponseDatacenterBlockItem `json:"AF"` + ASIA []GetLogsSearchFiltersResponseDatacenterBlockItem `json:"ASIA"` + EU []GetLogsSearchFiltersResponseDatacenterBlockItem `json:"EU"` + NA []GetLogsSearchFiltersResponseDatacenterBlockItem `json:"NA"` + SA []GetLogsSearchFiltersResponseDatacenterBlockItem `json:"SA"` + AdditionalProperties map[string]interface{} } type _GetLogsSearchFiltersResponseDatacenterBlock GetLogsSearchFiltersResponseDatacenterBlock @@ -187,6 +187,11 @@ func (o GetLogsSearchFiltersResponseDatacenterBlock) ToMap() (map[string]interfa toSerialize["EU"] = o.EU toSerialize["NA"] = o.NA toSerialize["SA"] = o.SA + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -218,9 +223,7 @@ func (o *GetLogsSearchFiltersResponseDatacenterBlock) UnmarshalJSON(data []byte) varGetLogsSearchFiltersResponseDatacenterBlock := _GetLogsSearchFiltersResponseDatacenterBlock{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGetLogsSearchFiltersResponseDatacenterBlock) + err = json.Unmarshal(data, &varGetLogsSearchFiltersResponseDatacenterBlock) if err != nil { return err @@ -228,6 +231,17 @@ func (o *GetLogsSearchFiltersResponseDatacenterBlock) UnmarshalJSON(data []byte) *o = GetLogsSearchFiltersResponseDatacenterBlock(varGetLogsSearchFiltersResponseDatacenterBlock) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "AF") + delete(additionalProperties, "ASIA") + delete(additionalProperties, "EU") + delete(additionalProperties, "NA") + delete(additionalProperties, "SA") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_get_logs_search_filters_response_datacenter_block_item.go b/services/cdn/v1beta2api/model_get_logs_search_filters_response_datacenter_block_item.go index 5ac0c0a3b..10a7ed8d7 100644 --- a/services/cdn/v1beta2api/model_get_logs_search_filters_response_datacenter_block_item.go +++ b/services/cdn/v1beta2api/model_get_logs_search_filters_response_datacenter_block_item.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,8 +20,9 @@ var _ MappedNullable = &GetLogsSearchFiltersResponseDatacenterBlockItem{} // GetLogsSearchFiltersResponseDatacenterBlockItem A datacenter. The `id` defines the key needed to filter against the logs endpoint, while the `displayName` defines a human-readable Name. type GetLogsSearchFiltersResponseDatacenterBlockItem struct { - DisplayName string `json:"displayName"` - Id string `json:"id"` + DisplayName string `json:"displayName"` + Id string `json:"id"` + AdditionalProperties map[string]interface{} } type _GetLogsSearchFiltersResponseDatacenterBlockItem GetLogsSearchFiltersResponseDatacenterBlockItem @@ -106,6 +106,11 @@ func (o GetLogsSearchFiltersResponseDatacenterBlockItem) ToMap() (map[string]int toSerialize := map[string]interface{}{} toSerialize["displayName"] = o.DisplayName toSerialize["id"] = o.Id + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -134,9 +139,7 @@ func (o *GetLogsSearchFiltersResponseDatacenterBlockItem) UnmarshalJSON(data []b varGetLogsSearchFiltersResponseDatacenterBlockItem := _GetLogsSearchFiltersResponseDatacenterBlockItem{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGetLogsSearchFiltersResponseDatacenterBlockItem) + err = json.Unmarshal(data, &varGetLogsSearchFiltersResponseDatacenterBlockItem) if err != nil { return err @@ -144,6 +147,14 @@ func (o *GetLogsSearchFiltersResponseDatacenterBlockItem) UnmarshalJSON(data []b *o = GetLogsSearchFiltersResponseDatacenterBlockItem(varGetLogsSearchFiltersResponseDatacenterBlockItem) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "displayName") + delete(additionalProperties, "id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_get_statistics_response.go b/services/cdn/v1beta2api/model_get_statistics_response.go index 6f33a8fd2..959c8cd17 100644 --- a/services/cdn/v1beta2api/model_get_statistics_response.go +++ b/services/cdn/v1beta2api/model_get_statistics_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,7 +20,8 @@ var _ MappedNullable = &GetStatisticsResponse{} // GetStatisticsResponse struct for GetStatisticsResponse type GetStatisticsResponse struct { - Records []DistributionStatisticsRecord `json:"records"` + Records []DistributionStatisticsRecord `json:"records"` + AdditionalProperties map[string]interface{} } type _GetStatisticsResponse GetStatisticsResponse @@ -79,6 +79,11 @@ func (o GetStatisticsResponse) MarshalJSON() ([]byte, error) { func (o GetStatisticsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["records"] = o.Records + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -106,9 +111,7 @@ func (o *GetStatisticsResponse) UnmarshalJSON(data []byte) (err error) { varGetStatisticsResponse := _GetStatisticsResponse{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGetStatisticsResponse) + err = json.Unmarshal(data, &varGetStatisticsResponse) if err != nil { return err @@ -116,6 +119,13 @@ func (o *GetStatisticsResponse) UnmarshalJSON(data []byte) (err error) { *o = GetStatisticsResponse(varGetStatisticsResponse) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "records") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_http_backend.go b/services/cdn/v1beta2api/model_http_backend.go index f3d95c736..9cce7b21f 100644 --- a/services/cdn/v1beta2api/model_http_backend.go +++ b/services/cdn/v1beta2api/model_http_backend.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -26,8 +25,9 @@ type HttpBackend struct { // Headers that will be sent with every request to the configured origin. **WARNING**: Do not store sensitive values in the headers. The configuration is stored as plain text. OriginRequestHeaders map[string]string `json:"originRequestHeaders"` // The origin of the content that should be made available through the CDN. Note that the path and query parameters are ignored. Ports are allowed. If no protocol is provided, `https` is assumed. So `www.example.com:1234/somePath?q=123` is normalized to `https://www.example.com:1234` - OriginUrl string `json:"originUrl"` - Type string `json:"type"` + OriginUrl string `json:"originUrl"` + Type string `json:"type"` + AdditionalProperties map[string]interface{} } type _HttpBackend HttpBackend @@ -163,6 +163,11 @@ func (o HttpBackend) ToMap() (map[string]interface{}, error) { toSerialize["originRequestHeaders"] = o.OriginRequestHeaders toSerialize["originUrl"] = o.OriginUrl toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -193,9 +198,7 @@ func (o *HttpBackend) UnmarshalJSON(data []byte) (err error) { varHttpBackend := _HttpBackend{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varHttpBackend) + err = json.Unmarshal(data, &varHttpBackend) if err != nil { return err @@ -203,6 +206,16 @@ func (o *HttpBackend) UnmarshalJSON(data []byte) (err error) { *o = HttpBackend(varHttpBackend) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "geofencing") + delete(additionalProperties, "originRequestHeaders") + delete(additionalProperties, "originUrl") + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_http_backend_create.go b/services/cdn/v1beta2api/model_http_backend_create.go index 9df41e9e9..3b51afd34 100644 --- a/services/cdn/v1beta2api/model_http_backend_create.go +++ b/services/cdn/v1beta2api/model_http_backend_create.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -26,8 +25,9 @@ type HttpBackendCreate struct { // Headers that will be sent with every request to the configured origin. **WARNING**: Do not store sensitive values in the headers. The configuration is stored as plain text. OriginRequestHeaders *map[string]string `json:"originRequestHeaders,omitempty"` // The origin of the content that should be made available through the CDN. Note that the path and query parameters are ignored. Ports are allowed. If no protocol is provided, `https` is assumed. So `www.example.com:1234/somePath?q=123` is normalized to `https://www.example.com:1234` - OriginUrl string `json:"originUrl"` - Type string `json:"type"` + OriginUrl string `json:"originUrl"` + Type string `json:"type"` + AdditionalProperties map[string]interface{} } type _HttpBackendCreate HttpBackendCreate @@ -181,6 +181,11 @@ func (o HttpBackendCreate) ToMap() (map[string]interface{}, error) { } toSerialize["originUrl"] = o.OriginUrl toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -209,9 +214,7 @@ func (o *HttpBackendCreate) UnmarshalJSON(data []byte) (err error) { varHttpBackendCreate := _HttpBackendCreate{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varHttpBackendCreate) + err = json.Unmarshal(data, &varHttpBackendCreate) if err != nil { return err @@ -219,6 +222,16 @@ func (o *HttpBackendCreate) UnmarshalJSON(data []byte) (err error) { *o = HttpBackendCreate(varHttpBackendCreate) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "geofencing") + delete(additionalProperties, "originRequestHeaders") + delete(additionalProperties, "originUrl") + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_http_backend_patch.go b/services/cdn/v1beta2api/model_http_backend_patch.go index 649d40327..bdb59baa4 100644 --- a/services/cdn/v1beta2api/model_http_backend_patch.go +++ b/services/cdn/v1beta2api/model_http_backend_patch.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -27,7 +26,8 @@ type HttpBackendPatch struct { OriginRequestHeaders *map[string]string `json:"originRequestHeaders,omitempty"` OriginUrl *string `json:"originUrl,omitempty"` // This property is required to determine the used backend type. - Type string `json:"type"` + Type string `json:"type"` + AdditionalProperties map[string]interface{} } type _HttpBackendPatch HttpBackendPatch @@ -190,6 +190,11 @@ func (o HttpBackendPatch) ToMap() (map[string]interface{}, error) { toSerialize["originUrl"] = o.OriginUrl } toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -217,9 +222,7 @@ func (o *HttpBackendPatch) UnmarshalJSON(data []byte) (err error) { varHttpBackendPatch := _HttpBackendPatch{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varHttpBackendPatch) + err = json.Unmarshal(data, &varHttpBackendPatch) if err != nil { return err @@ -227,6 +230,16 @@ func (o *HttpBackendPatch) UnmarshalJSON(data []byte) (err error) { *o = HttpBackendPatch(varHttpBackendPatch) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "geofencing") + delete(additionalProperties, "originRequestHeaders") + delete(additionalProperties, "originUrl") + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_list_distributions_response.go b/services/cdn/v1beta2api/model_list_distributions_response.go index 662a6a91d..312ff1f7a 100644 --- a/services/cdn/v1beta2api/model_list_distributions_response.go +++ b/services/cdn/v1beta2api/model_list_distributions_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,8 +20,9 @@ var _ MappedNullable = &ListDistributionsResponse{} // ListDistributionsResponse struct for ListDistributionsResponse type ListDistributionsResponse struct { - Distributions []Distribution `json:"distributions"` - NextPageIdentifier *string `json:"nextPageIdentifier,omitempty"` + Distributions []Distribution `json:"distributions"` + NextPageIdentifier *string `json:"nextPageIdentifier,omitempty"` + AdditionalProperties map[string]interface{} } type _ListDistributionsResponse ListDistributionsResponse @@ -115,6 +115,11 @@ func (o ListDistributionsResponse) ToMap() (map[string]interface{}, error) { if !IsNil(o.NextPageIdentifier) { toSerialize["nextPageIdentifier"] = o.NextPageIdentifier } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -142,9 +147,7 @@ func (o *ListDistributionsResponse) UnmarshalJSON(data []byte) (err error) { varListDistributionsResponse := _ListDistributionsResponse{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varListDistributionsResponse) + err = json.Unmarshal(data, &varListDistributionsResponse) if err != nil { return err @@ -152,6 +155,14 @@ func (o *ListDistributionsResponse) UnmarshalJSON(data []byte) (err error) { *o = ListDistributionsResponse(varListDistributionsResponse) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "distributions") + delete(additionalProperties, "nextPageIdentifier") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_list_waf_collections_response.go b/services/cdn/v1beta2api/model_list_waf_collections_response.go index 9e574e9eb..69d896689 100644 --- a/services/cdn/v1beta2api/model_list_waf_collections_response.go +++ b/services/cdn/v1beta2api/model_list_waf_collections_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,7 +20,8 @@ var _ MappedNullable = &ListWafCollectionsResponse{} // ListWafCollectionsResponse struct for ListWafCollectionsResponse type ListWafCollectionsResponse struct { - Collections []WafRuleCollection `json:"collections"` + Collections []WafRuleCollection `json:"collections"` + AdditionalProperties map[string]interface{} } type _ListWafCollectionsResponse ListWafCollectionsResponse @@ -79,6 +79,11 @@ func (o ListWafCollectionsResponse) MarshalJSON() ([]byte, error) { func (o ListWafCollectionsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["collections"] = o.Collections + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -106,9 +111,7 @@ func (o *ListWafCollectionsResponse) UnmarshalJSON(data []byte) (err error) { varListWafCollectionsResponse := _ListWafCollectionsResponse{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varListWafCollectionsResponse) + err = json.Unmarshal(data, &varListWafCollectionsResponse) if err != nil { return err @@ -116,6 +119,13 @@ func (o *ListWafCollectionsResponse) UnmarshalJSON(data []byte) (err error) { *o = ListWafCollectionsResponse(varListWafCollectionsResponse) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "collections") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_loki_log_sink.go b/services/cdn/v1beta2api/model_loki_log_sink.go index 94c35f99a..033e3d804 100644 --- a/services/cdn/v1beta2api/model_loki_log_sink.go +++ b/services/cdn/v1beta2api/model_loki_log_sink.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,8 +20,9 @@ var _ MappedNullable = &LokiLogSink{} // LokiLogSink struct for LokiLogSink type LokiLogSink struct { - PushUrl string `json:"pushUrl"` - Type string `json:"type"` + PushUrl string `json:"pushUrl"` + Type string `json:"type"` + AdditionalProperties map[string]interface{} } type _LokiLogSink LokiLogSink @@ -106,6 +106,11 @@ func (o LokiLogSink) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["pushUrl"] = o.PushUrl toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -134,9 +139,7 @@ func (o *LokiLogSink) UnmarshalJSON(data []byte) (err error) { varLokiLogSink := _LokiLogSink{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varLokiLogSink) + err = json.Unmarshal(data, &varLokiLogSink) if err != nil { return err @@ -144,6 +147,14 @@ func (o *LokiLogSink) UnmarshalJSON(data []byte) (err error) { *o = LokiLogSink(varLokiLogSink) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "pushUrl") + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_loki_log_sink_create.go b/services/cdn/v1beta2api/model_loki_log_sink_create.go index b93caf5dc..38a3c0d8d 100644 --- a/services/cdn/v1beta2api/model_loki_log_sink_create.go +++ b/services/cdn/v1beta2api/model_loki_log_sink_create.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,9 +20,10 @@ var _ MappedNullable = &LokiLogSinkCreate{} // LokiLogSinkCreate struct for LokiLogSinkCreate type LokiLogSinkCreate struct { - Credentials LokiLogSinkCredentials `json:"credentials"` - PushUrl string `json:"pushUrl"` - Type string `json:"type"` + Credentials LokiLogSinkCredentials `json:"credentials"` + PushUrl string `json:"pushUrl"` + Type string `json:"type"` + AdditionalProperties map[string]interface{} } type _LokiLogSinkCreate LokiLogSinkCreate @@ -133,6 +133,11 @@ func (o LokiLogSinkCreate) ToMap() (map[string]interface{}, error) { toSerialize["credentials"] = o.Credentials toSerialize["pushUrl"] = o.PushUrl toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -162,9 +167,7 @@ func (o *LokiLogSinkCreate) UnmarshalJSON(data []byte) (err error) { varLokiLogSinkCreate := _LokiLogSinkCreate{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varLokiLogSinkCreate) + err = json.Unmarshal(data, &varLokiLogSinkCreate) if err != nil { return err @@ -172,6 +175,15 @@ func (o *LokiLogSinkCreate) UnmarshalJSON(data []byte) (err error) { *o = LokiLogSinkCreate(varLokiLogSinkCreate) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "credentials") + delete(additionalProperties, "pushUrl") + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_loki_log_sink_credentials.go b/services/cdn/v1beta2api/model_loki_log_sink_credentials.go index 3494f7608..8d96b2d00 100644 --- a/services/cdn/v1beta2api/model_loki_log_sink_credentials.go +++ b/services/cdn/v1beta2api/model_loki_log_sink_credentials.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,8 +20,9 @@ var _ MappedNullable = &LokiLogSinkCredentials{} // LokiLogSinkCredentials struct for LokiLogSinkCredentials type LokiLogSinkCredentials struct { - Password string `json:"password"` - Username string `json:"username"` + Password string `json:"password"` + Username string `json:"username"` + AdditionalProperties map[string]interface{} } type _LokiLogSinkCredentials LokiLogSinkCredentials @@ -106,6 +106,11 @@ func (o LokiLogSinkCredentials) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["password"] = o.Password toSerialize["username"] = o.Username + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -134,9 +139,7 @@ func (o *LokiLogSinkCredentials) UnmarshalJSON(data []byte) (err error) { varLokiLogSinkCredentials := _LokiLogSinkCredentials{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varLokiLogSinkCredentials) + err = json.Unmarshal(data, &varLokiLogSinkCredentials) if err != nil { return err @@ -144,6 +147,14 @@ func (o *LokiLogSinkCredentials) UnmarshalJSON(data []byte) (err error) { *o = LokiLogSinkCredentials(varLokiLogSinkCredentials) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "password") + delete(additionalProperties, "username") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_loki_log_sink_patch.go b/services/cdn/v1beta2api/model_loki_log_sink_patch.go index 734260cea..be6474eb8 100644 --- a/services/cdn/v1beta2api/model_loki_log_sink_patch.go +++ b/services/cdn/v1beta2api/model_loki_log_sink_patch.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,9 +20,10 @@ var _ MappedNullable = &LokiLogSinkPatch{} // LokiLogSinkPatch struct for LokiLogSinkPatch type LokiLogSinkPatch struct { - Credentials *LokiLogSinkCredentials `json:"credentials,omitempty"` - PushUrl *string `json:"pushUrl,omitempty"` - Type string `json:"type"` + Credentials *LokiLogSinkCredentials `json:"credentials,omitempty"` + PushUrl *string `json:"pushUrl,omitempty"` + Type string `json:"type"` + AdditionalProperties map[string]interface{} } type _LokiLogSinkPatch LokiLogSinkPatch @@ -151,6 +151,11 @@ func (o LokiLogSinkPatch) ToMap() (map[string]interface{}, error) { toSerialize["pushUrl"] = o.PushUrl } toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -178,9 +183,7 @@ func (o *LokiLogSinkPatch) UnmarshalJSON(data []byte) (err error) { varLokiLogSinkPatch := _LokiLogSinkPatch{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varLokiLogSinkPatch) + err = json.Unmarshal(data, &varLokiLogSinkPatch) if err != nil { return err @@ -188,6 +191,15 @@ func (o *LokiLogSinkPatch) UnmarshalJSON(data []byte) (err error) { *o = LokiLogSinkPatch(varLokiLogSinkPatch) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "credentials") + delete(additionalProperties, "pushUrl") + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_optimizer.go b/services/cdn/v1beta2api/model_optimizer.go index 575b7f72c..29f92103d 100644 --- a/services/cdn/v1beta2api/model_optimizer.go +++ b/services/cdn/v1beta2api/model_optimizer.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -22,7 +21,8 @@ var _ MappedNullable = &Optimizer{} // Optimizer Optimizer is paid feature, a real-time on the fly image manipulation and optimization service that automatically optimizes your images for faster image delivery. type Optimizer struct { // Determines if the optimizer should be enabled for this distribution and incurs a monthly fee - Enabled bool `json:"enabled"` + Enabled bool `json:"enabled"` + AdditionalProperties map[string]interface{} } type _Optimizer Optimizer @@ -80,6 +80,11 @@ func (o Optimizer) MarshalJSON() ([]byte, error) { func (o Optimizer) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["enabled"] = o.Enabled + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -107,9 +112,7 @@ func (o *Optimizer) UnmarshalJSON(data []byte) (err error) { varOptimizer := _Optimizer{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varOptimizer) + err = json.Unmarshal(data, &varOptimizer) if err != nil { return err @@ -117,6 +120,13 @@ func (o *Optimizer) UnmarshalJSON(data []byte) (err error) { *o = Optimizer(varOptimizer) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "enabled") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_optimizer_patch.go b/services/cdn/v1beta2api/model_optimizer_patch.go index af07c73d3..f0cd77f3d 100644 --- a/services/cdn/v1beta2api/model_optimizer_patch.go +++ b/services/cdn/v1beta2api/model_optimizer_patch.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -19,9 +19,12 @@ var _ MappedNullable = &OptimizerPatch{} // OptimizerPatch struct for OptimizerPatch type OptimizerPatch struct { - Enabled *bool `json:"enabled,omitempty"` + Enabled *bool `json:"enabled,omitempty"` + AdditionalProperties map[string]interface{} } +type _OptimizerPatch OptimizerPatch + // NewOptimizerPatch instantiates a new OptimizerPatch 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 @@ -84,9 +87,35 @@ func (o OptimizerPatch) ToMap() (map[string]interface{}, error) { if !IsNil(o.Enabled) { toSerialize["enabled"] = o.Enabled } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *OptimizerPatch) UnmarshalJSON(data []byte) (err error) { + varOptimizerPatch := _OptimizerPatch{} + + err = json.Unmarshal(data, &varOptimizerPatch) + + if err != nil { + return err + } + + *o = OptimizerPatch(varOptimizerPatch) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "enabled") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableOptimizerPatch struct { value *OptimizerPatch isSet bool diff --git a/services/cdn/v1beta2api/model_patch_distribution_payload.go b/services/cdn/v1beta2api/model_patch_distribution_payload.go index f548c9c62..930df341f 100644 --- a/services/cdn/v1beta2api/model_patch_distribution_payload.go +++ b/services/cdn/v1beta2api/model_patch_distribution_payload.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -21,9 +21,12 @@ var _ MappedNullable = &PatchDistributionPayload{} type PatchDistributionPayload struct { Config *ConfigPatch `json:"config,omitempty"` // While optional, it is greatly encouraged to provide an `intentId`. This is used to deduplicate requests. If multiple modifying requests with the same `intentId` for a given `projectId` are received, all but the first request are dropped. - IntentId *string `json:"intentId,omitempty"` + IntentId *string `json:"intentId,omitempty"` + AdditionalProperties map[string]interface{} } +type _PatchDistributionPayload PatchDistributionPayload + // NewPatchDistributionPayload instantiates a new PatchDistributionPayload 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 @@ -121,9 +124,36 @@ func (o PatchDistributionPayload) ToMap() (map[string]interface{}, error) { if !IsNil(o.IntentId) { toSerialize["intentId"] = o.IntentId } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *PatchDistributionPayload) UnmarshalJSON(data []byte) (err error) { + varPatchDistributionPayload := _PatchDistributionPayload{} + + err = json.Unmarshal(data, &varPatchDistributionPayload) + + if err != nil { + return err + } + + *o = PatchDistributionPayload(varPatchDistributionPayload) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "config") + delete(additionalProperties, "intentId") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullablePatchDistributionPayload struct { value *PatchDistributionPayload isSet bool diff --git a/services/cdn/v1beta2api/model_patch_distribution_response.go b/services/cdn/v1beta2api/model_patch_distribution_response.go index 88a8ed956..d5ef48d0f 100644 --- a/services/cdn/v1beta2api/model_patch_distribution_response.go +++ b/services/cdn/v1beta2api/model_patch_distribution_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,7 +20,8 @@ var _ MappedNullable = &PatchDistributionResponse{} // PatchDistributionResponse struct for PatchDistributionResponse type PatchDistributionResponse struct { - Distribution Distribution `json:"distribution"` + Distribution Distribution `json:"distribution"` + AdditionalProperties map[string]interface{} } type _PatchDistributionResponse PatchDistributionResponse @@ -79,6 +79,11 @@ func (o PatchDistributionResponse) MarshalJSON() ([]byte, error) { func (o PatchDistributionResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["distribution"] = o.Distribution + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -106,9 +111,7 @@ func (o *PatchDistributionResponse) UnmarshalJSON(data []byte) (err error) { varPatchDistributionResponse := _PatchDistributionResponse{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varPatchDistributionResponse) + err = json.Unmarshal(data, &varPatchDistributionResponse) if err != nil { return err @@ -116,6 +119,13 @@ func (o *PatchDistributionResponse) UnmarshalJSON(data []byte) (err error) { *o = PatchDistributionResponse(varPatchDistributionResponse) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "distribution") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_purge_cache_payload.go b/services/cdn/v1beta2api/model_purge_cache_payload.go index 00779d85c..9fd958160 100644 --- a/services/cdn/v1beta2api/model_purge_cache_payload.go +++ b/services/cdn/v1beta2api/model_purge_cache_payload.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -20,9 +20,12 @@ var _ MappedNullable = &PurgeCachePayload{} // PurgeCachePayload struct for PurgeCachePayload type PurgeCachePayload struct { // Defines an optional path. If this is set, a granular purge is done. If missing, the entire cache is invalidated. During a granular cache purge, only the provided path is purged. Please do not that for example `/some/path` and `/some/path.txt` are considered different paths. - Path *string `json:"path,omitempty"` + Path *string `json:"path,omitempty"` + AdditionalProperties map[string]interface{} } +type _PurgeCachePayload PurgeCachePayload + // NewPurgeCachePayload instantiates a new PurgeCachePayload 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 PurgeCachePayload) ToMap() (map[string]interface{}, error) { if !IsNil(o.Path) { toSerialize["path"] = o.Path } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *PurgeCachePayload) UnmarshalJSON(data []byte) (err error) { + varPurgeCachePayload := _PurgeCachePayload{} + + err = json.Unmarshal(data, &varPurgeCachePayload) + + if err != nil { + return err + } + + *o = PurgeCachePayload(varPurgeCachePayload) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "path") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullablePurgeCachePayload struct { value *PurgeCachePayload isSet bool diff --git a/services/cdn/v1beta2api/model_put_custom_domain_custom_certificate.go b/services/cdn/v1beta2api/model_put_custom_domain_custom_certificate.go index 827e6b394..7110095a2 100644 --- a/services/cdn/v1beta2api/model_put_custom_domain_custom_certificate.go +++ b/services/cdn/v1beta2api/model_put_custom_domain_custom_certificate.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -24,8 +23,9 @@ type PutCustomDomainCustomCertificate struct { // base64-encoded PEM-encoded certificate Certificate string `json:"certificate"` // base64-encoded PEM encoded key - Key string `json:"key"` - Type string `json:"type"` + Key string `json:"key"` + Type string `json:"type"` + AdditionalProperties map[string]interface{} } type _PutCustomDomainCustomCertificate PutCustomDomainCustomCertificate @@ -135,6 +135,11 @@ func (o PutCustomDomainCustomCertificate) ToMap() (map[string]interface{}, error toSerialize["certificate"] = o.Certificate toSerialize["key"] = o.Key toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -164,9 +169,7 @@ func (o *PutCustomDomainCustomCertificate) UnmarshalJSON(data []byte) (err error varPutCustomDomainCustomCertificate := _PutCustomDomainCustomCertificate{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varPutCustomDomainCustomCertificate) + err = json.Unmarshal(data, &varPutCustomDomainCustomCertificate) if err != nil { return err @@ -174,6 +177,15 @@ func (o *PutCustomDomainCustomCertificate) UnmarshalJSON(data []byte) (err error *o = PutCustomDomainCustomCertificate(varPutCustomDomainCustomCertificate) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "certificate") + delete(additionalProperties, "key") + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_put_custom_domain_managed_certificate.go b/services/cdn/v1beta2api/model_put_custom_domain_managed_certificate.go index 42effb7c3..60780d92a 100644 --- a/services/cdn/v1beta2api/model_put_custom_domain_managed_certificate.go +++ b/services/cdn/v1beta2api/model_put_custom_domain_managed_certificate.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,7 +20,8 @@ var _ MappedNullable = &PutCustomDomainManagedCertificate{} // PutCustomDomainManagedCertificate This is returned when no custom certificate is used. We provision and manage a Let's Encrypt Certificate for you type PutCustomDomainManagedCertificate struct { - Type string `json:"type"` + Type string `json:"type"` + AdditionalProperties map[string]interface{} } type _PutCustomDomainManagedCertificate PutCustomDomainManagedCertificate @@ -79,6 +79,11 @@ func (o PutCustomDomainManagedCertificate) MarshalJSON() ([]byte, error) { func (o PutCustomDomainManagedCertificate) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -106,9 +111,7 @@ func (o *PutCustomDomainManagedCertificate) UnmarshalJSON(data []byte) (err erro varPutCustomDomainManagedCertificate := _PutCustomDomainManagedCertificate{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varPutCustomDomainManagedCertificate) + err = json.Unmarshal(data, &varPutCustomDomainManagedCertificate) if err != nil { return err @@ -116,6 +119,13 @@ func (o *PutCustomDomainManagedCertificate) UnmarshalJSON(data []byte) (err erro *o = PutCustomDomainManagedCertificate(varPutCustomDomainManagedCertificate) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_put_custom_domain_payload.go b/services/cdn/v1beta2api/model_put_custom_domain_payload.go index ea06f7f41..eab4c5202 100644 --- a/services/cdn/v1beta2api/model_put_custom_domain_payload.go +++ b/services/cdn/v1beta2api/model_put_custom_domain_payload.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -21,9 +21,12 @@ var _ MappedNullable = &PutCustomDomainPayload{} type PutCustomDomainPayload struct { Certificate *PutCustomDomainPayloadCertificate `json:"certificate,omitempty"` // While optional, it is greatly encouraged to provide an `intentId`. This is used to deduplicate requests. If multiple modifying Requests with the same `intentId` for a given `projectId` are received, all but the first request are dropped. - IntentId *string `json:"intentId,omitempty"` + IntentId *string `json:"intentId,omitempty"` + AdditionalProperties map[string]interface{} } +type _PutCustomDomainPayload PutCustomDomainPayload + // NewPutCustomDomainPayload instantiates a new PutCustomDomainPayload 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 @@ -121,9 +124,36 @@ func (o PutCustomDomainPayload) ToMap() (map[string]interface{}, error) { if !IsNil(o.IntentId) { toSerialize["intentId"] = o.IntentId } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *PutCustomDomainPayload) UnmarshalJSON(data []byte) (err error) { + varPutCustomDomainPayload := _PutCustomDomainPayload{} + + err = json.Unmarshal(data, &varPutCustomDomainPayload) + + if err != nil { + return err + } + + *o = PutCustomDomainPayload(varPutCustomDomainPayload) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "certificate") + delete(additionalProperties, "intentId") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullablePutCustomDomainPayload struct { value *PutCustomDomainPayload isSet bool diff --git a/services/cdn/v1beta2api/model_put_custom_domain_payload_certificate.go b/services/cdn/v1beta2api/model_put_custom_domain_payload_certificate.go index 0822649b2..c85d3c583 100644 --- a/services/cdn/v1beta2api/model_put_custom_domain_payload_certificate.go +++ b/services/cdn/v1beta2api/model_put_custom_domain_payload_certificate.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1beta2api/model_put_custom_domain_response.go b/services/cdn/v1beta2api/model_put_custom_domain_response.go index 2e4425c4b..aefc92f41 100644 --- a/services/cdn/v1beta2api/model_put_custom_domain_response.go +++ b/services/cdn/v1beta2api/model_put_custom_domain_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -21,8 +20,9 @@ var _ MappedNullable = &PutCustomDomainResponse{} // PutCustomDomainResponse struct for PutCustomDomainResponse type PutCustomDomainResponse struct { - Certificate *PutCustomDomainResponseCertificate `json:"certificate,omitempty"` - CustomDomain CustomDomain `json:"customDomain"` + Certificate *PutCustomDomainResponseCertificate `json:"certificate,omitempty"` + CustomDomain CustomDomain `json:"customDomain"` + AdditionalProperties map[string]interface{} } type _PutCustomDomainResponse PutCustomDomainResponse @@ -115,6 +115,11 @@ func (o PutCustomDomainResponse) ToMap() (map[string]interface{}, error) { toSerialize["certificate"] = o.Certificate } toSerialize["customDomain"] = o.CustomDomain + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -142,9 +147,7 @@ func (o *PutCustomDomainResponse) UnmarshalJSON(data []byte) (err error) { varPutCustomDomainResponse := _PutCustomDomainResponse{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varPutCustomDomainResponse) + err = json.Unmarshal(data, &varPutCustomDomainResponse) if err != nil { return err @@ -152,6 +155,14 @@ func (o *PutCustomDomainResponse) UnmarshalJSON(data []byte) (err error) { *o = PutCustomDomainResponse(varPutCustomDomainResponse) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "certificate") + delete(additionalProperties, "customDomain") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_put_custom_domain_response_certificate.go b/services/cdn/v1beta2api/model_put_custom_domain_response_certificate.go index bfa384d9c..6f3e444a1 100644 --- a/services/cdn/v1beta2api/model_put_custom_domain_response_certificate.go +++ b/services/cdn/v1beta2api/model_put_custom_domain_response_certificate.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1beta2api/model_region.go b/services/cdn/v1beta2api/model_region.go index b5eff1cd1..42099d9cc 100644 --- a/services/cdn/v1beta2api/model_region.go +++ b/services/cdn/v1beta2api/model_region.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1beta2api/model_status_error.go b/services/cdn/v1beta2api/model_status_error.go index ff59ca58b..335c7c0fd 100644 --- a/services/cdn/v1beta2api/model_status_error.go +++ b/services/cdn/v1beta2api/model_status_error.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -26,7 +25,8 @@ type StatusError struct { // An english translation string corresponding to the error key. An english translation key is always present. En string `json:"en"` // An enum value that describes a Status Error. - Key string `json:"key"` + Key string `json:"key"` + AdditionalProperties map[string]interface{} } type _StatusError StatusError @@ -145,6 +145,11 @@ func (o StatusError) ToMap() (map[string]interface{}, error) { } toSerialize["en"] = o.En toSerialize["key"] = o.Key + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -173,9 +178,7 @@ func (o *StatusError) UnmarshalJSON(data []byte) (err error) { varStatusError := _StatusError{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varStatusError) + err = json.Unmarshal(data, &varStatusError) if err != nil { return err @@ -183,6 +186,15 @@ func (o *StatusError) UnmarshalJSON(data []byte) (err error) { *o = StatusError(varStatusError) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "de") + delete(additionalProperties, "en") + delete(additionalProperties, "key") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_waf_config.go b/services/cdn/v1beta2api/model_waf_config.go index 55356d546..1babfe089 100644 --- a/services/cdn/v1beta2api/model_waf_config.go +++ b/services/cdn/v1beta2api/model_waf_config.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -43,10 +42,11 @@ type WafConfig struct { // Ids of WAF Rule Groups to mark as log Only. LogOnlyRuleGroupIds []string `json:"logOnlyRuleGroupIds,omitempty"` // Ids of WAF Rules that are **explicitly** marked as Log Only for this distribution. - LogOnlyRuleIds []string `json:"logOnlyRuleIds,omitempty"` - Mode WafMode `json:"mode"` - ParanoiaLevel *WafParanoiaLevel `json:"paranoiaLevel,omitempty"` - Type WafType `json:"type"` + LogOnlyRuleIds []string `json:"logOnlyRuleIds,omitempty"` + Mode WafMode `json:"mode"` + ParanoiaLevel *WafParanoiaLevel `json:"paranoiaLevel,omitempty"` + Type WafType `json:"type"` + AdditionalProperties map[string]interface{} } type _WafConfig WafConfig @@ -576,6 +576,11 @@ func (o WafConfig) ToMap() (map[string]interface{}, error) { toSerialize["paranoiaLevel"] = o.ParanoiaLevel } toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -605,9 +610,7 @@ func (o *WafConfig) UnmarshalJSON(data []byte) (err error) { varWafConfig := _WafConfig{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varWafConfig) + err = json.Unmarshal(data, &varWafConfig) if err != nil { return err @@ -615,6 +618,27 @@ func (o *WafConfig) UnmarshalJSON(data []byte) (err error) { *o = WafConfig(varWafConfig) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "allowedHttpMethods") + delete(additionalProperties, "allowedHttpVersions") + delete(additionalProperties, "allowedRequestContentTypes") + delete(additionalProperties, "disabledRuleCollectionIds") + delete(additionalProperties, "disabledRuleGroupIds") + delete(additionalProperties, "disabledRuleIds") + delete(additionalProperties, "enabledRuleCollectionIds") + delete(additionalProperties, "enabledRuleGroupIds") + delete(additionalProperties, "enabledRuleIds") + delete(additionalProperties, "logOnlyRuleCollectionIds") + delete(additionalProperties, "logOnlyRuleGroupIds") + delete(additionalProperties, "logOnlyRuleIds") + delete(additionalProperties, "mode") + delete(additionalProperties, "paranoiaLevel") + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_waf_config_patch.go b/services/cdn/v1beta2api/model_waf_config_patch.go index 4c79e755c..c0055b9c4 100644 --- a/services/cdn/v1beta2api/model_waf_config_patch.go +++ b/services/cdn/v1beta2api/model_waf_config_patch.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -39,12 +39,15 @@ type WafConfigPatch struct { // Ids of WAF Rule Groups to mark as log Only. LogOnlyRuleGroupIds []string `json:"logOnlyRuleGroupIds,omitempty"` // Ids of WAF Rules that are **explicitly** marked as Log Only for this distribution. - LogOnlyRuleIds []string `json:"logOnlyRuleIds,omitempty"` - Mode *WafMode `json:"mode,omitempty"` - ParanoiaLevel *WafParanoiaLevel `json:"paranoiaLevel,omitempty"` - Type *WafType `json:"type,omitempty"` + LogOnlyRuleIds []string `json:"logOnlyRuleIds,omitempty"` + Mode *WafMode `json:"mode,omitempty"` + ParanoiaLevel *WafParanoiaLevel `json:"paranoiaLevel,omitempty"` + Type *WafType `json:"type,omitempty"` + AdditionalProperties map[string]interface{} } +type _WafConfigPatch WafConfigPatch + // NewWafConfigPatch instantiates a new WafConfigPatch 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 @@ -597,9 +600,49 @@ func (o WafConfigPatch) ToMap() (map[string]interface{}, error) { if !IsNil(o.Type) { toSerialize["type"] = o.Type } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *WafConfigPatch) UnmarshalJSON(data []byte) (err error) { + varWafConfigPatch := _WafConfigPatch{} + + err = json.Unmarshal(data, &varWafConfigPatch) + + if err != nil { + return err + } + + *o = WafConfigPatch(varWafConfigPatch) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "allowedHttpMethods") + delete(additionalProperties, "allowedHttpVersions") + delete(additionalProperties, "allowedRequestContentTypes") + delete(additionalProperties, "disabledRuleCollectionIds") + delete(additionalProperties, "disabledRuleGroupIds") + delete(additionalProperties, "disabledRuleIds") + delete(additionalProperties, "enabledRuleCollectionIds") + delete(additionalProperties, "enabledRuleGroupIds") + delete(additionalProperties, "enabledRuleIds") + delete(additionalProperties, "logOnlyRuleCollectionIds") + delete(additionalProperties, "logOnlyRuleGroupIds") + delete(additionalProperties, "logOnlyRuleIds") + delete(additionalProperties, "mode") + delete(additionalProperties, "paranoiaLevel") + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableWafConfigPatch struct { value *WafConfigPatch isSet bool diff --git a/services/cdn/v1beta2api/model_waf_mode.go b/services/cdn/v1beta2api/model_waf_mode.go index 47bad30e9..07c35f47d 100644 --- a/services/cdn/v1beta2api/model_waf_mode.go +++ b/services/cdn/v1beta2api/model_waf_mode.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1beta2api/model_waf_paranoia_level.go b/services/cdn/v1beta2api/model_waf_paranoia_level.go index cf45b9e6b..2160f796c 100644 --- a/services/cdn/v1beta2api/model_waf_paranoia_level.go +++ b/services/cdn/v1beta2api/model_waf_paranoia_level.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1beta2api/model_waf_rule.go b/services/cdn/v1beta2api/model_waf_rule.go index cf4e48aed..4d1aaf933 100644 --- a/services/cdn/v1beta2api/model_waf_rule.go +++ b/services/cdn/v1beta2api/model_waf_rule.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -24,8 +23,9 @@ type WafRule struct { // Optional CoreRuleSet rule Id in case this is a CRS rule Code *string `json:"code,omitempty"` // LocalizedString is a map from language to string value - Description map[string]string `json:"description"` - Id string `json:"id"` + Description map[string]string `json:"description"` + Id string `json:"id"` + AdditionalProperties map[string]interface{} } type _WafRule WafRule @@ -144,6 +144,11 @@ func (o WafRule) ToMap() (map[string]interface{}, error) { } toSerialize["description"] = o.Description toSerialize["id"] = o.Id + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -172,9 +177,7 @@ func (o *WafRule) UnmarshalJSON(data []byte) (err error) { varWafRule := _WafRule{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varWafRule) + err = json.Unmarshal(data, &varWafRule) if err != nil { return err @@ -182,6 +185,15 @@ func (o *WafRule) UnmarshalJSON(data []byte) (err error) { *o = WafRule(varWafRule) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "code") + delete(additionalProperties, "description") + delete(additionalProperties, "id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_waf_rule_action.go b/services/cdn/v1beta2api/model_waf_rule_action.go index 213d61ec2..ecc365deb 100644 --- a/services/cdn/v1beta2api/model_waf_rule_action.go +++ b/services/cdn/v1beta2api/model_waf_rule_action.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1beta2api/model_waf_rule_collection.go b/services/cdn/v1beta2api/model_waf_rule_collection.go index 9dddec7ac..cf3eaa091 100644 --- a/services/cdn/v1beta2api/model_waf_rule_collection.go +++ b/services/cdn/v1beta2api/model_waf_rule_collection.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -24,7 +23,8 @@ type WafRuleCollection struct { Groups []WafRuleGroup `json:"groups"` Id string `json:"id"` // LocalizedString is a map from language to string value - Name map[string]string `json:"name"` + Name map[string]string `json:"name"` + AdditionalProperties map[string]interface{} } type _WafRuleCollection WafRuleCollection @@ -134,6 +134,11 @@ func (o WafRuleCollection) ToMap() (map[string]interface{}, error) { toSerialize["groups"] = o.Groups toSerialize["id"] = o.Id toSerialize["name"] = o.Name + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -163,9 +168,7 @@ func (o *WafRuleCollection) UnmarshalJSON(data []byte) (err error) { varWafRuleCollection := _WafRuleCollection{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varWafRuleCollection) + err = json.Unmarshal(data, &varWafRuleCollection) if err != nil { return err @@ -173,6 +176,15 @@ func (o *WafRuleCollection) UnmarshalJSON(data []byte) (err error) { *o = WafRuleCollection(varWafRuleCollection) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "groups") + delete(additionalProperties, "id") + delete(additionalProperties, "name") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_waf_rule_group.go b/services/cdn/v1beta2api/model_waf_rule_group.go index d11fb6b1b..263f90528 100644 --- a/services/cdn/v1beta2api/model_waf_rule_group.go +++ b/services/cdn/v1beta2api/model_waf_rule_group.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -24,8 +23,9 @@ type WafRuleGroup struct { // LocalizedString is a map from language to string value Description map[string]string `json:"description"` // LocalizedString is a map from language to string value - Name map[string]string `json:"name"` - Rules []WafRule `json:"rules"` + Name map[string]string `json:"name"` + Rules []WafRule `json:"rules"` + AdditionalProperties map[string]interface{} } type _WafRuleGroup WafRuleGroup @@ -135,6 +135,11 @@ func (o WafRuleGroup) ToMap() (map[string]interface{}, error) { toSerialize["description"] = o.Description toSerialize["name"] = o.Name toSerialize["rules"] = o.Rules + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -164,9 +169,7 @@ func (o *WafRuleGroup) UnmarshalJSON(data []byte) (err error) { varWafRuleGroup := _WafRuleGroup{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varWafRuleGroup) + err = json.Unmarshal(data, &varWafRuleGroup) if err != nil { return err @@ -174,6 +177,15 @@ func (o *WafRuleGroup) UnmarshalJSON(data []byte) (err error) { *o = WafRuleGroup(varWafRuleGroup) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "description") + delete(additionalProperties, "name") + delete(additionalProperties, "rules") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_waf_status_rule_block.go b/services/cdn/v1beta2api/model_waf_status_rule_block.go index d442f7ab3..7b8a57f34 100644 --- a/services/cdn/v1beta2api/model_waf_status_rule_block.go +++ b/services/cdn/v1beta2api/model_waf_status_rule_block.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -22,8 +21,9 @@ var _ MappedNullable = &WafStatusRuleBlock{} // WafStatusRuleBlock struct for WafStatusRuleBlock type WafStatusRuleBlock struct { // Specifies the Id of the Rule. - Id string `json:"id"` - Reason WafStatusRuleBlockReason `json:"reason"` + Id string `json:"id"` + Reason WafStatusRuleBlockReason `json:"reason"` + AdditionalProperties map[string]interface{} } type _WafStatusRuleBlock WafStatusRuleBlock @@ -107,6 +107,11 @@ func (o WafStatusRuleBlock) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["id"] = o.Id toSerialize["reason"] = o.Reason + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -135,9 +140,7 @@ func (o *WafStatusRuleBlock) UnmarshalJSON(data []byte) (err error) { varWafStatusRuleBlock := _WafStatusRuleBlock{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varWafStatusRuleBlock) + err = json.Unmarshal(data, &varWafStatusRuleBlock) if err != nil { return err @@ -145,6 +148,14 @@ func (o *WafStatusRuleBlock) UnmarshalJSON(data []byte) (err error) { *o = WafStatusRuleBlock(varWafStatusRuleBlock) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "id") + delete(additionalProperties, "reason") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_waf_status_rule_block_reason.go b/services/cdn/v1beta2api/model_waf_status_rule_block_reason.go index d5f94d4bd..410987d18 100644 --- a/services/cdn/v1beta2api/model_waf_status_rule_block_reason.go +++ b/services/cdn/v1beta2api/model_waf_status_rule_block_reason.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1beta2api/model_waf_status_rule_block_reason_directly_defined.go b/services/cdn/v1beta2api/model_waf_status_rule_block_reason_directly_defined.go index f39fd178a..f959da5e9 100644 --- a/services/cdn/v1beta2api/model_waf_status_rule_block_reason_directly_defined.go +++ b/services/cdn/v1beta2api/model_waf_status_rule_block_reason_directly_defined.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -22,7 +21,8 @@ var _ MappedNullable = &WafStatusRuleBlockReasonDirectlyDefined{} // WafStatusRuleBlockReasonDirectlyDefined struct for WafStatusRuleBlockReasonDirectlyDefined type WafStatusRuleBlockReasonDirectlyDefined struct { // This is always `directlyDefined` - Type string `json:"type"` + Type string `json:"type"` + AdditionalProperties map[string]interface{} } type _WafStatusRuleBlockReasonDirectlyDefined WafStatusRuleBlockReasonDirectlyDefined @@ -80,6 +80,11 @@ func (o WafStatusRuleBlockReasonDirectlyDefined) MarshalJSON() ([]byte, error) { func (o WafStatusRuleBlockReasonDirectlyDefined) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -107,9 +112,7 @@ func (o *WafStatusRuleBlockReasonDirectlyDefined) UnmarshalJSON(data []byte) (er varWafStatusRuleBlockReasonDirectlyDefined := _WafStatusRuleBlockReasonDirectlyDefined{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varWafStatusRuleBlockReasonDirectlyDefined) + err = json.Unmarshal(data, &varWafStatusRuleBlockReasonDirectlyDefined) if err != nil { return err @@ -117,6 +120,13 @@ func (o *WafStatusRuleBlockReasonDirectlyDefined) UnmarshalJSON(data []byte) (er *o = WafStatusRuleBlockReasonDirectlyDefined(varWafStatusRuleBlockReasonDirectlyDefined) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_waf_status_rule_block_reason_inherited_from_collection.go b/services/cdn/v1beta2api/model_waf_status_rule_block_reason_inherited_from_collection.go index 584662454..6c50a87cc 100644 --- a/services/cdn/v1beta2api/model_waf_status_rule_block_reason_inherited_from_collection.go +++ b/services/cdn/v1beta2api/model_waf_status_rule_block_reason_inherited_from_collection.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -24,7 +23,8 @@ type WafStatusRuleBlockReasonInheritedFromCollection struct { // The Collection that caused this rule to be in its current state. CollectionId string `json:"collectionId"` // This is always `inheritedFromCollection` - Type string `json:"type"` + Type string `json:"type"` + AdditionalProperties map[string]interface{} } type _WafStatusRuleBlockReasonInheritedFromCollection WafStatusRuleBlockReasonInheritedFromCollection @@ -108,6 +108,11 @@ func (o WafStatusRuleBlockReasonInheritedFromCollection) ToMap() (map[string]int toSerialize := map[string]interface{}{} toSerialize["collectionId"] = o.CollectionId toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -136,9 +141,7 @@ func (o *WafStatusRuleBlockReasonInheritedFromCollection) UnmarshalJSON(data []b varWafStatusRuleBlockReasonInheritedFromCollection := _WafStatusRuleBlockReasonInheritedFromCollection{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varWafStatusRuleBlockReasonInheritedFromCollection) + err = json.Unmarshal(data, &varWafStatusRuleBlockReasonInheritedFromCollection) if err != nil { return err @@ -146,6 +149,14 @@ func (o *WafStatusRuleBlockReasonInheritedFromCollection) UnmarshalJSON(data []b *o = WafStatusRuleBlockReasonInheritedFromCollection(varWafStatusRuleBlockReasonInheritedFromCollection) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "collectionId") + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_waf_status_rule_block_reason_inherited_from_group.go b/services/cdn/v1beta2api/model_waf_status_rule_block_reason_inherited_from_group.go index 220f69666..9c28b741d 100644 --- a/services/cdn/v1beta2api/model_waf_status_rule_block_reason_inherited_from_group.go +++ b/services/cdn/v1beta2api/model_waf_status_rule_block_reason_inherited_from_group.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -24,7 +23,8 @@ type WafStatusRuleBlockReasonInheritedFromGroup struct { // The Group that caused this rule to be in its current state. GroupId string `json:"groupId"` // This is always `inheritedFromGroup` - Type string `json:"type"` + Type string `json:"type"` + AdditionalProperties map[string]interface{} } type _WafStatusRuleBlockReasonInheritedFromGroup WafStatusRuleBlockReasonInheritedFromGroup @@ -108,6 +108,11 @@ func (o WafStatusRuleBlockReasonInheritedFromGroup) ToMap() (map[string]interfac toSerialize := map[string]interface{}{} toSerialize["groupId"] = o.GroupId toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -136,9 +141,7 @@ func (o *WafStatusRuleBlockReasonInheritedFromGroup) UnmarshalJSON(data []byte) varWafStatusRuleBlockReasonInheritedFromGroup := _WafStatusRuleBlockReasonInheritedFromGroup{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varWafStatusRuleBlockReasonInheritedFromGroup) + err = json.Unmarshal(data, &varWafStatusRuleBlockReasonInheritedFromGroup) if err != nil { return err @@ -146,6 +149,14 @@ func (o *WafStatusRuleBlockReasonInheritedFromGroup) UnmarshalJSON(data []byte) *o = WafStatusRuleBlockReasonInheritedFromGroup(varWafStatusRuleBlockReasonInheritedFromGroup) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "groupId") + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_waf_status_rule_block_reason_invalid_waf_type.go b/services/cdn/v1beta2api/model_waf_status_rule_block_reason_invalid_waf_type.go index 7d651a411..fe07c7397 100644 --- a/services/cdn/v1beta2api/model_waf_status_rule_block_reason_invalid_waf_type.go +++ b/services/cdn/v1beta2api/model_waf_status_rule_block_reason_invalid_waf_type.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -24,7 +23,8 @@ type WafStatusRuleBlockReasonInvalidWafType struct { // A list containing all WAF Types which can use this Rule. You must patch you WAF to one of these WAF Types to make use of this rule. Rules show up with this state if they would have been enabled or logOnly otherwise. AllowedWafTypes []WafType `json:"allowedWafTypes"` // This is always `invalidWafType` - Type string `json:"type"` + Type string `json:"type"` + AdditionalProperties map[string]interface{} } type _WafStatusRuleBlockReasonInvalidWafType WafStatusRuleBlockReasonInvalidWafType @@ -108,6 +108,11 @@ func (o WafStatusRuleBlockReasonInvalidWafType) ToMap() (map[string]interface{}, toSerialize := map[string]interface{}{} toSerialize["allowedWafTypes"] = o.AllowedWafTypes toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -136,9 +141,7 @@ func (o *WafStatusRuleBlockReasonInvalidWafType) UnmarshalJSON(data []byte) (err varWafStatusRuleBlockReasonInvalidWafType := _WafStatusRuleBlockReasonInvalidWafType{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varWafStatusRuleBlockReasonInvalidWafType) + err = json.Unmarshal(data, &varWafStatusRuleBlockReasonInvalidWafType) if err != nil { return err @@ -146,6 +149,14 @@ func (o *WafStatusRuleBlockReasonInvalidWafType) UnmarshalJSON(data []byte) (err *o = WafStatusRuleBlockReasonInvalidWafType(varWafStatusRuleBlockReasonInvalidWafType) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "allowedWafTypes") + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_waf_status_rule_block_reason_never_defined.go b/services/cdn/v1beta2api/model_waf_status_rule_block_reason_never_defined.go index 805d7c5a0..94d48f17b 100644 --- a/services/cdn/v1beta2api/model_waf_status_rule_block_reason_never_defined.go +++ b/services/cdn/v1beta2api/model_waf_status_rule_block_reason_never_defined.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -22,7 +21,8 @@ var _ MappedNullable = &WafStatusRuleBlockReasonNeverDefined{} // WafStatusRuleBlockReasonNeverDefined This object only ever shows up in the disabled rules section. If rules are never defined (e.g. no collection, rule group, or the rule itself is ever mentioned), they are implicitly disabled type WafStatusRuleBlockReasonNeverDefined struct { // This is always `neverDefined` - Type string `json:"type"` + Type string `json:"type"` + AdditionalProperties map[string]interface{} } type _WafStatusRuleBlockReasonNeverDefined WafStatusRuleBlockReasonNeverDefined @@ -80,6 +80,11 @@ func (o WafStatusRuleBlockReasonNeverDefined) MarshalJSON() ([]byte, error) { func (o WafStatusRuleBlockReasonNeverDefined) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -107,9 +112,7 @@ func (o *WafStatusRuleBlockReasonNeverDefined) UnmarshalJSON(data []byte) (err e varWafStatusRuleBlockReasonNeverDefined := _WafStatusRuleBlockReasonNeverDefined{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varWafStatusRuleBlockReasonNeverDefined) + err = json.Unmarshal(data, &varWafStatusRuleBlockReasonNeverDefined) if err != nil { return err @@ -117,6 +120,13 @@ func (o *WafStatusRuleBlockReasonNeverDefined) UnmarshalJSON(data []byte) (err e *o = WafStatusRuleBlockReasonNeverDefined(varWafStatusRuleBlockReasonNeverDefined) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/model_waf_type.go b/services/cdn/v1beta2api/model_waf_type.go index 8e614292c..279a40234 100644 --- a/services/cdn/v1beta2api/model_waf_type.go +++ b/services/cdn/v1beta2api/model_waf_type.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1beta2api/model_waf_violation.go b/services/cdn/v1beta2api/model_waf_violation.go index 4b944e8b9..b2558fd9d 100644 --- a/services/cdn/v1beta2api/model_waf_violation.go +++ b/services/cdn/v1beta2api/model_waf_violation.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta2.0.0 package v1beta2api import ( - "bytes" "encoding/json" "fmt" ) @@ -30,7 +29,8 @@ type WAFViolation struct { Method string `json:"method"` RequestHeaders map[string]string `json:"requestHeaders"` // ID of the WAF rule that was triggered - RuleId string `json:"ruleId"` + RuleId string `json:"ruleId"` + AdditionalProperties map[string]interface{} } type _WAFViolation WAFViolation @@ -218,6 +218,11 @@ func (o WAFViolation) ToMap() (map[string]interface{}, error) { toSerialize["method"] = o.Method toSerialize["requestHeaders"] = o.RequestHeaders toSerialize["ruleId"] = o.RuleId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -250,9 +255,7 @@ func (o *WAFViolation) UnmarshalJSON(data []byte) (err error) { varWAFViolation := _WAFViolation{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varWAFViolation) + err = json.Unmarshal(data, &varWAFViolation) if err != nil { return err @@ -260,6 +263,18 @@ func (o *WAFViolation) UnmarshalJSON(data []byte) (err error) { *o = WAFViolation(varWAFViolation) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "action") + delete(additionalProperties, "asn") + delete(additionalProperties, "message") + delete(additionalProperties, "method") + delete(additionalProperties, "requestHeaders") + delete(additionalProperties, "ruleId") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1beta2api/response.go b/services/cdn/v1beta2api/response.go index 97856b209..4c73acd48 100644 --- a/services/cdn/v1beta2api/response.go +++ b/services/cdn/v1beta2api/response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1beta2api/utils.go b/services/cdn/v1beta2api/utils.go index 4f9a78b1e..c9fa293a8 100644 --- a/services/cdn/v1beta2api/utils.go +++ b/services/cdn/v1beta2api/utils.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1betaapi/api_default.go b/services/cdn/v1betaapi/api_default.go index 2e683a683..eff9a023b 100644 --- a/services/cdn/v1betaapi/api_default.go +++ b/services/cdn/v1betaapi/api_default.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1betaapi/api_default_mock.go b/services/cdn/v1betaapi/api_default_mock.go index 1ff6d249e..410333ef2 100644 --- a/services/cdn/v1betaapi/api_default_mock.go +++ b/services/cdn/v1betaapi/api_default_mock.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1betaapi/client.go b/services/cdn/v1betaapi/client.go index 24697b385..cebeaa65e 100644 --- a/services/cdn/v1betaapi/client.go +++ b/services/cdn/v1betaapi/client.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -42,7 +42,7 @@ var ( queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]") ) -// APIClient manages communication with the CDN API API v1beta.0.0 +// APIClient manages communication with the STACKIT CDN API API v1beta.0.0 // In most cases there should be only one, shared, APIClient. type APIClient struct { cfg *config.Configuration diff --git a/services/cdn/v1betaapi/configuration.go b/services/cdn/v1betaapi/configuration.go index ff47d31ec..9b967125d 100644 --- a/services/cdn/v1betaapi/configuration.go +++ b/services/cdn/v1betaapi/configuration.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1betaapi/model_config.go b/services/cdn/v1betaapi/model_config.go index fbcff5844..abf8e1eb2 100644 --- a/services/cdn/v1betaapi/model_config.go +++ b/services/cdn/v1betaapi/model_config.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta.0.0 package v1betaapi import ( - "bytes" "encoding/json" "fmt" ) @@ -30,10 +29,11 @@ type Config struct { DefaultCacheDuration NullableString `json:"defaultCacheDuration,omitempty"` LogSink *LokiLogSink `json:"logSink,omitempty"` // Sets the monthly limit of bandwidth in bytes that the pullzone is allowed to use. - MonthlyLimitBytes NullableInt64 `json:"monthlyLimitBytes,omitempty"` - Optimizer *Optimizer `json:"optimizer,omitempty"` - Regions []Region `json:"regions"` - Waf WafConfig `json:"waf"` + MonthlyLimitBytes NullableInt64 `json:"monthlyLimitBytes,omitempty"` + Optimizer *Optimizer `json:"optimizer,omitempty"` + Regions []Region `json:"regions"` + Waf WafConfig `json:"waf"` + AdditionalProperties map[string]interface{} } type _Config Config @@ -357,6 +357,11 @@ func (o Config) ToMap() (map[string]interface{}, error) { } toSerialize["regions"] = o.Regions toSerialize["waf"] = o.Waf + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -388,9 +393,7 @@ func (o *Config) UnmarshalJSON(data []byte) (err error) { varConfig := _Config{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varConfig) + err = json.Unmarshal(data, &varConfig) if err != nil { return err @@ -398,6 +401,21 @@ func (o *Config) UnmarshalJSON(data []byte) (err error) { *o = Config(varConfig) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "backend") + delete(additionalProperties, "blockedCountries") + delete(additionalProperties, "blockedIPs") + delete(additionalProperties, "defaultCacheDuration") + delete(additionalProperties, "logSink") + delete(additionalProperties, "monthlyLimitBytes") + delete(additionalProperties, "optimizer") + delete(additionalProperties, "regions") + delete(additionalProperties, "waf") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1betaapi/model_config_patch.go b/services/cdn/v1betaapi/model_config_patch.go index b353e089c..8e75c7d7e 100644 --- a/services/cdn/v1betaapi/model_config_patch.go +++ b/services/cdn/v1betaapi/model_config_patch.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -28,12 +28,15 @@ type ConfigPatch struct { DefaultCacheDuration NullableString `json:"defaultCacheDuration,omitempty"` LogSink NullablePatchLokiLogSink `json:"logSink,omitempty"` // Sets the monthly limit of bandwidth in bytes that the pullzone is allowed to use. - MonthlyLimitBytes NullableInt64 `json:"monthlyLimitBytes,omitempty"` - Optimizer *OptimizerPatch `json:"optimizer,omitempty"` - Regions []Region `json:"regions,omitempty"` - Waf *WafConfigPatch `json:"waf,omitempty"` + MonthlyLimitBytes NullableInt64 `json:"monthlyLimitBytes,omitempty"` + Optimizer *OptimizerPatch `json:"optimizer,omitempty"` + Regions []Region `json:"regions,omitempty"` + Waf *WafConfigPatch `json:"waf,omitempty"` + AdditionalProperties map[string]interface{} } +type _ConfigPatch ConfigPatch + // NewConfigPatch instantiates a new ConfigPatch 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 @@ -409,9 +412,43 @@ func (o ConfigPatch) ToMap() (map[string]interface{}, error) { if !IsNil(o.Waf) { toSerialize["waf"] = o.Waf } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *ConfigPatch) UnmarshalJSON(data []byte) (err error) { + varConfigPatch := _ConfigPatch{} + + err = json.Unmarshal(data, &varConfigPatch) + + if err != nil { + return err + } + + *o = ConfigPatch(varConfigPatch) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "backend") + delete(additionalProperties, "blockedCountries") + delete(additionalProperties, "blockedIPs") + delete(additionalProperties, "defaultCacheDuration") + delete(additionalProperties, "logSink") + delete(additionalProperties, "monthlyLimitBytes") + delete(additionalProperties, "optimizer") + delete(additionalProperties, "regions") + delete(additionalProperties, "waf") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableConfigPatch struct { value *ConfigPatch isSet bool diff --git a/services/cdn/v1betaapi/model_create_distribution_payload.go b/services/cdn/v1betaapi/model_create_distribution_payload.go index 28942e041..b9258929f 100644 --- a/services/cdn/v1betaapi/model_create_distribution_payload.go +++ b/services/cdn/v1betaapi/model_create_distribution_payload.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta.0.0 package v1betaapi import ( - "bytes" "encoding/json" "fmt" ) @@ -40,8 +39,9 @@ type CreateDistributionPayload struct { // The origin of the content that should be made available through the CDN. Note that the path and query parameters are ignored. Ports are allowed. If no protocol is provided, `https` is assumed. So `www.example.com:1234/somePath?q=123` is normalized to `https://www.example.com:1234` OriginUrl string `json:"originUrl"` // Define in which regions you would like your content to be cached. - Regions []Region `json:"regions"` - Waf *WafConfig `json:"waf,omitempty"` + Regions []Region `json:"regions"` + Waf *WafConfig `json:"waf,omitempty"` + AdditionalProperties map[string]interface{} } type _CreateDistributionPayload CreateDistributionPayload @@ -475,6 +475,11 @@ func (o CreateDistributionPayload) ToMap() (map[string]interface{}, error) { if !IsNil(o.Waf) { toSerialize["waf"] = o.Waf } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -503,9 +508,7 @@ func (o *CreateDistributionPayload) UnmarshalJSON(data []byte) (err error) { varCreateDistributionPayload := _CreateDistributionPayload{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varCreateDistributionPayload) + err = json.Unmarshal(data, &varCreateDistributionPayload) if err != nil { return err @@ -513,6 +516,24 @@ func (o *CreateDistributionPayload) UnmarshalJSON(data []byte) (err error) { *o = CreateDistributionPayload(varCreateDistributionPayload) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "blockedCountries") + delete(additionalProperties, "blockedIPs") + delete(additionalProperties, "defaultCacheDuration") + delete(additionalProperties, "geofencing") + delete(additionalProperties, "intentId") + delete(additionalProperties, "logSink") + delete(additionalProperties, "monthlyLimitBytes") + delete(additionalProperties, "optimizer") + delete(additionalProperties, "originRequestHeaders") + delete(additionalProperties, "originUrl") + delete(additionalProperties, "regions") + delete(additionalProperties, "waf") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1betaapi/model_create_distribution_response.go b/services/cdn/v1betaapi/model_create_distribution_response.go index 7aa3b7f02..9bb3250fe 100644 --- a/services/cdn/v1betaapi/model_create_distribution_response.go +++ b/services/cdn/v1betaapi/model_create_distribution_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta.0.0 package v1betaapi import ( - "bytes" "encoding/json" "fmt" ) @@ -21,7 +20,8 @@ var _ MappedNullable = &CreateDistributionResponse{} // CreateDistributionResponse struct for CreateDistributionResponse type CreateDistributionResponse struct { - Distribution Distribution `json:"distribution"` + Distribution Distribution `json:"distribution"` + AdditionalProperties map[string]interface{} } type _CreateDistributionResponse CreateDistributionResponse @@ -79,6 +79,11 @@ func (o CreateDistributionResponse) MarshalJSON() ([]byte, error) { func (o CreateDistributionResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["distribution"] = o.Distribution + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -106,9 +111,7 @@ func (o *CreateDistributionResponse) UnmarshalJSON(data []byte) (err error) { varCreateDistributionResponse := _CreateDistributionResponse{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varCreateDistributionResponse) + err = json.Unmarshal(data, &varCreateDistributionResponse) if err != nil { return err @@ -116,6 +119,13 @@ func (o *CreateDistributionResponse) UnmarshalJSON(data []byte) (err error) { *o = CreateDistributionResponse(varCreateDistributionResponse) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "distribution") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1betaapi/model_custom_domain.go b/services/cdn/v1betaapi/model_custom_domain.go index 829caeaba..c6a8406fd 100644 --- a/services/cdn/v1betaapi/model_custom_domain.go +++ b/services/cdn/v1betaapi/model_custom_domain.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta.0.0 package v1betaapi import ( - "bytes" "encoding/json" "fmt" ) @@ -24,8 +23,9 @@ type CustomDomain struct { // This object is present if the custom domain has errors. Errors []StatusError `json:"errors,omitempty"` // The domain. Can be used as input for the GetCustomDomain endpoint - Name string `json:"name"` - Status DomainStatus `json:"status"` + Name string `json:"name"` + Status DomainStatus `json:"status"` + AdditionalProperties map[string]interface{} } type _CustomDomain CustomDomain @@ -144,6 +144,11 @@ func (o CustomDomain) ToMap() (map[string]interface{}, error) { } toSerialize["name"] = o.Name toSerialize["status"] = o.Status + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -172,9 +177,7 @@ func (o *CustomDomain) UnmarshalJSON(data []byte) (err error) { varCustomDomain := _CustomDomain{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varCustomDomain) + err = json.Unmarshal(data, &varCustomDomain) if err != nil { return err @@ -182,6 +185,15 @@ func (o *CustomDomain) UnmarshalJSON(data []byte) (err error) { *o = CustomDomain(varCustomDomain) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "errors") + delete(additionalProperties, "name") + delete(additionalProperties, "status") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1betaapi/model_delete_custom_domain_response.go b/services/cdn/v1betaapi/model_delete_custom_domain_response.go index 038b88ae5..eeacbe615 100644 --- a/services/cdn/v1betaapi/model_delete_custom_domain_response.go +++ b/services/cdn/v1betaapi/model_delete_custom_domain_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -19,9 +19,12 @@ var _ MappedNullable = &DeleteCustomDomainResponse{} // DeleteCustomDomainResponse Returns the custom domain that was deleted while the deletion has not completed yet. After the deletion was successful the response will be empty. type DeleteCustomDomainResponse struct { - CustomDomain *CustomDomain `json:"customDomain,omitempty"` + CustomDomain *CustomDomain `json:"customDomain,omitempty"` + AdditionalProperties map[string]interface{} } +type _DeleteCustomDomainResponse DeleteCustomDomainResponse + // NewDeleteCustomDomainResponse instantiates a new DeleteCustomDomainResponse 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 @@ -84,9 +87,35 @@ func (o DeleteCustomDomainResponse) ToMap() (map[string]interface{}, error) { if !IsNil(o.CustomDomain) { toSerialize["customDomain"] = o.CustomDomain } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *DeleteCustomDomainResponse) UnmarshalJSON(data []byte) (err error) { + varDeleteCustomDomainResponse := _DeleteCustomDomainResponse{} + + err = json.Unmarshal(data, &varDeleteCustomDomainResponse) + + if err != nil { + return err + } + + *o = DeleteCustomDomainResponse(varDeleteCustomDomainResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "customDomain") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableDeleteCustomDomainResponse struct { value *DeleteCustomDomainResponse isSet bool diff --git a/services/cdn/v1betaapi/model_delete_distribution_response.go b/services/cdn/v1betaapi/model_delete_distribution_response.go index 511d1b264..09e2ff41d 100644 --- a/services/cdn/v1betaapi/model_delete_distribution_response.go +++ b/services/cdn/v1betaapi/model_delete_distribution_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -19,9 +19,12 @@ var _ MappedNullable = &DeleteDistributionResponse{} // DeleteDistributionResponse struct for DeleteDistributionResponse type DeleteDistributionResponse struct { - Distribution *Distribution `json:"distribution,omitempty"` + Distribution *Distribution `json:"distribution,omitempty"` + AdditionalProperties map[string]interface{} } +type _DeleteDistributionResponse DeleteDistributionResponse + // NewDeleteDistributionResponse instantiates a new DeleteDistributionResponse 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 @@ -84,9 +87,35 @@ func (o DeleteDistributionResponse) ToMap() (map[string]interface{}, error) { if !IsNil(o.Distribution) { toSerialize["distribution"] = o.Distribution } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *DeleteDistributionResponse) UnmarshalJSON(data []byte) (err error) { + varDeleteDistributionResponse := _DeleteDistributionResponse{} + + err = json.Unmarshal(data, &varDeleteDistributionResponse) + + if err != nil { + return err + } + + *o = DeleteDistributionResponse(varDeleteDistributionResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "distribution") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableDeleteDistributionResponse struct { value *DeleteDistributionResponse isSet bool diff --git a/services/cdn/v1betaapi/model_distribution.go b/services/cdn/v1betaapi/model_distribution.go index 5d0b1c5a2..ab88974b8 100644 --- a/services/cdn/v1betaapi/model_distribution.go +++ b/services/cdn/v1betaapi/model_distribution.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta.0.0 package v1betaapi import ( - "bytes" "encoding/json" "fmt" "time" @@ -33,8 +32,9 @@ type Distribution struct { // - `CREATING`: The distribution was just created. All the relevant resources are created in the background. Once fully reconciled, this switches to `ACTIVE`. If there are any issues, the status changes to `ERROR`. You can look at the `errors` array to get more infos. - `ACTIVE`: The usual state. The desired configuration is synced, there are no errors - `UPDATING`: The state when there is a discrepancy between the desired and actual configuration state. This occurs right after an update. Will switch to `ACTIVE` or `ERROR`, depending on if synchronizing succeeds or not. - `DELETING`: The state right after a delete request was received. The distribution will stay in this status until all resources have been successfully removed, or until we encounter an `ERROR` state. **NOTE:** You can keep fetching the distribution while it is deleting. After successful deletion, trying to get a distribution will return a 404 Not Found response - `ERROR`: The error state. Look at the `errors` array for more info. Status string `json:"status"` // RFC3339 string which returns the last time the distribution configuration was modified. - UpdatedAt time.Time `json:"updatedAt"` - Waf *DistributionWaf `json:"waf,omitempty"` + UpdatedAt time.Time `json:"updatedAt"` + Waf *DistributionWaf `json:"waf,omitempty"` + AdditionalProperties map[string]interface{} } type _Distribution Distribution @@ -318,6 +318,11 @@ func (o Distribution) ToMap() (map[string]interface{}, error) { if !IsNil(o.Waf) { toSerialize["waf"] = o.Waf } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -351,9 +356,7 @@ func (o *Distribution) UnmarshalJSON(data []byte) (err error) { varDistribution := _Distribution{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varDistribution) + err = json.Unmarshal(data, &varDistribution) if err != nil { return err @@ -361,6 +364,21 @@ func (o *Distribution) UnmarshalJSON(data []byte) (err error) { *o = Distribution(varDistribution) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "config") + delete(additionalProperties, "createdAt") + delete(additionalProperties, "domains") + delete(additionalProperties, "errors") + delete(additionalProperties, "id") + delete(additionalProperties, "projectId") + delete(additionalProperties, "status") + delete(additionalProperties, "updatedAt") + delete(additionalProperties, "waf") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1betaapi/model_distribution_logs_record.go b/services/cdn/v1betaapi/model_distribution_logs_record.go index c3b9466c0..19d2c4797 100644 --- a/services/cdn/v1betaapi/model_distribution_logs_record.go +++ b/services/cdn/v1betaapi/model_distribution_logs_record.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta.0.0 package v1betaapi import ( - "bytes" "encoding/json" "fmt" "time" @@ -28,11 +27,12 @@ type DistributionLogsRecord struct { Host string `json:"host"` Path string `json:"path"` // ISO 3166-1 A2 compliant country code - RequestCountryCode string `json:"requestCountryCode"` - Size int64 `json:"size"` - StatusCode int32 `json:"statusCode"` - Timestamp time.Time `json:"timestamp"` - WafViolation *WAFViolation `json:"wafViolation,omitempty"` + RequestCountryCode string `json:"requestCountryCode"` + Size int64 `json:"size"` + StatusCode int32 `json:"statusCode"` + Timestamp time.Time `json:"timestamp"` + WafViolation *WAFViolation `json:"wafViolation,omitempty"` + AdditionalProperties map[string]interface{} } type _DistributionLogsRecord DistributionLogsRecord @@ -333,6 +333,11 @@ func (o DistributionLogsRecord) ToMap() (map[string]interface{}, error) { if !IsNil(o.WafViolation) { toSerialize["wafViolation"] = o.WafViolation } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -368,9 +373,7 @@ func (o *DistributionLogsRecord) UnmarshalJSON(data []byte) (err error) { varDistributionLogsRecord := _DistributionLogsRecord{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varDistributionLogsRecord) + err = json.Unmarshal(data, &varDistributionLogsRecord) if err != nil { return err @@ -378,6 +381,22 @@ func (o *DistributionLogsRecord) UnmarshalJSON(data []byte) (err error) { *o = DistributionLogsRecord(varDistributionLogsRecord) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "cacheHit") + delete(additionalProperties, "dataCenterRegion") + delete(additionalProperties, "distributionID") + delete(additionalProperties, "host") + delete(additionalProperties, "path") + delete(additionalProperties, "requestCountryCode") + delete(additionalProperties, "size") + delete(additionalProperties, "statusCode") + delete(additionalProperties, "timestamp") + delete(additionalProperties, "wafViolation") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1betaapi/model_distribution_statistics_record.go b/services/cdn/v1betaapi/model_distribution_statistics_record.go index 5d902fa2a..dd79e51e6 100644 --- a/services/cdn/v1betaapi/model_distribution_statistics_record.go +++ b/services/cdn/v1betaapi/model_distribution_statistics_record.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta.0.0 package v1betaapi import ( - "bytes" "encoding/json" "fmt" "time" @@ -32,7 +31,8 @@ type DistributionStatisticsRecord struct { End time.Time `json:"end"` Regions DistributionStatisticsRecordRegions `json:"regions"` // Start of the time interval the statistics refer to - Start time.Time `json:"start"` + Start time.Time `json:"start"` + AdditionalProperties map[string]interface{} } type _DistributionStatisticsRecord DistributionStatisticsRecord @@ -220,6 +220,11 @@ func (o DistributionStatisticsRecord) ToMap() (map[string]interface{}, error) { toSerialize["end"] = o.End toSerialize["regions"] = o.Regions toSerialize["start"] = o.Start + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -252,9 +257,7 @@ func (o *DistributionStatisticsRecord) UnmarshalJSON(data []byte) (err error) { varDistributionStatisticsRecord := _DistributionStatisticsRecord{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varDistributionStatisticsRecord) + err = json.Unmarshal(data, &varDistributionStatisticsRecord) if err != nil { return err @@ -262,6 +265,18 @@ func (o *DistributionStatisticsRecord) UnmarshalJSON(data []byte) (err error) { *o = DistributionStatisticsRecord(varDistributionStatisticsRecord) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "cachedRequests") + delete(additionalProperties, "totalRequests") + delete(additionalProperties, "totalTrafficBytes") + delete(additionalProperties, "end") + delete(additionalProperties, "regions") + delete(additionalProperties, "start") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1betaapi/model_distribution_statistics_record_entry.go b/services/cdn/v1betaapi/model_distribution_statistics_record_entry.go index c9a1ce1a5..b49de3669 100644 --- a/services/cdn/v1betaapi/model_distribution_statistics_record_entry.go +++ b/services/cdn/v1betaapi/model_distribution_statistics_record_entry.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta.0.0 package v1betaapi import ( - "bytes" "encoding/json" "fmt" ) @@ -26,7 +25,8 @@ type DistributionStatisticsRecordEntry struct { // Total number of requests that were served TotalRequests int64 `json:"totalRequests"` // Total traffic in bytes that occurred during the time interval - TotalTrafficBytes int64 `json:"totalTrafficBytes"` + TotalTrafficBytes int64 `json:"totalTrafficBytes"` + AdditionalProperties map[string]interface{} } type _DistributionStatisticsRecordEntry DistributionStatisticsRecordEntry @@ -136,6 +136,11 @@ func (o DistributionStatisticsRecordEntry) ToMap() (map[string]interface{}, erro toSerialize["cachedRequests"] = o.CachedRequests toSerialize["totalRequests"] = o.TotalRequests toSerialize["totalTrafficBytes"] = o.TotalTrafficBytes + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -165,9 +170,7 @@ func (o *DistributionStatisticsRecordEntry) UnmarshalJSON(data []byte) (err erro varDistributionStatisticsRecordEntry := _DistributionStatisticsRecordEntry{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varDistributionStatisticsRecordEntry) + err = json.Unmarshal(data, &varDistributionStatisticsRecordEntry) if err != nil { return err @@ -175,6 +178,15 @@ func (o *DistributionStatisticsRecordEntry) UnmarshalJSON(data []byte) (err erro *o = DistributionStatisticsRecordEntry(varDistributionStatisticsRecordEntry) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "cachedRequests") + delete(additionalProperties, "totalRequests") + delete(additionalProperties, "totalTrafficBytes") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1betaapi/model_distribution_statistics_record_regions.go b/services/cdn/v1betaapi/model_distribution_statistics_record_regions.go index d40356000..6bf27ff3d 100644 --- a/services/cdn/v1betaapi/model_distribution_statistics_record_regions.go +++ b/services/cdn/v1betaapi/model_distribution_statistics_record_regions.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta.0.0 package v1betaapi import ( - "bytes" "encoding/json" "fmt" ) @@ -21,11 +20,12 @@ var _ MappedNullable = &DistributionStatisticsRecordRegions{} // DistributionStatisticsRecordRegions Mapping of regions to the metrics for this region for the defined time interval All regions are always present. If no traffic was reported for a region, it will still contain 0-filled properties type DistributionStatisticsRecordRegions struct { - AF DistributionStatisticsRecordEntry `json:"AF"` - ASIA DistributionStatisticsRecordEntry `json:"ASIA"` - EU DistributionStatisticsRecordEntry `json:"EU"` - SA DistributionStatisticsRecordEntry `json:"SA"` - US DistributionStatisticsRecordEntry `json:"US"` + AF DistributionStatisticsRecordEntry `json:"AF"` + ASIA DistributionStatisticsRecordEntry `json:"ASIA"` + EU DistributionStatisticsRecordEntry `json:"EU"` + SA DistributionStatisticsRecordEntry `json:"SA"` + US DistributionStatisticsRecordEntry `json:"US"` + AdditionalProperties map[string]interface{} } type _DistributionStatisticsRecordRegions DistributionStatisticsRecordRegions @@ -187,6 +187,11 @@ func (o DistributionStatisticsRecordRegions) ToMap() (map[string]interface{}, er toSerialize["EU"] = o.EU toSerialize["SA"] = o.SA toSerialize["US"] = o.US + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -218,9 +223,7 @@ func (o *DistributionStatisticsRecordRegions) UnmarshalJSON(data []byte) (err er varDistributionStatisticsRecordRegions := _DistributionStatisticsRecordRegions{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varDistributionStatisticsRecordRegions) + err = json.Unmarshal(data, &varDistributionStatisticsRecordRegions) if err != nil { return err @@ -228,6 +231,17 @@ func (o *DistributionStatisticsRecordRegions) UnmarshalJSON(data []byte) (err er *o = DistributionStatisticsRecordRegions(varDistributionStatisticsRecordRegions) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "AF") + delete(additionalProperties, "ASIA") + delete(additionalProperties, "EU") + delete(additionalProperties, "SA") + delete(additionalProperties, "US") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1betaapi/model_distribution_waf.go b/services/cdn/v1betaapi/model_distribution_waf.go index 5f9fb7c8a..20cbf035f 100644 --- a/services/cdn/v1betaapi/model_distribution_waf.go +++ b/services/cdn/v1betaapi/model_distribution_waf.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta.0.0 package v1betaapi import ( - "bytes" "encoding/json" "fmt" ) @@ -21,9 +20,10 @@ var _ MappedNullable = &DistributionWaf{} // DistributionWaf For this property to be present two pre-conditions must be met: - the WAF was enabled at least once - the query parameter ?withWafStatus is truthy This property contains the waf Status. At this point in time, this contains all resolved rules. Rules are split into 3 groups: - enabledRules - logOnlyRules - disabledRules **Do note that the global waf mode (Disabled, LogOnly, Enabled) is *NOT* reflected in this list!** type DistributionWaf struct { - DisabledRules []WAFStatusRuleBlock `json:"disabledRules"` - EnabledRules []WAFStatusRuleBlock `json:"enabledRules"` - LogOnlyRules []WAFStatusRuleBlock `json:"logOnlyRules"` + DisabledRules []WAFStatusRuleBlock `json:"disabledRules"` + EnabledRules []WAFStatusRuleBlock `json:"enabledRules"` + LogOnlyRules []WAFStatusRuleBlock `json:"logOnlyRules"` + AdditionalProperties map[string]interface{} } type _DistributionWaf DistributionWaf @@ -133,6 +133,11 @@ func (o DistributionWaf) ToMap() (map[string]interface{}, error) { toSerialize["disabledRules"] = o.DisabledRules toSerialize["enabledRules"] = o.EnabledRules toSerialize["logOnlyRules"] = o.LogOnlyRules + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -162,9 +167,7 @@ func (o *DistributionWaf) UnmarshalJSON(data []byte) (err error) { varDistributionWaf := _DistributionWaf{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varDistributionWaf) + err = json.Unmarshal(data, &varDistributionWaf) if err != nil { return err @@ -172,6 +175,15 @@ func (o *DistributionWaf) UnmarshalJSON(data []byte) (err error) { *o = DistributionWaf(varDistributionWaf) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "disabledRules") + delete(additionalProperties, "enabledRules") + delete(additionalProperties, "logOnlyRules") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1betaapi/model_domain.go b/services/cdn/v1betaapi/model_domain.go index d3ae5ae17..6960eb43a 100644 --- a/services/cdn/v1betaapi/model_domain.go +++ b/services/cdn/v1betaapi/model_domain.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta.0.0 package v1betaapi import ( - "bytes" "encoding/json" "fmt" ) @@ -27,7 +26,8 @@ type Domain struct { Name string `json:"name"` Status DomainStatus `json:"status"` // Specifies the type of this Domain. Custom Domain can be further queries using the GetCustomDomain Endpoint - Type string `json:"type"` + Type string `json:"type"` + AdditionalProperties map[string]interface{} } type _Domain Domain @@ -172,6 +172,11 @@ func (o Domain) ToMap() (map[string]interface{}, error) { toSerialize["name"] = o.Name toSerialize["status"] = o.Status toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -201,9 +206,7 @@ func (o *Domain) UnmarshalJSON(data []byte) (err error) { varDomain := _Domain{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varDomain) + err = json.Unmarshal(data, &varDomain) if err != nil { return err @@ -211,6 +214,16 @@ func (o *Domain) UnmarshalJSON(data []byte) (err error) { *o = Domain(varDomain) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "errors") + delete(additionalProperties, "name") + delete(additionalProperties, "status") + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1betaapi/model_domain_status.go b/services/cdn/v1betaapi/model_domain_status.go index d7a289261..5743563b8 100644 --- a/services/cdn/v1betaapi/model_domain_status.go +++ b/services/cdn/v1betaapi/model_domain_status.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1betaapi/model_error_details.go b/services/cdn/v1betaapi/model_error_details.go index 356bbe7ec..2003b36b7 100644 --- a/services/cdn/v1betaapi/model_error_details.go +++ b/services/cdn/v1betaapi/model_error_details.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta.0.0 package v1betaapi import ( - "bytes" "encoding/json" "fmt" ) @@ -28,8 +27,9 @@ type ErrorDetails struct { // English description of the error En string `json:"en"` // Optional field in the request this error detail refers to - Field *string `json:"field,omitempty"` - Key string `json:"key"` + Field *string `json:"field,omitempty"` + Key string `json:"key"` + AdditionalProperties map[string]interface{} } type _ErrorDetails ErrorDetails @@ -212,6 +212,11 @@ func (o ErrorDetails) ToMap() (map[string]interface{}, error) { toSerialize["field"] = o.Field } toSerialize["key"] = o.Key + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -241,9 +246,7 @@ func (o *ErrorDetails) UnmarshalJSON(data []byte) (err error) { varErrorDetails := _ErrorDetails{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varErrorDetails) + err = json.Unmarshal(data, &varErrorDetails) if err != nil { return err @@ -251,6 +254,17 @@ func (o *ErrorDetails) UnmarshalJSON(data []byte) (err error) { *o = ErrorDetails(varErrorDetails) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "de") + delete(additionalProperties, "description") + delete(additionalProperties, "en") + delete(additionalProperties, "field") + delete(additionalProperties, "key") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1betaapi/model_find_cache_paths_response.go b/services/cdn/v1betaapi/model_find_cache_paths_response.go index 7350009f1..0847fe8e7 100644 --- a/services/cdn/v1betaapi/model_find_cache_paths_response.go +++ b/services/cdn/v1betaapi/model_find_cache_paths_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta.0.0 package v1betaapi import ( - "bytes" "encoding/json" "fmt" ) @@ -21,7 +20,8 @@ var _ MappedNullable = &FindCachePathsResponse{} // FindCachePathsResponse struct for FindCachePathsResponse type FindCachePathsResponse struct { - Response []FindCachePathsResponseEntry `json:"response"` + Response []FindCachePathsResponseEntry `json:"response"` + AdditionalProperties map[string]interface{} } type _FindCachePathsResponse FindCachePathsResponse @@ -79,6 +79,11 @@ func (o FindCachePathsResponse) MarshalJSON() ([]byte, error) { func (o FindCachePathsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["response"] = o.Response + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -106,9 +111,7 @@ func (o *FindCachePathsResponse) UnmarshalJSON(data []byte) (err error) { varFindCachePathsResponse := _FindCachePathsResponse{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varFindCachePathsResponse) + err = json.Unmarshal(data, &varFindCachePathsResponse) if err != nil { return err @@ -116,6 +119,13 @@ func (o *FindCachePathsResponse) UnmarshalJSON(data []byte) (err error) { *o = FindCachePathsResponse(varFindCachePathsResponse) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "response") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1betaapi/model_find_cache_paths_response_entry.go b/services/cdn/v1betaapi/model_find_cache_paths_response_entry.go index 63cf6ee9c..0f73f81cb 100644 --- a/services/cdn/v1betaapi/model_find_cache_paths_response_entry.go +++ b/services/cdn/v1betaapi/model_find_cache_paths_response_entry.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta.0.0 package v1betaapi import ( - "bytes" "encoding/json" "fmt" ) @@ -22,7 +21,8 @@ var _ MappedNullable = &FindCachePathsResponseEntry{} // FindCachePathsResponseEntry struct for FindCachePathsResponseEntry type FindCachePathsResponseEntry struct { // Defines one path that was previously used as part of a granular purge - Path string `json:"path"` + Path string `json:"path"` + AdditionalProperties map[string]interface{} } type _FindCachePathsResponseEntry FindCachePathsResponseEntry @@ -80,6 +80,11 @@ func (o FindCachePathsResponseEntry) MarshalJSON() ([]byte, error) { func (o FindCachePathsResponseEntry) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["path"] = o.Path + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -107,9 +112,7 @@ func (o *FindCachePathsResponseEntry) UnmarshalJSON(data []byte) (err error) { varFindCachePathsResponseEntry := _FindCachePathsResponseEntry{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varFindCachePathsResponseEntry) + err = json.Unmarshal(data, &varFindCachePathsResponseEntry) if err != nil { return err @@ -117,6 +120,13 @@ func (o *FindCachePathsResponseEntry) UnmarshalJSON(data []byte) (err error) { *o = FindCachePathsResponseEntry(varFindCachePathsResponseEntry) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "path") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1betaapi/model_generic_json_response.go b/services/cdn/v1betaapi/model_generic_json_response.go index 5547afa5f..90493e256 100644 --- a/services/cdn/v1betaapi/model_generic_json_response.go +++ b/services/cdn/v1betaapi/model_generic_json_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta.0.0 package v1betaapi import ( - "bytes" "encoding/json" "fmt" ) @@ -22,8 +21,9 @@ var _ MappedNullable = &GenericJSONResponse{} // GenericJSONResponse struct for GenericJSONResponse type GenericJSONResponse struct { // Listing of issues with your request - Details []ErrorDetails `json:"details,omitempty"` - Message string `json:"message"` + Details []ErrorDetails `json:"details,omitempty"` + Message string `json:"message"` + AdditionalProperties map[string]interface{} } type _GenericJSONResponse GenericJSONResponse @@ -116,6 +116,11 @@ func (o GenericJSONResponse) ToMap() (map[string]interface{}, error) { toSerialize["details"] = o.Details } toSerialize["message"] = o.Message + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -143,9 +148,7 @@ func (o *GenericJSONResponse) UnmarshalJSON(data []byte) (err error) { varGenericJSONResponse := _GenericJSONResponse{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGenericJSONResponse) + err = json.Unmarshal(data, &varGenericJSONResponse) if err != nil { return err @@ -153,6 +156,14 @@ func (o *GenericJSONResponse) UnmarshalJSON(data []byte) (err error) { *o = GenericJSONResponse(varGenericJSONResponse) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "details") + delete(additionalProperties, "message") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1betaapi/model_get_cache_info_response.go b/services/cdn/v1betaapi/model_get_cache_info_response.go index b6b27e415..58467be8c 100644 --- a/services/cdn/v1betaapi/model_get_cache_info_response.go +++ b/services/cdn/v1betaapi/model_get_cache_info_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta.0.0 package v1betaapi import ( - "bytes" "encoding/json" "fmt" "time" @@ -24,7 +23,8 @@ var _ MappedNullable = &GetCacheInfoResponse{} type GetCacheInfoResponse struct { History []GetCacheInfoResponseHistoryEntry `json:"history"` // Returns the last time the cache was purged by calling the PurgeCache endpoint. Time represented as RFC3339 compliant string. If the cache was never purged, this returns `null` - LastPurgeTime NullableTime `json:"lastPurgeTime"` + LastPurgeTime NullableTime `json:"lastPurgeTime"` + AdditionalProperties map[string]interface{} } type _GetCacheInfoResponse GetCacheInfoResponse @@ -110,6 +110,11 @@ func (o GetCacheInfoResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["history"] = o.History toSerialize["lastPurgeTime"] = o.LastPurgeTime.Get() + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -138,9 +143,7 @@ func (o *GetCacheInfoResponse) UnmarshalJSON(data []byte) (err error) { varGetCacheInfoResponse := _GetCacheInfoResponse{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGetCacheInfoResponse) + err = json.Unmarshal(data, &varGetCacheInfoResponse) if err != nil { return err @@ -148,6 +151,14 @@ func (o *GetCacheInfoResponse) UnmarshalJSON(data []byte) (err error) { *o = GetCacheInfoResponse(varGetCacheInfoResponse) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "history") + delete(additionalProperties, "lastPurgeTime") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1betaapi/model_get_cache_info_response_history_entry.go b/services/cdn/v1betaapi/model_get_cache_info_response_history_entry.go index 500eb3475..2823d81ad 100644 --- a/services/cdn/v1betaapi/model_get_cache_info_response_history_entry.go +++ b/services/cdn/v1betaapi/model_get_cache_info_response_history_entry.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta.0.0 package v1betaapi import ( - "bytes" "encoding/json" "fmt" "time" @@ -23,9 +22,10 @@ var _ MappedNullable = &GetCacheInfoResponseHistoryEntry{} // GetCacheInfoResponseHistoryEntry struct for GetCacheInfoResponseHistoryEntry type GetCacheInfoResponseHistoryEntry struct { // Deprecated - OccuredAt time.Time `json:"occuredAt"` - OccurredAt time.Time `json:"occurredAt"` - Type string `json:"type"` + OccuredAt time.Time `json:"occuredAt"` + OccurredAt time.Time `json:"occurredAt"` + Type string `json:"type"` + AdditionalProperties map[string]interface{} } type _GetCacheInfoResponseHistoryEntry GetCacheInfoResponseHistoryEntry @@ -138,6 +138,11 @@ func (o GetCacheInfoResponseHistoryEntry) ToMap() (map[string]interface{}, error toSerialize["occuredAt"] = o.OccuredAt toSerialize["occurredAt"] = o.OccurredAt toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -167,9 +172,7 @@ func (o *GetCacheInfoResponseHistoryEntry) UnmarshalJSON(data []byte) (err error varGetCacheInfoResponseHistoryEntry := _GetCacheInfoResponseHistoryEntry{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGetCacheInfoResponseHistoryEntry) + err = json.Unmarshal(data, &varGetCacheInfoResponseHistoryEntry) if err != nil { return err @@ -177,6 +180,15 @@ func (o *GetCacheInfoResponseHistoryEntry) UnmarshalJSON(data []byte) (err error *o = GetCacheInfoResponseHistoryEntry(varGetCacheInfoResponseHistoryEntry) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "occuredAt") + delete(additionalProperties, "occurredAt") + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1betaapi/model_get_custom_domain_custom_certificate.go b/services/cdn/v1betaapi/model_get_custom_domain_custom_certificate.go index a9b733197..808e2ff4c 100644 --- a/services/cdn/v1betaapi/model_get_custom_domain_custom_certificate.go +++ b/services/cdn/v1betaapi/model_get_custom_domain_custom_certificate.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta.0.0 package v1betaapi import ( - "bytes" "encoding/json" "fmt" ) @@ -23,7 +22,8 @@ var _ MappedNullable = &GetCustomDomainCustomCertificate{} type GetCustomDomainCustomCertificate struct { Type string `json:"type"` // Whenever a new custom certificate is added the version is increased by 1. - Version int32 `json:"version"` + Version int32 `json:"version"` + AdditionalProperties map[string]interface{} } type _GetCustomDomainCustomCertificate GetCustomDomainCustomCertificate @@ -107,6 +107,11 @@ func (o GetCustomDomainCustomCertificate) ToMap() (map[string]interface{}, error toSerialize := map[string]interface{}{} toSerialize["type"] = o.Type toSerialize["version"] = o.Version + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -135,9 +140,7 @@ func (o *GetCustomDomainCustomCertificate) UnmarshalJSON(data []byte) (err error varGetCustomDomainCustomCertificate := _GetCustomDomainCustomCertificate{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGetCustomDomainCustomCertificate) + err = json.Unmarshal(data, &varGetCustomDomainCustomCertificate) if err != nil { return err @@ -145,6 +148,14 @@ func (o *GetCustomDomainCustomCertificate) UnmarshalJSON(data []byte) (err error *o = GetCustomDomainCustomCertificate(varGetCustomDomainCustomCertificate) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + delete(additionalProperties, "version") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1betaapi/model_get_custom_domain_managed_certificate.go b/services/cdn/v1betaapi/model_get_custom_domain_managed_certificate.go index 92daf2ee4..eba650865 100644 --- a/services/cdn/v1betaapi/model_get_custom_domain_managed_certificate.go +++ b/services/cdn/v1betaapi/model_get_custom_domain_managed_certificate.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta.0.0 package v1betaapi import ( - "bytes" "encoding/json" "fmt" ) @@ -21,7 +20,8 @@ var _ MappedNullable = &GetCustomDomainManagedCertificate{} // GetCustomDomainManagedCertificate This is returned when no custom certificate is used. We provision and manage a Let's Encrypt Certificate for you type GetCustomDomainManagedCertificate struct { - Type string `json:"type"` + Type string `json:"type"` + AdditionalProperties map[string]interface{} } type _GetCustomDomainManagedCertificate GetCustomDomainManagedCertificate @@ -79,6 +79,11 @@ func (o GetCustomDomainManagedCertificate) MarshalJSON() ([]byte, error) { func (o GetCustomDomainManagedCertificate) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -106,9 +111,7 @@ func (o *GetCustomDomainManagedCertificate) UnmarshalJSON(data []byte) (err erro varGetCustomDomainManagedCertificate := _GetCustomDomainManagedCertificate{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGetCustomDomainManagedCertificate) + err = json.Unmarshal(data, &varGetCustomDomainManagedCertificate) if err != nil { return err @@ -116,6 +119,13 @@ func (o *GetCustomDomainManagedCertificate) UnmarshalJSON(data []byte) (err erro *o = GetCustomDomainManagedCertificate(varGetCustomDomainManagedCertificate) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1betaapi/model_get_custom_domain_response.go b/services/cdn/v1betaapi/model_get_custom_domain_response.go index 1bdedcbd4..c83c91def 100644 --- a/services/cdn/v1betaapi/model_get_custom_domain_response.go +++ b/services/cdn/v1betaapi/model_get_custom_domain_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta.0.0 package v1betaapi import ( - "bytes" "encoding/json" "fmt" ) @@ -24,7 +23,8 @@ type GetCustomDomainResponse struct { Certificate GetCustomDomainResponseCertificate `json:"certificate"` CustomDomain CustomDomain `json:"customDomain"` // Deprecated - Domain string `json:"domain" validate:"regexp=^[.\\\\-A-Za-z0-9]*$"` + Domain string `json:"domain" validate:"regexp=^[.\\\\-A-Za-z0-9]*$"` + AdditionalProperties map[string]interface{} } type _GetCustomDomainResponse GetCustomDomainResponse @@ -137,6 +137,11 @@ func (o GetCustomDomainResponse) ToMap() (map[string]interface{}, error) { toSerialize["certificate"] = o.Certificate toSerialize["customDomain"] = o.CustomDomain toSerialize["domain"] = o.Domain + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -166,9 +171,7 @@ func (o *GetCustomDomainResponse) UnmarshalJSON(data []byte) (err error) { varGetCustomDomainResponse := _GetCustomDomainResponse{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGetCustomDomainResponse) + err = json.Unmarshal(data, &varGetCustomDomainResponse) if err != nil { return err @@ -176,6 +179,15 @@ func (o *GetCustomDomainResponse) UnmarshalJSON(data []byte) (err error) { *o = GetCustomDomainResponse(varGetCustomDomainResponse) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "certificate") + delete(additionalProperties, "customDomain") + delete(additionalProperties, "domain") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1betaapi/model_get_custom_domain_response_certificate.go b/services/cdn/v1betaapi/model_get_custom_domain_response_certificate.go index 8ce40e768..149178e72 100644 --- a/services/cdn/v1betaapi/model_get_custom_domain_response_certificate.go +++ b/services/cdn/v1betaapi/model_get_custom_domain_response_certificate.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1betaapi/model_get_distribution_response.go b/services/cdn/v1betaapi/model_get_distribution_response.go index 5f133a3ee..479238999 100644 --- a/services/cdn/v1betaapi/model_get_distribution_response.go +++ b/services/cdn/v1betaapi/model_get_distribution_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta.0.0 package v1betaapi import ( - "bytes" "encoding/json" "fmt" ) @@ -21,7 +20,8 @@ var _ MappedNullable = &GetDistributionResponse{} // GetDistributionResponse struct for GetDistributionResponse type GetDistributionResponse struct { - Distribution Distribution `json:"distribution"` + Distribution Distribution `json:"distribution"` + AdditionalProperties map[string]interface{} } type _GetDistributionResponse GetDistributionResponse @@ -79,6 +79,11 @@ func (o GetDistributionResponse) MarshalJSON() ([]byte, error) { func (o GetDistributionResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["distribution"] = o.Distribution + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -106,9 +111,7 @@ func (o *GetDistributionResponse) UnmarshalJSON(data []byte) (err error) { varGetDistributionResponse := _GetDistributionResponse{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGetDistributionResponse) + err = json.Unmarshal(data, &varGetDistributionResponse) if err != nil { return err @@ -116,6 +119,13 @@ func (o *GetDistributionResponse) UnmarshalJSON(data []byte) (err error) { *o = GetDistributionResponse(varGetDistributionResponse) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "distribution") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1betaapi/model_get_logs_response.go b/services/cdn/v1betaapi/model_get_logs_response.go index bd5a488c7..181aef7b5 100644 --- a/services/cdn/v1betaapi/model_get_logs_response.go +++ b/services/cdn/v1betaapi/model_get_logs_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta.0.0 package v1betaapi import ( - "bytes" "encoding/json" "fmt" ) @@ -21,8 +20,9 @@ var _ MappedNullable = &GetLogsResponse{} // GetLogsResponse struct for GetLogsResponse type GetLogsResponse struct { - Logs []DistributionLogsRecord `json:"logs"` - NextPageIdentifier *string `json:"nextPageIdentifier,omitempty"` + Logs []DistributionLogsRecord `json:"logs"` + NextPageIdentifier *string `json:"nextPageIdentifier,omitempty"` + AdditionalProperties map[string]interface{} } type _GetLogsResponse GetLogsResponse @@ -115,6 +115,11 @@ func (o GetLogsResponse) ToMap() (map[string]interface{}, error) { if !IsNil(o.NextPageIdentifier) { toSerialize["nextPageIdentifier"] = o.NextPageIdentifier } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -142,9 +147,7 @@ func (o *GetLogsResponse) UnmarshalJSON(data []byte) (err error) { varGetLogsResponse := _GetLogsResponse{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGetLogsResponse) + err = json.Unmarshal(data, &varGetLogsResponse) if err != nil { return err @@ -152,6 +155,14 @@ func (o *GetLogsResponse) UnmarshalJSON(data []byte) (err error) { *o = GetLogsResponse(varGetLogsResponse) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "logs") + delete(additionalProperties, "nextPageIdentifier") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1betaapi/model_get_logs_search_filters_response.go b/services/cdn/v1betaapi/model_get_logs_search_filters_response.go index 7cf52d1a7..5e83ec410 100644 --- a/services/cdn/v1betaapi/model_get_logs_search_filters_response.go +++ b/services/cdn/v1betaapi/model_get_logs_search_filters_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta.0.0 package v1betaapi import ( - "bytes" "encoding/json" "fmt" ) @@ -21,7 +20,8 @@ var _ MappedNullable = &GetLogsSearchFiltersResponse{} // GetLogsSearchFiltersResponse struct for GetLogsSearchFiltersResponse type GetLogsSearchFiltersResponse struct { - Filters []string `json:"filters"` + Filters []string `json:"filters"` + AdditionalProperties map[string]interface{} } type _GetLogsSearchFiltersResponse GetLogsSearchFiltersResponse @@ -79,6 +79,11 @@ func (o GetLogsSearchFiltersResponse) MarshalJSON() ([]byte, error) { func (o GetLogsSearchFiltersResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["filters"] = o.Filters + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -106,9 +111,7 @@ func (o *GetLogsSearchFiltersResponse) UnmarshalJSON(data []byte) (err error) { varGetLogsSearchFiltersResponse := _GetLogsSearchFiltersResponse{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGetLogsSearchFiltersResponse) + err = json.Unmarshal(data, &varGetLogsSearchFiltersResponse) if err != nil { return err @@ -116,6 +119,13 @@ func (o *GetLogsSearchFiltersResponse) UnmarshalJSON(data []byte) (err error) { *o = GetLogsSearchFiltersResponse(varGetLogsSearchFiltersResponse) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "filters") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1betaapi/model_get_statistics_response.go b/services/cdn/v1betaapi/model_get_statistics_response.go index c91a56189..0c1e68431 100644 --- a/services/cdn/v1betaapi/model_get_statistics_response.go +++ b/services/cdn/v1betaapi/model_get_statistics_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta.0.0 package v1betaapi import ( - "bytes" "encoding/json" "fmt" ) @@ -21,7 +20,8 @@ var _ MappedNullable = &GetStatisticsResponse{} // GetStatisticsResponse struct for GetStatisticsResponse type GetStatisticsResponse struct { - Records []DistributionStatisticsRecord `json:"records"` + Records []DistributionStatisticsRecord `json:"records"` + AdditionalProperties map[string]interface{} } type _GetStatisticsResponse GetStatisticsResponse @@ -79,6 +79,11 @@ func (o GetStatisticsResponse) MarshalJSON() ([]byte, error) { func (o GetStatisticsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["records"] = o.Records + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -106,9 +111,7 @@ func (o *GetStatisticsResponse) UnmarshalJSON(data []byte) (err error) { varGetStatisticsResponse := _GetStatisticsResponse{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGetStatisticsResponse) + err = json.Unmarshal(data, &varGetStatisticsResponse) if err != nil { return err @@ -116,6 +119,13 @@ func (o *GetStatisticsResponse) UnmarshalJSON(data []byte) (err error) { *o = GetStatisticsResponse(varGetStatisticsResponse) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "records") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1betaapi/model_http_backend.go b/services/cdn/v1betaapi/model_http_backend.go index 73e01fef9..fc367943d 100644 --- a/services/cdn/v1betaapi/model_http_backend.go +++ b/services/cdn/v1betaapi/model_http_backend.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta.0.0 package v1betaapi import ( - "bytes" "encoding/json" "fmt" ) @@ -27,6 +26,7 @@ type HttpBackend struct { OriginRequestHeaders map[string]string `json:"originRequestHeaders"` OriginUrl string `json:"originUrl"` Type string `json:"type"` + AdditionalProperties map[string]interface{} } type _HttpBackend HttpBackend @@ -162,6 +162,11 @@ func (o HttpBackend) ToMap() (map[string]interface{}, error) { toSerialize["originRequestHeaders"] = o.OriginRequestHeaders toSerialize["originUrl"] = o.OriginUrl toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -192,9 +197,7 @@ func (o *HttpBackend) UnmarshalJSON(data []byte) (err error) { varHttpBackend := _HttpBackend{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varHttpBackend) + err = json.Unmarshal(data, &varHttpBackend) if err != nil { return err @@ -202,6 +205,16 @@ func (o *HttpBackend) UnmarshalJSON(data []byte) (err error) { *o = HttpBackend(varHttpBackend) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "geofencing") + delete(additionalProperties, "originRequestHeaders") + delete(additionalProperties, "originUrl") + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1betaapi/model_http_backend_patch.go b/services/cdn/v1betaapi/model_http_backend_patch.go index 8d87bfe3e..f1c74d94c 100644 --- a/services/cdn/v1betaapi/model_http_backend_patch.go +++ b/services/cdn/v1betaapi/model_http_backend_patch.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta.0.0 package v1betaapi import ( - "bytes" "encoding/json" "fmt" ) @@ -27,7 +26,8 @@ type HttpBackendPatch struct { OriginRequestHeaders *map[string]string `json:"originRequestHeaders,omitempty"` OriginUrl *string `json:"originUrl,omitempty"` // This property is required to determine the used backend type. - Type string `json:"type"` + Type string `json:"type"` + AdditionalProperties map[string]interface{} } type _HttpBackendPatch HttpBackendPatch @@ -190,6 +190,11 @@ func (o HttpBackendPatch) ToMap() (map[string]interface{}, error) { toSerialize["originUrl"] = o.OriginUrl } toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -217,9 +222,7 @@ func (o *HttpBackendPatch) UnmarshalJSON(data []byte) (err error) { varHttpBackendPatch := _HttpBackendPatch{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varHttpBackendPatch) + err = json.Unmarshal(data, &varHttpBackendPatch) if err != nil { return err @@ -227,6 +230,16 @@ func (o *HttpBackendPatch) UnmarshalJSON(data []byte) (err error) { *o = HttpBackendPatch(varHttpBackendPatch) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "geofencing") + delete(additionalProperties, "originRequestHeaders") + delete(additionalProperties, "originUrl") + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1betaapi/model_list_distributions_response.go b/services/cdn/v1betaapi/model_list_distributions_response.go index 4788a6260..ba45cdc57 100644 --- a/services/cdn/v1betaapi/model_list_distributions_response.go +++ b/services/cdn/v1betaapi/model_list_distributions_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta.0.0 package v1betaapi import ( - "bytes" "encoding/json" "fmt" ) @@ -21,8 +20,9 @@ var _ MappedNullable = &ListDistributionsResponse{} // ListDistributionsResponse struct for ListDistributionsResponse type ListDistributionsResponse struct { - Distributions []Distribution `json:"distributions"` - NextPageIdentifier *string `json:"nextPageIdentifier,omitempty"` + Distributions []Distribution `json:"distributions"` + NextPageIdentifier *string `json:"nextPageIdentifier,omitempty"` + AdditionalProperties map[string]interface{} } type _ListDistributionsResponse ListDistributionsResponse @@ -115,6 +115,11 @@ func (o ListDistributionsResponse) ToMap() (map[string]interface{}, error) { if !IsNil(o.NextPageIdentifier) { toSerialize["nextPageIdentifier"] = o.NextPageIdentifier } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -142,9 +147,7 @@ func (o *ListDistributionsResponse) UnmarshalJSON(data []byte) (err error) { varListDistributionsResponse := _ListDistributionsResponse{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varListDistributionsResponse) + err = json.Unmarshal(data, &varListDistributionsResponse) if err != nil { return err @@ -152,6 +155,14 @@ func (o *ListDistributionsResponse) UnmarshalJSON(data []byte) (err error) { *o = ListDistributionsResponse(varListDistributionsResponse) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "distributions") + delete(additionalProperties, "nextPageIdentifier") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1betaapi/model_list_waf_collections_response.go b/services/cdn/v1betaapi/model_list_waf_collections_response.go index 562034c5e..cee2634d6 100644 --- a/services/cdn/v1betaapi/model_list_waf_collections_response.go +++ b/services/cdn/v1betaapi/model_list_waf_collections_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta.0.0 package v1betaapi import ( - "bytes" "encoding/json" "fmt" ) @@ -21,7 +20,8 @@ var _ MappedNullable = &ListWAFCollectionsResponse{} // ListWAFCollectionsResponse struct for ListWAFCollectionsResponse type ListWAFCollectionsResponse struct { - Collections []WAFRuleCollection `json:"collections"` + Collections []WAFRuleCollection `json:"collections"` + AdditionalProperties map[string]interface{} } type _ListWAFCollectionsResponse ListWAFCollectionsResponse @@ -79,6 +79,11 @@ func (o ListWAFCollectionsResponse) MarshalJSON() ([]byte, error) { func (o ListWAFCollectionsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["collections"] = o.Collections + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -106,9 +111,7 @@ func (o *ListWAFCollectionsResponse) UnmarshalJSON(data []byte) (err error) { varListWAFCollectionsResponse := _ListWAFCollectionsResponse{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varListWAFCollectionsResponse) + err = json.Unmarshal(data, &varListWAFCollectionsResponse) if err != nil { return err @@ -116,6 +119,13 @@ func (o *ListWAFCollectionsResponse) UnmarshalJSON(data []byte) (err error) { *o = ListWAFCollectionsResponse(varListWAFCollectionsResponse) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "collections") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1betaapi/model_loki_log_sink.go b/services/cdn/v1betaapi/model_loki_log_sink.go index 51d6cf671..5bde6bc98 100644 --- a/services/cdn/v1betaapi/model_loki_log_sink.go +++ b/services/cdn/v1betaapi/model_loki_log_sink.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta.0.0 package v1betaapi import ( - "bytes" "encoding/json" "fmt" ) @@ -21,8 +20,9 @@ var _ MappedNullable = &LokiLogSink{} // LokiLogSink struct for LokiLogSink type LokiLogSink struct { - PushUrl string `json:"pushUrl"` - Type string `json:"type"` + PushUrl string `json:"pushUrl"` + Type string `json:"type"` + AdditionalProperties map[string]interface{} } type _LokiLogSink LokiLogSink @@ -106,6 +106,11 @@ func (o LokiLogSink) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["pushUrl"] = o.PushUrl toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -134,9 +139,7 @@ func (o *LokiLogSink) UnmarshalJSON(data []byte) (err error) { varLokiLogSink := _LokiLogSink{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varLokiLogSink) + err = json.Unmarshal(data, &varLokiLogSink) if err != nil { return err @@ -144,6 +147,14 @@ func (o *LokiLogSink) UnmarshalJSON(data []byte) (err error) { *o = LokiLogSink(varLokiLogSink) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "pushUrl") + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1betaapi/model_optimizer.go b/services/cdn/v1betaapi/model_optimizer.go index bf078c702..ba480d80d 100644 --- a/services/cdn/v1betaapi/model_optimizer.go +++ b/services/cdn/v1betaapi/model_optimizer.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta.0.0 package v1betaapi import ( - "bytes" "encoding/json" "fmt" ) @@ -22,7 +21,8 @@ var _ MappedNullable = &Optimizer{} // Optimizer Optimizer is paid feature, a real-time on the fly image manipulation and optimization service that automatically optimizes your images for faster image delivery. type Optimizer struct { // Determines if the optimizer should be enabled for this distribution and incurs a monthly fee - Enabled bool `json:"enabled"` + Enabled bool `json:"enabled"` + AdditionalProperties map[string]interface{} } type _Optimizer Optimizer @@ -80,6 +80,11 @@ func (o Optimizer) MarshalJSON() ([]byte, error) { func (o Optimizer) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["enabled"] = o.Enabled + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -107,9 +112,7 @@ func (o *Optimizer) UnmarshalJSON(data []byte) (err error) { varOptimizer := _Optimizer{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varOptimizer) + err = json.Unmarshal(data, &varOptimizer) if err != nil { return err @@ -117,6 +120,13 @@ func (o *Optimizer) UnmarshalJSON(data []byte) (err error) { *o = Optimizer(varOptimizer) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "enabled") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1betaapi/model_optimizer_patch.go b/services/cdn/v1betaapi/model_optimizer_patch.go index afc26ee14..1f96e283a 100644 --- a/services/cdn/v1betaapi/model_optimizer_patch.go +++ b/services/cdn/v1betaapi/model_optimizer_patch.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -19,9 +19,12 @@ var _ MappedNullable = &OptimizerPatch{} // OptimizerPatch struct for OptimizerPatch type OptimizerPatch struct { - Enabled *bool `json:"enabled,omitempty"` + Enabled *bool `json:"enabled,omitempty"` + AdditionalProperties map[string]interface{} } +type _OptimizerPatch OptimizerPatch + // NewOptimizerPatch instantiates a new OptimizerPatch 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 @@ -84,9 +87,35 @@ func (o OptimizerPatch) ToMap() (map[string]interface{}, error) { if !IsNil(o.Enabled) { toSerialize["enabled"] = o.Enabled } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *OptimizerPatch) UnmarshalJSON(data []byte) (err error) { + varOptimizerPatch := _OptimizerPatch{} + + err = json.Unmarshal(data, &varOptimizerPatch) + + if err != nil { + return err + } + + *o = OptimizerPatch(varOptimizerPatch) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "enabled") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableOptimizerPatch struct { value *OptimizerPatch isSet bool diff --git a/services/cdn/v1betaapi/model_patch_distribution_payload.go b/services/cdn/v1betaapi/model_patch_distribution_payload.go index 332125118..172dc73cb 100644 --- a/services/cdn/v1betaapi/model_patch_distribution_payload.go +++ b/services/cdn/v1betaapi/model_patch_distribution_payload.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -21,9 +21,12 @@ var _ MappedNullable = &PatchDistributionPayload{} type PatchDistributionPayload struct { Config *ConfigPatch `json:"config,omitempty"` // While optional, it is greatly encouraged to provide an `intentId`. This is used to deduplicate requests. If multiple modifying requests with the same `intentId` for a given `projectId` are received, all but the first request are dropped. - IntentId *string `json:"intentId,omitempty"` + IntentId *string `json:"intentId,omitempty"` + AdditionalProperties map[string]interface{} } +type _PatchDistributionPayload PatchDistributionPayload + // NewPatchDistributionPayload instantiates a new PatchDistributionPayload 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 @@ -121,9 +124,36 @@ func (o PatchDistributionPayload) ToMap() (map[string]interface{}, error) { if !IsNil(o.IntentId) { toSerialize["intentId"] = o.IntentId } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *PatchDistributionPayload) UnmarshalJSON(data []byte) (err error) { + varPatchDistributionPayload := _PatchDistributionPayload{} + + err = json.Unmarshal(data, &varPatchDistributionPayload) + + if err != nil { + return err + } + + *o = PatchDistributionPayload(varPatchDistributionPayload) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "config") + delete(additionalProperties, "intentId") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullablePatchDistributionPayload struct { value *PatchDistributionPayload isSet bool diff --git a/services/cdn/v1betaapi/model_patch_distribution_response.go b/services/cdn/v1betaapi/model_patch_distribution_response.go index ff142df49..a60e4bc60 100644 --- a/services/cdn/v1betaapi/model_patch_distribution_response.go +++ b/services/cdn/v1betaapi/model_patch_distribution_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta.0.0 package v1betaapi import ( - "bytes" "encoding/json" "fmt" ) @@ -21,7 +20,8 @@ var _ MappedNullable = &PatchDistributionResponse{} // PatchDistributionResponse struct for PatchDistributionResponse type PatchDistributionResponse struct { - Distribution Distribution `json:"distribution"` + Distribution Distribution `json:"distribution"` + AdditionalProperties map[string]interface{} } type _PatchDistributionResponse PatchDistributionResponse @@ -79,6 +79,11 @@ func (o PatchDistributionResponse) MarshalJSON() ([]byte, error) { func (o PatchDistributionResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["distribution"] = o.Distribution + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -106,9 +111,7 @@ func (o *PatchDistributionResponse) UnmarshalJSON(data []byte) (err error) { varPatchDistributionResponse := _PatchDistributionResponse{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varPatchDistributionResponse) + err = json.Unmarshal(data, &varPatchDistributionResponse) if err != nil { return err @@ -116,6 +119,13 @@ func (o *PatchDistributionResponse) UnmarshalJSON(data []byte) (err error) { *o = PatchDistributionResponse(varPatchDistributionResponse) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "distribution") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1betaapi/model_patch_loki_log_sink.go b/services/cdn/v1betaapi/model_patch_loki_log_sink.go index 380332457..6898cac1d 100644 --- a/services/cdn/v1betaapi/model_patch_loki_log_sink.go +++ b/services/cdn/v1betaapi/model_patch_loki_log_sink.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta.0.0 package v1betaapi import ( - "bytes" "encoding/json" "fmt" ) @@ -21,10 +20,11 @@ var _ MappedNullable = &PatchLokiLogSink{} // PatchLokiLogSink struct for PatchLokiLogSink type PatchLokiLogSink struct { - Password string `json:"password"` - PushUrl string `json:"pushUrl"` - Type string `json:"type"` - Username string `json:"username"` + Password string `json:"password"` + PushUrl string `json:"pushUrl"` + Type string `json:"type"` + Username string `json:"username"` + AdditionalProperties map[string]interface{} } type _PatchLokiLogSink PatchLokiLogSink @@ -160,6 +160,11 @@ func (o PatchLokiLogSink) ToMap() (map[string]interface{}, error) { toSerialize["pushUrl"] = o.PushUrl toSerialize["type"] = o.Type toSerialize["username"] = o.Username + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -190,9 +195,7 @@ func (o *PatchLokiLogSink) UnmarshalJSON(data []byte) (err error) { varPatchLokiLogSink := _PatchLokiLogSink{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varPatchLokiLogSink) + err = json.Unmarshal(data, &varPatchLokiLogSink) if err != nil { return err @@ -200,6 +203,16 @@ func (o *PatchLokiLogSink) UnmarshalJSON(data []byte) (err error) { *o = PatchLokiLogSink(varPatchLokiLogSink) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "password") + delete(additionalProperties, "pushUrl") + delete(additionalProperties, "type") + delete(additionalProperties, "username") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1betaapi/model_purge_cache_payload.go b/services/cdn/v1betaapi/model_purge_cache_payload.go index 5e81e1f52..cc2f2a1e0 100644 --- a/services/cdn/v1betaapi/model_purge_cache_payload.go +++ b/services/cdn/v1betaapi/model_purge_cache_payload.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -20,9 +20,12 @@ var _ MappedNullable = &PurgeCachePayload{} // PurgeCachePayload struct for PurgeCachePayload type PurgeCachePayload struct { // Defines an optional path. If this is set, a granular purge is done. If missing, the entire cache is invalidated. During a granular cache purge, only the provided path is purged. Please do not that for example `/some/path` and `/some/path.txt` are considered different paths. - Path *string `json:"path,omitempty"` + Path *string `json:"path,omitempty"` + AdditionalProperties map[string]interface{} } +type _PurgeCachePayload PurgeCachePayload + // NewPurgeCachePayload instantiates a new PurgeCachePayload 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 PurgeCachePayload) ToMap() (map[string]interface{}, error) { if !IsNil(o.Path) { toSerialize["path"] = o.Path } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *PurgeCachePayload) UnmarshalJSON(data []byte) (err error) { + varPurgeCachePayload := _PurgeCachePayload{} + + err = json.Unmarshal(data, &varPurgeCachePayload) + + if err != nil { + return err + } + + *o = PurgeCachePayload(varPurgeCachePayload) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "path") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullablePurgeCachePayload struct { value *PurgeCachePayload isSet bool diff --git a/services/cdn/v1betaapi/model_put_custom_domain_custom_certificate.go b/services/cdn/v1betaapi/model_put_custom_domain_custom_certificate.go index d0a58a7f6..2c8f84fba 100644 --- a/services/cdn/v1betaapi/model_put_custom_domain_custom_certificate.go +++ b/services/cdn/v1betaapi/model_put_custom_domain_custom_certificate.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta.0.0 package v1betaapi import ( - "bytes" "encoding/json" "fmt" ) @@ -24,8 +23,9 @@ type PutCustomDomainCustomCertificate struct { // base64-encoded PEM-encoded certificate Certificate string `json:"certificate"` // base64-encoded PEM encoded key - Key string `json:"key"` - Type string `json:"type"` + Key string `json:"key"` + Type string `json:"type"` + AdditionalProperties map[string]interface{} } type _PutCustomDomainCustomCertificate PutCustomDomainCustomCertificate @@ -135,6 +135,11 @@ func (o PutCustomDomainCustomCertificate) ToMap() (map[string]interface{}, error toSerialize["certificate"] = o.Certificate toSerialize["key"] = o.Key toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -164,9 +169,7 @@ func (o *PutCustomDomainCustomCertificate) UnmarshalJSON(data []byte) (err error varPutCustomDomainCustomCertificate := _PutCustomDomainCustomCertificate{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varPutCustomDomainCustomCertificate) + err = json.Unmarshal(data, &varPutCustomDomainCustomCertificate) if err != nil { return err @@ -174,6 +177,15 @@ func (o *PutCustomDomainCustomCertificate) UnmarshalJSON(data []byte) (err error *o = PutCustomDomainCustomCertificate(varPutCustomDomainCustomCertificate) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "certificate") + delete(additionalProperties, "key") + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1betaapi/model_put_custom_domain_managed_certificate.go b/services/cdn/v1betaapi/model_put_custom_domain_managed_certificate.go index aca11ef42..75ef8018a 100644 --- a/services/cdn/v1betaapi/model_put_custom_domain_managed_certificate.go +++ b/services/cdn/v1betaapi/model_put_custom_domain_managed_certificate.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta.0.0 package v1betaapi import ( - "bytes" "encoding/json" "fmt" ) @@ -21,7 +20,8 @@ var _ MappedNullable = &PutCustomDomainManagedCertificate{} // PutCustomDomainManagedCertificate This is returned when no custom certificate is used. We provision and manage a Let's Encrypt Certificate for you type PutCustomDomainManagedCertificate struct { - Type string `json:"type"` + Type string `json:"type"` + AdditionalProperties map[string]interface{} } type _PutCustomDomainManagedCertificate PutCustomDomainManagedCertificate @@ -79,6 +79,11 @@ func (o PutCustomDomainManagedCertificate) MarshalJSON() ([]byte, error) { func (o PutCustomDomainManagedCertificate) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -106,9 +111,7 @@ func (o *PutCustomDomainManagedCertificate) UnmarshalJSON(data []byte) (err erro varPutCustomDomainManagedCertificate := _PutCustomDomainManagedCertificate{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varPutCustomDomainManagedCertificate) + err = json.Unmarshal(data, &varPutCustomDomainManagedCertificate) if err != nil { return err @@ -116,6 +119,13 @@ func (o *PutCustomDomainManagedCertificate) UnmarshalJSON(data []byte) (err erro *o = PutCustomDomainManagedCertificate(varPutCustomDomainManagedCertificate) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1betaapi/model_put_custom_domain_payload.go b/services/cdn/v1betaapi/model_put_custom_domain_payload.go index d12475994..1514d4fbb 100644 --- a/services/cdn/v1betaapi/model_put_custom_domain_payload.go +++ b/services/cdn/v1betaapi/model_put_custom_domain_payload.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -21,9 +21,12 @@ var _ MappedNullable = &PutCustomDomainPayload{} type PutCustomDomainPayload struct { Certificate *PutCustomDomainPayloadCertificate `json:"certificate,omitempty"` // While optional, it is greatly encouraged to provide an `intentId`. This is used to deduplicate requests. If multiple modifying Requests with the same `intentId` for a given `projectId` are received, all but the first request are dropped. - IntentId *string `json:"intentId,omitempty"` + IntentId *string `json:"intentId,omitempty"` + AdditionalProperties map[string]interface{} } +type _PutCustomDomainPayload PutCustomDomainPayload + // NewPutCustomDomainPayload instantiates a new PutCustomDomainPayload 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 @@ -121,9 +124,36 @@ func (o PutCustomDomainPayload) ToMap() (map[string]interface{}, error) { if !IsNil(o.IntentId) { toSerialize["intentId"] = o.IntentId } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *PutCustomDomainPayload) UnmarshalJSON(data []byte) (err error) { + varPutCustomDomainPayload := _PutCustomDomainPayload{} + + err = json.Unmarshal(data, &varPutCustomDomainPayload) + + if err != nil { + return err + } + + *o = PutCustomDomainPayload(varPutCustomDomainPayload) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "certificate") + delete(additionalProperties, "intentId") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullablePutCustomDomainPayload struct { value *PutCustomDomainPayload isSet bool diff --git a/services/cdn/v1betaapi/model_put_custom_domain_payload_certificate.go b/services/cdn/v1betaapi/model_put_custom_domain_payload_certificate.go index ceff01931..a647a6dc4 100644 --- a/services/cdn/v1betaapi/model_put_custom_domain_payload_certificate.go +++ b/services/cdn/v1betaapi/model_put_custom_domain_payload_certificate.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1betaapi/model_put_custom_domain_response.go b/services/cdn/v1betaapi/model_put_custom_domain_response.go index fef641cda..eb77c8ea9 100644 --- a/services/cdn/v1betaapi/model_put_custom_domain_response.go +++ b/services/cdn/v1betaapi/model_put_custom_domain_response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta.0.0 package v1betaapi import ( - "bytes" "encoding/json" "fmt" ) @@ -24,7 +23,8 @@ type PutCustomDomainResponse struct { Certificate *PutCustomDomainResponseCertificate `json:"certificate,omitempty"` CustomDomain CustomDomain `json:"customDomain"` // Deprecated - Domain string `json:"domain" validate:"regexp=^[.\\\\-A-Za-z0-9]*$"` + Domain string `json:"domain" validate:"regexp=^[.\\\\-A-Za-z0-9]*$"` + AdditionalProperties map[string]interface{} } type _PutCustomDomainResponse PutCustomDomainResponse @@ -146,6 +146,11 @@ func (o PutCustomDomainResponse) ToMap() (map[string]interface{}, error) { } toSerialize["customDomain"] = o.CustomDomain toSerialize["domain"] = o.Domain + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -174,9 +179,7 @@ func (o *PutCustomDomainResponse) UnmarshalJSON(data []byte) (err error) { varPutCustomDomainResponse := _PutCustomDomainResponse{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varPutCustomDomainResponse) + err = json.Unmarshal(data, &varPutCustomDomainResponse) if err != nil { return err @@ -184,6 +187,15 @@ func (o *PutCustomDomainResponse) UnmarshalJSON(data []byte) (err error) { *o = PutCustomDomainResponse(varPutCustomDomainResponse) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "certificate") + delete(additionalProperties, "customDomain") + delete(additionalProperties, "domain") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1betaapi/model_put_custom_domain_response_certificate.go b/services/cdn/v1betaapi/model_put_custom_domain_response_certificate.go index ab3dc5d58..5ee25644d 100644 --- a/services/cdn/v1betaapi/model_put_custom_domain_response_certificate.go +++ b/services/cdn/v1betaapi/model_put_custom_domain_response_certificate.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1betaapi/model_region.go b/services/cdn/v1betaapi/model_region.go index 986d06673..b44f64032 100644 --- a/services/cdn/v1betaapi/model_region.go +++ b/services/cdn/v1betaapi/model_region.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1betaapi/model_status_error.go b/services/cdn/v1betaapi/model_status_error.go index 46e3a86e0..8d9ec2726 100644 --- a/services/cdn/v1betaapi/model_status_error.go +++ b/services/cdn/v1betaapi/model_status_error.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta.0.0 package v1betaapi import ( - "bytes" "encoding/json" "fmt" ) @@ -26,7 +25,8 @@ type StatusError struct { // An english translation string corresponding to the error key. An english translation key is always present. En string `json:"en"` // An enum value that describes a Status Error. - Key string `json:"key"` + Key string `json:"key"` + AdditionalProperties map[string]interface{} } type _StatusError StatusError @@ -145,6 +145,11 @@ func (o StatusError) ToMap() (map[string]interface{}, error) { } toSerialize["en"] = o.En toSerialize["key"] = o.Key + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -173,9 +178,7 @@ func (o *StatusError) UnmarshalJSON(data []byte) (err error) { varStatusError := _StatusError{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varStatusError) + err = json.Unmarshal(data, &varStatusError) if err != nil { return err @@ -183,6 +186,15 @@ func (o *StatusError) UnmarshalJSON(data []byte) (err error) { *o = StatusError(varStatusError) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "de") + delete(additionalProperties, "en") + delete(additionalProperties, "key") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1betaapi/model_waf_config.go b/services/cdn/v1betaapi/model_waf_config.go index 1d8ecbe15..43952c523 100644 --- a/services/cdn/v1betaapi/model_waf_config.go +++ b/services/cdn/v1betaapi/model_waf_config.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta.0.0 package v1betaapi import ( - "bytes" "encoding/json" "fmt" ) @@ -25,10 +24,11 @@ type WafConfig struct { AllowedHttpVersions []string `json:"allowedHttpVersions,omitempty"` AllowedRequestContentTypes []string `json:"allowedRequestContentTypes,omitempty"` // IDs of the WAF rules that are **explicitly** enabled for this distribution. If this rule is in a disabled / log Only RuleGroup or Collection, it will be enabled regardless as `enabledRuleIds` overrides those in specificity. Do note that rules can also be enabled because a Rulegroup or Collection is enabled. **DO NOT** use this property to find all active rules. Instead, pass `?withWafStatus=true` as a query parameter to `GetDistribution` or `ListDistributions`. This will expose the `waf` Property on distribution Level. From there you can `$.waf.enabledRules.map(e => e.id)` to get a list of all enabled rules. - EnabledRuleIds []string `json:"enabledRuleIds"` - Mode WafMode `json:"mode"` - ParanoiaLevel *WafParanoiaLevel `json:"paranoiaLevel,omitempty"` - Type WafType `json:"type"` + EnabledRuleIds []string `json:"enabledRuleIds"` + Mode WafMode `json:"mode"` + ParanoiaLevel *WafParanoiaLevel `json:"paranoiaLevel,omitempty"` + Type WafType `json:"type"` + AdditionalProperties map[string]interface{} } type _WafConfig WafConfig @@ -278,6 +278,11 @@ func (o WafConfig) ToMap() (map[string]interface{}, error) { toSerialize["paranoiaLevel"] = o.ParanoiaLevel } toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -307,9 +312,7 @@ func (o *WafConfig) UnmarshalJSON(data []byte) (err error) { varWafConfig := _WafConfig{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varWafConfig) + err = json.Unmarshal(data, &varWafConfig) if err != nil { return err @@ -317,6 +320,19 @@ func (o *WafConfig) UnmarshalJSON(data []byte) (err error) { *o = WafConfig(varWafConfig) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "allowedHttpMethods") + delete(additionalProperties, "allowedHttpVersions") + delete(additionalProperties, "allowedRequestContentTypes") + delete(additionalProperties, "enabledRuleIds") + delete(additionalProperties, "mode") + delete(additionalProperties, "paranoiaLevel") + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1betaapi/model_waf_config_patch.go b/services/cdn/v1betaapi/model_waf_config_patch.go index 2c749f67f..735cc3bcb 100644 --- a/services/cdn/v1betaapi/model_waf_config_patch.go +++ b/services/cdn/v1betaapi/model_waf_config_patch.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -25,8 +25,11 @@ type WafConfigPatch struct { Mode *WafMode `json:"mode,omitempty"` ParanoiaLevel *WafParanoiaLevel `json:"paranoiaLevel,omitempty"` Type *WafType `json:"type,omitempty"` + AdditionalProperties map[string]interface{} } +type _WafConfigPatch WafConfigPatch + // NewWafConfigPatch instantiates a new WafConfigPatch 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 @@ -264,9 +267,40 @@ func (o WafConfigPatch) ToMap() (map[string]interface{}, error) { if !IsNil(o.Type) { toSerialize["type"] = o.Type } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } +func (o *WafConfigPatch) UnmarshalJSON(data []byte) (err error) { + varWafConfigPatch := _WafConfigPatch{} + + err = json.Unmarshal(data, &varWafConfigPatch) + + if err != nil { + return err + } + + *o = WafConfigPatch(varWafConfigPatch) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "allowedHttpMethods") + delete(additionalProperties, "allowedHttpVersions") + delete(additionalProperties, "allowedRequestContentTypes") + delete(additionalProperties, "mode") + delete(additionalProperties, "paranoiaLevel") + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableWafConfigPatch struct { value *WafConfigPatch isSet bool diff --git a/services/cdn/v1betaapi/model_waf_mode.go b/services/cdn/v1betaapi/model_waf_mode.go index 39bf348d1..e5f810644 100644 --- a/services/cdn/v1betaapi/model_waf_mode.go +++ b/services/cdn/v1betaapi/model_waf_mode.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1betaapi/model_waf_paranoia_level.go b/services/cdn/v1betaapi/model_waf_paranoia_level.go index 9c2908677..966a78ef5 100644 --- a/services/cdn/v1betaapi/model_waf_paranoia_level.go +++ b/services/cdn/v1betaapi/model_waf_paranoia_level.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1betaapi/model_waf_rule.go b/services/cdn/v1betaapi/model_waf_rule.go index 232e37410..7f170c356 100644 --- a/services/cdn/v1betaapi/model_waf_rule.go +++ b/services/cdn/v1betaapi/model_waf_rule.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta.0.0 package v1betaapi import ( - "bytes" "encoding/json" "fmt" ) @@ -24,8 +23,9 @@ type WAFRule struct { // Optional CoreRuleSet rule ID in case this is a CRS rule Code *string `json:"code,omitempty"` // LocalizedString is a map from language to string value - Description map[string]string `json:"description"` - Id string `json:"id"` + Description map[string]string `json:"description"` + Id string `json:"id"` + AdditionalProperties map[string]interface{} } type _WAFRule WAFRule @@ -144,6 +144,11 @@ func (o WAFRule) ToMap() (map[string]interface{}, error) { } toSerialize["description"] = o.Description toSerialize["id"] = o.Id + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -172,9 +177,7 @@ func (o *WAFRule) UnmarshalJSON(data []byte) (err error) { varWAFRule := _WAFRule{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varWAFRule) + err = json.Unmarshal(data, &varWAFRule) if err != nil { return err @@ -182,6 +185,15 @@ func (o *WAFRule) UnmarshalJSON(data []byte) (err error) { *o = WAFRule(varWAFRule) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "code") + delete(additionalProperties, "description") + delete(additionalProperties, "id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1betaapi/model_waf_rule_action.go b/services/cdn/v1betaapi/model_waf_rule_action.go index 9435d93a3..dd6bfdb05 100644 --- a/services/cdn/v1betaapi/model_waf_rule_action.go +++ b/services/cdn/v1betaapi/model_waf_rule_action.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1betaapi/model_waf_rule_collection.go b/services/cdn/v1betaapi/model_waf_rule_collection.go index 00762c2fe..5f9fe52c3 100644 --- a/services/cdn/v1betaapi/model_waf_rule_collection.go +++ b/services/cdn/v1betaapi/model_waf_rule_collection.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta.0.0 package v1betaapi import ( - "bytes" "encoding/json" "fmt" ) @@ -24,7 +23,8 @@ type WAFRuleCollection struct { Groups []WAFRuleGroup `json:"groups"` Id string `json:"id"` // LocalizedString is a map from language to string value - Name map[string]string `json:"name"` + Name map[string]string `json:"name"` + AdditionalProperties map[string]interface{} } type _WAFRuleCollection WAFRuleCollection @@ -134,6 +134,11 @@ func (o WAFRuleCollection) ToMap() (map[string]interface{}, error) { toSerialize["groups"] = o.Groups toSerialize["id"] = o.Id toSerialize["name"] = o.Name + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -163,9 +168,7 @@ func (o *WAFRuleCollection) UnmarshalJSON(data []byte) (err error) { varWAFRuleCollection := _WAFRuleCollection{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varWAFRuleCollection) + err = json.Unmarshal(data, &varWAFRuleCollection) if err != nil { return err @@ -173,6 +176,15 @@ func (o *WAFRuleCollection) UnmarshalJSON(data []byte) (err error) { *o = WAFRuleCollection(varWAFRuleCollection) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "groups") + delete(additionalProperties, "id") + delete(additionalProperties, "name") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1betaapi/model_waf_rule_group.go b/services/cdn/v1betaapi/model_waf_rule_group.go index 52d7f8f0f..85fb211bf 100644 --- a/services/cdn/v1betaapi/model_waf_rule_group.go +++ b/services/cdn/v1betaapi/model_waf_rule_group.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta.0.0 package v1betaapi import ( - "bytes" "encoding/json" "fmt" ) @@ -24,8 +23,9 @@ type WAFRuleGroup struct { // LocalizedString is a map from language to string value Description map[string]string `json:"description"` // LocalizedString is a map from language to string value - Name map[string]string `json:"name"` - Rules []WAFRule `json:"rules"` + Name map[string]string `json:"name"` + Rules []WAFRule `json:"rules"` + AdditionalProperties map[string]interface{} } type _WAFRuleGroup WAFRuleGroup @@ -135,6 +135,11 @@ func (o WAFRuleGroup) ToMap() (map[string]interface{}, error) { toSerialize["description"] = o.Description toSerialize["name"] = o.Name toSerialize["rules"] = o.Rules + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -164,9 +169,7 @@ func (o *WAFRuleGroup) UnmarshalJSON(data []byte) (err error) { varWAFRuleGroup := _WAFRuleGroup{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varWAFRuleGroup) + err = json.Unmarshal(data, &varWAFRuleGroup) if err != nil { return err @@ -174,6 +177,15 @@ func (o *WAFRuleGroup) UnmarshalJSON(data []byte) (err error) { *o = WAFRuleGroup(varWAFRuleGroup) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "description") + delete(additionalProperties, "name") + delete(additionalProperties, "rules") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1betaapi/model_waf_status_rule_block.go b/services/cdn/v1betaapi/model_waf_status_rule_block.go index b13c7f249..a6d27f183 100644 --- a/services/cdn/v1betaapi/model_waf_status_rule_block.go +++ b/services/cdn/v1betaapi/model_waf_status_rule_block.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta.0.0 package v1betaapi import ( - "bytes" "encoding/json" "fmt" ) @@ -22,7 +21,8 @@ var _ MappedNullable = &WAFStatusRuleBlock{} // WAFStatusRuleBlock struct for WAFStatusRuleBlock type WAFStatusRuleBlock struct { // Specifies the ID of the Rule. - Id string `json:"id"` + Id string `json:"id"` + AdditionalProperties map[string]interface{} } type _WAFStatusRuleBlock WAFStatusRuleBlock @@ -80,6 +80,11 @@ func (o WAFStatusRuleBlock) MarshalJSON() ([]byte, error) { func (o WAFStatusRuleBlock) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["id"] = o.Id + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -107,9 +112,7 @@ func (o *WAFStatusRuleBlock) UnmarshalJSON(data []byte) (err error) { varWAFStatusRuleBlock := _WAFStatusRuleBlock{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varWAFStatusRuleBlock) + err = json.Unmarshal(data, &varWAFStatusRuleBlock) if err != nil { return err @@ -117,6 +120,13 @@ func (o *WAFStatusRuleBlock) UnmarshalJSON(data []byte) (err error) { *o = WAFStatusRuleBlock(varWAFStatusRuleBlock) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "id") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1betaapi/model_waf_type.go b/services/cdn/v1betaapi/model_waf_type.go index cc7f57b44..69e1b903f 100644 --- a/services/cdn/v1betaapi/model_waf_type.go +++ b/services/cdn/v1betaapi/model_waf_type.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1betaapi/model_waf_violation.go b/services/cdn/v1betaapi/model_waf_violation.go index f1852cc50..9c0e42aeb 100644 --- a/services/cdn/v1betaapi/model_waf_violation.go +++ b/services/cdn/v1betaapi/model_waf_violation.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. @@ -11,7 +11,6 @@ API version: 1beta.0.0 package v1betaapi import ( - "bytes" "encoding/json" "fmt" ) @@ -30,7 +29,8 @@ type WAFViolation struct { Method string `json:"method"` RequestHeaders map[string]string `json:"requestHeaders"` // ID of the WAF rule that was triggered - RuleId string `json:"ruleId"` + RuleId string `json:"ruleId"` + AdditionalProperties map[string]interface{} } type _WAFViolation WAFViolation @@ -218,6 +218,11 @@ func (o WAFViolation) ToMap() (map[string]interface{}, error) { toSerialize["method"] = o.Method toSerialize["requestHeaders"] = o.RequestHeaders toSerialize["ruleId"] = o.RuleId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -250,9 +255,7 @@ func (o *WAFViolation) UnmarshalJSON(data []byte) (err error) { varWAFViolation := _WAFViolation{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varWAFViolation) + err = json.Unmarshal(data, &varWAFViolation) if err != nil { return err @@ -260,6 +263,18 @@ func (o *WAFViolation) UnmarshalJSON(data []byte) (err error) { *o = WAFViolation(varWAFViolation) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "action") + delete(additionalProperties, "asn") + delete(additionalProperties, "message") + delete(additionalProperties, "method") + delete(additionalProperties, "requestHeaders") + delete(additionalProperties, "ruleId") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/services/cdn/v1betaapi/response.go b/services/cdn/v1betaapi/response.go index 4ca9f57a8..10fa31dfb 100644 --- a/services/cdn/v1betaapi/response.go +++ b/services/cdn/v1betaapi/response.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions. diff --git a/services/cdn/v1betaapi/utils.go b/services/cdn/v1betaapi/utils.go index ab551eb36..9d34cb8b0 100644 --- a/services/cdn/v1betaapi/utils.go +++ b/services/cdn/v1betaapi/utils.go @@ -1,5 +1,5 @@ /* -CDN API +STACKIT CDN API API used to create and manage your CDN distributions.