From e2c613e8b482686295bbf28d03337e4f11ce4289 Mon Sep 17 00:00:00 2001 From: Thomas Munzer Date: Sat, 10 Aug 2024 11:58:53 +0200 Subject: [PATCH] openapi spec updates (2408.1.x) --- go.mod | 2 +- go.sum | 4 ++-- .../datasource_device_ap_stats/sdk_to_terraform.go | 6 +++--- .../sdk_to_terraform_auto_placement.go | 6 +++--- .../sdk_to_terraform_auto_upgrade_stats.go | 2 +- .../sdk_to_terraform_ble_stats.go | 2 +- .../sdk_to_terraform_env_stats.go | 2 +- .../sdk_to_terraform_esl_stats.go | 2 +- .../sdk_to_terraform_iot_stats.go | 2 +- .../sdk_to_terraform_l2tp_stats.go | 4 ++-- .../sdk_to_terraform_lldp.go | 2 +- .../sdk_to_terraform_port_stat.go | 2 +- .../sdk_to_terraform_radio_stat.go | 4 ++-- .../sdk_to_terraform_switch_redundancy.go | 2 +- .../sdk_to_terraform_usb_stat.go | 2 +- .../sdk_to_terraform.go | 6 +++--- .../sdk_to_terraform_cluster_config.go | 10 +++++----- .../sdk_to_terraform_cluster_stats.go | 2 +- .../sdk_to_terraform_service_status.go | 2 +- .../sdk_to_terraform_spu_stats.go | 2 +- .../datasource_device_switch_stats/sdk_to_terraform.go | 6 +++--- .../sdk_to_terraform_ap_redundancy.go | 4 ++-- .../sdk_to_terraform_clients.go | 2 +- .../sdk_to_terraform_clients_stats.go | 4 ++-- .../sdk_to_terraform_vc_setup_info.go | 2 +- .../sdk_to_terraform.go | 2 +- .../sdk_to_terraform.go | 2 +- .../terraform_to_sdk_ip_networks.go | 2 +- .../sdk_to_terraform_switch_mgmt.go | 4 ++-- .../sdk_to_terraform_switch_snmp_config.go | 2 +- .../resource_device_switch/terraform_to_sdk_network.go | 2 +- .../terraform_to_sdk_port_usage.go | 2 +- .../terraform_to_sdk_switch_mgmt.go | 2 +- .../terraform_to_sdk_switch_snmp_config.go | 6 +++--- .../resource_org_deviceprofile_ap/terraform_to_sdk.go | 2 +- .../terraform_to_sdk.go | 2 +- .../terraform_to_sdk_ip_networks.go | 2 +- .../terraform_to_sdk_ip_networks.go | 2 +- internal/resource_org_network/terraform_to_sdk.go | 2 +- .../sdk_to_terraform_switch_mgmt.go | 4 ++-- .../sdk_to_terraform_switch_snmp_config.go | 2 +- .../terraform_to_sdk_network.go | 2 +- .../terraform_to_sdk_port_usage.go | 2 +- .../terraform_to_sdk_switch_mgmt.go | 2 +- .../terraform_to_sdk_switch_snmp_config.go | 6 +++--- .../sdk_to_terraform_cradlepoint.go | 2 +- .../terraform_to_sdk_cradlepoint.go | 4 ++-- .../resource_org_setting/terraform_to_sdk_synthetic.go | 4 ++-- .../resource_org_wlan/sdk_to_terraform_vlan_ids.go | 2 +- internal/resource_org_wlan/terraform_to_sdk.go | 6 +++--- internal/resource_org_wlan/terraform_to_sdk_bonjour.go | 4 ++-- .../resource_org_wlan/terraform_to_sdk_dynamic_psk.go | 6 +++--- .../resource_org_wlan/terraform_to_sdk_dynamic_vlan.go | 8 ++++---- .../sdk_to_terraform_switch_mgmt.go | 4 ++-- .../sdk_to_terraform_switch_snmp_config.go | 2 +- .../terraform_to_sdk_network.go | 2 +- .../terraform_to_sdk_port_usage.go | 2 +- .../terraform_to_sdk_switch_mgmt.go | 2 +- .../terraform_to_sdk_switch_snmp_config.go | 6 +++--- .../terraform_to_sdk_ctritical_url_monitoring.go | 2 +- .../terraform_to_sdk_synthetic_tests.go | 4 ++-- internal/resource_site_wlan/terraform_to_sdk.go | 6 +++--- .../resource_site_wlan/terraform_to_sdk_bonjour.go | 4 ++-- .../resource_site_wlan/terraform_to_sdk_dynamic_psk.go | 6 +++--- .../terraform_to_sdk_dynamic_vlan.go | 8 ++++---- 65 files changed, 110 insertions(+), 110 deletions(-) diff --git a/go.mod b/go.mod index ecb85a0b..0a184f7e 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/hashicorp/terraform-plugin-framework-validators v0.13.0 github.com/hashicorp/terraform-plugin-go v0.23.0 github.com/hashicorp/terraform-plugin-log v0.9.0 - github.com/tmunzer/mistapi-go v0.2.37 + github.com/tmunzer/mistapi-go v0.3.1 golang.org/x/net v0.27.0 ) diff --git a/go.sum b/go.sum index c20aa3b0..214b6bcb 100644 --- a/go.sum +++ b/go.sum @@ -168,8 +168,8 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/tmunzer/mistapi-go v0.2.37 h1:GNpBeR+Ikwjmz8XL15+CUF4OiO4epAa/yrFipOhRsrs= -github.com/tmunzer/mistapi-go v0.2.37/go.mod h1:L85t86nrbWnZ+7uv4EpEbra9psqHQIE+ugBqHGNCmGA= +github.com/tmunzer/mistapi-go v0.3.1 h1:FC4xo69xkRhVb9QL4Q/vyCoMA6cpFF26mMIY4rYQBqI= +github.com/tmunzer/mistapi-go v0.3.1/go.mod h1:L85t86nrbWnZ+7uv4EpEbra9psqHQIE+ugBqHGNCmGA= github.com/vmihailenco/msgpack/v5 v5.4.1 h1:cQriyiUvjTwOHg8QZaPihLWeRAAVoCpE00IUPn0Bjt8= github.com/vmihailenco/msgpack/v5 v5.4.1/go.mod h1:GaZTsDaehaPpQVyxrf5mtQlH+pc21PIudVV/E3rRQok= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= diff --git a/internal/datasource_device_ap_stats/sdk_to_terraform.go b/internal/datasource_device_ap_stats/sdk_to_terraform.go index db7cf6c4..2a4476a5 100644 --- a/internal/datasource_device_ap_stats/sdk_to_terraform.go +++ b/internal/datasource_device_ap_stats/sdk_to_terraform.go @@ -15,7 +15,7 @@ import ( "github.com/tmunzer/mistapi-go/mistapi/models" ) -func SdkToTerraform(ctx context.Context, l []models.ListOrgDevicesStatsResponse) (basetypes.SetValue, diag.Diagnostics) { +func SdkToTerraform(ctx context.Context, l []models.StatsDevice) (basetypes.SetValue, diag.Diagnostics) { var diags diag.Diagnostics var elements []attr.Value @@ -24,7 +24,7 @@ func SdkToTerraform(ctx context.Context, l []models.ListOrgDevicesStatsResponse) if e != nil { diags.AddError("Unable to Marshal AP Stats", e.Error()) } else { - ap := models.ApStats{} + ap := models.StatsAp{} e := json.Unmarshal(ap_js, &ap) if e != nil { diags.AddError("Unable to unMarshal AP Stats", e.Error()) @@ -42,7 +42,7 @@ func SdkToTerraform(ctx context.Context, l []models.ListOrgDevicesStatsResponse) return dataSet, diags } -func deviceApStatSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.ApStats) DeviceApStatsValue { +func deviceApStatSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.StatsAp) DeviceApStatsValue { var auto_placement basetypes.ObjectValue = types.ObjectNull(AutoPlacementValue{}.AttributeTypes(ctx)) var auto_upgrade_stat basetypes.ObjectValue = types.ObjectNull(AutoUpgradeStatValue{}.AttributeTypes(ctx)) diff --git a/internal/datasource_device_ap_stats/sdk_to_terraform_auto_placement.go b/internal/datasource_device_ap_stats/sdk_to_terraform_auto_placement.go index c85813b9..2ea81bd7 100644 --- a/internal/datasource_device_ap_stats/sdk_to_terraform_auto_placement.go +++ b/internal/datasource_device_ap_stats/sdk_to_terraform_auto_placement.go @@ -12,7 +12,7 @@ import ( "github.com/tmunzer/mistapi-go/mistapi/models" ) -func autoPlacementInfoProbaSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.ApStatsAutoPlacementInfoProbabilitySurface) basetypes.ObjectValue { +func autoPlacementInfoProbaSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.StatsApAutoPlacementInfoProbabilitySurface) basetypes.ObjectValue { var radius basetypes.NumberValue var radius_m basetypes.NumberValue var x basetypes.Float64Value @@ -39,7 +39,7 @@ func autoPlacementInfoProbaSdkToTerraform(ctx context.Context, diags *diag.Diagn return data } -func autoPlacementInfoSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.ApStatsAutoPlacementInfo) basetypes.ObjectValue { +func autoPlacementInfoSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.StatsApAutoPlacementInfo) basetypes.ObjectValue { var cluster_number basetypes.Int64Value var orientation_stats basetypes.Int64Value var probability_surface basetypes.ObjectValue = types.ObjectNull(ProbabilitySurfaceValue{}.AttributeTypes(ctx)) @@ -66,7 +66,7 @@ func autoPlacementInfoSdkToTerraform(ctx context.Context, diags *diag.Diagnostic return data } -func autoPlacementSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.ApStatsAutoPlacement) basetypes.ObjectValue { +func autoPlacementSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.StatsApAutoPlacement) basetypes.ObjectValue { var info basetypes.ObjectValue = types.ObjectNull(InfoValue{}.AttributeTypes(ctx)) var recommended_anchor basetypes.BoolValue var status basetypes.StringValue diff --git a/internal/datasource_device_ap_stats/sdk_to_terraform_auto_upgrade_stats.go b/internal/datasource_device_ap_stats/sdk_to_terraform_auto_upgrade_stats.go index 6b711cf4..1707a707 100644 --- a/internal/datasource_device_ap_stats/sdk_to_terraform_auto_upgrade_stats.go +++ b/internal/datasource_device_ap_stats/sdk_to_terraform_auto_upgrade_stats.go @@ -11,7 +11,7 @@ import ( "github.com/tmunzer/mistapi-go/mistapi/models" ) -func autoUpgradeStatsSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.ApStatsAutoUpgrade) basetypes.ObjectValue { +func autoUpgradeStatsSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.StatsApAutoUpgrade) basetypes.ObjectValue { var lastcheck basetypes.Int64Value if d.Lastcheck.Value() != nil { diff --git a/internal/datasource_device_ap_stats/sdk_to_terraform_ble_stats.go b/internal/datasource_device_ap_stats/sdk_to_terraform_ble_stats.go index 2a0068d1..5d76717f 100644 --- a/internal/datasource_device_ap_stats/sdk_to_terraform_ble_stats.go +++ b/internal/datasource_device_ap_stats/sdk_to_terraform_ble_stats.go @@ -13,7 +13,7 @@ import ( "github.com/tmunzer/mistapi-go/mistapi/models" ) -func bleStatsSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.ApStatsBle) basetypes.ObjectValue { +func bleStatsSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.StatsApBle) basetypes.ObjectValue { var beacon_enabled basetypes.BoolValue var beacon_rate basetypes.Int64Value var eddystone_uid_enabled basetypes.BoolValue diff --git a/internal/datasource_device_ap_stats/sdk_to_terraform_env_stats.go b/internal/datasource_device_ap_stats/sdk_to_terraform_env_stats.go index 9ea69431..4034456a 100644 --- a/internal/datasource_device_ap_stats/sdk_to_terraform_env_stats.go +++ b/internal/datasource_device_ap_stats/sdk_to_terraform_env_stats.go @@ -11,7 +11,7 @@ import ( "github.com/tmunzer/mistapi-go/mistapi/models" ) -func envStatsSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.ApStatsEnvStat) basetypes.ObjectValue { +func envStatsSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.StatsApEnvStat) basetypes.ObjectValue { var accel_x basetypes.Float64Value var accel_y basetypes.Float64Value var accel_z basetypes.Float64Value diff --git a/internal/datasource_device_ap_stats/sdk_to_terraform_esl_stats.go b/internal/datasource_device_ap_stats/sdk_to_terraform_esl_stats.go index 7b9ac0c7..d68da3da 100644 --- a/internal/datasource_device_ap_stats/sdk_to_terraform_esl_stats.go +++ b/internal/datasource_device_ap_stats/sdk_to_terraform_esl_stats.go @@ -11,7 +11,7 @@ import ( "github.com/tmunzer/mistapi-go/mistapi/models" ) -func eslStatsSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.ApStatsEslStat) basetypes.ObjectValue { +func eslStatsSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.StatsApEslStat) basetypes.ObjectValue { var channel basetypes.Int64Value var connected basetypes.BoolValue var type_esl basetypes.StringValue diff --git a/internal/datasource_device_ap_stats/sdk_to_terraform_iot_stats.go b/internal/datasource_device_ap_stats/sdk_to_terraform_iot_stats.go index 96083b89..5ce13e95 100644 --- a/internal/datasource_device_ap_stats/sdk_to_terraform_iot_stats.go +++ b/internal/datasource_device_ap_stats/sdk_to_terraform_iot_stats.go @@ -11,7 +11,7 @@ import ( "github.com/tmunzer/mistapi-go/mistapi/models" ) -func iotStatsSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, m map[string]models.ApStatsIotStatAdditionalProperties) basetypes.MapValue { +func iotStatsSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, m map[string]models.StatsApIotStatAdditionalProperties) basetypes.MapValue { map_attr_values := make(map[string]attr.Value) for k, d := range m { var value basetypes.Int64Value diff --git a/internal/datasource_device_ap_stats/sdk_to_terraform_l2tp_stats.go b/internal/datasource_device_ap_stats/sdk_to_terraform_l2tp_stats.go index 11bcdc7e..859f1f80 100644 --- a/internal/datasource_device_ap_stats/sdk_to_terraform_l2tp_stats.go +++ b/internal/datasource_device_ap_stats/sdk_to_terraform_l2tp_stats.go @@ -11,7 +11,7 @@ import ( "github.com/tmunzer/mistapi-go/mistapi/models" ) -func l2tpStatsSessionSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, l []models.ApStatsL2TpStatSession) basetypes.ListValue { +func l2tpStatsSessionSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, l []models.StatsApL2tpStatSession) basetypes.ListValue { var data_list = []SessionsValue{} for _, d := range l { var local_sid basetypes.Int64Value @@ -48,7 +48,7 @@ func l2tpStatsSessionSdkToTerraform(ctx context.Context, diags *diag.Diagnostics return r } -func l2tpStatsSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, m map[string]models.ApStatsL2TpStat) basetypes.MapValue { +func l2tpStatsSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, m map[string]models.StatsApL2tpStat) basetypes.MapValue { map_attr_values := make(map[string]attr.Value) for k, d := range m { var sessions basetypes.ListValue = types.ListUnknown(SessionsValue{}.Type(ctx)) diff --git a/internal/datasource_device_ap_stats/sdk_to_terraform_lldp.go b/internal/datasource_device_ap_stats/sdk_to_terraform_lldp.go index a3402226..96fcdec4 100644 --- a/internal/datasource_device_ap_stats/sdk_to_terraform_lldp.go +++ b/internal/datasource_device_ap_stats/sdk_to_terraform_lldp.go @@ -14,7 +14,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/types/basetypes" ) -func lldpSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.ApStatsLldpStat) basetypes.ObjectValue { +func lldpSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.StatsApLldpStat) basetypes.ObjectValue { var chassis_id basetypes.StringValue var lldp_med_supported basetypes.BoolValue diff --git a/internal/datasource_device_ap_stats/sdk_to_terraform_port_stat.go b/internal/datasource_device_ap_stats/sdk_to_terraform_port_stat.go index ae88dd90..06028d0f 100644 --- a/internal/datasource_device_ap_stats/sdk_to_terraform_port_stat.go +++ b/internal/datasource_device_ap_stats/sdk_to_terraform_port_stat.go @@ -12,7 +12,7 @@ import ( "github.com/tmunzer/mistapi-go/mistapi/models" ) -func portStatdkToTerraform(ctx context.Context, diags *diag.Diagnostics, m map[string]models.ApStatsPortStat) basetypes.MapValue { +func portStatdkToTerraform(ctx context.Context, diags *diag.Diagnostics, m map[string]models.StatsApPortStat) basetypes.MapValue { map_attr_values := make(map[string]attr.Value) for k, d := range m { var full_duplex basetypes.BoolValue diff --git a/internal/datasource_device_ap_stats/sdk_to_terraform_radio_stat.go b/internal/datasource_device_ap_stats/sdk_to_terraform_radio_stat.go index 96dc815c..8acd2322 100644 --- a/internal/datasource_device_ap_stats/sdk_to_terraform_radio_stat.go +++ b/internal/datasource_device_ap_stats/sdk_to_terraform_radio_stat.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/types/basetypes" ) -func radioStatBandSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.ApRadioStats) basetypes.ObjectValue { +func radioStatBandSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.ApRadioStat) basetypes.ObjectValue { var bandwidth basetypes.Int64Value var channel basetypes.Int64Value @@ -119,7 +119,7 @@ func radioStatBandSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d return data } -func radioStatSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.ApStatsRadioStat) basetypes.ObjectValue { +func radioStatSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.StatsApRadioStat) basetypes.ObjectValue { var band_24 basetypes.ObjectValue = types.ObjectNull(BandValue{}.AttributeTypes(ctx)) var band_5 basetypes.ObjectValue = types.ObjectNull(BandValue{}.AttributeTypes(ctx)) diff --git a/internal/datasource_device_ap_stats/sdk_to_terraform_switch_redundancy.go b/internal/datasource_device_ap_stats/sdk_to_terraform_switch_redundancy.go index 970f9a82..61249296 100644 --- a/internal/datasource_device_ap_stats/sdk_to_terraform_switch_redundancy.go +++ b/internal/datasource_device_ap_stats/sdk_to_terraform_switch_redundancy.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/types/basetypes" ) -func SwitchRedundancySdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.ApStatsSwitchRedundancy) basetypes.ObjectValue { +func SwitchRedundancySdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.StatsApSwitchRedundancy) basetypes.ObjectValue { var num_redundant_aps basetypes.Int64Value diff --git a/internal/datasource_device_ap_stats/sdk_to_terraform_usb_stat.go b/internal/datasource_device_ap_stats/sdk_to_terraform_usb_stat.go index ef0b9dc6..56a06c5a 100644 --- a/internal/datasource_device_ap_stats/sdk_to_terraform_usb_stat.go +++ b/internal/datasource_device_ap_stats/sdk_to_terraform_usb_stat.go @@ -11,7 +11,7 @@ import ( "github.com/tmunzer/mistapi-go/mistapi/models" ) -func usbStatsSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.ApStatsUsbStat) basetypes.ObjectValue { +func usbStatsSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.StatsApUsbStat) basetypes.ObjectValue { var channel basetypes.Int64Value var connected basetypes.BoolValue var last_activity basetypes.Int64Value diff --git a/internal/datasource_device_gateway_stats/sdk_to_terraform.go b/internal/datasource_device_gateway_stats/sdk_to_terraform.go index 38c08e32..228277df 100644 --- a/internal/datasource_device_gateway_stats/sdk_to_terraform.go +++ b/internal/datasource_device_gateway_stats/sdk_to_terraform.go @@ -13,7 +13,7 @@ import ( "github.com/tmunzer/mistapi-go/mistapi/models" ) -func SdkToTerraform(ctx context.Context, l []models.ListOrgDevicesStatsResponse) (basetypes.SetValue, diag.Diagnostics) { +func SdkToTerraform(ctx context.Context, l []models.StatsDevice) (basetypes.SetValue, diag.Diagnostics) { var diags diag.Diagnostics var elements []attr.Value @@ -22,7 +22,7 @@ func SdkToTerraform(ctx context.Context, l []models.ListOrgDevicesStatsResponse) if e != nil { diags.AddError("Unable to unMarshal Gateway Stats", e.Error()) } else { - gw := models.GatewayStats{} + gw := models.StatsGateway{} e := json.Unmarshal(gw_js, &gw) if e != nil { diags.AddError("Unable to unMarshal Switch Stats", e.Error()) @@ -40,7 +40,7 @@ func SdkToTerraform(ctx context.Context, l []models.ListOrgDevicesStatsResponse) return dataSet, diags } -func deviceGatewayStatSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.GatewayStats) DeviceGatewayStatsValue { +func deviceGatewayStatSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.StatsGateway) DeviceGatewayStatsValue { var ap_redundancy basetypes.ObjectValue = types.ObjectNull(ApRedundancyValue{}.AttributeTypes(ctx)) var arp_table_stats basetypes.ObjectValue = types.ObjectNull(ArpTableStatsValue{}.AttributeTypes(ctx)) diff --git a/internal/datasource_device_gateway_stats/sdk_to_terraform_cluster_config.go b/internal/datasource_device_gateway_stats/sdk_to_terraform_cluster_config.go index 76258dce..ea8a98ef 100644 --- a/internal/datasource_device_gateway_stats/sdk_to_terraform_cluster_config.go +++ b/internal/datasource_device_gateway_stats/sdk_to_terraform_cluster_config.go @@ -13,7 +13,7 @@ import ( "github.com/tmunzer/mistapi-go/mistapi/models" ) -func clusterConfigControlLinkInfoSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.ClusterConfigStatsControlLinkInfo) basetypes.ObjectValue { +func clusterConfigControlLinkInfoSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.StatsClusterConfigControlLinkInfo) basetypes.ObjectValue { var name basetypes.StringValue var status basetypes.StringValue @@ -36,7 +36,7 @@ func clusterConfigControlLinkInfoSdkToTerraform(ctx context.Context, diags *diag return data } -func clusterConfigStatsEthernetConnectionSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, l []models.ClusterConfigStatsEthernetConnectionItem) basetypes.ListValue { +func clusterConfigStatsEthernetConnectionSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, l []models.StatsClusterConfigEthernetConnectionItem) basetypes.ListValue { var data_list = []EthernetConnectionValue{} for _, d := range l { @@ -64,7 +64,7 @@ func clusterConfigStatsEthernetConnectionSdkToTerraform(ctx context.Context, dia return r } -func clusterConfigFabricLinkInfoSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.ClusterConfigStatsFabricLinkInfo) basetypes.ObjectValue { +func clusterConfigFabricLinkInfoSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.StatsClusterConfigFabricLinkInfo) basetypes.ObjectValue { var data_plane_notified_status basetypes.StringValue var interface_link basetypes.ListValue = types.ListNull(types.StringType) var internal_status basetypes.StringValue @@ -101,7 +101,7 @@ func clusterConfigFabricLinkInfoSdkToTerraform(ctx context.Context, diags *diag. return data } -func clusterConfigStatsRedundancySdkToTerraform(ctx context.Context, diags *diag.Diagnostics, l []models.ClusterConfigStatsRedundancyGroupInfoItem) basetypes.ListValue { +func clusterConfigStatsRedundancySdkToTerraform(ctx context.Context, diags *diag.Diagnostics, l []models.StatsClusterConfigRedundancyGroupInfoItem) basetypes.ListValue { var data_list = []RedundancyGroupInformationValue{} for _, d := range l { @@ -134,7 +134,7 @@ func clusterConfigStatsRedundancySdkToTerraform(ctx context.Context, diags *diag return r } -func clusterConfigSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.ClusterConfigStats) basetypes.ObjectValue { +func clusterConfigSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.StatsClusterConfig) basetypes.ObjectValue { var configuration basetypes.StringValue var control_link_info basetypes.ObjectValue = types.ObjectNull(ControlLinkInfoValue{}.AttributeTypes(ctx)) var ethernet_connection basetypes.ListValue = types.ListNull(EthernetConnectionValue{}.Type(ctx)) diff --git a/internal/datasource_device_gateway_stats/sdk_to_terraform_cluster_stats.go b/internal/datasource_device_gateway_stats/sdk_to_terraform_cluster_stats.go index d79b8ffd..d811b40d 100644 --- a/internal/datasource_device_gateway_stats/sdk_to_terraform_cluster_stats.go +++ b/internal/datasource_device_gateway_stats/sdk_to_terraform_cluster_stats.go @@ -11,7 +11,7 @@ import ( "github.com/tmunzer/mistapi-go/mistapi/models" ) -func clusterStatsSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.GatewayStatsCluster) basetypes.ObjectValue { +func clusterStatsSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.StatsGatewayCluster) basetypes.ObjectValue { var state basetypes.StringValue if d.State.Value() != nil { diff --git a/internal/datasource_device_gateway_stats/sdk_to_terraform_service_status.go b/internal/datasource_device_gateway_stats/sdk_to_terraform_service_status.go index eeab0239..2d4d3861 100644 --- a/internal/datasource_device_gateway_stats/sdk_to_terraform_service_status.go +++ b/internal/datasource_device_gateway_stats/sdk_to_terraform_service_status.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/types/basetypes" ) -func serviceStatusSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.GatewayStatsServiceStatus) basetypes.ObjectValue { +func serviceStatusSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.StatsGatewayServiceStatus) basetypes.ObjectValue { var appid_install_result basetypes.StringValue var appid_install_timestamp basetypes.StringValue diff --git a/internal/datasource_device_gateway_stats/sdk_to_terraform_spu_stats.go b/internal/datasource_device_gateway_stats/sdk_to_terraform_spu_stats.go index a596463b..32684930 100644 --- a/internal/datasource_device_gateway_stats/sdk_to_terraform_spu_stats.go +++ b/internal/datasource_device_gateway_stats/sdk_to_terraform_spu_stats.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/types/basetypes" ) -func spuStatsSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, l []models.GatewayStatsSpuItem) basetypes.ListValue { +func spuStatsSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, l []models.StatsGatewaySpuItem) basetypes.ListValue { var data_list = []SpuStatValue{} for _, d := range l { diff --git a/internal/datasource_device_switch_stats/sdk_to_terraform.go b/internal/datasource_device_switch_stats/sdk_to_terraform.go index 122b8712..058618bc 100644 --- a/internal/datasource_device_switch_stats/sdk_to_terraform.go +++ b/internal/datasource_device_switch_stats/sdk_to_terraform.go @@ -13,7 +13,7 @@ import ( "github.com/tmunzer/mistapi-go/mistapi/models" ) -func SdkToTerraform(ctx context.Context, l []models.ListOrgDevicesStatsResponse) (basetypes.SetValue, diag.Diagnostics) { +func SdkToTerraform(ctx context.Context, l []models.StatsDevice) (basetypes.SetValue, diag.Diagnostics) { var diags diag.Diagnostics var elements []attr.Value @@ -22,7 +22,7 @@ func SdkToTerraform(ctx context.Context, l []models.ListOrgDevicesStatsResponse) if e != nil { diags.AddError("Unable to Marshal Switch Stats", e.Error()) } else { - sw := models.SwitchStats{} + sw := models.StatsSwitch{} e := json.Unmarshal(sw_js, &sw) if e != nil { diags.AddError("Unable to unMarshal Switch Stats", e.Error()) @@ -40,7 +40,7 @@ func SdkToTerraform(ctx context.Context, l []models.ListOrgDevicesStatsResponse) return dataSet, diags } -func deviceSwitchStatSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.SwitchStats) DeviceSwitchStatsValue { +func deviceSwitchStatSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.StatsSwitch) DeviceSwitchStatsValue { var ap_redundancy basetypes.ObjectValue = types.ObjectNull(ApRedundancyValue{}.AttributeTypes(ctx)) var arp_table_stats basetypes.ObjectValue = types.ObjectNull(ArpTableStatsValue{}.AttributeTypes(ctx)) diff --git a/internal/datasource_device_switch_stats/sdk_to_terraform_ap_redundancy.go b/internal/datasource_device_switch_stats/sdk_to_terraform_ap_redundancy.go index ad8d6bd5..249317e8 100644 --- a/internal/datasource_device_switch_stats/sdk_to_terraform_ap_redundancy.go +++ b/internal/datasource_device_switch_stats/sdk_to_terraform_ap_redundancy.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/types/basetypes" ) -func apRedundancyModuleSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, m map[string]models.SwitchStatsApRedundancyModule) basetypes.MapValue { +func apRedundancyModuleSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, m map[string]models.StatsSwitchApRedundancyModule) basetypes.MapValue { map_attr_values := make(map[string]attr.Value) for k, d := range m { @@ -39,7 +39,7 @@ func apRedundancyModuleSdkToTerraform(ctx context.Context, diags *diag.Diagnosti return state_result } -func apRedundancySdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.SwitchStatsApRedundancy) basetypes.ObjectValue { +func apRedundancySdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.StatsSwitchApRedundancy) basetypes.ObjectValue { var modules basetypes.MapValue = types.MapNull(ModulesValue{}.Type(ctx)) var num_aps basetypes.Int64Value diff --git a/internal/datasource_device_switch_stats/sdk_to_terraform_clients.go b/internal/datasource_device_switch_stats/sdk_to_terraform_clients.go index a91091c0..7129caea 100644 --- a/internal/datasource_device_switch_stats/sdk_to_terraform_clients.go +++ b/internal/datasource_device_switch_stats/sdk_to_terraform_clients.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/types/basetypes" ) -func clientsSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, l []models.SwitchStatsClientItem) basetypes.ListValue { +func clientsSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, l []models.StatsSwitchClientItem) basetypes.ListValue { var data_list = []ClientsValue{} diff --git a/internal/datasource_device_switch_stats/sdk_to_terraform_clients_stats.go b/internal/datasource_device_switch_stats/sdk_to_terraform_clients_stats.go index 82ece018..d3c0e24d 100644 --- a/internal/datasource_device_switch_stats/sdk_to_terraform_clients_stats.go +++ b/internal/datasource_device_switch_stats/sdk_to_terraform_clients_stats.go @@ -13,7 +13,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/types/basetypes" ) -func clientsStatsTotalSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.SwitchStatsClientsStatsTotal) basetypes.ObjectValue { +func clientsStatsTotalSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.StatsSwitchClientsStatsTotal) basetypes.ObjectValue { var num_aps basetypes.ListValue = types.ListNull(types.Int64Type) var num_wired_clients basetypes.Int64Value @@ -36,7 +36,7 @@ func clientsStatsTotalSdkToTerraform(ctx context.Context, diags *diag.Diagnostic return data } -func clientsStatsSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.SwitchStatsClientsStats) basetypes.ObjectValue { +func clientsStatsSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.StatsSwitchClientsStats) basetypes.ObjectValue { var total basetypes.ObjectValue = types.ObjectNull(TotalValue{}.AttributeTypes(ctx)) diff --git a/internal/datasource_device_switch_stats/sdk_to_terraform_vc_setup_info.go b/internal/datasource_device_switch_stats/sdk_to_terraform_vc_setup_info.go index ab1db5f5..8eb6b152 100644 --- a/internal/datasource_device_switch_stats/sdk_to_terraform_vc_setup_info.go +++ b/internal/datasource_device_switch_stats/sdk_to_terraform_vc_setup_info.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/types/basetypes" ) -func vcSetupInfoSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.SwitchStatsVcSetupInfo) basetypes.ObjectValue { +func vcSetupInfoSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.StatsSwitchVcSetupInfo) basetypes.ObjectValue { var config_type basetypes.StringValue var err_missing_dev_id_fpc basetypes.BoolValue diff --git a/internal/datasource_org_deviceprofiles_ap/sdk_to_terraform.go b/internal/datasource_org_deviceprofiles_ap/sdk_to_terraform.go index 45aa3b5f..1e018a44 100644 --- a/internal/datasource_org_deviceprofiles_ap/sdk_to_terraform.go +++ b/internal/datasource_org_deviceprofiles_ap/sdk_to_terraform.go @@ -13,7 +13,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/types/basetypes" ) -func SdkToTerraform(ctx context.Context, l []models.ListOrgDeviceProfilesResponse) (basetypes.SetValue, diag.Diagnostics) { +func SdkToTerraform(ctx context.Context, l []models.Deviceprofile) (basetypes.SetValue, diag.Diagnostics) { var diags diag.Diagnostics var elements []attr.Value diff --git a/internal/datasource_org_deviceprofiles_gateway/sdk_to_terraform.go b/internal/datasource_org_deviceprofiles_gateway/sdk_to_terraform.go index 31ed076f..cbfa9f2a 100644 --- a/internal/datasource_org_deviceprofiles_gateway/sdk_to_terraform.go +++ b/internal/datasource_org_deviceprofiles_gateway/sdk_to_terraform.go @@ -13,7 +13,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/types/basetypes" ) -func SdkToTerraform(ctx context.Context, l []models.ListOrgDeviceProfilesResponse) (basetypes.SetValue, diag.Diagnostics) { +func SdkToTerraform(ctx context.Context, l []models.Deviceprofile) (basetypes.SetValue, diag.Diagnostics) { var diags diag.Diagnostics var elements []attr.Value diff --git a/internal/resource_device_gateway/terraform_to_sdk_ip_networks.go b/internal/resource_device_gateway/terraform_to_sdk_ip_networks.go index 355e93a4..8b502437 100644 --- a/internal/resource_device_gateway/terraform_to_sdk_ip_networks.go +++ b/internal/resource_device_gateway/terraform_to_sdk_ip_networks.go @@ -62,7 +62,7 @@ func networksTerraformToSdk(ctx context.Context, diags *diag.Diagnostics, d base } if plan.VlanId.ValueStringPointer() != nil { - data.VlanId = models.ToPointer(models.NetworkVlanIdContainer.FromString(plan.VlanId.ValueString())) + data.VlanId = models.ToPointer(models.VlanIdWithVariableContainer.FromString(plan.VlanId.ValueString())) } if !plan.VpnAccess.IsNull() && !plan.VpnAccess.IsUnknown() { diff --git a/internal/resource_device_switch/sdk_to_terraform_switch_mgmt.go b/internal/resource_device_switch/sdk_to_terraform_switch_mgmt.go index 390e16cb..47d8bb1d 100644 --- a/internal/resource_device_switch/sdk_to_terraform_switch_mgmt.go +++ b/internal/resource_device_switch/sdk_to_terraform_switch_mgmt.go @@ -213,8 +213,8 @@ func switchMgmtSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *m var tacacs basetypes.ObjectValue = types.ObjectNull(TacacsValue{}.AttributeTypes(ctx)) if d != nil { - if d.ConfigRevert != nil { - config_revert = types.Int64Value(int64(*d.ConfigRevert)) + if d.ConfigRevertTimer != nil { + config_revert = types.Int64Value(int64(*d.ConfigRevertTimer)) } if d.ProtectRe != nil { protect_re = switchMgmtProtectReSdkToTerraform(ctx, diags, d.ProtectRe) diff --git a/internal/resource_device_switch/sdk_to_terraform_switch_snmp_config.go b/internal/resource_device_switch/sdk_to_terraform_switch_snmp_config.go index 8dc4b296..8674382a 100644 --- a/internal/resource_device_switch/sdk_to_terraform_switch_snmp_config.go +++ b/internal/resource_device_switch/sdk_to_terraform_switch_snmp_config.go @@ -86,7 +86,7 @@ func snmpTrapGroupsSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, // ////////////////////////////////// // ////////// V2 -func snmpV2cSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, l []models.SnmpConfigV2CConfig) basetypes.ListValue { +func snmpV2cSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, l []models.SnmpConfigV2cConfig) basetypes.ListValue { var data_list = []V2cConfigValue{} for _, d := range l { var authorization basetypes.StringValue diff --git a/internal/resource_device_switch/terraform_to_sdk_network.go b/internal/resource_device_switch/terraform_to_sdk_network.go index 67548e47..fd7fd577 100644 --- a/internal/resource_device_switch/terraform_to_sdk_network.go +++ b/internal/resource_device_switch/terraform_to_sdk_network.go @@ -17,7 +17,7 @@ func NetworksTerraformToSdk(ctx context.Context, diags *diag.Diagnostics, d base net_data := models.SwitchNetwork{} if net_plan.VlanId.ValueStringPointer() != nil { - net_data.VlanId = models.SwitchNetworkVlanIdContainer.FromString(net_plan.VlanId.ValueString()) + net_data.VlanId = models.VlanIdWithVariableContainer.FromString(net_plan.VlanId.ValueString()) } if net_plan.Subnet.ValueStringPointer() != nil { net_data.Subnet = models.ToPointer(net_plan.Subnet.ValueString()) diff --git a/internal/resource_device_switch/terraform_to_sdk_port_usage.go b/internal/resource_device_switch/terraform_to_sdk_port_usage.go index 002ecaef..8e271c4d 100644 --- a/internal/resource_device_switch/terraform_to_sdk_port_usage.go +++ b/internal/resource_device_switch/terraform_to_sdk_port_usage.go @@ -137,7 +137,7 @@ func portUsageTerraformToSdk(ctx context.Context, diags *diag.Diagnostics, d bas new_pu.PoeDisabled = models.ToPointer(pu_attr_value.PoeDisabled.ValueBool()) } if pu_attr_value.PortAuth.ValueStringPointer() != nil { - new_pu.PortAuth = models.NewOptional(models.ToPointer(models.SwitchPortUsageDot1XEnum(pu_attr_value.PortAuth.ValueString()))) + new_pu.PortAuth = models.NewOptional(models.ToPointer(models.SwitchPortUsageDot1xEnum(pu_attr_value.PortAuth.ValueString()))) } if pu_attr_value.PortNetwork.ValueStringPointer() != nil { new_pu.PortNetwork = models.ToPointer(pu_attr_value.PortNetwork.ValueString()) diff --git a/internal/resource_device_switch/terraform_to_sdk_switch_mgmt.go b/internal/resource_device_switch/terraform_to_sdk_switch_mgmt.go index dae40284..714d8896 100644 --- a/internal/resource_device_switch/terraform_to_sdk_switch_mgmt.go +++ b/internal/resource_device_switch/terraform_to_sdk_switch_mgmt.go @@ -145,7 +145,7 @@ func switchMgmtTerraformToSdk(ctx context.Context, diags *diag.Diagnostics, d Sw } else { if d.ConfigRevert.ValueInt64Pointer() != nil { - data.ConfigRevert = models.ToPointer(int(d.ConfigRevert.ValueInt64())) + data.ConfigRevertTimer = models.ToPointer(int(d.ConfigRevert.ValueInt64())) } if !d.ProtectRe.IsNull() && !d.ProtectRe.IsUnknown() { data.ProtectRe = switchMgmtProtectReTerraformToSdk(ctx, diags, d.ProtectRe) diff --git a/internal/resource_device_switch/terraform_to_sdk_switch_snmp_config.go b/internal/resource_device_switch/terraform_to_sdk_switch_snmp_config.go index 902a70e4..b36b4f66 100644 --- a/internal/resource_device_switch/terraform_to_sdk_switch_snmp_config.go +++ b/internal/resource_device_switch/terraform_to_sdk_switch_snmp_config.go @@ -61,12 +61,12 @@ func snmpConfigTrapGroupsTerraformToSdk(ctx context.Context, diags *diag.Diagnos // ////////////////////////////////// // ////////// V2c -func snmpConfigV2cTerraformToSdk(ctx context.Context, diags *diag.Diagnostics, d basetypes.ListValue) []models.SnmpConfigV2CConfig { - var data_list []models.SnmpConfigV2CConfig +func snmpConfigV2cTerraformToSdk(ctx context.Context, diags *diag.Diagnostics, d basetypes.ListValue) []models.SnmpConfigV2cConfig { + var data_list []models.SnmpConfigV2cConfig for _, v := range d.Elements() { var v_interface interface{} = v plan := v_interface.(V2cConfigValue) - data := models.SnmpConfigV2CConfig{} + data := models.SnmpConfigV2cConfig{} if plan.Authorization.ValueStringPointer() != nil { data.Authorization = plan.Authorization.ValueStringPointer() } diff --git a/internal/resource_org_deviceprofile_ap/terraform_to_sdk.go b/internal/resource_org_deviceprofile_ap/terraform_to_sdk.go index e379221e..dce3e5c5 100644 --- a/internal/resource_org_deviceprofile_ap/terraform_to_sdk.go +++ b/internal/resource_org_deviceprofile_ap/terraform_to_sdk.go @@ -10,7 +10,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/diag" ) -func TerraformToSdk(ctx context.Context, plan *OrgDeviceprofileApModel) (models.Deviceprofile2, diag.Diagnostics) { +func TerraformToSdk(ctx context.Context, plan *OrgDeviceprofileApModel) (models.Deviceprofile, diag.Diagnostics) { data := models.DeviceprofileAp{} var diags diag.Diagnostics unset := make(map[string]interface{}) diff --git a/internal/resource_org_deviceprofile_gateway/terraform_to_sdk.go b/internal/resource_org_deviceprofile_gateway/terraform_to_sdk.go index 6043c5fa..85e6eead 100644 --- a/internal/resource_org_deviceprofile_gateway/terraform_to_sdk.go +++ b/internal/resource_org_deviceprofile_gateway/terraform_to_sdk.go @@ -10,7 +10,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/diag" ) -func TerraformToSdk(ctx context.Context, plan *OrgDeviceprofileGatewayModel) (models.Deviceprofile2, diag.Diagnostics) { +func TerraformToSdk(ctx context.Context, plan *OrgDeviceprofileGatewayModel) (models.Deviceprofile, diag.Diagnostics) { data := models.DeviceprofileGateway{} var diags diag.Diagnostics unset := make(map[string]interface{}) diff --git a/internal/resource_org_deviceprofile_gateway/terraform_to_sdk_ip_networks.go b/internal/resource_org_deviceprofile_gateway/terraform_to_sdk_ip_networks.go index 967385c1..9d483e6c 100644 --- a/internal/resource_org_deviceprofile_gateway/terraform_to_sdk_ip_networks.go +++ b/internal/resource_org_deviceprofile_gateway/terraform_to_sdk_ip_networks.go @@ -62,7 +62,7 @@ func networksTerraformToSdk(ctx context.Context, diags *diag.Diagnostics, d base } if plan.VlanId.ValueStringPointer() != nil { - data.VlanId = models.ToPointer(models.NetworkVlanIdContainer.FromString(plan.VlanId.ValueString())) + data.VlanId = models.ToPointer(models.VlanIdWithVariableContainer.FromString(plan.VlanId.ValueString())) } if !plan.VpnAccess.IsNull() && !plan.VpnAccess.IsUnknown() { diff --git a/internal/resource_org_gatewaytemplate/terraform_to_sdk_ip_networks.go b/internal/resource_org_gatewaytemplate/terraform_to_sdk_ip_networks.go index bc3f5d6c..49b6e943 100644 --- a/internal/resource_org_gatewaytemplate/terraform_to_sdk_ip_networks.go +++ b/internal/resource_org_gatewaytemplate/terraform_to_sdk_ip_networks.go @@ -62,7 +62,7 @@ func networksTerraformToSdk(ctx context.Context, diags *diag.Diagnostics, d base } if plan.VlanId.ValueStringPointer() != nil { - data.VlanId = models.ToPointer(models.NetworkVlanIdContainer.FromString(plan.VlanId.ValueString())) + data.VlanId = models.ToPointer(models.VlanIdWithVariableContainer.FromString(plan.VlanId.ValueString())) } if !plan.VpnAccess.IsNull() && !plan.VpnAccess.IsUnknown() { diff --git a/internal/resource_org_network/terraform_to_sdk.go b/internal/resource_org_network/terraform_to_sdk.go index 6088a5ff..577c25f9 100644 --- a/internal/resource_org_network/terraform_to_sdk.go +++ b/internal/resource_org_network/terraform_to_sdk.go @@ -84,7 +84,7 @@ func TerraformToSdk(ctx context.Context, plan *OrgNetworkModel) (*models.Network } if plan.VlanId.ValueStringPointer() != nil { - data.VlanId = models.ToPointer(models.NetworkVlanIdContainer.FromString(plan.VlanId.ValueString())) + data.VlanId = models.ToPointer(models.VlanIdWithVariableContainer.FromString(plan.VlanId.ValueString())) } else { unset["-vlan_id"] = "" } diff --git a/internal/resource_org_networktemplate/sdk_to_terraform_switch_mgmt.go b/internal/resource_org_networktemplate/sdk_to_terraform_switch_mgmt.go index 67411c2a..f6a843e6 100644 --- a/internal/resource_org_networktemplate/sdk_to_terraform_switch_mgmt.go +++ b/internal/resource_org_networktemplate/sdk_to_terraform_switch_mgmt.go @@ -213,8 +213,8 @@ func switchMgmtSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *m var tacacs basetypes.ObjectValue = types.ObjectNull(TacacsValue{}.AttributeTypes(ctx)) if d != nil { - if d.ConfigRevert != nil { - config_revert = types.Int64Value(int64(*d.ConfigRevert)) + if d.ConfigRevertTimer != nil { + config_revert = types.Int64Value(int64(*d.ConfigRevertTimer)) } if d.ProtectRe != nil { protect_re = switchMgmtProtectReSdkToTerraform(ctx, diags, d.ProtectRe) diff --git a/internal/resource_org_networktemplate/sdk_to_terraform_switch_snmp_config.go b/internal/resource_org_networktemplate/sdk_to_terraform_switch_snmp_config.go index 5151c5bf..93bf6580 100644 --- a/internal/resource_org_networktemplate/sdk_to_terraform_switch_snmp_config.go +++ b/internal/resource_org_networktemplate/sdk_to_terraform_switch_snmp_config.go @@ -86,7 +86,7 @@ func snmpTrapGroupsSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, // ////////////////////////////////// // ////////// V2 -func snmpV2cSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, l []models.SnmpConfigV2CConfig) basetypes.ListValue { +func snmpV2cSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, l []models.SnmpConfigV2cConfig) basetypes.ListValue { var data_list = []V2cConfigValue{} for _, d := range l { var authorization basetypes.StringValue diff --git a/internal/resource_org_networktemplate/terraform_to_sdk_network.go b/internal/resource_org_networktemplate/terraform_to_sdk_network.go index ab3f9361..575d46b6 100644 --- a/internal/resource_org_networktemplate/terraform_to_sdk_network.go +++ b/internal/resource_org_networktemplate/terraform_to_sdk_network.go @@ -17,7 +17,7 @@ func NetworksTerraformToSdk(ctx context.Context, diags *diag.Diagnostics, d base net_data := models.SwitchNetwork{} if net_plan.VlanId.ValueStringPointer() != nil { - net_data.VlanId = models.SwitchNetworkVlanIdContainer.FromString(net_plan.VlanId.ValueString()) + net_data.VlanId = models.VlanIdWithVariableContainer.FromString(net_plan.VlanId.ValueString()) } if net_plan.Subnet.ValueStringPointer() != nil { net_data.Subnet = models.ToPointer(net_plan.Subnet.ValueString()) diff --git a/internal/resource_org_networktemplate/terraform_to_sdk_port_usage.go b/internal/resource_org_networktemplate/terraform_to_sdk_port_usage.go index 3cf42ea6..9809acb7 100644 --- a/internal/resource_org_networktemplate/terraform_to_sdk_port_usage.go +++ b/internal/resource_org_networktemplate/terraform_to_sdk_port_usage.go @@ -137,7 +137,7 @@ func portUsageTerraformToSdk(ctx context.Context, diags *diag.Diagnostics, d bas new_pu.PoeDisabled = models.ToPointer(pu_attr_value.PoeDisabled.ValueBool()) } if pu_attr_value.PortAuth.ValueStringPointer() != nil { - new_pu.PortAuth = models.NewOptional(models.ToPointer(models.SwitchPortUsageDot1XEnum(pu_attr_value.PortAuth.ValueString()))) + new_pu.PortAuth = models.NewOptional(models.ToPointer(models.SwitchPortUsageDot1xEnum(pu_attr_value.PortAuth.ValueString()))) } if pu_attr_value.PortNetwork.ValueStringPointer() != nil { new_pu.PortNetwork = models.ToPointer(pu_attr_value.PortNetwork.ValueString()) diff --git a/internal/resource_org_networktemplate/terraform_to_sdk_switch_mgmt.go b/internal/resource_org_networktemplate/terraform_to_sdk_switch_mgmt.go index a3d31849..fe110162 100644 --- a/internal/resource_org_networktemplate/terraform_to_sdk_switch_mgmt.go +++ b/internal/resource_org_networktemplate/terraform_to_sdk_switch_mgmt.go @@ -144,7 +144,7 @@ func switchMgmtTerraformToSdk(ctx context.Context, diags *diag.Diagnostics, d Sw } else { if d.ConfigRevert.ValueInt64Pointer() != nil { - data.ConfigRevert = models.ToPointer(int(d.ConfigRevert.ValueInt64())) + data.ConfigRevertTimer = models.ToPointer(int(d.ConfigRevert.ValueInt64())) } if !d.ProtectRe.IsNull() && !d.ProtectRe.IsUnknown() { data.ProtectRe = switchMgmtProtectReTerraformToSdk(ctx, diags, d.ProtectRe) diff --git a/internal/resource_org_networktemplate/terraform_to_sdk_switch_snmp_config.go b/internal/resource_org_networktemplate/terraform_to_sdk_switch_snmp_config.go index d24ab889..4baf7f71 100644 --- a/internal/resource_org_networktemplate/terraform_to_sdk_switch_snmp_config.go +++ b/internal/resource_org_networktemplate/terraform_to_sdk_switch_snmp_config.go @@ -61,12 +61,12 @@ func snmpConfigTrapGroupsTerraformToSdk(ctx context.Context, diags *diag.Diagnos // ////////////////////////////////// // ////////// V2c -func snmpConfigV2cTerraformToSdk(ctx context.Context, diags *diag.Diagnostics, d basetypes.ListValue) []models.SnmpConfigV2CConfig { - var data_list []models.SnmpConfigV2CConfig +func snmpConfigV2cTerraformToSdk(ctx context.Context, diags *diag.Diagnostics, d basetypes.ListValue) []models.SnmpConfigV2cConfig { + var data_list []models.SnmpConfigV2cConfig for _, v := range d.Elements() { var v_interface interface{} = v plan := v_interface.(V2cConfigValue) - data := models.SnmpConfigV2CConfig{} + data := models.SnmpConfigV2cConfig{} if plan.Authorization.ValueStringPointer() != nil { data.Authorization = plan.Authorization.ValueStringPointer() } diff --git a/internal/resource_org_setting/sdk_to_terraform_cradlepoint.go b/internal/resource_org_setting/sdk_to_terraform_cradlepoint.go index a96e48bb..bea269ba 100644 --- a/internal/resource_org_setting/sdk_to_terraform_cradlepoint.go +++ b/internal/resource_org_setting/sdk_to_terraform_cradlepoint.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/types/basetypes" ) -func cradlepointSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.AccountCradlepointConfig) CradlepointValue { +func cradlepointSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *models.OrgSettingCradlepoint) CradlepointValue { var cp_api_id basetypes.StringValue var cp_api_key basetypes.StringValue diff --git a/internal/resource_org_setting/terraform_to_sdk_cradlepoint.go b/internal/resource_org_setting/terraform_to_sdk_cradlepoint.go index ffa58ffd..7aa24f81 100644 --- a/internal/resource_org_setting/terraform_to_sdk_cradlepoint.go +++ b/internal/resource_org_setting/terraform_to_sdk_cradlepoint.go @@ -8,8 +8,8 @@ import ( "github.com/tmunzer/mistapi-go/mistapi/models" ) -func cradlepointTerraformToSdk(ctx context.Context, diags *diag.Diagnostics, d CradlepointValue) *models.AccountCradlepointConfig { - data := models.AccountCradlepointConfig{} +func cradlepointTerraformToSdk(ctx context.Context, diags *diag.Diagnostics, d CradlepointValue) *models.OrgSettingCradlepoint { + data := models.OrgSettingCradlepoint{} if d.CpApiId.ValueStringPointer() != nil { data.CpApiId = d.CpApiId.ValueStringPointer() diff --git a/internal/resource_org_setting/terraform_to_sdk_synthetic.go b/internal/resource_org_setting/terraform_to_sdk_synthetic.go index c19eba55..38d8b32f 100644 --- a/internal/resource_org_setting/terraform_to_sdk_synthetic.go +++ b/internal/resource_org_setting/terraform_to_sdk_synthetic.go @@ -26,11 +26,11 @@ func syntheticTestVlansTerraformToSdk(ctx context.Context, diags *diag.Diagnosti } if !plan.VlanIds.IsNull() && !plan.VlanIds.IsUnknown() { - var items []models.SynthetictestPropertiesVlanIds + var items []models.VlanIdWithVariable for _, item := range plan.VlanIds.Elements() { var item_interface interface{} = item i := item_interface.(basetypes.StringValue) - v := models.SynthetictestPropertiesVlanIdsContainer.FromString(i.ValueString()) + v := models.VlanIdWithVariableContainer.FromString(i.ValueString()) items = append(items, v) } data.VlanIds = items diff --git a/internal/resource_org_wlan/sdk_to_terraform_vlan_ids.go b/internal/resource_org_wlan/sdk_to_terraform_vlan_ids.go index 82d9cea4..92cb7ad4 100644 --- a/internal/resource_org_wlan/sdk_to_terraform_vlan_ids.go +++ b/internal/resource_org_wlan/sdk_to_terraform_vlan_ids.go @@ -10,7 +10,7 @@ import ( "github.com/tmunzer/mistapi-go/mistapi/models" ) -func vlanIdsSkToTerraform(ctx context.Context, diags *diag.Diagnostics, data []models.WlanDynamicPskVlanIds) basetypes.ListValue { +func vlanIdsSkToTerraform(ctx context.Context, diags *diag.Diagnostics, data []models.VlanIdWithVariable) basetypes.ListValue { var list []attr.Value for _, v := range data { diff --git a/internal/resource_org_wlan/terraform_to_sdk.go b/internal/resource_org_wlan/terraform_to_sdk.go index 4a8f6bbe..d524bb2b 100644 --- a/internal/resource_org_wlan/terraform_to_sdk.go +++ b/internal/resource_org_wlan/terraform_to_sdk.go @@ -479,17 +479,17 @@ func TerraformToSdk(ctx context.Context, plan *OrgWlanModel) (*models.Wlan, diag if plan.VlanId.IsNull() || plan.VlanId.IsUnknown() { unset["-vlan_id"] = "" } else { - data.VlanId = models.ToPointer(models.WlanVlanIdContainer.FromString(plan.VlanId.ValueString())) + data.VlanId = models.ToPointer(models.VlanIdWithVariableContainer.FromString(plan.VlanId.ValueString())) } if plan.VlanIds.IsNull() || plan.VlanIds.IsUnknown() { unset["-vlan_ids"] = "" } else { - var items []models.WlanVlanIds + var items []models.VlanIdWithVariable for _, item := range plan.VlanIds.Elements() { var item_interface interface{} = item i := item_interface.(basetypes.StringValue) - v := models.WlanVlanIdsContainer.FromString(i.ValueString()) + v := models.VlanIdWithVariableContainer.FromString(i.ValueString()) items = append(items, v) } data.VlanIds = items diff --git a/internal/resource_org_wlan/terraform_to_sdk_bonjour.go b/internal/resource_org_wlan/terraform_to_sdk_bonjour.go index 746b8f68..1813e4af 100644 --- a/internal/resource_org_wlan/terraform_to_sdk_bonjour.go +++ b/internal/resource_org_wlan/terraform_to_sdk_bonjour.go @@ -29,11 +29,11 @@ func bonjourTerraformToSdk(ctx context.Context, diags *diag.Diagnostics, plan Bo data := models.WlanBonjour{} - var items []models.WlanBonjourAdditionalVlanIds + var items []models.VlanIdWithVariable for _, item := range plan.AdditionalVlanIds.Elements() { var item_interface interface{} = item i := item_interface.(basetypes.StringValue) - v := models.WlanBonjourAdditionalVlanIdsContainer.FromString(i.ValueString()) + v := models.VlanIdWithVariableContainer.FromString(i.ValueString()) items = append(items, v) } data.AdditionalVlanIds = items diff --git a/internal/resource_org_wlan/terraform_to_sdk_dynamic_psk.go b/internal/resource_org_wlan/terraform_to_sdk_dynamic_psk.go index 6c8cd806..94dfcf65 100644 --- a/internal/resource_org_wlan/terraform_to_sdk_dynamic_psk.go +++ b/internal/resource_org_wlan/terraform_to_sdk_dynamic_psk.go @@ -11,17 +11,17 @@ import ( func dynamicPskTerraformToSdk(ctx context.Context, diags *diag.Diagnostics, plan DynamicPskValue) *models.WlanDynamicPsk { - var vlan_ids []models.WlanDynamicPskVlanIds + var vlan_ids []models.VlanIdWithVariable for _, item := range plan.VlanIds.Elements() { var item_interface interface{} = item i := item_interface.(basetypes.StringValue) - j := models.WlanDynamicPskVlanIdsContainer.FromString(i.ValueString()) + j := models.VlanIdWithVariableContainer.FromString(i.ValueString()) vlan_ids = append(vlan_ids, j) } data := models.WlanDynamicPsk{} data.DefaultPsk = plan.DefaultPsk.ValueStringPointer() - data.DefaultVlanId = models.ToPointer(models.WlanDynamicPskDefaultVlanIdContainer.FromString(plan.DefaultVlanId.ValueString())) + data.DefaultVlanId = models.ToPointer(models.VlanIdWithVariableContainer.FromString(plan.DefaultVlanId.ValueString())) data.Enabled = plan.Enabled.ValueBoolPointer() data.ForceLookup = plan.ForceLookup.ValueBoolPointer() data.Source = models.ToPointer(models.DynamicPskSourceEnum(string(plan.Source.ValueString()))) diff --git a/internal/resource_org_wlan/terraform_to_sdk_dynamic_vlan.go b/internal/resource_org_wlan/terraform_to_sdk_dynamic_vlan.go index b2a36097..7c10f4b6 100644 --- a/internal/resource_org_wlan/terraform_to_sdk_dynamic_vlan.go +++ b/internal/resource_org_wlan/terraform_to_sdk_dynamic_vlan.go @@ -11,11 +11,11 @@ import ( func dynamicVlanTerraformToSdk(ctx context.Context, diags *diag.Diagnostics, plan DynamicVlanValue) *models.WlanDynamicVlan { - var local_vlan_ids []models.WlanDynamicVlanLocalVlanIds + var local_vlan_ids []models.VlanIdWithVariable for _, item := range plan.LocalVlanIds.Elements() { var item_interface interface{} = item i := item_interface.(basetypes.StringValue) - j := models.WlanDynamicVlanLocalVlanIdsContainer.FromString(i.ValueString()) + j := models.VlanIdWithVariableContainer.FromString(i.ValueString()) local_vlan_ids = append(local_vlan_ids, j) } @@ -26,11 +26,11 @@ func dynamicVlanTerraformToSdk(ctx context.Context, diags *diag.Diagnostics, pla vlans[k] = v_plan.ValueString() } - var default_vlan_ids []models.WlanDynamicVlanDefaultVlanIds + var default_vlan_ids []models.WlanDynamicVlanDefaultVlanId for _, item := range plan.DefaultVlanIds.Elements() { var item_interface interface{} = item i := item_interface.(basetypes.StringValue) - j := models.WlanDynamicVlanDefaultVlanIdsContainer.FromString(i.ValueString()) + j := models.WlanDynamicVlanDefaultVlanIdContainer.FromString(i.ValueString()) default_vlan_ids = append(default_vlan_ids, j) } diff --git a/internal/resource_site_networktemplate/sdk_to_terraform_switch_mgmt.go b/internal/resource_site_networktemplate/sdk_to_terraform_switch_mgmt.go index c52dc5a6..f588fb8f 100644 --- a/internal/resource_site_networktemplate/sdk_to_terraform_switch_mgmt.go +++ b/internal/resource_site_networktemplate/sdk_to_terraform_switch_mgmt.go @@ -213,8 +213,8 @@ func switchMgmtSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, d *m var tacacs basetypes.ObjectValue = types.ObjectNull(TacacsValue{}.AttributeTypes(ctx)) if d != nil { - if d.ConfigRevert != nil { - config_revert = types.Int64Value(int64(*d.ConfigRevert)) + if d.ConfigRevertTimer != nil { + config_revert = types.Int64Value(int64(*d.ConfigRevertTimer)) } if d.ProtectRe != nil { protect_re = switchMgmtProtectReSdkToTerraform(ctx, diags, d.ProtectRe) diff --git a/internal/resource_site_networktemplate/sdk_to_terraform_switch_snmp_config.go b/internal/resource_site_networktemplate/sdk_to_terraform_switch_snmp_config.go index 3f6c8e23..86000c2a 100644 --- a/internal/resource_site_networktemplate/sdk_to_terraform_switch_snmp_config.go +++ b/internal/resource_site_networktemplate/sdk_to_terraform_switch_snmp_config.go @@ -86,7 +86,7 @@ func snmpTrapGroupsSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, // ////////////////////////////////// // ////////// V2 -func snmpV2cSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, l []models.SnmpConfigV2CConfig) basetypes.ListValue { +func snmpV2cSdkToTerraform(ctx context.Context, diags *diag.Diagnostics, l []models.SnmpConfigV2cConfig) basetypes.ListValue { var data_list = []V2cConfigValue{} for _, d := range l { var authorization basetypes.StringValue diff --git a/internal/resource_site_networktemplate/terraform_to_sdk_network.go b/internal/resource_site_networktemplate/terraform_to_sdk_network.go index c5e8287f..dceda7fd 100644 --- a/internal/resource_site_networktemplate/terraform_to_sdk_network.go +++ b/internal/resource_site_networktemplate/terraform_to_sdk_network.go @@ -17,7 +17,7 @@ func NetworksTerraformToSdk(ctx context.Context, diags *diag.Diagnostics, d base net_data := models.SwitchNetwork{} if net_plan.VlanId.ValueStringPointer() != nil { - net_data.VlanId = models.SwitchNetworkVlanIdContainer.FromString(net_plan.VlanId.ValueString()) + net_data.VlanId = models.VlanIdWithVariableContainer.FromString(net_plan.VlanId.ValueString()) } if net_plan.Subnet.ValueStringPointer() != nil { net_data.Subnet = models.ToPointer(net_plan.Subnet.ValueString()) diff --git a/internal/resource_site_networktemplate/terraform_to_sdk_port_usage.go b/internal/resource_site_networktemplate/terraform_to_sdk_port_usage.go index e5b45aeb..469cc726 100644 --- a/internal/resource_site_networktemplate/terraform_to_sdk_port_usage.go +++ b/internal/resource_site_networktemplate/terraform_to_sdk_port_usage.go @@ -137,7 +137,7 @@ func portUsageTerraformToSdk(ctx context.Context, diags *diag.Diagnostics, d bas new_pu.PoeDisabled = models.ToPointer(pu_attr_value.PoeDisabled.ValueBool()) } if pu_attr_value.PortAuth.ValueStringPointer() != nil { - new_pu.PortAuth = models.NewOptional(models.ToPointer(models.SwitchPortUsageDot1XEnum(pu_attr_value.PortAuth.ValueString()))) + new_pu.PortAuth = models.NewOptional(models.ToPointer(models.SwitchPortUsageDot1xEnum(pu_attr_value.PortAuth.ValueString()))) } if pu_attr_value.PortNetwork.ValueStringPointer() != nil { new_pu.PortNetwork = models.ToPointer(pu_attr_value.PortNetwork.ValueString()) diff --git a/internal/resource_site_networktemplate/terraform_to_sdk_switch_mgmt.go b/internal/resource_site_networktemplate/terraform_to_sdk_switch_mgmt.go index 26b7523c..9a4ae320 100644 --- a/internal/resource_site_networktemplate/terraform_to_sdk_switch_mgmt.go +++ b/internal/resource_site_networktemplate/terraform_to_sdk_switch_mgmt.go @@ -144,7 +144,7 @@ func switchMgmtTerraformToSdk(ctx context.Context, diags *diag.Diagnostics, d Sw } else { if d.ConfigRevert.ValueInt64Pointer() != nil { - data.ConfigRevert = models.ToPointer(int(d.ConfigRevert.ValueInt64())) + data.ConfigRevertTimer = models.ToPointer(int(d.ConfigRevert.ValueInt64())) } if !d.ProtectRe.IsNull() && !d.ProtectRe.IsUnknown() { data.ProtectRe = switchMgmtProtectReTerraformToSdk(ctx, diags, d.ProtectRe) diff --git a/internal/resource_site_networktemplate/terraform_to_sdk_switch_snmp_config.go b/internal/resource_site_networktemplate/terraform_to_sdk_switch_snmp_config.go index 2ed9fd89..f659c6e5 100644 --- a/internal/resource_site_networktemplate/terraform_to_sdk_switch_snmp_config.go +++ b/internal/resource_site_networktemplate/terraform_to_sdk_switch_snmp_config.go @@ -61,12 +61,12 @@ func snmpConfigTrapGroupsTerraformToSdk(ctx context.Context, diags *diag.Diagnos // ////////////////////////////////// // ////////// V2c -func snmpConfigV2cTerraformToSdk(ctx context.Context, diags *diag.Diagnostics, d basetypes.ListValue) []models.SnmpConfigV2CConfig { - var data_list []models.SnmpConfigV2CConfig +func snmpConfigV2cTerraformToSdk(ctx context.Context, diags *diag.Diagnostics, d basetypes.ListValue) []models.SnmpConfigV2cConfig { + var data_list []models.SnmpConfigV2cConfig for _, v := range d.Elements() { var v_interface interface{} = v plan := v_interface.(V2cConfigValue) - data := models.SnmpConfigV2CConfig{} + data := models.SnmpConfigV2cConfig{} if plan.Authorization.ValueStringPointer() != nil { data.Authorization = plan.Authorization.ValueStringPointer() } diff --git a/internal/resource_site_setting/terraform_to_sdk_ctritical_url_monitoring.go b/internal/resource_site_setting/terraform_to_sdk_ctritical_url_monitoring.go index 51318a6d..2bf3dfbb 100644 --- a/internal/resource_site_setting/terraform_to_sdk_ctritical_url_monitoring.go +++ b/internal/resource_site_setting/terraform_to_sdk_ctritical_url_monitoring.go @@ -17,7 +17,7 @@ func criticalUrlMonitoringMonitorsTerraformToSdk(ctx context.Context, diags *dia data := models.SiteSettingCriticalUrlMonitoringMonitor{} data.Url = plan.Url.ValueStringPointer() if !plan.VlanId.IsNull() && !plan.VlanId.IsUnknown() { - data.VlanId = models.ToPointer(models.SiteSettingCriticalUrlMonitoringMonitorVlanIdContainer.FromString(plan.VlanId.ValueString())) + data.VlanId = models.ToPointer(models.VlanIdWithVariableContainer.FromString(plan.VlanId.ValueString())) } data_list = append(data_list, data) diff --git a/internal/resource_site_setting/terraform_to_sdk_synthetic_tests.go b/internal/resource_site_setting/terraform_to_sdk_synthetic_tests.go index 762aea33..1de6ad39 100644 --- a/internal/resource_site_setting/terraform_to_sdk_synthetic_tests.go +++ b/internal/resource_site_setting/terraform_to_sdk_synthetic_tests.go @@ -27,11 +27,11 @@ func syntheticTestVlansTerraformToSdk(ctx context.Context, diags *diag.Diagnosti } if !plan.VlanIds.IsNull() && !plan.VlanIds.IsUnknown() { - var items []models.SynthetictestPropertiesVlanIds + var items []models.VlanIdWithVariable for _, item := range plan.VlanIds.Elements() { var item_interface interface{} = item i := item_interface.(basetypes.StringValue) - v := models.SynthetictestPropertiesVlanIdsContainer.FromString(i.ValueString()) + v := models.VlanIdWithVariableContainer.FromString(i.ValueString()) items = append(items, v) } data.VlanIds = items diff --git a/internal/resource_site_wlan/terraform_to_sdk.go b/internal/resource_site_wlan/terraform_to_sdk.go index e11a55fe..11a1f72e 100644 --- a/internal/resource_site_wlan/terraform_to_sdk.go +++ b/internal/resource_site_wlan/terraform_to_sdk.go @@ -475,17 +475,17 @@ func TerraformToSdk(ctx context.Context, plan *SiteWlanModel) (*models.Wlan, dia if plan.VlanId.IsNull() || plan.VlanId.IsUnknown() { unset["-vlan_id"] = "" } else { - data.VlanId = models.ToPointer(models.WlanVlanIdContainer.FromString(plan.VlanId.ValueString())) + data.VlanId = models.ToPointer(models.VlanIdWithVariableContainer.FromString(plan.VlanId.ValueString())) } if plan.VlanIds.IsNull() || plan.VlanIds.IsUnknown() { unset["-vlan_ids"] = "" } else { - var items []models.WlanVlanIds + var items []models.VlanIdWithVariable for _, item := range plan.VlanIds.Elements() { var item_interface interface{} = item i := item_interface.(basetypes.StringValue) - v := models.WlanVlanIdsContainer.FromString(i.ValueString()) + v := models.VlanIdWithVariableContainer.FromString(i.ValueString()) items = append(items, v) } data.VlanIds = items diff --git a/internal/resource_site_wlan/terraform_to_sdk_bonjour.go b/internal/resource_site_wlan/terraform_to_sdk_bonjour.go index e8713b4b..57aa8d41 100644 --- a/internal/resource_site_wlan/terraform_to_sdk_bonjour.go +++ b/internal/resource_site_wlan/terraform_to_sdk_bonjour.go @@ -29,11 +29,11 @@ func bonjourTerraformToSdk(ctx context.Context, diags *diag.Diagnostics, plan Bo data := models.WlanBonjour{} - var items []models.WlanBonjourAdditionalVlanIds + var items []models.VlanIdWithVariable for _, item := range plan.AdditionalVlanIds.Elements() { var item_interface interface{} = item i := item_interface.(basetypes.StringValue) - v := models.WlanBonjourAdditionalVlanIdsContainer.FromString(i.ValueString()) + v := models.VlanIdWithVariableContainer.FromString(i.ValueString()) items = append(items, v) } data.AdditionalVlanIds = items diff --git a/internal/resource_site_wlan/terraform_to_sdk_dynamic_psk.go b/internal/resource_site_wlan/terraform_to_sdk_dynamic_psk.go index 26202ebe..58b9162c 100644 --- a/internal/resource_site_wlan/terraform_to_sdk_dynamic_psk.go +++ b/internal/resource_site_wlan/terraform_to_sdk_dynamic_psk.go @@ -11,17 +11,17 @@ import ( func dynamicPskTerraformToSdk(ctx context.Context, diags *diag.Diagnostics, plan DynamicPskValue) *models.WlanDynamicPsk { - var vlan_ids []models.WlanDynamicPskVlanIds + var vlan_ids []models.VlanIdWithVariable for _, item := range plan.VlanIds.Elements() { var item_interface interface{} = item i := item_interface.(basetypes.StringValue) - j := models.WlanDynamicPskVlanIdsContainer.FromString(i.ValueString()) + j := models.VlanIdWithVariableContainer.FromString(i.ValueString()) vlan_ids = append(vlan_ids, j) } data := models.WlanDynamicPsk{} data.DefaultPsk = plan.DefaultPsk.ValueStringPointer() - data.DefaultVlanId = models.ToPointer(models.WlanDynamicPskDefaultVlanIdContainer.FromString(plan.DefaultVlanId.ValueString())) + data.DefaultVlanId = models.ToPointer(models.VlanIdWithVariableContainer.FromString(plan.DefaultVlanId.ValueString())) data.Enabled = plan.Enabled.ValueBoolPointer() data.ForceLookup = plan.ForceLookup.ValueBoolPointer() data.Source = models.ToPointer(models.DynamicPskSourceEnum(string(plan.Source.ValueString()))) diff --git a/internal/resource_site_wlan/terraform_to_sdk_dynamic_vlan.go b/internal/resource_site_wlan/terraform_to_sdk_dynamic_vlan.go index b7d8f7a4..b100c1ba 100644 --- a/internal/resource_site_wlan/terraform_to_sdk_dynamic_vlan.go +++ b/internal/resource_site_wlan/terraform_to_sdk_dynamic_vlan.go @@ -11,11 +11,11 @@ import ( func dynamicVlanTerraformToSdk(ctx context.Context, diags *diag.Diagnostics, plan DynamicVlanValue) *models.WlanDynamicVlan { - var local_vlan_ids []models.WlanDynamicVlanLocalVlanIds + var local_vlan_ids []models.VlanIdWithVariable for _, item := range plan.LocalVlanIds.Elements() { var item_interface interface{} = item i := item_interface.(basetypes.StringValue) - j := models.WlanDynamicVlanLocalVlanIdsContainer.FromString(i.ValueString()) + j := models.VlanIdWithVariableContainer.FromString(i.ValueString()) local_vlan_ids = append(local_vlan_ids, j) } @@ -26,11 +26,11 @@ func dynamicVlanTerraformToSdk(ctx context.Context, diags *diag.Diagnostics, pla vlans[k] = v_plan.ValueString() } - var default_vlan_ids []models.WlanDynamicVlanDefaultVlanIds + var default_vlan_ids []models.WlanDynamicVlanDefaultVlanId for _, item := range plan.DefaultVlanIds.Elements() { var item_interface interface{} = item i := item_interface.(basetypes.StringValue) - j := models.WlanDynamicVlanDefaultVlanIdsContainer.FromString(i.ValueString()) + j := models.WlanDynamicVlanDefaultVlanIdContainer.FromString(i.ValueString()) default_vlan_ids = append(default_vlan_ids, j) }