From 47c6ddd12bfdbebade9a4bfe40d161ac1ea5fcfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Nie=C3=9F?= Date: Thu, 17 Nov 2022 21:37:38 +0100 Subject: [PATCH] fix: Fix linter deprecation warnings --- .golangci.yml | 15 ++++++--------- netbox/dcim/data_netbox_dcim_platform.go | 4 +++- netbox/dcim/data_netbox_dcim_site.go | 4 +++- netbox/ipam/data_netbox_ipam_aggregate.go | 4 +++- netbox/ipam/data_netbox_ipam_ip_addresses.go | 4 +++- netbox/ipam/data_netbox_ipam_role.go | 4 +++- netbox/ipam/data_netbox_ipam_service.go | 4 +++- netbox/ipam/data_netbox_ipam_vlan.go | 4 +++- netbox/ipam/data_netbox_ipam_vlan_group.go | 4 +++- netbox/ipam/resource_netbox_ipam_ip_addresses.go | 8 ++++++-- ...box_json_circuits_circuit_terminations_list.go | 8 +++++++- ...ata_netbox_json_circuits_circuit_types_list.go | 8 +++++++- .../data_netbox_json_circuits_circuits_list.go | 8 +++++++- ...netbox_json_circuits_provider_networks_list.go | 8 +++++++- .../data_netbox_json_circuits_providers_list.go | 8 +++++++- netbox/json/data_netbox_json_dcim_cables_list.go | 8 +++++++- ...etbox_json_dcim_console_port_templates_list.go | 8 +++++++- .../data_netbox_json_dcim_console_ports_list.go | 8 +++++++- ...son_dcim_console_server_port_templates_list.go | 8 +++++++- ..._netbox_json_dcim_console_server_ports_list.go | 8 +++++++- ..._netbox_json_dcim_device_bay_templates_list.go | 8 +++++++- .../data_netbox_json_dcim_device_bays_list.go | 8 +++++++- .../data_netbox_json_dcim_device_roles_list.go | 8 +++++++- .../data_netbox_json_dcim_device_types_list.go | 8 +++++++- netbox/json/data_netbox_json_dcim_devices_list.go | 8 +++++++- ..._netbox_json_dcim_front_port_templates_list.go | 8 +++++++- .../data_netbox_json_dcim_front_ports_list.go | 8 +++++++- ...a_netbox_json_dcim_interface_templates_list.go | 8 +++++++- .../json/data_netbox_json_dcim_interfaces_list.go | 8 +++++++- ..._netbox_json_dcim_inventory_item_roles_list.go | 8 +++++++- ...box_json_dcim_inventory_item_templates_list.go | 8 +++++++- .../data_netbox_json_dcim_inventory_items_list.go | 8 +++++++- .../json/data_netbox_json_dcim_locations_list.go | 8 +++++++- .../data_netbox_json_dcim_manufacturers_list.go | 8 +++++++- ..._netbox_json_dcim_module_bay_templates_list.go | 8 +++++++- .../data_netbox_json_dcim_module_bays_list.go | 8 +++++++- .../data_netbox_json_dcim_module_types_list.go | 8 +++++++- netbox/json/data_netbox_json_dcim_modules_list.go | 8 +++++++- .../json/data_netbox_json_dcim_platforms_list.go | 8 +++++++- .../data_netbox_json_dcim_power_feeds_list.go | 8 +++++++- ...etbox_json_dcim_power_outlet_templates_list.go | 8 +++++++- .../data_netbox_json_dcim_power_outlets_list.go | 8 +++++++- .../data_netbox_json_dcim_power_panels_list.go | 8 +++++++- ..._netbox_json_dcim_power_port_templates_list.go | 8 +++++++- .../data_netbox_json_dcim_power_ports_list.go | 8 +++++++- ...ata_netbox_json_dcim_rack_reservations_list.go | 8 +++++++- .../json/data_netbox_json_dcim_rack_roles_list.go | 8 +++++++- netbox/json/data_netbox_json_dcim_racks_list.go | 8 +++++++- ...a_netbox_json_dcim_rear_port_templates_list.go | 8 +++++++- .../json/data_netbox_json_dcim_rear_ports_list.go | 8 +++++++- netbox/json/data_netbox_json_dcim_regions_list.go | 8 +++++++- .../data_netbox_json_dcim_site_groups_list.go | 8 +++++++- netbox/json/data_netbox_json_dcim_sites_list.go | 8 +++++++- .../data_netbox_json_dcim_virtual_chassis_list.go | 8 +++++++- ...ata_netbox_json_extras_config_contexts_list.go | 8 +++++++- .../data_netbox_json_extras_content_types_list.go | 8 +++++++- .../data_netbox_json_extras_custom_fields_list.go | 8 +++++++- .../data_netbox_json_extras_custom_links_list.go | 8 +++++++- ...ta_netbox_json_extras_export_templates_list.go | 8 +++++++- ...a_netbox_json_extras_image_attachments_list.go | 8 +++++++- .../data_netbox_json_extras_job_results_list.go | 8 +++++++- ...ata_netbox_json_extras_journal_entries_list.go | 8 +++++++- ...data_netbox_json_extras_object_changes_list.go | 8 +++++++- netbox/json/data_netbox_json_extras_tags_list.go | 8 +++++++- .../json/data_netbox_json_extras_webhooks_list.go | 8 +++++++- .../json/data_netbox_json_ipam_aggregates_list.go | 8 +++++++- netbox/json/data_netbox_json_ipam_asns_list.go | 8 +++++++- ...etbox_json_ipam_fhrp_group_assignments_list.go | 8 +++++++- .../data_netbox_json_ipam_fhrp_groups_list.go | 8 +++++++- .../data_netbox_json_ipam_ip_addresses_list.go | 8 +++++++- .../json/data_netbox_json_ipam_ip_ranges_list.go | 8 +++++++- .../json/data_netbox_json_ipam_prefixes_list.go | 8 +++++++- netbox/json/data_netbox_json_ipam_rirs_list.go | 8 +++++++- netbox/json/data_netbox_json_ipam_roles_list.go | 8 +++++++- .../data_netbox_json_ipam_route_targets_list.go | 8 +++++++- ...ata_netbox_json_ipam_service_templates_list.go | 8 +++++++- .../json/data_netbox_json_ipam_services_list.go | 8 +++++++- .../data_netbox_json_ipam_vlan_groups_list.go | 8 +++++++- netbox/json/data_netbox_json_ipam_vlans_list.go | 8 +++++++- netbox/json/data_netbox_json_ipam_vrfs_list.go | 8 +++++++- ...etbox_json_tenancy_contact_assignments_list.go | 8 +++++++- ...ata_netbox_json_tenancy_contact_groups_list.go | 8 +++++++- ...data_netbox_json_tenancy_contact_roles_list.go | 8 +++++++- .../data_netbox_json_tenancy_contacts_list.go | 8 +++++++- ...data_netbox_json_tenancy_tenant_groups_list.go | 8 +++++++- .../json/data_netbox_json_tenancy_tenants_list.go | 8 +++++++- netbox/json/data_netbox_json_users_groups_list.go | 8 +++++++- .../data_netbox_json_users_permissions_list.go | 8 +++++++- netbox/json/data_netbox_json_users_tokens_list.go | 8 +++++++- netbox/json/data_netbox_json_users_users_list.go | 8 +++++++- ...box_json_virtualization_cluster_groups_list.go | 8 +++++++- ...tbox_json_virtualization_cluster_types_list.go | 8 +++++++- ...ta_netbox_json_virtualization_clusters_list.go | 8 +++++++- ..._netbox_json_virtualization_interfaces_list.go | 8 +++++++- ...x_json_virtualization_virtual_machines_list.go | 8 +++++++- ...tbox_json_wireless_wireless_lan_groups_list.go | 8 +++++++- ...ata_netbox_json_wireless_wireless_lans_list.go | 8 +++++++- ...ta_netbox_json_wireless_wireless_links_list.go | 8 +++++++- netbox/tenancy/data_netbox_tenancy_contact.go | 4 +++- .../tenancy/data_netbox_tenancy_contact_group.go | 4 +++- netbox/tenancy/data_netbox_tenancy_tenant.go | 4 +++- .../tenancy/data_netbox_tenancy_tenant_group.go | 4 +++- netbox/tenancy/data_netbox_tenancy_tenant_role.go | 4 +++- .../data_netbox_virtualization_cluster.go | 4 +++- utils/generateJsonDatasources | 8 +++++++- 105 files changed, 677 insertions(+), 114 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 9e387a076..1d1226d10 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -256,18 +256,15 @@ output: linters: enable: - - deadcode + - unused - gocyclo - - golint - - varcheck - - structcheck - - maligned + - revive - errcheck - ineffassign - - interfacer - unconvert - goconst - gosec + - govet - megacheck #disable: # - maligned @@ -310,9 +307,9 @@ issues: # text: "SA9003:" # Exclude lll issues for long lines with go:generate - - linters: - - errcheck - text: "Error return value of `d.Set` is not checked" + # - linters: + # - errcheck + # text: "Error return value of `d.Set` is not checked" # source: "^//go:generate " # Independently from option `exclude` we use default exclude patterns, diff --git a/netbox/dcim/data_netbox_dcim_platform.go b/netbox/dcim/data_netbox_dcim_platform.go index 8baf466b8..979a7a0a8 100644 --- a/netbox/dcim/data_netbox_dcim_platform.go +++ b/netbox/dcim/data_netbox_dcim_platform.go @@ -58,7 +58,9 @@ func dataNetboxDcimPlatformRead(ctx context.Context, d *schema.ResourceData, m i r := list.Payload.Results[0] d.SetId(strconv.FormatInt(r.ID, 10)) - d.Set("content_type", util.ConvertURIContentType(r.URL)) + if err = d.Set("content_type", util.ConvertURIContentType(r.URL)); err != nil { + return diag.FromErr(err) + } return nil } diff --git a/netbox/dcim/data_netbox_dcim_site.go b/netbox/dcim/data_netbox_dcim_site.go index a5b2be8ea..0e8e5223a 100644 --- a/netbox/dcim/data_netbox_dcim_site.go +++ b/netbox/dcim/data_netbox_dcim_site.go @@ -58,7 +58,9 @@ func dataNetboxDcimSiteRead(ctx context.Context, d *schema.ResourceData, m inter r := list.Payload.Results[0] d.SetId(strconv.FormatInt(r.ID, 10)) - d.Set("content_type", util.ConvertURIContentType(r.URL)) + if err = d.Set("content_type", util.ConvertURIContentType(r.URL)); err != nil { + return diag.FromErr(err) + } return nil } diff --git a/netbox/ipam/data_netbox_ipam_aggregate.go b/netbox/ipam/data_netbox_ipam_aggregate.go index cf8f57121..2a2d086a4 100644 --- a/netbox/ipam/data_netbox_ipam_aggregate.go +++ b/netbox/ipam/data_netbox_ipam_aggregate.go @@ -62,7 +62,9 @@ func dataNetboxIpamAggregateRead(ctx context.Context, d *schema.ResourceData, r := list.Payload.Results[0] d.SetId(strconv.FormatInt(r.ID, 10)) - d.Set("content_type", util.ConvertURIContentType(r.URL)) + if err = d.Set("content_type", util.ConvertURIContentType(r.URL)); err != nil { + return diag.FromErr(err) + } return nil } diff --git a/netbox/ipam/data_netbox_ipam_ip_addresses.go b/netbox/ipam/data_netbox_ipam_ip_addresses.go index 9a3aa1136..f5bcd25d7 100644 --- a/netbox/ipam/data_netbox_ipam_ip_addresses.go +++ b/netbox/ipam/data_netbox_ipam_ip_addresses.go @@ -56,7 +56,9 @@ func dataNetboxIpamIPAddressesRead(ctx context.Context, d *schema.ResourceData, r := list.Payload.Results[0] d.SetId(strconv.FormatInt(r.ID, 10)) - d.Set("content_type", util.ConvertURIContentType(r.URL)) + if err = d.Set("content_type", util.ConvertURIContentType(r.URL)); err != nil { + return diag.FromErr(err) + } return nil } diff --git a/netbox/ipam/data_netbox_ipam_role.go b/netbox/ipam/data_netbox_ipam_role.go index b2b2bc71d..c4019a42e 100644 --- a/netbox/ipam/data_netbox_ipam_role.go +++ b/netbox/ipam/data_netbox_ipam_role.go @@ -58,7 +58,9 @@ func dataNetboxIpamRoleRead(ctx context.Context, d *schema.ResourceData, m inter r := list.Payload.Results[0] d.SetId(strconv.FormatInt(r.ID, 10)) - d.Set("content_type", util.ConvertURIContentType(r.URL)) + if err = d.Set("content_type", util.ConvertURIContentType(r.URL)); err != nil { + return diag.FromErr(err) + } return nil } diff --git a/netbox/ipam/data_netbox_ipam_service.go b/netbox/ipam/data_netbox_ipam_service.go index 40dce8b25..5d90618fa 100644 --- a/netbox/ipam/data_netbox_ipam_service.go +++ b/netbox/ipam/data_netbox_ipam_service.go @@ -93,7 +93,9 @@ func dataNetboxIpamServiceRead(ctx context.Context, d *schema.ResourceData, r := list.Payload.Results[0] d.SetId(strconv.FormatInt(r.ID, 10)) - d.Set("content_type", util.ConvertURIContentType(r.URL)) + if err = d.Set("content_type", util.ConvertURIContentType(r.URL)); err != nil { + return diag.FromErr(err) + } return nil } diff --git a/netbox/ipam/data_netbox_ipam_vlan.go b/netbox/ipam/data_netbox_ipam_vlan.go index fdb8d4973..36726b257 100644 --- a/netbox/ipam/data_netbox_ipam_vlan.go +++ b/netbox/ipam/data_netbox_ipam_vlan.go @@ -64,7 +64,9 @@ func dataNetboxIpamVlanRead(ctx context.Context, d *schema.ResourceData, m inter r := list.Payload.Results[0] d.SetId(strconv.FormatInt(r.ID, 10)) - d.Set("content_type", util.ConvertURIContentType(r.URL)) + if err = d.Set("content_type", util.ConvertURIContentType(r.URL)); err != nil { + return diag.FromErr(err) + } return nil } diff --git a/netbox/ipam/data_netbox_ipam_vlan_group.go b/netbox/ipam/data_netbox_ipam_vlan_group.go index e1208c125..0302c9d92 100644 --- a/netbox/ipam/data_netbox_ipam_vlan_group.go +++ b/netbox/ipam/data_netbox_ipam_vlan_group.go @@ -58,7 +58,9 @@ func dataNetboxIpamVlanGroupRead(ctx context.Context, d *schema.ResourceData, m r := list.Payload.Results[0] d.SetId(strconv.FormatInt(r.ID, 10)) - d.Set("content_type", util.ConvertURIContentType(r.URL)) + if err = d.Set("content_type", util.ConvertURIContentType(r.URL)); err != nil { + return diag.FromErr(err) + } return nil } diff --git a/netbox/ipam/resource_netbox_ipam_ip_addresses.go b/netbox/ipam/resource_netbox_ipam_ip_addresses.go index f284623fd..9323a58d4 100644 --- a/netbox/ipam/resource_netbox_ipam_ip_addresses.go +++ b/netbox/ipam/resource_netbox_ipam_ip_addresses.go @@ -147,7 +147,9 @@ func resourceNetboxIpamIPAddressesCreate(ctx context.Context, d *schema.Resource } address = *ip.Address addressid = &ip.ID - d.Set("address", address) + if err := d.Set("address", address); err != nil { + return diag.FromErr(err) + } } else if rangeid, ok := d.GetOk("ip_range"); ok { ip, err := getNewAvailableIPForIPRange(client, int64(rangeid.(int))) if err != nil { @@ -155,7 +157,9 @@ func resourceNetboxIpamIPAddressesCreate(ctx context.Context, d *schema.Resource } address = *ip.Address addressid = &ip.ID - d.Set("address", address) + if err := d.Set("address", address); err != nil { + return diag.FromErr(err) + } } else { return diag.Errorf("exactly one of (address, ip_range, prefix) must be specified") } diff --git a/netbox/json/data_netbox_json_circuits_circuit_terminations_list.go b/netbox/json/data_netbox_json_circuits_circuit_terminations_list.go index d690a8d30..69d474e8a 100644 --- a/netbox/json/data_netbox_json_circuits_circuit_terminations_list.go +++ b/netbox/json/data_netbox_json_circuits_circuit_terminations_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/circuits" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONCircuitsCircuitTerminationsList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the circuits_circuit_terminations_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONCircuitsCircuitTerminationsListRead(ctx context.Context, d *s j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONCircuitsCircuitTerminationsList") return nil diff --git a/netbox/json/data_netbox_json_circuits_circuit_types_list.go b/netbox/json/data_netbox_json_circuits_circuit_types_list.go index 6fe72f641..58e5d0e66 100644 --- a/netbox/json/data_netbox_json_circuits_circuit_types_list.go +++ b/netbox/json/data_netbox_json_circuits_circuit_types_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/circuits" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONCircuitsCircuitTypesList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the circuits_circuit_types_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONCircuitsCircuitTypesListRead(ctx context.Context, d *schema.R j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONCircuitsCircuitTypesList") return nil diff --git a/netbox/json/data_netbox_json_circuits_circuits_list.go b/netbox/json/data_netbox_json_circuits_circuits_list.go index 544dcb9d6..4707c0db5 100644 --- a/netbox/json/data_netbox_json_circuits_circuits_list.go +++ b/netbox/json/data_netbox_json_circuits_circuits_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/circuits" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONCircuitsCircuitsList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the circuits_circuits_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONCircuitsCircuitsListRead(ctx context.Context, d *schema.Resou j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONCircuitsCircuitsList") return nil diff --git a/netbox/json/data_netbox_json_circuits_provider_networks_list.go b/netbox/json/data_netbox_json_circuits_provider_networks_list.go index f027c46e1..d604b2509 100644 --- a/netbox/json/data_netbox_json_circuits_provider_networks_list.go +++ b/netbox/json/data_netbox_json_circuits_provider_networks_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/circuits" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONCircuitsProviderNetworksList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the circuits_provider_networks_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONCircuitsProviderNetworksListRead(ctx context.Context, d *sche j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONCircuitsProviderNetworksList") return nil diff --git a/netbox/json/data_netbox_json_circuits_providers_list.go b/netbox/json/data_netbox_json_circuits_providers_list.go index c83723adc..9e021bb6a 100644 --- a/netbox/json/data_netbox_json_circuits_providers_list.go +++ b/netbox/json/data_netbox_json_circuits_providers_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/circuits" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONCircuitsProvidersList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the circuits_providers_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONCircuitsProvidersListRead(ctx context.Context, d *schema.Reso j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONCircuitsProvidersList") return nil diff --git a/netbox/json/data_netbox_json_dcim_cables_list.go b/netbox/json/data_netbox_json_dcim_cables_list.go index 1f07ac378..24a25676b 100644 --- a/netbox/json/data_netbox_json_dcim_cables_list.go +++ b/netbox/json/data_netbox_json_dcim_cables_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/dcim" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONDcimCablesList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the dcim_cables_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONDcimCablesListRead(ctx context.Context, d *schema.ResourceDat j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONDcimCablesList") return nil diff --git a/netbox/json/data_netbox_json_dcim_console_port_templates_list.go b/netbox/json/data_netbox_json_dcim_console_port_templates_list.go index 7af381f64..46a79144a 100644 --- a/netbox/json/data_netbox_json_dcim_console_port_templates_list.go +++ b/netbox/json/data_netbox_json_dcim_console_port_templates_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/dcim" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONDcimConsolePortTemplatesList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the dcim_console_port_templates_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONDcimConsolePortTemplatesListRead(ctx context.Context, d *sche j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONDcimConsolePortTemplatesList") return nil diff --git a/netbox/json/data_netbox_json_dcim_console_ports_list.go b/netbox/json/data_netbox_json_dcim_console_ports_list.go index 9cacfcd06..74c057824 100644 --- a/netbox/json/data_netbox_json_dcim_console_ports_list.go +++ b/netbox/json/data_netbox_json_dcim_console_ports_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/dcim" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONDcimConsolePortsList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the dcim_console_ports_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONDcimConsolePortsListRead(ctx context.Context, d *schema.Resou j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONDcimConsolePortsList") return nil diff --git a/netbox/json/data_netbox_json_dcim_console_server_port_templates_list.go b/netbox/json/data_netbox_json_dcim_console_server_port_templates_list.go index 22ee683ea..7121b92a4 100644 --- a/netbox/json/data_netbox_json_dcim_console_server_port_templates_list.go +++ b/netbox/json/data_netbox_json_dcim_console_server_port_templates_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/dcim" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONDcimConsoleServerPortTemplatesList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the dcim_console_server_port_templates_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONDcimConsoleServerPortTemplatesListRead(ctx context.Context, d j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONDcimConsoleServerPortTemplatesList") return nil diff --git a/netbox/json/data_netbox_json_dcim_console_server_ports_list.go b/netbox/json/data_netbox_json_dcim_console_server_ports_list.go index f9cb8f62e..544834735 100644 --- a/netbox/json/data_netbox_json_dcim_console_server_ports_list.go +++ b/netbox/json/data_netbox_json_dcim_console_server_ports_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/dcim" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONDcimConsoleServerPortsList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the dcim_console_server_ports_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONDcimConsoleServerPortsListRead(ctx context.Context, d *schema j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONDcimConsoleServerPortsList") return nil diff --git a/netbox/json/data_netbox_json_dcim_device_bay_templates_list.go b/netbox/json/data_netbox_json_dcim_device_bay_templates_list.go index eb45584d5..1be021ddf 100644 --- a/netbox/json/data_netbox_json_dcim_device_bay_templates_list.go +++ b/netbox/json/data_netbox_json_dcim_device_bay_templates_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/dcim" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONDcimDeviceBayTemplatesList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the dcim_device_bay_templates_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONDcimDeviceBayTemplatesListRead(ctx context.Context, d *schema j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONDcimDeviceBayTemplatesList") return nil diff --git a/netbox/json/data_netbox_json_dcim_device_bays_list.go b/netbox/json/data_netbox_json_dcim_device_bays_list.go index 4003591f8..359f75543 100644 --- a/netbox/json/data_netbox_json_dcim_device_bays_list.go +++ b/netbox/json/data_netbox_json_dcim_device_bays_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/dcim" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONDcimDeviceBaysList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the dcim_device_bays_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONDcimDeviceBaysListRead(ctx context.Context, d *schema.Resourc j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONDcimDeviceBaysList") return nil diff --git a/netbox/json/data_netbox_json_dcim_device_roles_list.go b/netbox/json/data_netbox_json_dcim_device_roles_list.go index 58b39da63..8ef8029b3 100644 --- a/netbox/json/data_netbox_json_dcim_device_roles_list.go +++ b/netbox/json/data_netbox_json_dcim_device_roles_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/dcim" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONDcimDeviceRolesList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the dcim_device_roles_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONDcimDeviceRolesListRead(ctx context.Context, d *schema.Resour j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONDcimDeviceRolesList") return nil diff --git a/netbox/json/data_netbox_json_dcim_device_types_list.go b/netbox/json/data_netbox_json_dcim_device_types_list.go index 64c23343e..8350575ba 100644 --- a/netbox/json/data_netbox_json_dcim_device_types_list.go +++ b/netbox/json/data_netbox_json_dcim_device_types_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/dcim" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONDcimDeviceTypesList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the dcim_device_types_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONDcimDeviceTypesListRead(ctx context.Context, d *schema.Resour j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONDcimDeviceTypesList") return nil diff --git a/netbox/json/data_netbox_json_dcim_devices_list.go b/netbox/json/data_netbox_json_dcim_devices_list.go index 478502939..f8e6432db 100644 --- a/netbox/json/data_netbox_json_dcim_devices_list.go +++ b/netbox/json/data_netbox_json_dcim_devices_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/dcim" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONDcimDevicesList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the dcim_devices_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONDcimDevicesListRead(ctx context.Context, d *schema.ResourceDa j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONDcimDevicesList") return nil diff --git a/netbox/json/data_netbox_json_dcim_front_port_templates_list.go b/netbox/json/data_netbox_json_dcim_front_port_templates_list.go index 608612c58..767ff1792 100644 --- a/netbox/json/data_netbox_json_dcim_front_port_templates_list.go +++ b/netbox/json/data_netbox_json_dcim_front_port_templates_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/dcim" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONDcimFrontPortTemplatesList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the dcim_front_port_templates_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONDcimFrontPortTemplatesListRead(ctx context.Context, d *schema j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONDcimFrontPortTemplatesList") return nil diff --git a/netbox/json/data_netbox_json_dcim_front_ports_list.go b/netbox/json/data_netbox_json_dcim_front_ports_list.go index ccd2125b9..82b95ad9d 100644 --- a/netbox/json/data_netbox_json_dcim_front_ports_list.go +++ b/netbox/json/data_netbox_json_dcim_front_ports_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/dcim" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONDcimFrontPortsList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the dcim_front_ports_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONDcimFrontPortsListRead(ctx context.Context, d *schema.Resourc j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONDcimFrontPortsList") return nil diff --git a/netbox/json/data_netbox_json_dcim_interface_templates_list.go b/netbox/json/data_netbox_json_dcim_interface_templates_list.go index fa45d17b5..280b144ab 100644 --- a/netbox/json/data_netbox_json_dcim_interface_templates_list.go +++ b/netbox/json/data_netbox_json_dcim_interface_templates_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/dcim" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONDcimInterfaceTemplatesList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the dcim_interface_templates_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONDcimInterfaceTemplatesListRead(ctx context.Context, d *schema j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONDcimInterfaceTemplatesList") return nil diff --git a/netbox/json/data_netbox_json_dcim_interfaces_list.go b/netbox/json/data_netbox_json_dcim_interfaces_list.go index 2a1f23159..fbfcbbb74 100644 --- a/netbox/json/data_netbox_json_dcim_interfaces_list.go +++ b/netbox/json/data_netbox_json_dcim_interfaces_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/dcim" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONDcimInterfacesList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the dcim_interfaces_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONDcimInterfacesListRead(ctx context.Context, d *schema.Resourc j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONDcimInterfacesList") return nil diff --git a/netbox/json/data_netbox_json_dcim_inventory_item_roles_list.go b/netbox/json/data_netbox_json_dcim_inventory_item_roles_list.go index 88f9d9d40..ace67903d 100644 --- a/netbox/json/data_netbox_json_dcim_inventory_item_roles_list.go +++ b/netbox/json/data_netbox_json_dcim_inventory_item_roles_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/dcim" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONDcimInventoryItemRolesList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the dcim_inventory_item_roles_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONDcimInventoryItemRolesListRead(ctx context.Context, d *schema j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONDcimInventoryItemRolesList") return nil diff --git a/netbox/json/data_netbox_json_dcim_inventory_item_templates_list.go b/netbox/json/data_netbox_json_dcim_inventory_item_templates_list.go index 12be5665b..75433daaa 100644 --- a/netbox/json/data_netbox_json_dcim_inventory_item_templates_list.go +++ b/netbox/json/data_netbox_json_dcim_inventory_item_templates_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/dcim" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONDcimInventoryItemTemplatesList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the dcim_inventory_item_templates_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONDcimInventoryItemTemplatesListRead(ctx context.Context, d *sc j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONDcimInventoryItemTemplatesList") return nil diff --git a/netbox/json/data_netbox_json_dcim_inventory_items_list.go b/netbox/json/data_netbox_json_dcim_inventory_items_list.go index 5d94accd1..2d52a73ab 100644 --- a/netbox/json/data_netbox_json_dcim_inventory_items_list.go +++ b/netbox/json/data_netbox_json_dcim_inventory_items_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/dcim" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONDcimInventoryItemsList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the dcim_inventory_items_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONDcimInventoryItemsListRead(ctx context.Context, d *schema.Res j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONDcimInventoryItemsList") return nil diff --git a/netbox/json/data_netbox_json_dcim_locations_list.go b/netbox/json/data_netbox_json_dcim_locations_list.go index c38649874..1deb6b762 100644 --- a/netbox/json/data_netbox_json_dcim_locations_list.go +++ b/netbox/json/data_netbox_json_dcim_locations_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/dcim" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONDcimLocationsList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the dcim_locations_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONDcimLocationsListRead(ctx context.Context, d *schema.Resource j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONDcimLocationsList") return nil diff --git a/netbox/json/data_netbox_json_dcim_manufacturers_list.go b/netbox/json/data_netbox_json_dcim_manufacturers_list.go index 88600222c..778e126a3 100644 --- a/netbox/json/data_netbox_json_dcim_manufacturers_list.go +++ b/netbox/json/data_netbox_json_dcim_manufacturers_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/dcim" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONDcimManufacturersList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the dcim_manufacturers_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONDcimManufacturersListRead(ctx context.Context, d *schema.Reso j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONDcimManufacturersList") return nil diff --git a/netbox/json/data_netbox_json_dcim_module_bay_templates_list.go b/netbox/json/data_netbox_json_dcim_module_bay_templates_list.go index 92a4a0968..2390dd63b 100644 --- a/netbox/json/data_netbox_json_dcim_module_bay_templates_list.go +++ b/netbox/json/data_netbox_json_dcim_module_bay_templates_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/dcim" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONDcimModuleBayTemplatesList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the dcim_module_bay_templates_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONDcimModuleBayTemplatesListRead(ctx context.Context, d *schema j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONDcimModuleBayTemplatesList") return nil diff --git a/netbox/json/data_netbox_json_dcim_module_bays_list.go b/netbox/json/data_netbox_json_dcim_module_bays_list.go index 8b5cc2fc2..b86c2eb5c 100644 --- a/netbox/json/data_netbox_json_dcim_module_bays_list.go +++ b/netbox/json/data_netbox_json_dcim_module_bays_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/dcim" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONDcimModuleBaysList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the dcim_module_bays_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONDcimModuleBaysListRead(ctx context.Context, d *schema.Resourc j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONDcimModuleBaysList") return nil diff --git a/netbox/json/data_netbox_json_dcim_module_types_list.go b/netbox/json/data_netbox_json_dcim_module_types_list.go index 89d551a61..6366e625f 100644 --- a/netbox/json/data_netbox_json_dcim_module_types_list.go +++ b/netbox/json/data_netbox_json_dcim_module_types_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/dcim" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONDcimModuleTypesList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the dcim_module_types_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONDcimModuleTypesListRead(ctx context.Context, d *schema.Resour j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONDcimModuleTypesList") return nil diff --git a/netbox/json/data_netbox_json_dcim_modules_list.go b/netbox/json/data_netbox_json_dcim_modules_list.go index ef28418f9..bc382e4bf 100644 --- a/netbox/json/data_netbox_json_dcim_modules_list.go +++ b/netbox/json/data_netbox_json_dcim_modules_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/dcim" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONDcimModulesList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the dcim_modules_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONDcimModulesListRead(ctx context.Context, d *schema.ResourceDa j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONDcimModulesList") return nil diff --git a/netbox/json/data_netbox_json_dcim_platforms_list.go b/netbox/json/data_netbox_json_dcim_platforms_list.go index e8731a516..4dbd0dd7c 100644 --- a/netbox/json/data_netbox_json_dcim_platforms_list.go +++ b/netbox/json/data_netbox_json_dcim_platforms_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/dcim" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONDcimPlatformsList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the dcim_platforms_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONDcimPlatformsListRead(ctx context.Context, d *schema.Resource j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONDcimPlatformsList") return nil diff --git a/netbox/json/data_netbox_json_dcim_power_feeds_list.go b/netbox/json/data_netbox_json_dcim_power_feeds_list.go index 3c55406a9..febb060db 100644 --- a/netbox/json/data_netbox_json_dcim_power_feeds_list.go +++ b/netbox/json/data_netbox_json_dcim_power_feeds_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/dcim" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONDcimPowerFeedsList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the dcim_power_feeds_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONDcimPowerFeedsListRead(ctx context.Context, d *schema.Resourc j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONDcimPowerFeedsList") return nil diff --git a/netbox/json/data_netbox_json_dcim_power_outlet_templates_list.go b/netbox/json/data_netbox_json_dcim_power_outlet_templates_list.go index b8e45c8f1..751711102 100644 --- a/netbox/json/data_netbox_json_dcim_power_outlet_templates_list.go +++ b/netbox/json/data_netbox_json_dcim_power_outlet_templates_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/dcim" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONDcimPowerOutletTemplatesList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the dcim_power_outlet_templates_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONDcimPowerOutletTemplatesListRead(ctx context.Context, d *sche j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONDcimPowerOutletTemplatesList") return nil diff --git a/netbox/json/data_netbox_json_dcim_power_outlets_list.go b/netbox/json/data_netbox_json_dcim_power_outlets_list.go index f90df4677..7404b2cf9 100644 --- a/netbox/json/data_netbox_json_dcim_power_outlets_list.go +++ b/netbox/json/data_netbox_json_dcim_power_outlets_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/dcim" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONDcimPowerOutletsList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the dcim_power_outlets_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONDcimPowerOutletsListRead(ctx context.Context, d *schema.Resou j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONDcimPowerOutletsList") return nil diff --git a/netbox/json/data_netbox_json_dcim_power_panels_list.go b/netbox/json/data_netbox_json_dcim_power_panels_list.go index 03cf554cb..4ed9b283f 100644 --- a/netbox/json/data_netbox_json_dcim_power_panels_list.go +++ b/netbox/json/data_netbox_json_dcim_power_panels_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/dcim" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONDcimPowerPanelsList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the dcim_power_panels_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONDcimPowerPanelsListRead(ctx context.Context, d *schema.Resour j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONDcimPowerPanelsList") return nil diff --git a/netbox/json/data_netbox_json_dcim_power_port_templates_list.go b/netbox/json/data_netbox_json_dcim_power_port_templates_list.go index df10f30ff..cf2b51cd8 100644 --- a/netbox/json/data_netbox_json_dcim_power_port_templates_list.go +++ b/netbox/json/data_netbox_json_dcim_power_port_templates_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/dcim" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONDcimPowerPortTemplatesList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the dcim_power_port_templates_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONDcimPowerPortTemplatesListRead(ctx context.Context, d *schema j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONDcimPowerPortTemplatesList") return nil diff --git a/netbox/json/data_netbox_json_dcim_power_ports_list.go b/netbox/json/data_netbox_json_dcim_power_ports_list.go index 3c795d300..379fb99b3 100644 --- a/netbox/json/data_netbox_json_dcim_power_ports_list.go +++ b/netbox/json/data_netbox_json_dcim_power_ports_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/dcim" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONDcimPowerPortsList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the dcim_power_ports_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONDcimPowerPortsListRead(ctx context.Context, d *schema.Resourc j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONDcimPowerPortsList") return nil diff --git a/netbox/json/data_netbox_json_dcim_rack_reservations_list.go b/netbox/json/data_netbox_json_dcim_rack_reservations_list.go index 47d91dfc2..f505e7454 100644 --- a/netbox/json/data_netbox_json_dcim_rack_reservations_list.go +++ b/netbox/json/data_netbox_json_dcim_rack_reservations_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/dcim" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONDcimRackReservationsList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the dcim_rack_reservations_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONDcimRackReservationsListRead(ctx context.Context, d *schema.R j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONDcimRackReservationsList") return nil diff --git a/netbox/json/data_netbox_json_dcim_rack_roles_list.go b/netbox/json/data_netbox_json_dcim_rack_roles_list.go index 38c28dec4..ba60cce0c 100644 --- a/netbox/json/data_netbox_json_dcim_rack_roles_list.go +++ b/netbox/json/data_netbox_json_dcim_rack_roles_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/dcim" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONDcimRackRolesList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the dcim_rack_roles_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONDcimRackRolesListRead(ctx context.Context, d *schema.Resource j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONDcimRackRolesList") return nil diff --git a/netbox/json/data_netbox_json_dcim_racks_list.go b/netbox/json/data_netbox_json_dcim_racks_list.go index 1db7b091e..f136871c2 100644 --- a/netbox/json/data_netbox_json_dcim_racks_list.go +++ b/netbox/json/data_netbox_json_dcim_racks_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/dcim" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONDcimRacksList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the dcim_racks_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONDcimRacksListRead(ctx context.Context, d *schema.ResourceData j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONDcimRacksList") return nil diff --git a/netbox/json/data_netbox_json_dcim_rear_port_templates_list.go b/netbox/json/data_netbox_json_dcim_rear_port_templates_list.go index de9545d15..18d6e22b8 100644 --- a/netbox/json/data_netbox_json_dcim_rear_port_templates_list.go +++ b/netbox/json/data_netbox_json_dcim_rear_port_templates_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/dcim" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONDcimRearPortTemplatesList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the dcim_rear_port_templates_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONDcimRearPortTemplatesListRead(ctx context.Context, d *schema. j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONDcimRearPortTemplatesList") return nil diff --git a/netbox/json/data_netbox_json_dcim_rear_ports_list.go b/netbox/json/data_netbox_json_dcim_rear_ports_list.go index ea42b5d99..d2c46532a 100644 --- a/netbox/json/data_netbox_json_dcim_rear_ports_list.go +++ b/netbox/json/data_netbox_json_dcim_rear_ports_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/dcim" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONDcimRearPortsList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the dcim_rear_ports_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONDcimRearPortsListRead(ctx context.Context, d *schema.Resource j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONDcimRearPortsList") return nil diff --git a/netbox/json/data_netbox_json_dcim_regions_list.go b/netbox/json/data_netbox_json_dcim_regions_list.go index 8e6bf84be..17fa92865 100644 --- a/netbox/json/data_netbox_json_dcim_regions_list.go +++ b/netbox/json/data_netbox_json_dcim_regions_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/dcim" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONDcimRegionsList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the dcim_regions_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONDcimRegionsListRead(ctx context.Context, d *schema.ResourceDa j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONDcimRegionsList") return nil diff --git a/netbox/json/data_netbox_json_dcim_site_groups_list.go b/netbox/json/data_netbox_json_dcim_site_groups_list.go index d0425a175..692ad7d5e 100644 --- a/netbox/json/data_netbox_json_dcim_site_groups_list.go +++ b/netbox/json/data_netbox_json_dcim_site_groups_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/dcim" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONDcimSiteGroupsList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the dcim_site_groups_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONDcimSiteGroupsListRead(ctx context.Context, d *schema.Resourc j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONDcimSiteGroupsList") return nil diff --git a/netbox/json/data_netbox_json_dcim_sites_list.go b/netbox/json/data_netbox_json_dcim_sites_list.go index 0321e8713..99e01089e 100644 --- a/netbox/json/data_netbox_json_dcim_sites_list.go +++ b/netbox/json/data_netbox_json_dcim_sites_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/dcim" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONDcimSitesList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the dcim_sites_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONDcimSitesListRead(ctx context.Context, d *schema.ResourceData j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONDcimSitesList") return nil diff --git a/netbox/json/data_netbox_json_dcim_virtual_chassis_list.go b/netbox/json/data_netbox_json_dcim_virtual_chassis_list.go index 7d510f20e..1efa2e504 100644 --- a/netbox/json/data_netbox_json_dcim_virtual_chassis_list.go +++ b/netbox/json/data_netbox_json_dcim_virtual_chassis_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/dcim" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONDcimVirtualChassisList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the dcim_virtual_chassis_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONDcimVirtualChassisListRead(ctx context.Context, d *schema.Res j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONDcimVirtualChassisList") return nil diff --git a/netbox/json/data_netbox_json_extras_config_contexts_list.go b/netbox/json/data_netbox_json_extras_config_contexts_list.go index f1640daa4..8d261abd5 100644 --- a/netbox/json/data_netbox_json_extras_config_contexts_list.go +++ b/netbox/json/data_netbox_json_extras_config_contexts_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/extras" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONExtrasConfigContextsList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the extras_config_contexts_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONExtrasConfigContextsListRead(ctx context.Context, d *schema.R j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONExtrasConfigContextsList") return nil diff --git a/netbox/json/data_netbox_json_extras_content_types_list.go b/netbox/json/data_netbox_json_extras_content_types_list.go index caa3f0c64..07a1cee74 100644 --- a/netbox/json/data_netbox_json_extras_content_types_list.go +++ b/netbox/json/data_netbox_json_extras_content_types_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/extras" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONExtrasContentTypesList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the extras_content_types_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONExtrasContentTypesListRead(ctx context.Context, d *schema.Res j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONExtrasContentTypesList") return nil diff --git a/netbox/json/data_netbox_json_extras_custom_fields_list.go b/netbox/json/data_netbox_json_extras_custom_fields_list.go index f8d23d892..c32e17b39 100644 --- a/netbox/json/data_netbox_json_extras_custom_fields_list.go +++ b/netbox/json/data_netbox_json_extras_custom_fields_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/extras" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONExtrasCustomFieldsList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the extras_custom_fields_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONExtrasCustomFieldsListRead(ctx context.Context, d *schema.Res j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONExtrasCustomFieldsList") return nil diff --git a/netbox/json/data_netbox_json_extras_custom_links_list.go b/netbox/json/data_netbox_json_extras_custom_links_list.go index 3916a7ae5..9c624c20b 100644 --- a/netbox/json/data_netbox_json_extras_custom_links_list.go +++ b/netbox/json/data_netbox_json_extras_custom_links_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/extras" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONExtrasCustomLinksList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the extras_custom_links_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONExtrasCustomLinksListRead(ctx context.Context, d *schema.Reso j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONExtrasCustomLinksList") return nil diff --git a/netbox/json/data_netbox_json_extras_export_templates_list.go b/netbox/json/data_netbox_json_extras_export_templates_list.go index 9eee51a1b..5debb0501 100644 --- a/netbox/json/data_netbox_json_extras_export_templates_list.go +++ b/netbox/json/data_netbox_json_extras_export_templates_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/extras" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONExtrasExportTemplatesList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the extras_export_templates_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONExtrasExportTemplatesListRead(ctx context.Context, d *schema. j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONExtrasExportTemplatesList") return nil diff --git a/netbox/json/data_netbox_json_extras_image_attachments_list.go b/netbox/json/data_netbox_json_extras_image_attachments_list.go index 1b0b411d0..c5d4c7acb 100644 --- a/netbox/json/data_netbox_json_extras_image_attachments_list.go +++ b/netbox/json/data_netbox_json_extras_image_attachments_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/extras" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONExtrasImageAttachmentsList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the extras_image_attachments_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONExtrasImageAttachmentsListRead(ctx context.Context, d *schema j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONExtrasImageAttachmentsList") return nil diff --git a/netbox/json/data_netbox_json_extras_job_results_list.go b/netbox/json/data_netbox_json_extras_job_results_list.go index 9300037a8..b627240d2 100644 --- a/netbox/json/data_netbox_json_extras_job_results_list.go +++ b/netbox/json/data_netbox_json_extras_job_results_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/extras" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONExtrasJobResultsList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the extras_job_results_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONExtrasJobResultsListRead(ctx context.Context, d *schema.Resou j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONExtrasJobResultsList") return nil diff --git a/netbox/json/data_netbox_json_extras_journal_entries_list.go b/netbox/json/data_netbox_json_extras_journal_entries_list.go index d325dbc9c..2a820f997 100644 --- a/netbox/json/data_netbox_json_extras_journal_entries_list.go +++ b/netbox/json/data_netbox_json_extras_journal_entries_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/extras" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONExtrasJournalEntriesList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the extras_journal_entries_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONExtrasJournalEntriesListRead(ctx context.Context, d *schema.R j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONExtrasJournalEntriesList") return nil diff --git a/netbox/json/data_netbox_json_extras_object_changes_list.go b/netbox/json/data_netbox_json_extras_object_changes_list.go index bbccf3b4c..285505dba 100644 --- a/netbox/json/data_netbox_json_extras_object_changes_list.go +++ b/netbox/json/data_netbox_json_extras_object_changes_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/extras" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONExtrasObjectChangesList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the extras_object_changes_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONExtrasObjectChangesListRead(ctx context.Context, d *schema.Re j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONExtrasObjectChangesList") return nil diff --git a/netbox/json/data_netbox_json_extras_tags_list.go b/netbox/json/data_netbox_json_extras_tags_list.go index 8160757b3..fbbdf50aa 100644 --- a/netbox/json/data_netbox_json_extras_tags_list.go +++ b/netbox/json/data_netbox_json_extras_tags_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/extras" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONExtrasTagsList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the extras_tags_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONExtrasTagsListRead(ctx context.Context, d *schema.ResourceDat j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONExtrasTagsList") return nil diff --git a/netbox/json/data_netbox_json_extras_webhooks_list.go b/netbox/json/data_netbox_json_extras_webhooks_list.go index dccb6b94a..c3ccd2226 100644 --- a/netbox/json/data_netbox_json_extras_webhooks_list.go +++ b/netbox/json/data_netbox_json_extras_webhooks_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/extras" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONExtrasWebhooksList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the extras_webhooks_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONExtrasWebhooksListRead(ctx context.Context, d *schema.Resourc j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONExtrasWebhooksList") return nil diff --git a/netbox/json/data_netbox_json_ipam_aggregates_list.go b/netbox/json/data_netbox_json_ipam_aggregates_list.go index 259ed16bf..c4e9e1448 100644 --- a/netbox/json/data_netbox_json_ipam_aggregates_list.go +++ b/netbox/json/data_netbox_json_ipam_aggregates_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/ipam" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONIpamAggregatesList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the ipam_aggregates_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONIpamAggregatesListRead(ctx context.Context, d *schema.Resourc j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONIpamAggregatesList") return nil diff --git a/netbox/json/data_netbox_json_ipam_asns_list.go b/netbox/json/data_netbox_json_ipam_asns_list.go index 47a8cd044..40de40361 100644 --- a/netbox/json/data_netbox_json_ipam_asns_list.go +++ b/netbox/json/data_netbox_json_ipam_asns_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/ipam" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONIpamAsnsList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the ipam_asns_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONIpamAsnsListRead(ctx context.Context, d *schema.ResourceData, j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONIpamAsnsList") return nil diff --git a/netbox/json/data_netbox_json_ipam_fhrp_group_assignments_list.go b/netbox/json/data_netbox_json_ipam_fhrp_group_assignments_list.go index 2db27b6e7..d02b505c7 100644 --- a/netbox/json/data_netbox_json_ipam_fhrp_group_assignments_list.go +++ b/netbox/json/data_netbox_json_ipam_fhrp_group_assignments_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/ipam" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONIpamFhrpGroupAssignmentsList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the ipam_fhrp_group_assignments_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONIpamFhrpGroupAssignmentsListRead(ctx context.Context, d *sche j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONIpamFhrpGroupAssignmentsList") return nil diff --git a/netbox/json/data_netbox_json_ipam_fhrp_groups_list.go b/netbox/json/data_netbox_json_ipam_fhrp_groups_list.go index 9ec73abce..da5e2010b 100644 --- a/netbox/json/data_netbox_json_ipam_fhrp_groups_list.go +++ b/netbox/json/data_netbox_json_ipam_fhrp_groups_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/ipam" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONIpamFhrpGroupsList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the ipam_fhrp_groups_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONIpamFhrpGroupsListRead(ctx context.Context, d *schema.Resourc j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONIpamFhrpGroupsList") return nil diff --git a/netbox/json/data_netbox_json_ipam_ip_addresses_list.go b/netbox/json/data_netbox_json_ipam_ip_addresses_list.go index 5b82e4826..39c64e807 100644 --- a/netbox/json/data_netbox_json_ipam_ip_addresses_list.go +++ b/netbox/json/data_netbox_json_ipam_ip_addresses_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/ipam" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONIpamIPAddressesList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the ipam_ip_addresses_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONIpamIPAddressesListRead(ctx context.Context, d *schema.Resour j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONIpamIPAddressesList") return nil diff --git a/netbox/json/data_netbox_json_ipam_ip_ranges_list.go b/netbox/json/data_netbox_json_ipam_ip_ranges_list.go index e9bdfb826..7975e83f9 100644 --- a/netbox/json/data_netbox_json_ipam_ip_ranges_list.go +++ b/netbox/json/data_netbox_json_ipam_ip_ranges_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/ipam" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONIpamIPRangesList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the ipam_ip_ranges_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONIpamIPRangesListRead(ctx context.Context, d *schema.ResourceD j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONIpamIPRangesList") return nil diff --git a/netbox/json/data_netbox_json_ipam_prefixes_list.go b/netbox/json/data_netbox_json_ipam_prefixes_list.go index b99f1bef1..8e46f1e74 100644 --- a/netbox/json/data_netbox_json_ipam_prefixes_list.go +++ b/netbox/json/data_netbox_json_ipam_prefixes_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/ipam" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONIpamPrefixesList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the ipam_prefixes_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONIpamPrefixesListRead(ctx context.Context, d *schema.ResourceD j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONIpamPrefixesList") return nil diff --git a/netbox/json/data_netbox_json_ipam_rirs_list.go b/netbox/json/data_netbox_json_ipam_rirs_list.go index 211662932..e600a6b74 100644 --- a/netbox/json/data_netbox_json_ipam_rirs_list.go +++ b/netbox/json/data_netbox_json_ipam_rirs_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/ipam" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONIpamRirsList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the ipam_rirs_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONIpamRirsListRead(ctx context.Context, d *schema.ResourceData, j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONIpamRirsList") return nil diff --git a/netbox/json/data_netbox_json_ipam_roles_list.go b/netbox/json/data_netbox_json_ipam_roles_list.go index 6ac0e6604..7fea1df86 100644 --- a/netbox/json/data_netbox_json_ipam_roles_list.go +++ b/netbox/json/data_netbox_json_ipam_roles_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/ipam" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONIpamRolesList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the ipam_roles_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONIpamRolesListRead(ctx context.Context, d *schema.ResourceData j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONIpamRolesList") return nil diff --git a/netbox/json/data_netbox_json_ipam_route_targets_list.go b/netbox/json/data_netbox_json_ipam_route_targets_list.go index 44f0c6876..cf099e415 100644 --- a/netbox/json/data_netbox_json_ipam_route_targets_list.go +++ b/netbox/json/data_netbox_json_ipam_route_targets_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/ipam" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONIpamRouteTargetsList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the ipam_route_targets_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONIpamRouteTargetsListRead(ctx context.Context, d *schema.Resou j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONIpamRouteTargetsList") return nil diff --git a/netbox/json/data_netbox_json_ipam_service_templates_list.go b/netbox/json/data_netbox_json_ipam_service_templates_list.go index 9692d16fb..7541b5666 100644 --- a/netbox/json/data_netbox_json_ipam_service_templates_list.go +++ b/netbox/json/data_netbox_json_ipam_service_templates_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/ipam" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONIpamServiceTemplatesList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the ipam_service_templates_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONIpamServiceTemplatesListRead(ctx context.Context, d *schema.R j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONIpamServiceTemplatesList") return nil diff --git a/netbox/json/data_netbox_json_ipam_services_list.go b/netbox/json/data_netbox_json_ipam_services_list.go index 300e6351f..3ba4e8aae 100644 --- a/netbox/json/data_netbox_json_ipam_services_list.go +++ b/netbox/json/data_netbox_json_ipam_services_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/ipam" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONIpamServicesList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the ipam_services_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONIpamServicesListRead(ctx context.Context, d *schema.ResourceD j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONIpamServicesList") return nil diff --git a/netbox/json/data_netbox_json_ipam_vlan_groups_list.go b/netbox/json/data_netbox_json_ipam_vlan_groups_list.go index 6abc327c8..627a145be 100644 --- a/netbox/json/data_netbox_json_ipam_vlan_groups_list.go +++ b/netbox/json/data_netbox_json_ipam_vlan_groups_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/ipam" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONIpamVlanGroupsList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the ipam_vlan_groups_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONIpamVlanGroupsListRead(ctx context.Context, d *schema.Resourc j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONIpamVlanGroupsList") return nil diff --git a/netbox/json/data_netbox_json_ipam_vlans_list.go b/netbox/json/data_netbox_json_ipam_vlans_list.go index 08b62cac7..3186716f9 100644 --- a/netbox/json/data_netbox_json_ipam_vlans_list.go +++ b/netbox/json/data_netbox_json_ipam_vlans_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/ipam" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONIpamVlansList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the ipam_vlans_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONIpamVlansListRead(ctx context.Context, d *schema.ResourceData j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONIpamVlansList") return nil diff --git a/netbox/json/data_netbox_json_ipam_vrfs_list.go b/netbox/json/data_netbox_json_ipam_vrfs_list.go index b0406d307..2ca923e54 100644 --- a/netbox/json/data_netbox_json_ipam_vrfs_list.go +++ b/netbox/json/data_netbox_json_ipam_vrfs_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/ipam" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONIpamVrfsList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the ipam_vrfs_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONIpamVrfsListRead(ctx context.Context, d *schema.ResourceData, j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONIpamVrfsList") return nil diff --git a/netbox/json/data_netbox_json_tenancy_contact_assignments_list.go b/netbox/json/data_netbox_json_tenancy_contact_assignments_list.go index 13f12dd1f..253fa7af5 100644 --- a/netbox/json/data_netbox_json_tenancy_contact_assignments_list.go +++ b/netbox/json/data_netbox_json_tenancy_contact_assignments_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/tenancy" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONTenancyContactAssignmentsList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the tenancy_contact_assignments_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONTenancyContactAssignmentsListRead(ctx context.Context, d *sch j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONTenancyContactAssignmentsList") return nil diff --git a/netbox/json/data_netbox_json_tenancy_contact_groups_list.go b/netbox/json/data_netbox_json_tenancy_contact_groups_list.go index 6368a3178..8f082bf95 100644 --- a/netbox/json/data_netbox_json_tenancy_contact_groups_list.go +++ b/netbox/json/data_netbox_json_tenancy_contact_groups_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/tenancy" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONTenancyContactGroupsList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the tenancy_contact_groups_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONTenancyContactGroupsListRead(ctx context.Context, d *schema.R j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONTenancyContactGroupsList") return nil diff --git a/netbox/json/data_netbox_json_tenancy_contact_roles_list.go b/netbox/json/data_netbox_json_tenancy_contact_roles_list.go index 44060bfca..839f94bff 100644 --- a/netbox/json/data_netbox_json_tenancy_contact_roles_list.go +++ b/netbox/json/data_netbox_json_tenancy_contact_roles_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/tenancy" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONTenancyContactRolesList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the tenancy_contact_roles_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONTenancyContactRolesListRead(ctx context.Context, d *schema.Re j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONTenancyContactRolesList") return nil diff --git a/netbox/json/data_netbox_json_tenancy_contacts_list.go b/netbox/json/data_netbox_json_tenancy_contacts_list.go index e58a64c54..2f4b04d0b 100644 --- a/netbox/json/data_netbox_json_tenancy_contacts_list.go +++ b/netbox/json/data_netbox_json_tenancy_contacts_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/tenancy" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONTenancyContactsList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the tenancy_contacts_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONTenancyContactsListRead(ctx context.Context, d *schema.Resour j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONTenancyContactsList") return nil diff --git a/netbox/json/data_netbox_json_tenancy_tenant_groups_list.go b/netbox/json/data_netbox_json_tenancy_tenant_groups_list.go index e55fe0a6d..f809a87f2 100644 --- a/netbox/json/data_netbox_json_tenancy_tenant_groups_list.go +++ b/netbox/json/data_netbox_json_tenancy_tenant_groups_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/tenancy" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONTenancyTenantGroupsList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the tenancy_tenant_groups_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONTenancyTenantGroupsListRead(ctx context.Context, d *schema.Re j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONTenancyTenantGroupsList") return nil diff --git a/netbox/json/data_netbox_json_tenancy_tenants_list.go b/netbox/json/data_netbox_json_tenancy_tenants_list.go index 077d27bc6..7b6cc8a47 100644 --- a/netbox/json/data_netbox_json_tenancy_tenants_list.go +++ b/netbox/json/data_netbox_json_tenancy_tenants_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/tenancy" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONTenancyTenantsList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the tenancy_tenants_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONTenancyTenantsListRead(ctx context.Context, d *schema.Resourc j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONTenancyTenantsList") return nil diff --git a/netbox/json/data_netbox_json_users_groups_list.go b/netbox/json/data_netbox_json_users_groups_list.go index f59ca219d..30ee2f3e3 100644 --- a/netbox/json/data_netbox_json_users_groups_list.go +++ b/netbox/json/data_netbox_json_users_groups_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/users" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONUsersGroupsList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the users_groups_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONUsersGroupsListRead(ctx context.Context, d *schema.ResourceDa j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONUsersGroupsList") return nil diff --git a/netbox/json/data_netbox_json_users_permissions_list.go b/netbox/json/data_netbox_json_users_permissions_list.go index b3a263866..32a49004e 100644 --- a/netbox/json/data_netbox_json_users_permissions_list.go +++ b/netbox/json/data_netbox_json_users_permissions_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/users" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONUsersPermissionsList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the users_permissions_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONUsersPermissionsListRead(ctx context.Context, d *schema.Resou j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONUsersPermissionsList") return nil diff --git a/netbox/json/data_netbox_json_users_tokens_list.go b/netbox/json/data_netbox_json_users_tokens_list.go index 94135bc53..67bf3b046 100644 --- a/netbox/json/data_netbox_json_users_tokens_list.go +++ b/netbox/json/data_netbox_json_users_tokens_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/users" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONUsersTokensList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the users_tokens_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONUsersTokensListRead(ctx context.Context, d *schema.ResourceDa j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONUsersTokensList") return nil diff --git a/netbox/json/data_netbox_json_users_users_list.go b/netbox/json/data_netbox_json_users_users_list.go index 301c4c74d..e4a8334aa 100644 --- a/netbox/json/data_netbox_json_users_users_list.go +++ b/netbox/json/data_netbox_json_users_users_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/users" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONUsersUsersList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the users_users_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONUsersUsersListRead(ctx context.Context, d *schema.ResourceDat j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONUsersUsersList") return nil diff --git a/netbox/json/data_netbox_json_virtualization_cluster_groups_list.go b/netbox/json/data_netbox_json_virtualization_cluster_groups_list.go index 02a5f09d0..882472799 100644 --- a/netbox/json/data_netbox_json_virtualization_cluster_groups_list.go +++ b/netbox/json/data_netbox_json_virtualization_cluster_groups_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/virtualization" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONVirtualizationClusterGroupsList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the virtualization_cluster_groups_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONVirtualizationClusterGroupsListRead(ctx context.Context, d *s j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONVirtualizationClusterGroupsList") return nil diff --git a/netbox/json/data_netbox_json_virtualization_cluster_types_list.go b/netbox/json/data_netbox_json_virtualization_cluster_types_list.go index 7b69ff9d1..a88f6d5f7 100644 --- a/netbox/json/data_netbox_json_virtualization_cluster_types_list.go +++ b/netbox/json/data_netbox_json_virtualization_cluster_types_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/virtualization" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONVirtualizationClusterTypesList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the virtualization_cluster_types_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONVirtualizationClusterTypesListRead(ctx context.Context, d *sc j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONVirtualizationClusterTypesList") return nil diff --git a/netbox/json/data_netbox_json_virtualization_clusters_list.go b/netbox/json/data_netbox_json_virtualization_clusters_list.go index 122add795..af7e6fcaa 100644 --- a/netbox/json/data_netbox_json_virtualization_clusters_list.go +++ b/netbox/json/data_netbox_json_virtualization_clusters_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/virtualization" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONVirtualizationClustersList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the virtualization_clusters_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONVirtualizationClustersListRead(ctx context.Context, d *schema j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONVirtualizationClustersList") return nil diff --git a/netbox/json/data_netbox_json_virtualization_interfaces_list.go b/netbox/json/data_netbox_json_virtualization_interfaces_list.go index a3d02ac03..88af89edb 100644 --- a/netbox/json/data_netbox_json_virtualization_interfaces_list.go +++ b/netbox/json/data_netbox_json_virtualization_interfaces_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/virtualization" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONVirtualizationInterfacesList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the virtualization_interfaces_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONVirtualizationInterfacesListRead(ctx context.Context, d *sche j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONVirtualizationInterfacesList") return nil diff --git a/netbox/json/data_netbox_json_virtualization_virtual_machines_list.go b/netbox/json/data_netbox_json_virtualization_virtual_machines_list.go index 46da4894b..5aceeebf2 100644 --- a/netbox/json/data_netbox_json_virtualization_virtual_machines_list.go +++ b/netbox/json/data_netbox_json_virtualization_virtual_machines_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/virtualization" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONVirtualizationVirtualMachinesList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the virtualization_virtual_machines_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONVirtualizationVirtualMachinesListRead(ctx context.Context, d j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONVirtualizationVirtualMachinesList") return nil diff --git a/netbox/json/data_netbox_json_wireless_wireless_lan_groups_list.go b/netbox/json/data_netbox_json_wireless_wireless_lan_groups_list.go index 17a3a69af..9629df985 100644 --- a/netbox/json/data_netbox_json_wireless_wireless_lan_groups_list.go +++ b/netbox/json/data_netbox_json_wireless_wireless_lan_groups_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/wireless" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONWirelessWirelessLanGroupsList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the wireless_wireless_lan_groups_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONWirelessWirelessLanGroupsListRead(ctx context.Context, d *sch j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONWirelessWirelessLanGroupsList") return nil diff --git a/netbox/json/data_netbox_json_wireless_wireless_lans_list.go b/netbox/json/data_netbox_json_wireless_wireless_lans_list.go index 2d0b08cd8..44ff32159 100644 --- a/netbox/json/data_netbox_json_wireless_wireless_lans_list.go +++ b/netbox/json/data_netbox_json_wireless_wireless_lans_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/wireless" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONWirelessWirelessLansList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the wireless_wireless_lans_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONWirelessWirelessLansListRead(ctx context.Context, d *schema.R j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONWirelessWirelessLansList") return nil diff --git a/netbox/json/data_netbox_json_wireless_wireless_links_list.go b/netbox/json/data_netbox_json_wireless_wireless_links_list.go index cda4ecd96..e6ba5523d 100644 --- a/netbox/json/data_netbox_json_wireless_wireless_links_list.go +++ b/netbox/json/data_netbox_json_wireless_wireless_links_list.go @@ -1,3 +1,4 @@ +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -10,6 +11,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/wireless" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSONWirelessWirelessLinksList() *schema.Resource { return &schema.Resource{ Description: "Get json output from the wireless_wireless_links_list Netbox endpoint.", @@ -68,7 +72,9 @@ func dataNetboxJSONWirelessWirelessLinksListRead(ctx context.Context, d *schema. j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSONWirelessWirelessLinksList") return nil diff --git a/netbox/tenancy/data_netbox_tenancy_contact.go b/netbox/tenancy/data_netbox_tenancy_contact.go index 77c16e05e..ed460f70a 100644 --- a/netbox/tenancy/data_netbox_tenancy_contact.go +++ b/netbox/tenancy/data_netbox_tenancy_contact.go @@ -52,7 +52,9 @@ func dataNetboxTenancyContactRead(ctx context.Context, d *schema.ResourceData, m r := list.Payload.Results[0] d.SetId(strconv.FormatInt(r.ID, 10)) - d.Set("content_type", util.ConvertURIContentType(r.URL)) + if err = d.Set("content_type", util.ConvertURIContentType(r.URL)); err != nil { + return diag.FromErr(err) + } return nil } diff --git a/netbox/tenancy/data_netbox_tenancy_contact_group.go b/netbox/tenancy/data_netbox_tenancy_contact_group.go index bde5dd65d..4153d01dc 100644 --- a/netbox/tenancy/data_netbox_tenancy_contact_group.go +++ b/netbox/tenancy/data_netbox_tenancy_contact_group.go @@ -52,7 +52,9 @@ func dataNetboxTenancyContactGroupRead(ctx context.Context, d *schema.ResourceDa r := list.Payload.Results[0] d.SetId(strconv.FormatInt(r.ID, 10)) - d.Set("content_type", util.ConvertURIContentType(r.URL)) + if err = d.Set("content_type", util.ConvertURIContentType(r.URL)); err != nil { + return diag.FromErr(err) + } return nil } diff --git a/netbox/tenancy/data_netbox_tenancy_tenant.go b/netbox/tenancy/data_netbox_tenancy_tenant.go index 8ba7a26c6..83c4f3031 100644 --- a/netbox/tenancy/data_netbox_tenancy_tenant.go +++ b/netbox/tenancy/data_netbox_tenancy_tenant.go @@ -55,7 +55,9 @@ func dataNetboxTenancyTenantRead(ctx context.Context, d *schema.ResourceData, m r := list.Payload.Results[0] d.SetId(strconv.FormatInt(r.ID, 10)) - d.Set("content_type", util.ConvertURIContentType(r.URL)) + if err = d.Set("content_type", util.ConvertURIContentType(r.URL)); err != nil { + return diag.FromErr(err) + } return nil } diff --git a/netbox/tenancy/data_netbox_tenancy_tenant_group.go b/netbox/tenancy/data_netbox_tenancy_tenant_group.go index 2023e3b43..29d76f5d5 100644 --- a/netbox/tenancy/data_netbox_tenancy_tenant_group.go +++ b/netbox/tenancy/data_netbox_tenancy_tenant_group.go @@ -57,7 +57,9 @@ func dataNetboxTenancyTenantGroupRead(ctx context.Context, d *schema.ResourceDat r := list.Payload.Results[0] d.SetId(strconv.FormatInt(r.ID, 10)) - d.Set("content_type", util.ConvertURIContentType(r.URL)) + if err = d.Set("content_type", util.ConvertURIContentType(r.URL)); err != nil { + return diag.FromErr(err) + } return nil } diff --git a/netbox/tenancy/data_netbox_tenancy_tenant_role.go b/netbox/tenancy/data_netbox_tenancy_tenant_role.go index ed5dc4442..1b629637c 100644 --- a/netbox/tenancy/data_netbox_tenancy_tenant_role.go +++ b/netbox/tenancy/data_netbox_tenancy_tenant_role.go @@ -57,7 +57,9 @@ func dataNetboxTenancyContactRoleRead(ctx context.Context, d *schema.ResourceDat r := list.Payload.Results[0] d.SetId(strconv.FormatInt(r.ID, 10)) - d.Set("content_type", util.ConvertURIContentType(r.URL)) + if err = d.Set("content_type", util.ConvertURIContentType(r.URL)); err != nil { + return diag.FromErr(err) + } return nil } diff --git a/netbox/virtualization/data_netbox_virtualization_cluster.go b/netbox/virtualization/data_netbox_virtualization_cluster.go index b870dfc23..6fb298013 100644 --- a/netbox/virtualization/data_netbox_virtualization_cluster.go +++ b/netbox/virtualization/data_netbox_virtualization_cluster.go @@ -54,7 +54,9 @@ func dataNetboxVirtualizationClusterRead(ctx context.Context, d *schema.Resource r := list.Payload.Results[0] d.SetId(strconv.FormatInt(r.ID, 10)) - d.Set("content_type", util.ConvertURIContentType(r.URL)) + if err = d.Set("content_type", util.ConvertURIContentType(r.URL)); err != nil { + return diag.FromErr(err) + } return nil } diff --git a/utils/generateJsonDatasources b/utils/generateJsonDatasources index 55cd80f21..95ad2b9b7 100755 --- a/utils/generateJsonDatasources +++ b/utils/generateJsonDatasources @@ -81,6 +81,7 @@ while read -r line; do ITEM=${SPLIT[2]} cat << EOF > ${SCRIPT_PATH}/../netbox/json/data_netbox_json_${ENDPOINT}_list.go +// Code generated by util/generateJsonDatasources; DO NOT EDIT. package json import ( @@ -93,6 +94,9 @@ import ( "github.com/smutel/go-netbox/v3/netbox/client/${SECTION,}" ) +// This file was generated by the util/generateJsonDatasources. +// Editing this file might prove futile when you re-run the util/generateJsonDatasources command + func DataNetboxJSON${SECTION}${ITEM}List() *schema.Resource { return &schema.Resource{ Description: "Get json output from the ${ENDPOINT}_list Netbox endpoint.", @@ -151,7 +155,9 @@ func dataNetboxJSON${SECTION}${ITEM}ListRead(ctx context.Context, d *schema.Reso j, _ := json.Marshal(tmp) - d.Set("json", string(j)) + if err = d.Set("json", string(j)); err != nil { + return diag.FromErr(err) + } d.SetId("NetboxJSON${SECTION}${ITEM}List") return nil