From 63bba552c1cd7cce122f709e4464d995ec062662 Mon Sep 17 00:00:00 2001 From: artaasadi Date: Sun, 10 Nov 2024 01:47:18 +0100 Subject: [PATCH] fix: fix tags --- DockerFile | 8 - go.mod | 2 +- go.sum | 2 + pkg/describer/worker.go | 22 +- pkg/sdk/es/resources_clients.go | 27469 ++++------------ .../steampipe_es_client_generator/main.go | 52 +- 6 files changed, 7304 insertions(+), 20251 deletions(-) delete mode 100644 DockerFile diff --git a/DockerFile b/DockerFile deleted file mode 100644 index 53eb1ac5..00000000 --- a/DockerFile +++ /dev/null @@ -1,8 +0,0 @@ -FROM docker.io/golang:alpine as build -RUN apk --no-cache add ca-certificates - -FROM scratch -COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ -COPY ./local/og-describer ./ -ENTRYPOINT [ "./og-describer" ] -CMD [ "./og-describer" ] \ No newline at end of file diff --git a/go.mod b/go.mod index 0080b8f5..8e69ed34 100755 --- a/go.mod +++ b/go.mod @@ -111,7 +111,7 @@ require ( github.com/manicminer/hamilton v0.44.0 github.com/microsoftgraph/msgraph-sdk-go v1.51.0 github.com/nats-io/nats.go v1.36.0 - github.com/opengovern/og-util v1.0.6-0.20241108102418-e20a35efc8ca + github.com/opengovern/og-util v1.1.0 github.com/opengovern/opengovernance v0.434.59-feat-integrations-service.0 github.com/spf13/cobra v1.8.1 github.com/tombuildsstuff/giovanni v0.18.0 diff --git a/go.sum b/go.sum index e3684702..491f42dc 100644 --- a/go.sum +++ b/go.sum @@ -986,6 +986,8 @@ github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/opengovern/og-util v1.0.6-0.20241108102418-e20a35efc8ca h1:yeF0lhv15WWULbOb811lVAv/KTY5nfsA0dkzd4GODlk= github.com/opengovern/og-util v1.0.6-0.20241108102418-e20a35efc8ca/go.mod h1:7l7fNhK6uewIwA0cs7QagJuhjt/E6hEAC01SR8Y0kKk= +github.com/opengovern/og-util v1.1.0 h1:bV2XKX8aIpJGC2CR4kh9CU/rJWPQed76gtVXM2zBDXM= +github.com/opengovern/og-util v1.1.0/go.mod h1:dyn8rhmxq59o1jnbgGfmcUvW7iB/eN6OxoTUUx6jEHA= github.com/opengovern/opengovernance v0.434.55-feat-integrations-service.0 h1:N7aSSdY9c3nUqyGnVyUDKnrsqyNBtgnJl3ccYXxrAIQ= github.com/opengovern/opengovernance v0.434.55-feat-integrations-service.0/go.mod h1:R0o3Yf92y4p6onI7bYOWL2VhFmO1Crti2EG2l6MWglA= github.com/opengovern/opengovernance v0.434.58-feat-integrations-service.0 h1:+Wk+p1thvGe3I1cwxZl5jo//w3WZFTK9ZmfBCiCufLQ= diff --git a/pkg/describer/worker.go b/pkg/describer/worker.go index b2d8d244..45bec85c 100755 --- a/pkg/describer/worker.go +++ b/pkg/describer/worker.go @@ -147,17 +147,17 @@ func doDescribe( } rs.Send(&es.Resource{ - PlatformID: uuid.New().String(), - ResourceID: resource.UniqueID(), - ResourceName: resource.Name, - Description: description, - IntegrationType: configs.IntegrationName, - ResourceType: strings.ToLower(job.ResourceType), - IntegrationID: job.IntegrationID, - IntegrationMetadata: metadata, - CanonicalTags: newTags, - DescribedAt: job.DescribedAt, - DescribedBy: strconv.FormatUint(uint64(job.JobID), 10), + PlatformID: uuid.New().String(), + ResourceID: resource.UniqueID(), + ResourceName: resource.Name, + Description: description, + IntegrationType: configs.IntegrationName, + ResourceType: strings.ToLower(job.ResourceType), + IntegrationID: job.IntegrationID, + Metadata: metadata, + CanonicalTags: newTags, + DescribedAt: job.DescribedAt, + DescribedBy: strconv.FormatUint(uint64(job.JobID), 10), }) return nil } diff --git a/pkg/sdk/es/resources_clients.go b/pkg/sdk/es/resources_clients.go index afe8ed3f..2cf85a3e 100644 --- a/pkg/sdk/es/resources_clients.go +++ b/pkg/sdk/es/resources_clients.go @@ -20,72 +20,14 @@ type Client struct { // ========================== START: APIManagement ============================= type APIManagement struct { - Description azure.APIManagementDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *APIManagement) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.APIManagementDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.APIManagementDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type APIManagementHit struct { @@ -156,47 +98,46 @@ func (p APIManagementPaginator) NextPage(ctx context.Context) ([]APIManagement, } var listAPIManagementFilters = map[string]string{ - "additional_locations": "description.APIManagement.Properties.AdditionalLocations", - "api_version_constraint": "description.APIManagement.Properties.APIVersionConstraint", - "certificates": "description.APIManagement.Properties.Certificates", - "custom_properties": "description.APIManagement.Properties.CustomProperties", - "developer_portal_url": "description.APIManagement.Properties.DeveloperPortalURL", - "diagnostic_settings": "description.DiagnosticSettingsResources", - "disable_gateway": "description.APIManagement.Properties.DisableGateway", - "enable_client_certificate": "description.APIManagement.Properties.EnableClientCertificate", - "etag": "description.APIManagement.Etag", - "gateway_regional_url": "description.APIManagement.Properties.GatewayRegionalURL", - "gateway_url": "description.APIManagement.Properties.GatewayURL", - "host_name_configurations": "description.APIManagement.Properties.HostnameConfigurations", - "id": "description.APIManagement.ID", - "identity_principal_id": "description.APIManagement.Identity.PrincipalID", - "identity_tenant_id": "description.APIManagement.Identity.TenantID", - "identity_type": "description.APIManagement.Identity.Type", - "identity_user_assigned_identities": "description.APIManagement.Identity.UserAssignedIdentities", - "og_account_id": "metadata.SourceID", - "management_api_url": "description.APIManagement.Properties.ManagementAPIURL", - "name": "description.APIManagement.Name", - "notification_sender_email": "description.APIManagement.Properties.NotificationSenderEmail", - "portal_url": "description.APIManagement.Properties.PortalURL", - "private_ip_addresses": "description.APIManagement.Properties.PrivateIPAddresses", - "provisioning_state": "description.APIManagement.Properties.ProvisioningState", - "public_ip_addresses": "description.APIManagement.Properties.PublicIPAddresses", - "publisher_email": "description.APIManagement.Properties.PublisherEmail", - "publisher_name": "description.APIManagement.Properties.PublisherName", - "resource_group": "description.ResourceGroup", - "restore": "description.APIManagement.Properties.Restore", - "scm_url": "description.APIManagement.Properties.ScmURL", - "sku_capacity": "description.APIManagement.SKU.Capacity", - "sku_name": "description.APIManagement.SKU.Name", - "tags": "description.APIManagement.Tags", - "target_provisioning_state": "description.APIManagement.Properties.TargetProvisioningState", - "title": "description.APIManagement.Name", - "type": "description.APIManagement.Type", - "virtual_network_configuration_id": "description.APIManagement.Properties.VirtualNetworkConfiguration.Vnetid", - "virtual_network_configuration_subnet_name": "description.APIManagement.Properties.VirtualNetworkConfiguration.Subnetname", - "virtual_network_configuration_subnet_resource_id": "description.APIManagement.Properties.VirtualNetworkConfiguration.SubnetResourceID", - "virtual_network_type": "description.APIManagement.Properties.VirtualNetworkType", - "zones": "description.APIManagement.Zones", + "additional_locations": "Description.APIManagement.Properties.AdditionalLocations", + "api_version_constraint": "Description.APIManagement.Properties.APIVersionConstraint", + "certificates": "Description.APIManagement.Properties.Certificates", + "custom_properties": "Description.APIManagement.Properties.CustomProperties", + "developer_portal_url": "Description.APIManagement.Properties.DeveloperPortalURL", + "diagnostic_settings": "Description.DiagnosticSettingsResources", + "disable_gateway": "Description.APIManagement.Properties.DisableGateway", + "enable_client_certificate": "Description.APIManagement.Properties.EnableClientCertificate", + "etag": "Description.APIManagement.Etag", + "gateway_regional_url": "Description.APIManagement.Properties.GatewayRegionalURL", + "gateway_url": "Description.APIManagement.Properties.GatewayURL", + "host_name_configurations": "Description.APIManagement.Properties.HostnameConfigurations", + "id": "Description.APIManagement.ID", + "identity_principal_id": "Description.APIManagement.Identity.PrincipalID", + "identity_tenant_id": "Description.APIManagement.Identity.TenantID", + "identity_type": "Description.APIManagement.Identity.Type", + "identity_user_assigned_identities": "Description.APIManagement.Identity.UserAssignedIdentities", + "management_api_url": "Description.APIManagement.Properties.ManagementAPIURL", + "name": "Description.APIManagement.Name", + "notification_sender_email": "Description.APIManagement.Properties.NotificationSenderEmail", + "portal_url": "Description.APIManagement.Properties.PortalURL", + "private_ip_addresses": "Description.APIManagement.Properties.PrivateIPAddresses", + "provisioning_state": "Description.APIManagement.Properties.ProvisioningState", + "public_ip_addresses": "Description.APIManagement.Properties.PublicIPAddresses", + "publisher_email": "Description.APIManagement.Properties.PublisherEmail", + "publisher_name": "Description.APIManagement.Properties.PublisherName", + "resource_group": "Description.ResourceGroup", + "restore": "Description.APIManagement.Properties.Restore", + "scm_url": "Description.APIManagement.Properties.ScmURL", + "sku_capacity": "Description.APIManagement.SKU.Capacity", + "sku_name": "Description.APIManagement.SKU.Name", + "tags": "Description.APIManagement.Tags", + "target_provisioning_state": "Description.APIManagement.Properties.TargetProvisioningState", + "title": "Description.APIManagement.Name", + "type": "Description.APIManagement.Type", + "virtual_network_configuration_id": "Description.APIManagement.Properties.VirtualNetworkConfiguration.Vnetid", + "virtual_network_configuration_subnet_name": "Description.APIManagement.Properties.VirtualNetworkConfiguration.Subnetname", + "virtual_network_configuration_subnet_resource_id": "Description.APIManagement.Properties.VirtualNetworkConfiguration.SubnetResourceID", + "virtual_network_type": "Description.APIManagement.Properties.VirtualNetworkType", + "zones": "Description.APIManagement.Zones", } func ListAPIManagement(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -260,47 +201,46 @@ func ListAPIManagement(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra } var getAPIManagementFilters = map[string]string{ - "additional_locations": "description.APIManagement.Properties.AdditionalLocations", - "api_version_constraint": "description.APIManagement.Properties.APIVersionConstraint", - "certificates": "description.APIManagement.Properties.Certificates", - "custom_properties": "description.APIManagement.Properties.CustomProperties", - "developer_portal_url": "description.APIManagement.Properties.DeveloperPortalURL", - "diagnostic_settings": "description.DiagnosticSettingsResources", - "disable_gateway": "description.APIManagement.Properties.DisableGateway", - "enable_client_certificate": "description.APIManagement.Properties.EnableClientCertificate", - "etag": "description.APIManagement.Etag", - "gateway_regional_url": "description.APIManagement.Properties.GatewayRegionalURL", - "gateway_url": "description.APIManagement.Properties.GatewayURL", - "host_name_configurations": "description.APIManagement.Properties.HostnameConfigurations", - "id": "description.APIManagement.ID", - "identity_principal_id": "description.APIManagement.Identity.PrincipalID", - "identity_tenant_id": "description.APIManagement.Identity.TenantID", - "identity_type": "description.APIManagement.Identity.Type", - "identity_user_assigned_identities": "description.APIManagement.Identity.UserAssignedIdentities", - "og_account_id": "metadata.SourceID", - "management_api_url": "description.APIManagement.Properties.ManagementAPIURL", + "additional_locations": "Description.APIManagement.Properties.AdditionalLocations", + "api_version_constraint": "Description.APIManagement.Properties.APIVersionConstraint", + "certificates": "Description.APIManagement.Properties.Certificates", + "custom_properties": "Description.APIManagement.Properties.CustomProperties", + "developer_portal_url": "Description.APIManagement.Properties.DeveloperPortalURL", + "diagnostic_settings": "Description.DiagnosticSettingsResources", + "disable_gateway": "Description.APIManagement.Properties.DisableGateway", + "enable_client_certificate": "Description.APIManagement.Properties.EnableClientCertificate", + "etag": "Description.APIManagement.Etag", + "gateway_regional_url": "Description.APIManagement.Properties.GatewayRegionalURL", + "gateway_url": "Description.APIManagement.Properties.GatewayURL", + "host_name_configurations": "Description.APIManagement.Properties.HostnameConfigurations", + "id": "Description.APIManagement.ID", + "identity_principal_id": "Description.APIManagement.Identity.PrincipalID", + "identity_tenant_id": "Description.APIManagement.Identity.TenantID", + "identity_type": "Description.APIManagement.Identity.Type", + "identity_user_assigned_identities": "Description.APIManagement.Identity.UserAssignedIdentities", + "management_api_url": "Description.APIManagement.Properties.ManagementAPIURL", "name": "description.APIManagement.name", - "notification_sender_email": "description.APIManagement.Properties.NotificationSenderEmail", - "portal_url": "description.APIManagement.Properties.PortalURL", - "private_ip_addresses": "description.APIManagement.Properties.PrivateIPAddresses", - "provisioning_state": "description.APIManagement.Properties.ProvisioningState", - "public_ip_addresses": "description.APIManagement.Properties.PublicIPAddresses", - "publisher_email": "description.APIManagement.Properties.PublisherEmail", - "publisher_name": "description.APIManagement.Properties.PublisherName", + "notification_sender_email": "Description.APIManagement.Properties.NotificationSenderEmail", + "portal_url": "Description.APIManagement.Properties.PortalURL", + "private_ip_addresses": "Description.APIManagement.Properties.PrivateIPAddresses", + "provisioning_state": "Description.APIManagement.Properties.ProvisioningState", + "public_ip_addresses": "Description.APIManagement.Properties.PublicIPAddresses", + "publisher_email": "Description.APIManagement.Properties.PublisherEmail", + "publisher_name": "Description.APIManagement.Properties.PublisherName", "resource_group": "description.ResourceGroup", - "restore": "description.APIManagement.Properties.Restore", - "scm_url": "description.APIManagement.Properties.ScmURL", - "sku_capacity": "description.APIManagement.SKU.Capacity", - "sku_name": "description.APIManagement.SKU.Name", - "tags": "description.APIManagement.Tags", - "target_provisioning_state": "description.APIManagement.Properties.TargetProvisioningState", - "title": "description.APIManagement.Name", - "type": "description.APIManagement.Type", - "virtual_network_configuration_id": "description.APIManagement.Properties.VirtualNetworkConfiguration.Vnetid", - "virtual_network_configuration_subnet_name": "description.APIManagement.Properties.VirtualNetworkConfiguration.Subnetname", - "virtual_network_configuration_subnet_resource_id": "description.APIManagement.Properties.VirtualNetworkConfiguration.SubnetResourceID", - "virtual_network_type": "description.APIManagement.Properties.VirtualNetworkType", - "zones": "description.APIManagement.Zones", + "restore": "Description.APIManagement.Properties.Restore", + "scm_url": "Description.APIManagement.Properties.ScmURL", + "sku_capacity": "Description.APIManagement.SKU.Capacity", + "sku_name": "Description.APIManagement.SKU.Name", + "tags": "Description.APIManagement.Tags", + "target_provisioning_state": "Description.APIManagement.Properties.TargetProvisioningState", + "title": "Description.APIManagement.Name", + "type": "Description.APIManagement.Type", + "virtual_network_configuration_id": "Description.APIManagement.Properties.VirtualNetworkConfiguration.Vnetid", + "virtual_network_configuration_subnet_name": "Description.APIManagement.Properties.VirtualNetworkConfiguration.Subnetname", + "virtual_network_configuration_subnet_resource_id": "Description.APIManagement.Properties.VirtualNetworkConfiguration.SubnetResourceID", + "virtual_network_type": "Description.APIManagement.Properties.VirtualNetworkType", + "zones": "Description.APIManagement.Zones", } func GetAPIManagement(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -361,72 +301,14 @@ func GetAPIManagement(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat // ========================== START: APIManagementBackend ============================= type APIManagementBackend struct { - Description azure.APIManagementBackendDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *APIManagementBackend) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.APIManagementBackendDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.APIManagementBackendDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type APIManagementBackendHit struct { @@ -497,20 +379,20 @@ func (p APIManagementBackendPaginator) NextPage(ctx context.Context) ([]APIManag } var listAPIManagementBackendFilters = map[string]string{ - "credentials": "description.APIManagementBackend.Properties.Credentials", - "description": "description.APIManagementBackend.Properties.Description", - "id": "description.APIManagementBackend.ID", - "name": "description.APIManagementBackend.Name", - "properties": "description.APIManagementBackend.Properties.Properties", - "protocol": "description.APIManagementBackend.Properties.Protocol", - "proxy": "description.APIManagementBackend.Properties.Proxy", - "resource_group": "description.APIManagementBackend.ResourceGroup", - "resource_id": "description.APIManagementBackend.Properties.ResourceID", - "service_name": "description.ServiceName", - "title": "description.APIManagementBackend.Properties.Title", - "tls": "description.APIManagementBackend.Properties.TLS", - "type": "description.APIManagementBackend.Type", - "url": "description.APIManagementBackend.Properties.URL", + "credentials": "Description.APIManagementBackend.Properties.Credentials", + "description": "Description.APIManagementBackend.Properties.Description", + "id": "Description.APIManagementBackend.ID", + "name": "Description.APIManagementBackend.Name", + "properties": "Description.APIManagementBackend.Properties.Properties", + "protocol": "Description.APIManagementBackend.Properties.Protocol", + "proxy": "Description.APIManagementBackend.Properties.Proxy", + "resource_group": "Description.APIManagementBackend.ResourceGroup", + "resource_id": "Description.APIManagementBackend.Properties.ResourceID", + "service_name": "Description.ServiceName", + "title": "Description.APIManagementBackend.Properties.Title", + "tls": "Description.APIManagementBackend.Properties.TLS", + "type": "Description.APIManagementBackend.Type", + "url": "Description.APIManagementBackend.Properties.URL", } func ListAPIManagementBackend(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -574,20 +456,20 @@ func ListAPIManagementBackend(ctx context.Context, d *plugin.QueryData, _ *plugi } var getAPIManagementBackendFilters = map[string]string{ - "credentials": "description.APIManagementBackend.Properties.Credentials", - "description": "description.APIManagementBackend.Properties.Description", - "id": "description.APIManagementBackend.ID", - "name": "description.APIManagementBackend.Name", - "properties": "description.APIManagementBackend.Properties.Properties", - "protocol": "description.APIManagementBackend.Properties.Protocol", - "proxy": "description.APIManagementBackend.Properties.Proxy", - "resource_group": "description.APIManagementBackend.ResourceGroup", - "resource_id": "description.APIManagementBackend.Properties.ResourceID", - "service_name": "description.ServiceName", - "title": "description.APIManagementBackend.Properties.Title", - "tls": "description.APIManagementBackend.Properties.TLS", - "type": "description.APIManagementBackend.Type", - "url": "description.APIManagementBackend.Properties.URL", + "credentials": "Description.APIManagementBackend.Properties.Credentials", + "description": "Description.APIManagementBackend.Properties.Description", + "id": "Description.APIManagementBackend.ID", + "name": "Description.APIManagementBackend.Name", + "properties": "Description.APIManagementBackend.Properties.Properties", + "protocol": "Description.APIManagementBackend.Properties.Protocol", + "proxy": "Description.APIManagementBackend.Properties.Proxy", + "resource_group": "Description.APIManagementBackend.ResourceGroup", + "resource_id": "Description.APIManagementBackend.Properties.ResourceID", + "service_name": "Description.ServiceName", + "title": "Description.APIManagementBackend.Properties.Title", + "tls": "Description.APIManagementBackend.Properties.TLS", + "type": "Description.APIManagementBackend.Type", + "url": "Description.APIManagementBackend.Properties.URL", } func GetAPIManagementBackend(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -648,72 +530,14 @@ func GetAPIManagementBackend(ctx context.Context, d *plugin.QueryData, _ *plugin // ========================== START: AutomationAccounts ============================= type AutomationAccounts struct { - Description azure.AutomationAccountsDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *AutomationAccounts) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.AutomationAccountsDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.AutomationAccountsDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type AutomationAccountsHit struct { @@ -784,21 +608,20 @@ func (p AutomationAccountsPaginator) NextPage(ctx context.Context) ([]Automation } var listAutomationAccountsFilters = map[string]string{ - "creation_time": "description.Automation.Properties.CreationTime", - "description": "description.Automation.Properties.Description", - "etag": "description.Automation.Etag", - "id": "description.Automation.ID", - "og_account_id": "metadata.SourceID", - "last_modified_by": "description.Automation.Properties.LastModifiedBy", - "last_modified_time": "description.Automation.Properties.LastModifiedTime", - "name": "description.Automation.Name", - "sku_capacity": "description.Automation.Properties.SKU.Capacity", - "sku_family": "description.Automation.Properties.SKU.Family", - "sku_name": "description.Automation.Properties.SKU.Name", - "state": "description.Automation.Properties.State", - "tags": "description.Automation.Tags", - "title": "description.Automation.Name", - "type": "description.Automation.Type", + "creation_time": "Description.Automation.Properties.CreationTime", + "description": "Description.Automation.Properties.Description", + "etag": "Description.Automation.Etag", + "id": "Description.Automation.ID", + "last_modified_by": "Description.Automation.Properties.LastModifiedBy", + "last_modified_time": "Description.Automation.Properties.LastModifiedTime", + "name": "Description.Automation.Name", + "sku_capacity": "Description.Automation.Properties.SKU.Capacity", + "sku_family": "Description.Automation.Properties.SKU.Family", + "sku_name": "Description.Automation.Properties.SKU.Name", + "state": "Description.Automation.Properties.State", + "tags": "Description.Automation.Tags", + "title": "Description.Automation.Name", + "type": "Description.Automation.Type", } func ListAutomationAccounts(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -862,21 +685,20 @@ func ListAutomationAccounts(ctx context.Context, d *plugin.QueryData, _ *plugin. } var getAutomationAccountsFilters = map[string]string{ - "creation_time": "description.Automation.Properties.CreationTime", - "description": "description.Automation.Properties.Description", - "etag": "description.Automation.Etag", - "id": "description.Automation.ID", - "og_account_id": "metadata.SourceID", - "last_modified_by": "description.Automation.Properties.LastModifiedBy", - "last_modified_time": "description.Automation.Properties.LastModifiedTime", - "name": "description.Automation.Name", - "sku_capacity": "description.Automation.Properties.SKU.Capacity", - "sku_family": "description.Automation.Properties.SKU.Family", - "sku_name": "description.Automation.Properties.SKU.Name", - "state": "description.Automation.Properties.State", - "tags": "description.Automation.Tags", - "title": "description.Automation.Name", - "type": "description.Automation.Type", + "creation_time": "Description.Automation.Properties.CreationTime", + "description": "Description.Automation.Properties.Description", + "etag": "Description.Automation.Etag", + "id": "Description.Automation.ID", + "last_modified_by": "Description.Automation.Properties.LastModifiedBy", + "last_modified_time": "Description.Automation.Properties.LastModifiedTime", + "name": "Description.Automation.Name", + "sku_capacity": "Description.Automation.Properties.SKU.Capacity", + "sku_family": "Description.Automation.Properties.SKU.Family", + "sku_name": "Description.Automation.Properties.SKU.Name", + "state": "Description.Automation.Properties.State", + "tags": "Description.Automation.Tags", + "title": "Description.Automation.Name", + "type": "Description.Automation.Type", } func GetAutomationAccounts(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -937,72 +759,14 @@ func GetAutomationAccounts(ctx context.Context, d *plugin.QueryData, _ *plugin.H // ========================== START: AutomationVariables ============================= type AutomationVariables struct { - Description azure.AutomationVariablesDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *AutomationVariables) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.AutomationVariablesDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.AutomationVariablesDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type AutomationVariablesHit struct { @@ -1073,18 +837,17 @@ func (p AutomationVariablesPaginator) NextPage(ctx context.Context) ([]Automatio } var listAutomationVariablesFilters = map[string]string{ - "account_name": "description.AccountName", - "creation_time": "description.Automation.Properties.CreationTime", - "description": "description.Automation.Properties.Description", - "id": "description.Automation.ID", - "is_encrypted": "description.Automation.Properties.IsEncrypted", - "og_account_id": "metadata.SourceID", - "last_modified_time": "description.Automation.Properties.LastModifiedTime", - "name": "description.Automation.Name", - "resource_group": "description.ResourceGroup", - "title": "description.Automation.Name", - "type": "description.Automation.Type", - "value": "description.Automation.Properties.Value", + "account_name": "Description.AccountName", + "creation_time": "Description.Automation.Properties.CreationTime", + "description": "Description.Automation.Properties.Description", + "id": "Description.Automation.ID", + "is_encrypted": "Description.Automation.Properties.IsEncrypted", + "last_modified_time": "Description.Automation.Properties.LastModifiedTime", + "name": "Description.Automation.Name", + "resource_group": "Description.ResourceGroup", + "title": "Description.Automation.Name", + "type": "Description.Automation.Type", + "value": "Description.Automation.Properties.Value", } func ListAutomationVariables(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -1148,18 +911,17 @@ func ListAutomationVariables(ctx context.Context, d *plugin.QueryData, _ *plugin } var getAutomationVariablesFilters = map[string]string{ - "account_name": "description.AccountName", - "creation_time": "description.Automation.Properties.CreationTime", - "description": "description.Automation.Properties.Description", - "id": "description.Automation.ID", - "is_encrypted": "description.Automation.Properties.IsEncrypted", - "og_account_id": "metadata.SourceID", - "last_modified_time": "description.Automation.Properties.LastModifiedTime", - "name": "description.Automation.Name", - "resource_group": "description.ResourceGroup", - "title": "description.Automation.Name", - "type": "description.Automation.Type", - "value": "description.Automation.Properties.Value", + "account_name": "Description.AccountName", + "creation_time": "Description.Automation.Properties.CreationTime", + "description": "Description.Automation.Properties.Description", + "id": "Description.Automation.ID", + "is_encrypted": "Description.Automation.Properties.IsEncrypted", + "last_modified_time": "Description.Automation.Properties.LastModifiedTime", + "name": "Description.Automation.Name", + "resource_group": "Description.ResourceGroup", + "title": "Description.Automation.Name", + "type": "Description.Automation.Type", + "value": "Description.Automation.Properties.Value", } func GetAutomationVariables(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -1220,72 +982,14 @@ func GetAutomationVariables(ctx context.Context, d *plugin.QueryData, _ *plugin. // ========================== START: AppConfiguration ============================= type AppConfiguration struct { - Description azure.AppConfigurationDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *AppConfiguration) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.AppConfigurationDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.AppConfigurationDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type AppConfigurationHit struct { @@ -1356,19 +1060,18 @@ func (p AppConfigurationPaginator) NextPage(ctx context.Context) ([]AppConfigura } var listAppConfigurationFilters = map[string]string{ - "diagnostic_settings": "description.DiagnosticSettingsResources", - "encryption": "description.ConfigurationStore.Properties.Encryption", - "endpoint": "description.ConfigurationStore.Properties.Endpoint", - "id": "description.ConfigurationStore.ID", - "identity": "description.ConfigurationStore.Identity", - "og_account_id": "metadata.SourceID", - "name": "description.ConfigurationStore.Name", - "provisioning_state": "description.ConfigurationStore.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "sku_name": "description.ConfigurationStore.SKU.Name", - "tags": "description.ConfigurationStore.Tags", - "title": "description.ConfigurationStore.Name", - "type": "description.ConfigurationStore.Type", + "diagnostic_settings": "Description.DiagnosticSettingsResources", + "encryption": "Description.ConfigurationStore.Properties.Encryption", + "endpoint": "Description.ConfigurationStore.Properties.Endpoint", + "id": "Description.ConfigurationStore.ID", + "identity": "Description.ConfigurationStore.Identity", + "name": "Description.ConfigurationStore.Name", + "provisioning_state": "Description.ConfigurationStore.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "sku_name": "Description.ConfigurationStore.SKU.Name", + "tags": "Description.ConfigurationStore.Tags", + "title": "Description.ConfigurationStore.Name", + "type": "Description.ConfigurationStore.Type", } func ListAppConfiguration(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -1432,19 +1135,18 @@ func ListAppConfiguration(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy } var getAppConfigurationFilters = map[string]string{ - "diagnostic_settings": "description.DiagnosticSettingsResources", - "encryption": "description.ConfigurationStore.Properties.Encryption", - "endpoint": "description.ConfigurationStore.Properties.Endpoint", - "id": "description.ConfigurationStore.ID", - "identity": "description.ConfigurationStore.Identity", - "og_account_id": "metadata.SourceID", + "diagnostic_settings": "Description.DiagnosticSettingsResources", + "encryption": "Description.ConfigurationStore.Properties.Encryption", + "endpoint": "Description.ConfigurationStore.Properties.Endpoint", + "id": "Description.ConfigurationStore.ID", + "identity": "Description.ConfigurationStore.Identity", "name": "description.ConfigurationStore.name", - "provisioning_state": "description.ConfigurationStore.Properties.ProvisioningState", + "provisioning_state": "Description.ConfigurationStore.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", - "sku_name": "description.ConfigurationStore.SKU.Name", - "tags": "description.ConfigurationStore.Tags", - "title": "description.ConfigurationStore.Name", - "type": "description.ConfigurationStore.Type", + "sku_name": "Description.ConfigurationStore.SKU.Name", + "tags": "Description.ConfigurationStore.Tags", + "title": "Description.ConfigurationStore.Name", + "type": "Description.ConfigurationStore.Type", } func GetAppConfiguration(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -1505,72 +1207,14 @@ func GetAppConfiguration(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd // ========================== START: AppServiceEnvironment ============================= type AppServiceEnvironment struct { - Description azure.AppServiceEnvironmentDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *AppServiceEnvironment) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.AppServiceEnvironmentDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.AppServiceEnvironmentDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type AppServiceEnvironmentHit struct { @@ -1641,23 +1285,22 @@ func (p AppServiceEnvironmentPaginator) NextPage(ctx context.Context) ([]AppServ } var listAppServiceEnvironmentFilters = map[string]string{ - "cluster_settings": "description.AppServiceEnvironmentResource.Properties.ClusterSettings", - "default_front_end_scale_factor": "description.AppServiceEnvironmentResource.Properties.FrontEndScaleFactor", - "dynamic_cache_enabled": "description.AppServiceEnvironmentResource.Properties.EnableAcceleratedNetworking", - "front_end_scale_factor": "description.AppServiceEnvironmentResource.Properties.FrontEndScaleFactor", - "has_linux_workers": "description.AppServiceEnvironmentResource.Properties.HasLinuxWorkers", - "id": "description.AppServiceEnvironmentResource.ID", - "internal_load_balancing_mode": "description.AppServiceEnvironmentResource.Properties.InternalLoadBalancingMode", - "is_healthy_environment": "description.AppServiceEnvironmentResource.Properties.EnvironmentIsHealthy", - "og_account_id": "metadata.SourceID", - "kind": "description.AppServiceEnvironmentResource.Kind", - "name": "description.AppServiceEnvironmentResource.Name", - "provisioning_state": "description.AppServiceEnvironmentResource.Properties.ProvisioningState", - "status": "description.AppServiceEnvironmentResource.Properties.Status", - "suspended": "description.AppServiceEnvironmentResource.Properties.Suspended", - "tags": "description.AppServiceEnvironmentResource.Tags", - "title": "description.AppServiceEnvironmentResource.Name", - "type": "description.AppServiceEnvironmentResource.Type", + "cluster_settings": "Description.AppServiceEnvironmentResource.Properties.ClusterSettings", + "default_front_end_scale_factor": "Description.AppServiceEnvironmentResource.Properties.FrontEndScaleFactor", + "dynamic_cache_enabled": "Description.AppServiceEnvironmentResource.Properties.EnableAcceleratedNetworking", + "front_end_scale_factor": "Description.AppServiceEnvironmentResource.Properties.FrontEndScaleFactor", + "has_linux_workers": "Description.AppServiceEnvironmentResource.Properties.HasLinuxWorkers", + "id": "Description.AppServiceEnvironmentResource.ID", + "internal_load_balancing_mode": "Description.AppServiceEnvironmentResource.Properties.InternalLoadBalancingMode", + "is_healthy_environment": "Description.AppServiceEnvironmentResource.Properties.EnvironmentIsHealthy", + "kind": "Description.AppServiceEnvironmentResource.Kind", + "name": "Description.AppServiceEnvironmentResource.Name", + "provisioning_state": "Description.AppServiceEnvironmentResource.Properties.ProvisioningState", + "status": "Description.AppServiceEnvironmentResource.Properties.Status", + "suspended": "Description.AppServiceEnvironmentResource.Properties.Suspended", + "tags": "Description.AppServiceEnvironmentResource.Tags", + "title": "Description.AppServiceEnvironmentResource.Name", + "type": "Description.AppServiceEnvironmentResource.Type", } func ListAppServiceEnvironment(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -1721,24 +1364,23 @@ func ListAppServiceEnvironment(ctx context.Context, d *plugin.QueryData, _ *plug } var getAppServiceEnvironmentFilters = map[string]string{ - "cluster_settings": "description.AppServiceEnvironmentResource.Properties.ClusterSettings", - "default_front_end_scale_factor": "description.AppServiceEnvironmentResource.Properties.FrontEndScaleFactor", - "dynamic_cache_enabled": "description.AppServiceEnvironmentResource.Properties.EnableAcceleratedNetworking", - "front_end_scale_factor": "description.AppServiceEnvironmentResource.Properties.FrontEndScaleFactor", - "has_linux_workers": "description.AppServiceEnvironmentResource.Properties.HasLinuxWorkers", - "id": "description.AppServiceEnvironmentResource.ID", - "internal_load_balancing_mode": "description.AppServiceEnvironmentResource.Properties.InternalLoadBalancingMode", - "is_healthy_environment": "description.AppServiceEnvironmentResource.Properties.EnvironmentIsHealthy", - "og_account_id": "metadata.SourceID", - "kind": "description.AppServiceEnvironmentResource.Kind", + "cluster_settings": "Description.AppServiceEnvironmentResource.Properties.ClusterSettings", + "default_front_end_scale_factor": "Description.AppServiceEnvironmentResource.Properties.FrontEndScaleFactor", + "dynamic_cache_enabled": "Description.AppServiceEnvironmentResource.Properties.EnableAcceleratedNetworking", + "front_end_scale_factor": "Description.AppServiceEnvironmentResource.Properties.FrontEndScaleFactor", + "has_linux_workers": "Description.AppServiceEnvironmentResource.Properties.HasLinuxWorkers", + "id": "Description.AppServiceEnvironmentResource.ID", + "internal_load_balancing_mode": "Description.AppServiceEnvironmentResource.Properties.InternalLoadBalancingMode", + "is_healthy_environment": "Description.AppServiceEnvironmentResource.Properties.EnvironmentIsHealthy", + "kind": "Description.AppServiceEnvironmentResource.Kind", "name": "description.AppServiceEnvironmentResource.name", - "provisioning_state": "description.AppServiceEnvironmentResource.Properties.ProvisioningState", + "provisioning_state": "Description.AppServiceEnvironmentResource.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", - "status": "description.AppServiceEnvironmentResource.Properties.Status", - "suspended": "description.AppServiceEnvironmentResource.Properties.Suspended", - "tags": "description.AppServiceEnvironmentResource.Tags", - "title": "description.AppServiceEnvironmentResource.Name", - "type": "description.AppServiceEnvironmentResource.Type", + "status": "Description.AppServiceEnvironmentResource.Properties.Status", + "suspended": "Description.AppServiceEnvironmentResource.Properties.Suspended", + "tags": "Description.AppServiceEnvironmentResource.Tags", + "title": "Description.AppServiceEnvironmentResource.Name", + "type": "Description.AppServiceEnvironmentResource.Type", } func GetAppServiceEnvironment(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -1799,72 +1441,14 @@ func GetAppServiceEnvironment(ctx context.Context, d *plugin.QueryData, _ *plugi // ========================== START: AppServiceFunctionApp ============================= type AppServiceFunctionApp struct { - Description azure.AppServiceFunctionAppDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *AppServiceFunctionApp) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.AppServiceFunctionAppDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.AppServiceFunctionAppDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type AppServiceFunctionAppHit struct { @@ -1935,27 +1519,26 @@ func (p AppServiceFunctionAppPaginator) NextPage(ctx context.Context) ([]AppServ } var listAppServiceFunctionAppFilters = map[string]string{ - "auth_settings": "description.SiteAuthSettings", - "client_affinity_enabled": "description.Site.Properties.ClientAffinityEnabled", - "client_cert_enabled": "description.Site.Properties.ClientCertEnabled", - "configuration": "description.SiteConfigResource", - "default_site_hostname": "description.Site.Properties.DefaultHostName", - "enabled": "description.Site.Properties.Enabled", - "host_name_disabled": "description.Site.Properties.HostNamesDisabled", - "host_names": "description.Site.Properties.HostNames", - "https_only": "description.Site.Properties.HTTPSOnly", - "id": "description.Site.ID", - "og_account_id": "metadata.SourceID", - "kind": "description.Site.Kind", - "name": "description.Site.Name", - "outbound_ip_addresses": "description.Site.Properties.OutboundIPAddresses", - "possible_outbound_ip_addresses": "description.Site.Properties.PossibleOutboundIPAddresses", - "reserved": "description.Site.Properties.Reserved", - "site_config": "description.Site.Properties.SiteConfig", - "state": "description.Site.Properties.State", - "tags": "description.Site.Tags", - "title": "description.Site.Name", - "type": "description.Site.Properties.Type", + "auth_settings": "Description.SiteAuthSettings", + "client_affinity_enabled": "Description.Site.Properties.ClientAffinityEnabled", + "client_cert_enabled": "Description.Site.Properties.ClientCertEnabled", + "configuration": "Description.SiteConfigResource", + "default_site_hostname": "Description.Site.Properties.DefaultHostName", + "enabled": "Description.Site.Properties.Enabled", + "host_name_disabled": "Description.Site.Properties.HostNamesDisabled", + "host_names": "Description.Site.Properties.HostNames", + "https_only": "Description.Site.Properties.HTTPSOnly", + "id": "Description.Site.ID", + "kind": "Description.Site.Kind", + "name": "Description.Site.Name", + "outbound_ip_addresses": "Description.Site.Properties.OutboundIPAddresses", + "possible_outbound_ip_addresses": "Description.Site.Properties.PossibleOutboundIPAddresses", + "reserved": "Description.Site.Properties.Reserved", + "site_config": "Description.Site.Properties.SiteConfig", + "state": "Description.Site.Properties.State", + "tags": "Description.Site.Tags", + "title": "Description.Site.Name", + "type": "Description.Site.Properties.Type", } func ListAppServiceFunctionApp(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -2019,28 +1602,27 @@ func ListAppServiceFunctionApp(ctx context.Context, d *plugin.QueryData, _ *plug } var getAppServiceFunctionAppFilters = map[string]string{ - "auth_settings": "description.SiteAuthSettings", - "client_affinity_enabled": "description.Site.Properties.ClientAffinityEnabled", - "client_cert_enabled": "description.Site.Properties.ClientCertEnabled", - "configuration": "description.SiteConfigResource", - "default_site_hostname": "description.Site.Properties.DefaultHostName", - "enabled": "description.Site.Properties.Enabled", - "host_name_disabled": "description.Site.Properties.HostNamesDisabled", - "host_names": "description.Site.Properties.HostNames", - "https_only": "description.Site.Properties.HTTPSOnly", - "id": "description.Site.ID", - "og_account_id": "metadata.SourceID", - "kind": "description.Site.Kind", + "auth_settings": "Description.SiteAuthSettings", + "client_affinity_enabled": "Description.Site.Properties.ClientAffinityEnabled", + "client_cert_enabled": "Description.Site.Properties.ClientCertEnabled", + "configuration": "Description.SiteConfigResource", + "default_site_hostname": "Description.Site.Properties.DefaultHostName", + "enabled": "Description.Site.Properties.Enabled", + "host_name_disabled": "Description.Site.Properties.HostNamesDisabled", + "host_names": "Description.Site.Properties.HostNames", + "https_only": "Description.Site.Properties.HTTPSOnly", + "id": "Description.Site.ID", + "kind": "Description.Site.Kind", "name": "description.Site.name", - "outbound_ip_addresses": "description.Site.Properties.OutboundIPAddresses", - "possible_outbound_ip_addresses": "description.Site.Properties.PossibleOutboundIPAddresses", - "reserved": "description.Site.Properties.Reserved", + "outbound_ip_addresses": "Description.Site.Properties.OutboundIPAddresses", + "possible_outbound_ip_addresses": "Description.Site.Properties.PossibleOutboundIPAddresses", + "reserved": "Description.Site.Properties.Reserved", "resource_group": "description.ResourceGroup", - "site_config": "description.Site.Properties.SiteConfig", - "state": "description.Site.Properties.State", - "tags": "description.Site.Tags", - "title": "description.Site.Name", - "type": "description.Site.Properties.Type", + "site_config": "Description.Site.Properties.SiteConfig", + "state": "Description.Site.Properties.State", + "tags": "Description.Site.Tags", + "title": "Description.Site.Name", + "type": "Description.Site.Properties.Type", } func GetAppServiceFunctionApp(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -2101,72 +1683,14 @@ func GetAppServiceFunctionApp(ctx context.Context, d *plugin.QueryData, _ *plugi // ========================== START: AppServiceWebApp ============================= type AppServiceWebApp struct { - Description azure.AppServiceWebAppDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *AppServiceWebApp) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.AppServiceWebAppDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.AppServiceWebAppDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type AppServiceWebAppHit struct { @@ -2237,29 +1761,28 @@ func (p AppServiceWebAppPaginator) NextPage(ctx context.Context) ([]AppServiceWe } var listAppServiceWebAppFilters = map[string]string{ - "auth_settings": "description.SiteAuthSettings", - "client_affinity_enabled": "description.Site.Properties.ClientAffinityEnabled", - "client_cert_enabled": "description.Site.Properties.ClientCertEnabled", - "configuration": "description.SiteConfigResource", - "default_site_hostname": "description.Site.Properties.DefaultHostName", - "diagnostic_logs_configuration": "description.SiteLogConfig", - "enabled": "description.Site.Properties.Enabled", - "host_name_disabled": "description.Site.Properties.HostNamesDisabled", - "host_names": "description.Site.Properties.HostNames", - "https_only": "description.Site.Properties.HTTPSOnly", - "id": "description.Site.ID", - "og_account_id": "metadata.SourceID", - "kind": "description.Site.Kind", - "name": "description.Site.Name", - "outbound_ip_addresses": "description.Site.Properties.OutboundIPAddresses", - "possible_outbound_ip_addresses": "description.Site.Properties.PossibleOutboundIPAddresses", - "reserved": "description.Site.Properties.Reserved", - "site_config": "description.Site.Properties.SiteConfig", - "state": "description.Site.Properties.State", - "tags": "description.Site.Tags", - "title": "description.Site.Name", - "type": "description.Site.Type", - "vnet_connection": "description.VnetInfo", + "auth_settings": "Description.SiteAuthSettings", + "client_affinity_enabled": "Description.Site.Properties.ClientAffinityEnabled", + "client_cert_enabled": "Description.Site.Properties.ClientCertEnabled", + "configuration": "Description.SiteConfigResource", + "default_site_hostname": "Description.Site.Properties.DefaultHostName", + "diagnostic_logs_configuration": "Description.SiteLogConfig", + "enabled": "Description.Site.Properties.Enabled", + "host_name_disabled": "Description.Site.Properties.HostNamesDisabled", + "host_names": "Description.Site.Properties.HostNames", + "https_only": "Description.Site.Properties.HTTPSOnly", + "id": "Description.Site.ID", + "kind": "Description.Site.Kind", + "name": "Description.Site.Name", + "outbound_ip_addresses": "Description.Site.Properties.OutboundIPAddresses", + "possible_outbound_ip_addresses": "Description.Site.Properties.PossibleOutboundIPAddresses", + "reserved": "Description.Site.Properties.Reserved", + "site_config": "Description.Site.Properties.SiteConfig", + "state": "Description.Site.Properties.State", + "tags": "Description.Site.Tags", + "title": "Description.Site.Name", + "type": "Description.Site.Type", + "vnet_connection": "Description.VnetInfo", } func ListAppServiceWebApp(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -2323,30 +1846,29 @@ func ListAppServiceWebApp(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy } var getAppServiceWebAppFilters = map[string]string{ - "auth_settings": "description.SiteAuthSettings", - "client_affinity_enabled": "description.Site.Properties.ClientAffinityEnabled", - "client_cert_enabled": "description.Site.Properties.ClientCertEnabled", - "configuration": "description.SiteConfigResource", - "default_site_hostname": "description.Site.Properties.DefaultHostName", - "diagnostic_logs_configuration": "description.SiteLogConfig", - "enabled": "description.Site.Properties.Enabled", - "host_name_disabled": "description.Site.Properties.HostNamesDisabled", - "host_names": "description.Site.Properties.HostNames", - "https_only": "description.Site.Properties.HTTPSOnly", - "id": "description.Site.ID", - "og_account_id": "metadata.SourceID", - "kind": "description.Site.Kind", + "auth_settings": "Description.SiteAuthSettings", + "client_affinity_enabled": "Description.Site.Properties.ClientAffinityEnabled", + "client_cert_enabled": "Description.Site.Properties.ClientCertEnabled", + "configuration": "Description.SiteConfigResource", + "default_site_hostname": "Description.Site.Properties.DefaultHostName", + "diagnostic_logs_configuration": "Description.SiteLogConfig", + "enabled": "Description.Site.Properties.Enabled", + "host_name_disabled": "Description.Site.Properties.HostNamesDisabled", + "host_names": "Description.Site.Properties.HostNames", + "https_only": "Description.Site.Properties.HTTPSOnly", + "id": "Description.Site.ID", + "kind": "Description.Site.Kind", "name": "description.Site.name", - "outbound_ip_addresses": "description.Site.Properties.OutboundIPAddresses", - "possible_outbound_ip_addresses": "description.Site.Properties.PossibleOutboundIPAddresses", - "reserved": "description.Site.Properties.Reserved", + "outbound_ip_addresses": "Description.Site.Properties.OutboundIPAddresses", + "possible_outbound_ip_addresses": "Description.Site.Properties.PossibleOutboundIPAddresses", + "reserved": "Description.Site.Properties.Reserved", "resource_group": "description.ResourceGroup", - "site_config": "description.Site.Properties.SiteConfig", - "state": "description.Site.Properties.State", - "tags": "description.Site.Tags", - "title": "description.Site.Name", - "type": "description.Site.Type", - "vnet_connection": "description.VnetInfo", + "site_config": "Description.Site.Properties.SiteConfig", + "state": "Description.Site.Properties.State", + "tags": "Description.Site.Tags", + "title": "Description.Site.Name", + "type": "Description.Site.Type", + "vnet_connection": "Description.VnetInfo", } func GetAppServiceWebApp(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -2407,72 +1929,14 @@ func GetAppServiceWebApp(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd // ========================== START: AppServiceWebAppSlot ============================= type AppServiceWebAppSlot struct { - Description azure.AppServiceWebAppSlotDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *AppServiceWebAppSlot) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.AppServiceWebAppSlotDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.AppServiceWebAppSlotDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type AppServiceWebAppSlotHit struct { @@ -2543,47 +2007,47 @@ func (p AppServiceWebAppSlotPaginator) NextPage(ctx context.Context) ([]AppServi } var listAppServiceWebAppSlotFilters = map[string]string{ - "app_name": "description.AppName", - "availability_state": "description.Site.Properties.AvailabilityState", - "client_affinity_enabled": "description.Site.Properties.ClientAffinityEnabled", - "client_cert_exclusion_paths": "description.Site.Properties.ClientCertExclusionPaths", - "client_cert_mode": "description.Site.Properties.ClientCertMode", - "container_size": "description.Site.Properties.ContainerSize", - "custom_domain_verification_id": "description.Site.Properties.CustomDomainVerificationID", - "default_host_name": "description.Site.Properties.DefaultHostName", - "enabled": "description.Site.Properties.Enabled", - "enabled_host_names": "description.Site.Properties.EnabledHostNames", - "host_name_ssl_states": "description.Site.Properties.HostNameSSLStates", - "host_names": "description.Site.Properties.HostNames", - "host_names_disabled": "description.Site.Properties.HostNamesDisabled", - "hosting_environment_profile": "description.Site.Properties.HostingEnvironmentProfile", - "https_only": "description.Site.Properties.HTTPSOnly", - "hyper_v": "description.Site.Properties.HyperV", - "id": "description.Site.ID", - "identity": "description.Site.Identity", - "is_default_container": "description.Site.Properties.IsDefaultContainer", - "is_xenon": "description.Site.Properties.IsXenon", - "kind": "description.Site.Kind", - "last_modified_time_utc": "description.Site.Properties.LastModifiedTimeUTC", - "outbound_ip_addresses": "description.Site.Properties.OutboundIPAddresses", - "possible_outbound_ip_addresses": "description.Site.Properties.PossibleOutboundIPAddresses", - "redundancy_mode": "description.Site.Properties.RedundancyMode", - "repository_site_name": "description.Site.Properties.RepositorySiteName", - "reserved": "description.Site.Properties.Reserved", - "resource_group": "description.ResourceGroup", - "scm_site_also_stopped": "description.Site.Properties.ScmSiteAlsoStopped", - "server_farm_id": "description.Site.Properties.ServerFarmID", - "site_config": "description.Site.Properties.SiteConfig", - "site_config_resource": "description.Site.Properties.SiteConfig", - "slot_swap_status": "description.Site.Properties.SlotSwapStatus", - "state": "description.Site.Properties.State", - "suspended_till": "description.Site.Properties.SuspendedTill", - "tags": "description.Site.Tags", - "target_swap_slot": "description.Site.Properties.TargetSwapSlot", - "title": "description.Site.Name", - "traffic_manager_host_names": "description.Site.Properties.TrafficManagerHostNames", - "type": "description.Site.Type", - "usage_state": "description.Site.Properties.UsageState", + "app_name": "Description.AppName", + "availability_state": "Description.Site.Properties.AvailabilityState", + "client_affinity_enabled": "Description.Site.Properties.ClientAffinityEnabled", + "client_cert_exclusion_paths": "Description.Site.Properties.ClientCertExclusionPaths", + "client_cert_mode": "Description.Site.Properties.ClientCertMode", + "container_size": "Description.Site.Properties.ContainerSize", + "custom_domain_verification_id": "Description.Site.Properties.CustomDomainVerificationID", + "default_host_name": "Description.Site.Properties.DefaultHostName", + "enabled": "Description.Site.Properties.Enabled", + "enabled_host_names": "Description.Site.Properties.EnabledHostNames", + "host_name_ssl_states": "Description.Site.Properties.HostNameSSLStates", + "host_names": "Description.Site.Properties.HostNames", + "host_names_disabled": "Description.Site.Properties.HostNamesDisabled", + "hosting_environment_profile": "Description.Site.Properties.HostingEnvironmentProfile", + "https_only": "Description.Site.Properties.HTTPSOnly", + "hyper_v": "Description.Site.Properties.HyperV", + "id": "Description.Site.ID", + "identity": "Description.Site.Identity", + "is_default_container": "Description.Site.Properties.IsDefaultContainer", + "is_xenon": "Description.Site.Properties.IsXenon", + "kind": "Description.Site.Kind", + "last_modified_time_utc": "Description.Site.Properties.LastModifiedTimeUTC", + "outbound_ip_addresses": "Description.Site.Properties.OutboundIPAddresses", + "possible_outbound_ip_addresses": "Description.Site.Properties.PossibleOutboundIPAddresses", + "redundancy_mode": "Description.Site.Properties.RedundancyMode", + "repository_site_name": "Description.Site.Properties.RepositorySiteName", + "reserved": "Description.Site.Properties.Reserved", + "resource_group": "Description.ResourceGroup", + "scm_site_also_stopped": "Description.Site.Properties.ScmSiteAlsoStopped", + "server_farm_id": "Description.Site.Properties.ServerFarmID", + "site_config": "Description.Site.Properties.SiteConfig", + "site_config_resource": "Description.Site.Properties.SiteConfig", + "slot_swap_status": "Description.Site.Properties.SlotSwapStatus", + "state": "Description.Site.Properties.State", + "suspended_till": "Description.Site.Properties.SuspendedTill", + "tags": "Description.Site.Tags", + "target_swap_slot": "Description.Site.Properties.TargetSwapSlot", + "title": "Description.Site.Name", + "traffic_manager_host_names": "Description.Site.Properties.TrafficManagerHostNames", + "type": "Description.Site.Type", + "usage_state": "Description.Site.Properties.UsageState", } func ListAppServiceWebAppSlot(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -2647,47 +2111,47 @@ func ListAppServiceWebAppSlot(ctx context.Context, d *plugin.QueryData, _ *plugi } var getAppServiceWebAppSlotFilters = map[string]string{ - "app_name": "description.AppName", - "availability_state": "description.Site.Properties.AvailabilityState", - "client_affinity_enabled": "description.Site.Properties.ClientAffinityEnabled", - "client_cert_exclusion_paths": "description.Site.Properties.ClientCertExclusionPaths", - "client_cert_mode": "description.Site.Properties.ClientCertMode", - "container_size": "description.Site.Properties.ContainerSize", - "custom_domain_verification_id": "description.Site.Properties.CustomDomainVerificationID", - "default_host_name": "description.Site.Properties.DefaultHostName", - "enabled": "description.Site.Properties.Enabled", - "enabled_host_names": "description.Site.Properties.EnabledHostNames", - "host_name_ssl_states": "description.Site.Properties.HostNameSSLStates", - "host_names": "description.Site.Properties.HostNames", - "host_names_disabled": "description.Site.Properties.HostNamesDisabled", - "hosting_environment_profile": "description.Site.Properties.HostingEnvironmentProfile", - "https_only": "description.Site.Properties.HTTPSOnly", - "hyper_v": "description.Site.Properties.HyperV", - "id": "description.Site.ID", - "identity": "description.Site.Identity", - "is_default_container": "description.Site.Properties.IsDefaultContainer", - "is_xenon": "description.Site.Properties.IsXenon", - "kind": "description.Site.Kind", - "last_modified_time_utc": "description.Site.Properties.LastModifiedTimeUTC", - "outbound_ip_addresses": "description.Site.Properties.OutboundIPAddresses", - "possible_outbound_ip_addresses": "description.Site.Properties.PossibleOutboundIPAddresses", - "redundancy_mode": "description.Site.Properties.RedundancyMode", - "repository_site_name": "description.Site.Properties.RepositorySiteName", - "reserved": "description.Site.Properties.Reserved", - "resource_group": "description.ResourceGroup", - "scm_site_also_stopped": "description.Site.Properties.ScmSiteAlsoStopped", - "server_farm_id": "description.Site.Properties.ServerFarmID", - "site_config": "description.Site.Properties.SiteConfig", - "site_config_resource": "description.Site.Properties.SiteConfig", - "slot_swap_status": "description.Site.Properties.SlotSwapStatus", - "state": "description.Site.Properties.State", - "suspended_till": "description.Site.Properties.SuspendedTill", - "tags": "description.Site.Tags", - "target_swap_slot": "description.Site.Properties.TargetSwapSlot", - "title": "description.Site.Name", - "traffic_manager_host_names": "description.Site.Properties.TrafficManagerHostNames", - "type": "description.Site.Type", - "usage_state": "description.Site.Properties.UsageState", + "app_name": "Description.AppName", + "availability_state": "Description.Site.Properties.AvailabilityState", + "client_affinity_enabled": "Description.Site.Properties.ClientAffinityEnabled", + "client_cert_exclusion_paths": "Description.Site.Properties.ClientCertExclusionPaths", + "client_cert_mode": "Description.Site.Properties.ClientCertMode", + "container_size": "Description.Site.Properties.ContainerSize", + "custom_domain_verification_id": "Description.Site.Properties.CustomDomainVerificationID", + "default_host_name": "Description.Site.Properties.DefaultHostName", + "enabled": "Description.Site.Properties.Enabled", + "enabled_host_names": "Description.Site.Properties.EnabledHostNames", + "host_name_ssl_states": "Description.Site.Properties.HostNameSSLStates", + "host_names": "Description.Site.Properties.HostNames", + "host_names_disabled": "Description.Site.Properties.HostNamesDisabled", + "hosting_environment_profile": "Description.Site.Properties.HostingEnvironmentProfile", + "https_only": "Description.Site.Properties.HTTPSOnly", + "hyper_v": "Description.Site.Properties.HyperV", + "id": "Description.Site.ID", + "identity": "Description.Site.Identity", + "is_default_container": "Description.Site.Properties.IsDefaultContainer", + "is_xenon": "Description.Site.Properties.IsXenon", + "kind": "Description.Site.Kind", + "last_modified_time_utc": "Description.Site.Properties.LastModifiedTimeUTC", + "outbound_ip_addresses": "Description.Site.Properties.OutboundIPAddresses", + "possible_outbound_ip_addresses": "Description.Site.Properties.PossibleOutboundIPAddresses", + "redundancy_mode": "Description.Site.Properties.RedundancyMode", + "repository_site_name": "Description.Site.Properties.RepositorySiteName", + "reserved": "Description.Site.Properties.Reserved", + "resource_group": "Description.ResourceGroup", + "scm_site_also_stopped": "Description.Site.Properties.ScmSiteAlsoStopped", + "server_farm_id": "Description.Site.Properties.ServerFarmID", + "site_config": "Description.Site.Properties.SiteConfig", + "site_config_resource": "Description.Site.Properties.SiteConfig", + "slot_swap_status": "Description.Site.Properties.SlotSwapStatus", + "state": "Description.Site.Properties.State", + "suspended_till": "Description.Site.Properties.SuspendedTill", + "tags": "Description.Site.Tags", + "target_swap_slot": "Description.Site.Properties.TargetSwapSlot", + "title": "Description.Site.Name", + "traffic_manager_host_names": "Description.Site.Properties.TrafficManagerHostNames", + "type": "Description.Site.Type", + "usage_state": "Description.Site.Properties.UsageState", } func GetAppServiceWebAppSlot(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -2748,72 +2212,14 @@ func GetAppServiceWebAppSlot(ctx context.Context, d *plugin.QueryData, _ *plugin // ========================== START: AppServicePlan ============================= type AppServicePlan struct { - Description azure.AppServicePlanDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *AppServicePlan) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.AppServicePlanDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.AppServicePlanDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type AppServicePlanHit struct { @@ -2884,28 +2290,27 @@ func (p AppServicePlanPaginator) NextPage(ctx context.Context) ([]AppServicePlan } var listAppServicePlanFilters = map[string]string{ - "apps": "description.Apps", - "hyper_v": "description.Plan.Properties.HyperV", - "id": "description.Plan.ID", - "is_spot": "description.Plan.Properties.IsSpot", - "is_xenon": "description.Plan.Properties.IsXenon", - "og_account_id": "metadata.SourceID", - "kind": "description.Plan.Kind", - "maximum_elastic_worker_count": "description.Plan.Properties.MaximumElasticWorkerCount", - "maximum_number_of_workers": "description.Plan.Properties.MaximumNumberOfWorkers", - "name": "description.Plan.Name", - "per_site_scaling": "description.Plan.Properties.PerSiteScaling", - "provisioning_state": "description.Plan.Properties.ProvisioningState", - "reserved": "description.Plan.Properties.Reserved", - "sku_capacity": "description.Plan.SKU.Capacity", - "sku_family": "description.Plan.SKU.Family", - "sku_name": "description.Plan.SKU.Name", - "sku_size": "description.Plan.SKU.Size", - "sku_tier": "description.Plan.SKU.Tier", - "status": "description.Plan.Properties.Status", - "tags": "description.Plan.Tags", - "title": "description.Plan.Name", - "type": "description.Plan.Type", + "apps": "Description.Apps", + "hyper_v": "Description.Plan.Properties.HyperV", + "id": "Description.Plan.ID", + "is_spot": "Description.Plan.Properties.IsSpot", + "is_xenon": "Description.Plan.Properties.IsXenon", + "kind": "Description.Plan.Kind", + "maximum_elastic_worker_count": "Description.Plan.Properties.MaximumElasticWorkerCount", + "maximum_number_of_workers": "Description.Plan.Properties.MaximumNumberOfWorkers", + "name": "Description.Plan.Name", + "per_site_scaling": "Description.Plan.Properties.PerSiteScaling", + "provisioning_state": "Description.Plan.Properties.ProvisioningState", + "reserved": "Description.Plan.Properties.Reserved", + "sku_capacity": "Description.Plan.SKU.Capacity", + "sku_family": "Description.Plan.SKU.Family", + "sku_name": "Description.Plan.SKU.Name", + "sku_size": "Description.Plan.SKU.Size", + "sku_tier": "Description.Plan.SKU.Tier", + "status": "Description.Plan.Properties.Status", + "tags": "Description.Plan.Tags", + "title": "Description.Plan.Name", + "type": "Description.Plan.Type", } func ListAppServicePlan(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -2969,29 +2374,28 @@ func ListAppServicePlan(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr } var getAppServicePlanFilters = map[string]string{ - "apps": "description.Apps", - "hyper_v": "description.Plan.Properties.HyperV", - "id": "description.Plan.ID", - "is_spot": "description.Plan.Properties.IsSpot", - "is_xenon": "description.Plan.Properties.IsXenon", - "og_account_id": "metadata.SourceID", - "kind": "description.Plan.Kind", - "maximum_elastic_worker_count": "description.Plan.Properties.MaximumElasticWorkerCount", - "maximum_number_of_workers": "description.Plan.Properties.MaximumNumberOfWorkers", + "apps": "Description.Apps", + "hyper_v": "Description.Plan.Properties.HyperV", + "id": "Description.Plan.ID", + "is_spot": "Description.Plan.Properties.IsSpot", + "is_xenon": "Description.Plan.Properties.IsXenon", + "kind": "Description.Plan.Kind", + "maximum_elastic_worker_count": "Description.Plan.Properties.MaximumElasticWorkerCount", + "maximum_number_of_workers": "Description.Plan.Properties.MaximumNumberOfWorkers", "name": "description.Site.name", - "per_site_scaling": "description.Plan.Properties.PerSiteScaling", - "provisioning_state": "description.Plan.Properties.ProvisioningState", - "reserved": "description.Plan.Properties.Reserved", + "per_site_scaling": "Description.Plan.Properties.PerSiteScaling", + "provisioning_state": "Description.Plan.Properties.ProvisioningState", + "reserved": "Description.Plan.Properties.Reserved", "resource_group": "description.ResourceGroup", - "sku_capacity": "description.Plan.SKU.Capacity", - "sku_family": "description.Plan.SKU.Family", - "sku_name": "description.Plan.SKU.Name", - "sku_size": "description.Plan.SKU.Size", - "sku_tier": "description.Plan.SKU.Tier", - "status": "description.Plan.Properties.Status", - "tags": "description.Plan.Tags", - "title": "description.Plan.Name", - "type": "description.Plan.Type", + "sku_capacity": "Description.Plan.SKU.Capacity", + "sku_family": "Description.Plan.SKU.Family", + "sku_name": "Description.Plan.SKU.Name", + "sku_size": "Description.Plan.SKU.Size", + "sku_tier": "Description.Plan.SKU.Tier", + "status": "Description.Plan.Properties.Status", + "tags": "Description.Plan.Tags", + "title": "Description.Plan.Name", + "type": "Description.Plan.Type", } func GetAppServicePlan(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -3052,72 +2456,14 @@ func GetAppServicePlan(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra // ========================== START: ContainerApp ============================= type ContainerApp struct { - Description azure.ContainerAppDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *ContainerApp) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.ContainerAppDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.ContainerAppDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type ContainerAppHit struct { @@ -3188,11 +2534,10 @@ func (p ContainerAppPaginator) NextPage(ctx context.Context) ([]ContainerApp, er } var listContainerAppFilters = map[string]string{ - "id": "description.Server.ID", - "og_account_id": "metadata.SourceID", - "name": "description.Server.Name", - "tags": "description.Server.Tags", - "title": "description.Server.Name", + "id": "Description.Server.ID", + "name": "Description.Server.Name", + "tags": "Description.Server.Tags", + "title": "Description.Server.Name", } func ListContainerApp(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -3256,11 +2601,10 @@ func ListContainerApp(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat } var getContainerAppFilters = map[string]string{ - "id": "description.Server.ID", - "og_account_id": "metadata.SourceID", - "name": "description.Server.Name", - "tags": "description.Server.Tags", - "title": "description.Server.Name", + "id": "Description.Server.ID", + "name": "Description.Server.Name", + "tags": "Description.Server.Tags", + "title": "Description.Server.Name", } func GetContainerApp(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -3318,344 +2662,17 @@ func GetContainerApp(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate // ========================== END: ContainerApp ============================= -// ========================== START: AppManagedEnvironment ============================= - -type AppManagedEnvironment struct { - Description azure.AppManagedEnvironmentDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *AppManagedEnvironment) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.AppManagedEnvironmentDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - -type AppManagedEnvironmentHit struct { - ID string `json:"_id"` - Score float64 `json:"_score"` - Index string `json:"_index"` - Type string `json:"_type"` - Version int64 `json:"_version,omitempty"` - Source AppManagedEnvironment `json:"_source"` - Sort []interface{} `json:"sort"` -} - -type AppManagedEnvironmentHits struct { - Total essdk.SearchTotal `json:"total"` - Hits []AppManagedEnvironmentHit `json:"hits"` -} - -type AppManagedEnvironmentSearchResponse struct { - PitID string `json:"pit_id"` - Hits AppManagedEnvironmentHits `json:"hits"` -} - -type AppManagedEnvironmentPaginator struct { - paginator *essdk.BaseESPaginator -} - -func (k Client) NewAppManagedEnvironmentPaginator(filters []essdk.BoolFilter, limit *int64) (AppManagedEnvironmentPaginator, error) { - paginator, err := essdk.NewPaginator(k.ES(), "microsoft_app_managedenvironments", filters, limit) - if err != nil { - return AppManagedEnvironmentPaginator{}, err - } - - p := AppManagedEnvironmentPaginator{ - paginator: paginator, - } - - return p, nil -} - -func (p AppManagedEnvironmentPaginator) HasNext() bool { - return !p.paginator.Done() -} - -func (p AppManagedEnvironmentPaginator) Close(ctx context.Context) error { - return p.paginator.Deallocate(ctx) -} - -func (p AppManagedEnvironmentPaginator) NextPage(ctx context.Context) ([]AppManagedEnvironment, error) { - var response AppManagedEnvironmentSearchResponse - err := p.paginator.Search(ctx, &response) - if err != nil { - return nil, err - } - - var values []AppManagedEnvironment - for _, hit := range response.Hits.Hits { - values = append(values, hit.Source) - } - - hits := int64(len(response.Hits.Hits)) - if hits > 0 { - p.paginator.UpdateState(hits, response.Hits.Hits[hits-1].Sort, response.PitID) - } else { - p.paginator.UpdateState(hits, nil, "") - } - - return values, nil -} - -var listAppManagedEnvironmentFilters = map[string]string{ - "id": "description.HostingEnvironment.ID", - "og_account_id": "metadata.SourceID", - "name": "description.HostingEnvironment.Name", - "tags": "description.HostingEnvironment.Tags", - "title": "description.HostingEnvironment.Name", -} - -func ListAppManagedEnvironment(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { - plugin.Logger(ctx).Trace("ListAppManagedEnvironment") - runtime.GC() - - // create service - cfg := essdk.GetConfig(d.Connection) - ke, err := essdk.NewClientCached(cfg, d.ConnectionCache, ctx) - if err != nil { - plugin.Logger(ctx).Error("ListAppManagedEnvironment NewClientCached", "error", err) - return nil, err - } - k := Client{Client: ke} - - sc, err := steampipesdk.NewSelfClientCached(ctx, d.ConnectionCache) - if err != nil { - plugin.Logger(ctx).Error("ListAppManagedEnvironment NewSelfClientCached", "error", err) - return nil, err - } - accountId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyAccountID) - if err != nil { - plugin.Logger(ctx).Error("ListAppManagedEnvironment GetConfigTableValueOrNil for OpenGovernanceConfigKeyAccountID", "error", err) - return nil, err - } - encodedResourceCollectionFilters, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyResourceCollectionFilters) - if err != nil { - plugin.Logger(ctx).Error("ListAppManagedEnvironment GetConfigTableValueOrNil for OpenGovernanceConfigKeyResourceCollectionFilters", "error", err) - return nil, err - } - clientType, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyClientType) - if err != nil { - plugin.Logger(ctx).Error("ListAppManagedEnvironment GetConfigTableValueOrNil for OpenGovernanceConfigKeyClientType", "error", err) - return nil, err - } - - paginator, err := k.NewAppManagedEnvironmentPaginator(essdk.BuildFilter(ctx, d.QueryContext, listAppManagedEnvironmentFilters, "azure", accountId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) - if err != nil { - plugin.Logger(ctx).Error("ListAppManagedEnvironment NewAppManagedEnvironmentPaginator", "error", err) - return nil, err - } - - for paginator.HasNext() { - page, err := paginator.NextPage(ctx) - if err != nil { - plugin.Logger(ctx).Error("ListAppManagedEnvironment paginator.NextPage", "error", err) - return nil, err - } - - for _, v := range page { - d.StreamListItem(ctx, v) - } - } - - err = paginator.Close(ctx) - if err != nil { - return nil, err - } - - return nil, nil -} - -var getAppManagedEnvironmentFilters = map[string]string{ - "id": "description.HostingEnvironment.ID", - "og_account_id": "metadata.SourceID", - "name": "description.HostingEnvironment.Name", - "tags": "description.HostingEnvironment.Tags", - "title": "description.HostingEnvironment.Name", -} - -func GetAppManagedEnvironment(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { - plugin.Logger(ctx).Trace("GetAppManagedEnvironment") - runtime.GC() - // create service - cfg := essdk.GetConfig(d.Connection) - ke, err := essdk.NewClientCached(cfg, d.ConnectionCache, ctx) - if err != nil { - return nil, err - } - k := Client{Client: ke} - - sc, err := steampipesdk.NewSelfClientCached(ctx, d.ConnectionCache) - if err != nil { - return nil, err - } - accountId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyAccountID) - if err != nil { - return nil, err - } - encodedResourceCollectionFilters, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyResourceCollectionFilters) - if err != nil { - return nil, err - } - clientType, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyClientType) - if err != nil { - return nil, err - } - - limit := int64(1) - paginator, err := k.NewAppManagedEnvironmentPaginator(essdk.BuildFilter(ctx, d.QueryContext, getAppManagedEnvironmentFilters, "azure", accountId, encodedResourceCollectionFilters, clientType), &limit) - if err != nil { - return nil, err - } - - for paginator.HasNext() { - page, err := paginator.NextPage(ctx) - if err != nil { - return nil, err - } - - for _, v := range page { - return v, nil - } - } - - err = paginator.Close(ctx) - if err != nil { - return nil, err - } - - return nil, nil -} - -// ========================== END: AppManagedEnvironment ============================= - // ========================== START: WebServerFarms ============================= type WebServerFarms struct { - Description azure.WebServerFarmsDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *WebServerFarms) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.WebServerFarmsDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.WebServerFarmsDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type WebServerFarmsHit struct { @@ -3726,11 +2743,10 @@ func (p WebServerFarmsPaginator) NextPage(ctx context.Context) ([]WebServerFarms } var listWebServerFarmsFilters = map[string]string{ - "id": "description.ServerFarm.ID", - "og_account_id": "metadata.SourceID", - "name": "description.ServerFarm.Name", - "tags": "description.ServerFarm.Tags", - "title": "description.ServerFarm.Name", + "id": "Description.ServerFarm.ID", + "name": "Description.ServerFarm.Name", + "tags": "Description.ServerFarm.Tags", + "title": "Description.ServerFarm.Name", } func ListWebServerFarms(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -3794,11 +2810,10 @@ func ListWebServerFarms(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr } var getWebServerFarmsFilters = map[string]string{ - "id": "description.ServerFarm.ID", - "og_account_id": "metadata.SourceID", - "name": "description.ServerFarm.Name", - "tags": "description.ServerFarm.Tags", - "title": "description.ServerFarm.Name", + "id": "Description.ServerFarm.ID", + "name": "Description.ServerFarm.Name", + "tags": "Description.ServerFarm.Tags", + "title": "Description.ServerFarm.Name", } func GetWebServerFarms(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -3859,72 +2874,14 @@ func GetWebServerFarms(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra // ========================== START: Blueprint ============================= type Blueprint struct { - Description azure.BlueprintDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *Blueprint) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.BlueprintDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.BlueprintDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type BlueprintHit struct { @@ -3995,10 +2952,9 @@ func (p BlueprintPaginator) NextPage(ctx context.Context) ([]Blueprint, error) { } var listBlueprintFilters = map[string]string{ - "id": "description.Blueprints.ID", - "og_account_id": "metadata.SourceID", - "name": "description.Blueprint.Name", - "title": "description.Blueprint.Name", + "id": "Description.Blueprints.ID", + "name": "Description.Blueprint.Name", + "title": "Description.Blueprint.Name", } func ListBlueprint(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -4062,10 +3018,9 @@ func ListBlueprint(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDa } var getBlueprintFilters = map[string]string{ - "id": "description.Blueprints.ID", - "og_account_id": "metadata.SourceID", - "name": "description.Blueprint.Name", - "title": "description.Blueprint.Name", + "id": "Description.Blueprints.ID", + "name": "Description.Blueprint.Name", + "title": "Description.Blueprint.Name", } func GetBlueprint(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -4126,72 +3081,14 @@ func GetBlueprint(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDat // ========================== START: ComputeDisk ============================= type ComputeDisk struct { - Description azure.ComputeDiskDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *ComputeDisk) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.ComputeDiskDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.ComputeDiskDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type ComputeDiskHit struct { @@ -4262,48 +3159,47 @@ func (p ComputeDiskPaginator) NextPage(ctx context.Context) ([]ComputeDisk, erro } var listComputeDiskFilters = map[string]string{ - "creation_data_gallery_image_reference_id": "description.Disk.Properties.CreationData.GalleryImageReference.ID", - "creation_data_gallery_image_reference_lun": "description.Disk.Properties.CreationData.GalleryImageReference.Lun", - "creation_data_image_reference_id": "description.Disk.Properties.CreationData.ImageReference.ID", - "creation_data_image_reference_lun": "description.Disk.Properties.CreationData.ImageReference.Lun", - "creation_data_option": "description.Disk.Properties.CreationData.CreateOption", - "creation_data_source_resource_id": "description.Disk.Properties.CreationData.SourceResourceID", - "creation_data_source_unique_id": "description.Disk.Properties.CreationData.SourceUniqueID", - "creation_data_source_uri": "description.Disk.Properties.CreationData.SourceURI", - "creation_data_storage_account_id": "description.Disk.Properties.CreationData.StorageAccountID", - "creation_data_upload_size_bytes": "description.Disk.Properties.CreationData.UploadSizeBytes", - "disk_access_id": "description.Disk.Properties.DiskAccessID", - "disk_iops_mbps_read_only": "description.Disk.Properties.DiskMBpsReadOnly", - "disk_iops_mbps_read_write": "description.Disk.Properties.DiskMBpsReadWrite", - "disk_iops_read_only": "description.Disk.Properties.DiskMBpsReadOnly", - "disk_iops_read_write": "description.Disk.Properties.DiskMBpsReadWrite", - "disk_size_bytes": "description.Disk.Properties.DiskSizeBytes", - "disk_size_gb": "description.Disk.Properties.DiskSizeGB", - "disk_state": "description.Disk.Properties.DiskState", - "encryption_disk_encryption_set_id": "description.Disk.Properties.Encryption.DiskEncryptionSetID", - "encryption_settings_collection_enabled": "description.Disk.Properties.EncryptionSettingsCollection.Enabled", - "encryption_settings_collection_settings": "description.Disk.Properties.EncryptionSettingsCollection.EncryptionSettings", - "encryption_settings_collection_version": "description.Disk.Properties.EncryptionSettingsCollection.EncryptionSettingsVersion", - "encryption_type": "description.Disk.Properties.Encryption.Type", - "hyper_v_generation": "description.Disk.Properties.HyperVGeneration", - "id": "description.Disk.ID", - "og_account_id": "metadata.SourceID", - "managed_by": "description.Disk.ManagedBy", - "managed_by_extended": "description.Disk.ManagedByExtended", - "max_shares": "description.Disk.Properties.MaxShares", - "name": "description.Disk.Name", - "network_access_policy": "description.Disk.Properties.NetworkAccessPolicy", - "os_type": "description.Disk.Properties.OSType", - "provisioning_state": "description.Disk.ProvisioningState", - "resource_group": "description.ResourceGroup", - "share_info": "description.Disk.Properties.ShareInfo", - "sku_name": "description.Disk.SKU.Name", - "sku_tier": "description.Disk.SKU.Tier", - "tags": "description.Disk.Tags", - "title": "description.Disk.Name", - "type": "description.Disk.Type", - "unique_id": "description.Disk.Properties.UniqueID", - "zones": "description.Disk.Zones", + "creation_data_gallery_image_reference_id": "Description.Disk.Properties.CreationData.GalleryImageReference.ID", + "creation_data_gallery_image_reference_lun": "Description.Disk.Properties.CreationData.GalleryImageReference.Lun", + "creation_data_image_reference_id": "Description.Disk.Properties.CreationData.ImageReference.ID", + "creation_data_image_reference_lun": "Description.Disk.Properties.CreationData.ImageReference.Lun", + "creation_data_option": "Description.Disk.Properties.CreationData.CreateOption", + "creation_data_source_resource_id": "Description.Disk.Properties.CreationData.SourceResourceID", + "creation_data_source_unique_id": "Description.Disk.Properties.CreationData.SourceUniqueID", + "creation_data_source_uri": "Description.Disk.Properties.CreationData.SourceURI", + "creation_data_storage_account_id": "Description.Disk.Properties.CreationData.StorageAccountID", + "creation_data_upload_size_bytes": "Description.Disk.Properties.CreationData.UploadSizeBytes", + "disk_access_id": "Description.Disk.Properties.DiskAccessID", + "disk_iops_mbps_read_only": "Description.Disk.Properties.DiskMBpsReadOnly", + "disk_iops_mbps_read_write": "Description.Disk.Properties.DiskMBpsReadWrite", + "disk_iops_read_only": "Description.Disk.Properties.DiskMBpsReadOnly", + "disk_iops_read_write": "Description.Disk.Properties.DiskMBpsReadWrite", + "disk_size_bytes": "Description.Disk.Properties.DiskSizeBytes", + "disk_size_gb": "Description.Disk.Properties.DiskSizeGB", + "disk_state": "Description.Disk.Properties.DiskState", + "encryption_disk_encryption_set_id": "Description.Disk.Properties.Encryption.DiskEncryptionSetID", + "encryption_settings_collection_enabled": "Description.Disk.Properties.EncryptionSettingsCollection.Enabled", + "encryption_settings_collection_settings": "Description.Disk.Properties.EncryptionSettingsCollection.EncryptionSettings", + "encryption_settings_collection_version": "Description.Disk.Properties.EncryptionSettingsCollection.EncryptionSettingsVersion", + "encryption_type": "Description.Disk.Properties.Encryption.Type", + "hyper_v_generation": "Description.Disk.Properties.HyperVGeneration", + "id": "Description.Disk.ID", + "managed_by": "Description.Disk.ManagedBy", + "managed_by_extended": "Description.Disk.ManagedByExtended", + "max_shares": "Description.Disk.Properties.MaxShares", + "name": "Description.Disk.Name", + "network_access_policy": "Description.Disk.Properties.NetworkAccessPolicy", + "os_type": "Description.Disk.Properties.OSType", + "provisioning_state": "Description.Disk.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "share_info": "Description.Disk.Properties.ShareInfo", + "sku_name": "Description.Disk.SKU.Name", + "sku_tier": "Description.Disk.SKU.Tier", + "tags": "Description.Disk.Tags", + "title": "Description.Disk.Name", + "type": "Description.Disk.Type", + "unique_id": "Description.Disk.Properties.UniqueID", + "zones": "Description.Disk.Zones", } func ListComputeDisk(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -4367,48 +3263,47 @@ func ListComputeDisk(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate } var getComputeDiskFilters = map[string]string{ - "creation_data_gallery_image_reference_id": "description.Disk.Properties.CreationData.GalleryImageReference.ID", - "creation_data_gallery_image_reference_lun": "description.Disk.Properties.CreationData.GalleryImageReference.Lun", - "creation_data_image_reference_id": "description.Disk.Properties.CreationData.ImageReference.ID", - "creation_data_image_reference_lun": "description.Disk.Properties.CreationData.ImageReference.Lun", - "creation_data_option": "description.Disk.Properties.CreationData.CreateOption", - "creation_data_source_resource_id": "description.Disk.Properties.CreationData.SourceResourceID", - "creation_data_source_unique_id": "description.Disk.Properties.CreationData.SourceUniqueID", - "creation_data_source_uri": "description.Disk.Properties.CreationData.SourceURI", - "creation_data_storage_account_id": "description.Disk.Properties.CreationData.StorageAccountID", - "creation_data_upload_size_bytes": "description.Disk.Properties.CreationData.UploadSizeBytes", - "disk_access_id": "description.Disk.Properties.DiskAccessID", - "disk_iops_mbps_read_only": "description.Disk.Properties.DiskMBpsReadOnly", - "disk_iops_mbps_read_write": "description.Disk.Properties.DiskMBpsReadWrite", - "disk_iops_read_only": "description.Disk.Properties.DiskMBpsReadOnly", - "disk_iops_read_write": "description.Disk.Properties.DiskMBpsReadWrite", - "disk_size_bytes": "description.Disk.Properties.DiskSizeBytes", - "disk_size_gb": "description.Disk.Properties.DiskSizeGB", - "disk_state": "description.Disk.Properties.DiskState", - "encryption_disk_encryption_set_id": "description.Disk.Properties.Encryption.DiskEncryptionSetID", - "encryption_settings_collection_enabled": "description.Disk.Properties.EncryptionSettingsCollection.Enabled", - "encryption_settings_collection_settings": "description.Disk.Properties.EncryptionSettingsCollection.EncryptionSettings", - "encryption_settings_collection_version": "description.Disk.Properties.EncryptionSettingsCollection.EncryptionSettingsVersion", - "encryption_type": "description.Disk.Properties.Encryption.Type", - "hyper_v_generation": "description.Disk.Properties.HyperVGeneration", - "id": "description.Disk.ID", - "og_account_id": "metadata.SourceID", - "managed_by": "description.Disk.ManagedBy", - "managed_by_extended": "description.Disk.ManagedByExtended", - "max_shares": "description.Disk.Properties.MaxShares", + "creation_data_gallery_image_reference_id": "Description.Disk.Properties.CreationData.GalleryImageReference.ID", + "creation_data_gallery_image_reference_lun": "Description.Disk.Properties.CreationData.GalleryImageReference.Lun", + "creation_data_image_reference_id": "Description.Disk.Properties.CreationData.ImageReference.ID", + "creation_data_image_reference_lun": "Description.Disk.Properties.CreationData.ImageReference.Lun", + "creation_data_option": "Description.Disk.Properties.CreationData.CreateOption", + "creation_data_source_resource_id": "Description.Disk.Properties.CreationData.SourceResourceID", + "creation_data_source_unique_id": "Description.Disk.Properties.CreationData.SourceUniqueID", + "creation_data_source_uri": "Description.Disk.Properties.CreationData.SourceURI", + "creation_data_storage_account_id": "Description.Disk.Properties.CreationData.StorageAccountID", + "creation_data_upload_size_bytes": "Description.Disk.Properties.CreationData.UploadSizeBytes", + "disk_access_id": "Description.Disk.Properties.DiskAccessID", + "disk_iops_mbps_read_only": "Description.Disk.Properties.DiskMBpsReadOnly", + "disk_iops_mbps_read_write": "Description.Disk.Properties.DiskMBpsReadWrite", + "disk_iops_read_only": "Description.Disk.Properties.DiskMBpsReadOnly", + "disk_iops_read_write": "Description.Disk.Properties.DiskMBpsReadWrite", + "disk_size_bytes": "Description.Disk.Properties.DiskSizeBytes", + "disk_size_gb": "Description.Disk.Properties.DiskSizeGB", + "disk_state": "Description.Disk.Properties.DiskState", + "encryption_disk_encryption_set_id": "Description.Disk.Properties.Encryption.DiskEncryptionSetID", + "encryption_settings_collection_enabled": "Description.Disk.Properties.EncryptionSettingsCollection.Enabled", + "encryption_settings_collection_settings": "Description.Disk.Properties.EncryptionSettingsCollection.EncryptionSettings", + "encryption_settings_collection_version": "Description.Disk.Properties.EncryptionSettingsCollection.EncryptionSettingsVersion", + "encryption_type": "Description.Disk.Properties.Encryption.Type", + "hyper_v_generation": "Description.Disk.Properties.HyperVGeneration", + "id": "Description.Disk.ID", + "managed_by": "Description.Disk.ManagedBy", + "managed_by_extended": "Description.Disk.ManagedByExtended", + "max_shares": "Description.Disk.Properties.MaxShares", "name": "description.Disk.name", - "network_access_policy": "description.Disk.Properties.NetworkAccessPolicy", - "os_type": "description.Disk.Properties.OSType", - "provisioning_state": "description.Disk.ProvisioningState", + "network_access_policy": "Description.Disk.Properties.NetworkAccessPolicy", + "os_type": "Description.Disk.Properties.OSType", + "provisioning_state": "Description.Disk.ProvisioningState", "resource_group": "description.ResourceGroup", - "share_info": "description.Disk.Properties.ShareInfo", - "sku_name": "description.Disk.SKU.Name", - "sku_tier": "description.Disk.SKU.Tier", - "tags": "description.Disk.Tags", - "title": "description.Disk.Name", - "type": "description.Disk.Type", - "unique_id": "description.Disk.Properties.UniqueID", - "zones": "description.Disk.Zones", + "share_info": "Description.Disk.Properties.ShareInfo", + "sku_name": "Description.Disk.SKU.Name", + "sku_tier": "Description.Disk.SKU.Tier", + "tags": "Description.Disk.Tags", + "title": "Description.Disk.Name", + "type": "Description.Disk.Type", + "unique_id": "Description.Disk.Properties.UniqueID", + "zones": "Description.Disk.Zones", } func GetComputeDisk(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -4469,72 +3364,14 @@ func GetComputeDisk(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD // ========================== START: ComputeDiskReadOps ============================= type ComputeDiskReadOps struct { - Description azure.ComputeDiskReadOpsDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *ComputeDiskReadOps) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.ComputeDiskReadOpsDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.ComputeDiskReadOpsDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type ComputeDiskReadOpsHit struct { @@ -4604,9 +3441,7 @@ func (p ComputeDiskReadOpsPaginator) NextPage(ctx context.Context) ([]ComputeDis return values, nil } -var listComputeDiskReadOpsFilters = map[string]string{ - "og_account_id": "metadata.SourceID", -} +var listComputeDiskReadOpsFilters = map[string]string{} func ListComputeDiskReadOps(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { plugin.Logger(ctx).Trace("ListComputeDiskReadOps") @@ -4668,9 +3503,7 @@ func ListComputeDiskReadOps(ctx context.Context, d *plugin.QueryData, _ *plugin. return nil, nil } -var getComputeDiskReadOpsFilters = map[string]string{ - "og_account_id": "metadata.SourceID", -} +var getComputeDiskReadOpsFilters = map[string]string{} func GetComputeDiskReadOps(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { plugin.Logger(ctx).Trace("GetComputeDiskReadOps") @@ -4730,72 +3563,14 @@ func GetComputeDiskReadOps(ctx context.Context, d *plugin.QueryData, _ *plugin.H // ========================== START: ComputeDiskReadOpsDaily ============================= type ComputeDiskReadOpsDaily struct { - Description azure.ComputeDiskReadOpsDailyDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *ComputeDiskReadOpsDaily) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.ComputeDiskReadOpsDailyDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.ComputeDiskReadOpsDailyDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type ComputeDiskReadOpsDailyHit struct { @@ -4865,9 +3640,7 @@ func (p ComputeDiskReadOpsDailyPaginator) NextPage(ctx context.Context) ([]Compu return values, nil } -var listComputeDiskReadOpsDailyFilters = map[string]string{ - "og_account_id": "metadata.SourceID", -} +var listComputeDiskReadOpsDailyFilters = map[string]string{} func ListComputeDiskReadOpsDaily(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { plugin.Logger(ctx).Trace("ListComputeDiskReadOpsDaily") @@ -4929,9 +3702,7 @@ func ListComputeDiskReadOpsDaily(ctx context.Context, d *plugin.QueryData, _ *pl return nil, nil } -var getComputeDiskReadOpsDailyFilters = map[string]string{ - "og_account_id": "metadata.SourceID", -} +var getComputeDiskReadOpsDailyFilters = map[string]string{} func GetComputeDiskReadOpsDaily(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { plugin.Logger(ctx).Trace("GetComputeDiskReadOpsDaily") @@ -4991,72 +3762,14 @@ func GetComputeDiskReadOpsDaily(ctx context.Context, d *plugin.QueryData, _ *plu // ========================== START: ComputeDiskReadOpsHourly ============================= type ComputeDiskReadOpsHourly struct { - Description azure.ComputeDiskReadOpsHourlyDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *ComputeDiskReadOpsHourly) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.ComputeDiskReadOpsHourlyDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.ComputeDiskReadOpsHourlyDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type ComputeDiskReadOpsHourlyHit struct { @@ -5126,9 +3839,7 @@ func (p ComputeDiskReadOpsHourlyPaginator) NextPage(ctx context.Context) ([]Comp return values, nil } -var listComputeDiskReadOpsHourlyFilters = map[string]string{ - "og_account_id": "metadata.SourceID", -} +var listComputeDiskReadOpsHourlyFilters = map[string]string{} func ListComputeDiskReadOpsHourly(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { plugin.Logger(ctx).Trace("ListComputeDiskReadOpsHourly") @@ -5190,9 +3901,7 @@ func ListComputeDiskReadOpsHourly(ctx context.Context, d *plugin.QueryData, _ *p return nil, nil } -var getComputeDiskReadOpsHourlyFilters = map[string]string{ - "og_account_id": "metadata.SourceID", -} +var getComputeDiskReadOpsHourlyFilters = map[string]string{} func GetComputeDiskReadOpsHourly(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { plugin.Logger(ctx).Trace("GetComputeDiskReadOpsHourly") @@ -5252,72 +3961,14 @@ func GetComputeDiskReadOpsHourly(ctx context.Context, d *plugin.QueryData, _ *pl // ========================== START: ComputeDiskWriteOps ============================= type ComputeDiskWriteOps struct { - Description azure.ComputeDiskWriteOpsDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *ComputeDiskWriteOps) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.ComputeDiskWriteOpsDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.ComputeDiskWriteOpsDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type ComputeDiskWriteOpsHit struct { @@ -5387,9 +4038,7 @@ func (p ComputeDiskWriteOpsPaginator) NextPage(ctx context.Context) ([]ComputeDi return values, nil } -var listComputeDiskWriteOpsFilters = map[string]string{ - "og_account_id": "metadata.SourceID", -} +var listComputeDiskWriteOpsFilters = map[string]string{} func ListComputeDiskWriteOps(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { plugin.Logger(ctx).Trace("ListComputeDiskWriteOps") @@ -5451,9 +4100,7 @@ func ListComputeDiskWriteOps(ctx context.Context, d *plugin.QueryData, _ *plugin return nil, nil } -var getComputeDiskWriteOpsFilters = map[string]string{ - "og_account_id": "metadata.SourceID", -} +var getComputeDiskWriteOpsFilters = map[string]string{} func GetComputeDiskWriteOps(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { plugin.Logger(ctx).Trace("GetComputeDiskWriteOps") @@ -5513,72 +4160,14 @@ func GetComputeDiskWriteOps(ctx context.Context, d *plugin.QueryData, _ *plugin. // ========================== START: ComputeDiskWriteOpsDaily ============================= type ComputeDiskWriteOpsDaily struct { - Description azure.ComputeDiskWriteOpsDailyDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *ComputeDiskWriteOpsDaily) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.ComputeDiskWriteOpsDailyDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.ComputeDiskWriteOpsDailyDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type ComputeDiskWriteOpsDailyHit struct { @@ -5648,9 +4237,7 @@ func (p ComputeDiskWriteOpsDailyPaginator) NextPage(ctx context.Context) ([]Comp return values, nil } -var listComputeDiskWriteOpsDailyFilters = map[string]string{ - "og_account_id": "metadata.SourceID", -} +var listComputeDiskWriteOpsDailyFilters = map[string]string{} func ListComputeDiskWriteOpsDaily(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { plugin.Logger(ctx).Trace("ListComputeDiskWriteOpsDaily") @@ -5712,9 +4299,7 @@ func ListComputeDiskWriteOpsDaily(ctx context.Context, d *plugin.QueryData, _ *p return nil, nil } -var getComputeDiskWriteOpsDailyFilters = map[string]string{ - "og_account_id": "metadata.SourceID", -} +var getComputeDiskWriteOpsDailyFilters = map[string]string{} func GetComputeDiskWriteOpsDaily(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { plugin.Logger(ctx).Trace("GetComputeDiskWriteOpsDaily") @@ -5774,72 +4359,14 @@ func GetComputeDiskWriteOpsDaily(ctx context.Context, d *plugin.QueryData, _ *pl // ========================== START: ComputeDiskWriteOpsHourly ============================= type ComputeDiskWriteOpsHourly struct { - Description azure.ComputeDiskWriteOpsHourlyDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *ComputeDiskWriteOpsHourly) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.ComputeDiskWriteOpsHourlyDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.ComputeDiskWriteOpsHourlyDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type ComputeDiskWriteOpsHourlyHit struct { @@ -5909,9 +4436,7 @@ func (p ComputeDiskWriteOpsHourlyPaginator) NextPage(ctx context.Context) ([]Com return values, nil } -var listComputeDiskWriteOpsHourlyFilters = map[string]string{ - "og_account_id": "metadata.SourceID", -} +var listComputeDiskWriteOpsHourlyFilters = map[string]string{} func ListComputeDiskWriteOpsHourly(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { plugin.Logger(ctx).Trace("ListComputeDiskWriteOpsHourly") @@ -5973,9 +4498,7 @@ func ListComputeDiskWriteOpsHourly(ctx context.Context, d *plugin.QueryData, _ * return nil, nil } -var getComputeDiskWriteOpsHourlyFilters = map[string]string{ - "og_account_id": "metadata.SourceID", -} +var getComputeDiskWriteOpsHourlyFilters = map[string]string{} func GetComputeDiskWriteOpsHourly(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { plugin.Logger(ctx).Trace("GetComputeDiskWriteOpsHourly") @@ -6035,72 +4558,14 @@ func GetComputeDiskWriteOpsHourly(ctx context.Context, d *plugin.QueryData, _ *p // ========================== START: ComputeDiskAccess ============================= type ComputeDiskAccess struct { - Description azure.ComputeDiskAccessDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *ComputeDiskAccess) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.ComputeDiskAccessDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.ComputeDiskAccessDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type ComputeDiskAccessHit struct { @@ -6171,14 +4636,13 @@ func (p ComputeDiskAccessPaginator) NextPage(ctx context.Context) ([]ComputeDisk } var listComputeDiskAccessFilters = map[string]string{ - "id": "description.DiskAccess.ID", - "og_account_id": "metadata.SourceID", - "name": "description.DiskAccess.Name", - "provisioning_state": "description.DiskAccess.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "tags": "description.DiskAccess.Tags", - "title": "description.DiskAccess.Name", - "type": "description.DiskAccess.Type", + "id": "Description.DiskAccess.ID", + "name": "Description.DiskAccess.Name", + "provisioning_state": "Description.DiskAccess.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "tags": "Description.DiskAccess.Tags", + "title": "Description.DiskAccess.Name", + "type": "Description.DiskAccess.Type", } func ListComputeDiskAccess(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -6242,14 +4706,13 @@ func ListComputeDiskAccess(ctx context.Context, d *plugin.QueryData, _ *plugin.H } var getComputeDiskAccessFilters = map[string]string{ - "id": "description.DiskAccess.ID", - "og_account_id": "metadata.SourceID", + "id": "Description.DiskAccess.ID", "name": "description.DiskAccess.name", - "provisioning_state": "description.DiskAccess.Properties.ProvisioningState", + "provisioning_state": "Description.DiskAccess.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", - "tags": "description.DiskAccess.Tags", - "title": "description.DiskAccess.Name", - "type": "description.DiskAccess.Type", + "tags": "Description.DiskAccess.Tags", + "title": "Description.DiskAccess.Name", + "type": "Description.DiskAccess.Type", } func GetComputeDiskAccess(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -6310,72 +4773,14 @@ func GetComputeDiskAccess(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy // ========================== START: ComputeVirtualMachineScaleSet ============================= type ComputeVirtualMachineScaleSet struct { - Description azure.ComputeVirtualMachineScaleSetDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *ComputeVirtualMachineScaleSet) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.ComputeVirtualMachineScaleSetDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.ComputeVirtualMachineScaleSetDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type ComputeVirtualMachineScaleSetHit struct { @@ -6446,36 +4851,35 @@ func (p ComputeVirtualMachineScaleSetPaginator) NextPage(ctx context.Context) ([ } var listComputeVirtualMachineScaleSetFilters = map[string]string{ - "do_not_run_extensions_on_overprovisioned_vms": "description.VirtualMachineScaleSet.Properties.DoNotRunExtensionsOnOverprovisionedVMs", - "extensions": "description.VirtualMachineScaleSetExtensions", - "id": "description.VirtualMachineScaleSet.ID", - "identity": "description.VirtualMachineScaleSet.Identity", - "og_account_id": "metadata.SourceID", - "location": "description.VirtualMachineScaleSet.Location", - "name": "description.VirtualMachineScaleSet.Name", - "overprovision": "description.VirtualMachineScaleSet.Properties.Overprovision", - "plan": "description.VirtualMachineScaleSet.Plan", - "platform_fault_domain_count": "description.VirtualMachineScaleSet.Properties.PlatformFaultDomainCount", - "provisioning_state": "description.VirtualMachineScaleSet.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "scale_in_policy": "description.VirtualMachineScaleSet.Properties.ScaleInPolicy", - "single_placement_group": "description.VirtualMachineScaleSet.Properties.SinglePlacementGroup", - "sku_capacity": "description.VirtualMachineScaleSet.SKU.Capacity", - "sku_name": "description.VirtualMachineScaleSet.SKU.Name", - "sku_tier": "description.VirtualMachineScaleSet.SKU.Tier", - "tags": "description.VirtualMachineScaleSet.Tags", - "tags_src": "description.VirtualMachineScaleSet.Tags", - "title": "description.VirtualMachineScaleSet.Name", - "type": "description.VirtualMachineScaleSet.Type", - "unique_id": "description.VirtualMachineScaleSet.Properties.UniqueID", - "upgrade_policy": "description.VirtualMachineScaleSet.Properties.UpgradePolicy", - "virtual_machine_diagnostics_profile": "description.VirtualMachineScaleSet.Properties.VirtualMachineProfile.DiagnosticsProfile", - "virtual_machine_extension_profile": "description.VirtualMachineScaleSet.Properties.VirtualMachineProfile.ExtensionProfile", - "virtual_machine_network_profile": "description.VirtualMachineScaleSet.Properties.VirtualMachineProfile.NetworkProfile", - "virtual_machine_os_profile": "description.VirtualMachineScaleSet.Properties.VirtualMachineProfile.OSProfile", - "virtual_machine_security_profile": "description.VirtualMachineScaleSet.Properties.VirtualMachineProfile.SecurityProfile", - "virtual_machine_storage_profile": "description.VirtualMachineScaleSet.Properties.VirtualMachineProfile.StorageProfile", - "zones": "description.VirtualMachineScaleSet.Zones", + "do_not_run_extensions_on_overprovisioned_vms": "Description.VirtualMachineScaleSet.Properties.DoNotRunExtensionsOnOverprovisionedVMs", + "extensions": "Description.VirtualMachineScaleSetExtensions", + "id": "Description.VirtualMachineScaleSet.ID", + "identity": "Description.VirtualMachineScaleSet.Identity", + "location": "Description.VirtualMachineScaleSet.Location", + "name": "Description.VirtualMachineScaleSet.Name", + "overprovision": "Description.VirtualMachineScaleSet.Properties.Overprovision", + "plan": "Description.VirtualMachineScaleSet.Plan", + "platform_fault_domain_count": "Description.VirtualMachineScaleSet.Properties.PlatformFaultDomainCount", + "provisioning_state": "Description.VirtualMachineScaleSet.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "scale_in_policy": "Description.VirtualMachineScaleSet.Properties.ScaleInPolicy", + "single_placement_group": "Description.VirtualMachineScaleSet.Properties.SinglePlacementGroup", + "sku_capacity": "Description.VirtualMachineScaleSet.SKU.Capacity", + "sku_name": "Description.VirtualMachineScaleSet.SKU.Name", + "sku_tier": "Description.VirtualMachineScaleSet.SKU.Tier", + "tags": "Description.VirtualMachineScaleSet.Tags", + "tags_src": "Description.VirtualMachineScaleSet.Tags", + "title": "Description.VirtualMachineScaleSet.Name", + "type": "Description.VirtualMachineScaleSet.Type", + "unique_id": "Description.VirtualMachineScaleSet.Properties.UniqueID", + "upgrade_policy": "Description.VirtualMachineScaleSet.Properties.UpgradePolicy", + "virtual_machine_diagnostics_profile": "Description.VirtualMachineScaleSet.Properties.VirtualMachineProfile.DiagnosticsProfile", + "virtual_machine_extension_profile": "Description.VirtualMachineScaleSet.Properties.VirtualMachineProfile.ExtensionProfile", + "virtual_machine_network_profile": "Description.VirtualMachineScaleSet.Properties.VirtualMachineProfile.NetworkProfile", + "virtual_machine_os_profile": "Description.VirtualMachineScaleSet.Properties.VirtualMachineProfile.OSProfile", + "virtual_machine_security_profile": "Description.VirtualMachineScaleSet.Properties.VirtualMachineProfile.SecurityProfile", + "virtual_machine_storage_profile": "Description.VirtualMachineScaleSet.Properties.VirtualMachineProfile.StorageProfile", + "zones": "Description.VirtualMachineScaleSet.Zones", } func ListComputeVirtualMachineScaleSet(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -6539,36 +4943,35 @@ func ListComputeVirtualMachineScaleSet(ctx context.Context, d *plugin.QueryData, } var getComputeVirtualMachineScaleSetFilters = map[string]string{ - "do_not_run_extensions_on_overprovisioned_vms": "description.VirtualMachineScaleSet.Properties.DoNotRunExtensionsOnOverprovisionedVMs", - "extensions": "description.VirtualMachineScaleSetExtensions", - "id": "description.VirtualMachineScaleSet.ID", - "identity": "description.VirtualMachineScaleSet.Identity", - "og_account_id": "metadata.SourceID", - "location": "description.VirtualMachineScaleSet.Location", + "do_not_run_extensions_on_overprovisioned_vms": "Description.VirtualMachineScaleSet.Properties.DoNotRunExtensionsOnOverprovisionedVMs", + "extensions": "Description.VirtualMachineScaleSetExtensions", + "id": "Description.VirtualMachineScaleSet.ID", + "identity": "Description.VirtualMachineScaleSet.Identity", + "location": "Description.VirtualMachineScaleSet.Location", "name": "description.VirtualMachineScaleSet.name", - "overprovision": "description.VirtualMachineScaleSet.Properties.Overprovision", - "plan": "description.VirtualMachineScaleSet.Plan", - "platform_fault_domain_count": "description.VirtualMachineScaleSet.Properties.PlatformFaultDomainCount", - "provisioning_state": "description.VirtualMachineScaleSet.Properties.ProvisioningState", + "overprovision": "Description.VirtualMachineScaleSet.Properties.Overprovision", + "plan": "Description.VirtualMachineScaleSet.Plan", + "platform_fault_domain_count": "Description.VirtualMachineScaleSet.Properties.PlatformFaultDomainCount", + "provisioning_state": "Description.VirtualMachineScaleSet.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", - "scale_in_policy": "description.VirtualMachineScaleSet.Properties.ScaleInPolicy", - "single_placement_group": "description.VirtualMachineScaleSet.Properties.SinglePlacementGroup", - "sku_capacity": "description.VirtualMachineScaleSet.SKU.Capacity", - "sku_name": "description.VirtualMachineScaleSet.SKU.Name", - "sku_tier": "description.VirtualMachineScaleSet.SKU.Tier", - "tags": "description.VirtualMachineScaleSet.Tags", - "tags_src": "description.VirtualMachineScaleSet.Tags", - "title": "description.VirtualMachineScaleSet.Name", - "type": "description.VirtualMachineScaleSet.Type", - "unique_id": "description.VirtualMachineScaleSet.Properties.UniqueID", - "upgrade_policy": "description.VirtualMachineScaleSet.Properties.UpgradePolicy", - "virtual_machine_diagnostics_profile": "description.VirtualMachineScaleSet.Properties.VirtualMachineProfile.DiagnosticsProfile", - "virtual_machine_extension_profile": "description.VirtualMachineScaleSet.Properties.VirtualMachineProfile.ExtensionProfile", - "virtual_machine_network_profile": "description.VirtualMachineScaleSet.Properties.VirtualMachineProfile.NetworkProfile", - "virtual_machine_os_profile": "description.VirtualMachineScaleSet.Properties.VirtualMachineProfile.OSProfile", - "virtual_machine_security_profile": "description.VirtualMachineScaleSet.Properties.VirtualMachineProfile.SecurityProfile", - "virtual_machine_storage_profile": "description.VirtualMachineScaleSet.Properties.VirtualMachineProfile.StorageProfile", - "zones": "description.VirtualMachineScaleSet.Zones", + "scale_in_policy": "Description.VirtualMachineScaleSet.Properties.ScaleInPolicy", + "single_placement_group": "Description.VirtualMachineScaleSet.Properties.SinglePlacementGroup", + "sku_capacity": "Description.VirtualMachineScaleSet.SKU.Capacity", + "sku_name": "Description.VirtualMachineScaleSet.SKU.Name", + "sku_tier": "Description.VirtualMachineScaleSet.SKU.Tier", + "tags": "Description.VirtualMachineScaleSet.Tags", + "tags_src": "Description.VirtualMachineScaleSet.Tags", + "title": "Description.VirtualMachineScaleSet.Name", + "type": "Description.VirtualMachineScaleSet.Type", + "unique_id": "Description.VirtualMachineScaleSet.Properties.UniqueID", + "upgrade_policy": "Description.VirtualMachineScaleSet.Properties.UpgradePolicy", + "virtual_machine_diagnostics_profile": "Description.VirtualMachineScaleSet.Properties.VirtualMachineProfile.DiagnosticsProfile", + "virtual_machine_extension_profile": "Description.VirtualMachineScaleSet.Properties.VirtualMachineProfile.ExtensionProfile", + "virtual_machine_network_profile": "Description.VirtualMachineScaleSet.Properties.VirtualMachineProfile.NetworkProfile", + "virtual_machine_os_profile": "Description.VirtualMachineScaleSet.Properties.VirtualMachineProfile.OSProfile", + "virtual_machine_security_profile": "Description.VirtualMachineScaleSet.Properties.VirtualMachineProfile.SecurityProfile", + "virtual_machine_storage_profile": "Description.VirtualMachineScaleSet.Properties.VirtualMachineProfile.StorageProfile", + "zones": "Description.VirtualMachineScaleSet.Zones", } func GetComputeVirtualMachineScaleSet(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -6629,72 +5032,14 @@ func GetComputeVirtualMachineScaleSet(ctx context.Context, d *plugin.QueryData, // ========================== START: ComputeVirtualMachineScaleSetNetworkInterface ============================= type ComputeVirtualMachineScaleSetNetworkInterface struct { - Description azure.ComputeVirtualMachineScaleSetNetworkInterfaceDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *ComputeVirtualMachineScaleSetNetworkInterface) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.ComputeVirtualMachineScaleSetNetworkInterfaceDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.ComputeVirtualMachineScaleSetNetworkInterfaceDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type ComputeVirtualMachineScaleSetNetworkInterfaceHit struct { @@ -6765,15 +5110,14 @@ func (p ComputeVirtualMachineScaleSetNetworkInterfacePaginator) NextPage(ctx con } var listComputeVirtualMachineScaleSetNetworkInterfaceFilters = map[string]string{ - "id": "description.NetworkInterface.ID", - "og_account_id": "metadata.SourceID", - "mac_address": "description.NetworkInterface.MacAddress", - "name": "description.NetworkInterface.Name", - "resource_group": "description.ResourceGroup", - "scale_set_name": "description.VirtualMachineScaleSet.Name", - "tags": "description.NetworkInterface.Tags", - "title": "description.NetworkInterface.Name", - "type": "description.NetworkInterface.Type", + "id": "Description.NetworkInterface.ID", + "mac_address": "Description.NetworkInterface.MacAddress", + "name": "Description.NetworkInterface.Name", + "resource_group": "Description.ResourceGroup", + "scale_set_name": "Description.VirtualMachineScaleSet.Name", + "tags": "Description.NetworkInterface.Tags", + "title": "Description.NetworkInterface.Name", + "type": "Description.NetworkInterface.Type", } func ListComputeVirtualMachineScaleSetNetworkInterface(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -6837,15 +5181,14 @@ func ListComputeVirtualMachineScaleSetNetworkInterface(ctx context.Context, d *p } var getComputeVirtualMachineScaleSetNetworkInterfaceFilters = map[string]string{ - "id": "description.NetworkInterface.ID", - "og_account_id": "metadata.SourceID", - "mac_address": "description.NetworkInterface.MacAddress", - "name": "description.NetworkInterface.Name", - "resource_group": "description.ResourceGroup", - "scale_set_name": "description.VirtualMachineScaleSet.Name", - "tags": "description.NetworkInterface.Tags", - "title": "description.NetworkInterface.Name", - "type": "description.NetworkInterface.Type", + "id": "Description.NetworkInterface.ID", + "mac_address": "Description.NetworkInterface.MacAddress", + "name": "Description.NetworkInterface.Name", + "resource_group": "Description.ResourceGroup", + "scale_set_name": "Description.VirtualMachineScaleSet.Name", + "tags": "Description.NetworkInterface.Tags", + "title": "Description.NetworkInterface.Name", + "type": "Description.NetworkInterface.Type", } func GetComputeVirtualMachineScaleSetNetworkInterface(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -6906,72 +5249,14 @@ func GetComputeVirtualMachineScaleSetNetworkInterface(ctx context.Context, d *pl // ========================== START: ComputeVirtualMachineScaleSetVm ============================= type ComputeVirtualMachineScaleSetVm struct { - Description azure.ComputeVirtualMachineScaleSetVmDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *ComputeVirtualMachineScaleSetVm) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.ComputeVirtualMachineScaleSetVmDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.ComputeVirtualMachineScaleSetVmDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type ComputeVirtualMachineScaleSetVmHit struct { @@ -7042,40 +5327,39 @@ func (p ComputeVirtualMachineScaleSetVmPaginator) NextPage(ctx context.Context) } var listComputeVirtualMachineScaleSetVmFilters = map[string]string{ - "additional_capabilities": "description.VirtualMachineScaleSet.Properties.AdditionalCapabilities", - "availability_set": "description.ScaleSetVM.Properties.AvailabilitySet", - "id": "description.NetworkInterface.ID", - "instance_id": "description.ScaleSetVM.InstanceID", - "og_account_id": "metadata.SourceID", - "latest_model_applied": "description.VirtualMachineScaleSet.Properties.LatestModelApplied", - "license_type": "description.VirtualMachineScaleSet.Properties.LicenseType", - "location": "description.ScaleSetVM.Location", - "model_definition_applied": "description.ScaleSetVM.Properties.ModelDefinitionApplied", - "name": "description.ScaleSetVM.Name", - "plan": "description.ScaleSetVM.Plan", - "power_state": "description.PowerState", - "protection_policy": "description.VirtualMachineScaleSet.Properties.SpotRestorePolicy", - "provisioning_state": "description.VirtualMachineScaleSet.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "resources": "description.ScaleSetVM.Resources", - "scale_set_name": "description.VirtualMachineScaleSet.Name", - "sku_capacity": "description.ScaleSetVM.SKU.Capacity", - "sku_name": "description.ScaleSetVM.SKU.Name", - "sku_tier": "description.ScaleSetVM.SKU.Tier", - "tags": "description.ScaleSetVM.Tags", - "tags_src": "description.ScaleSetVM.Tags", - "title": "description.ScaleSetVM.Name", - "type": "description.ScaleSetVM.Type", - "upgrade_policy": "description.VirtualMachineScaleSet.Properties.UpgradePolicy", - "virtual_machine_diagnostics_profile": "description.VirtualMachineScaleSet.Properties.VirtualMachineProfile.DiagnosticsProfile", - "virtual_machine_hardware_profile": "description.VirtualMachineScaleSet.Properties.VirtualMachineProfile.HardwareProfile", - "virtual_machine_network_profile": "description.ScaleSetVM.Properties.NetworkProfile.NetworkInterfaces", - "virtual_machine_network_profile_configuration": "description.ScaleSetVM.Properties.NetworkProfileConfiguration", - "virtual_machine_os_profile": "description.VirtualMachineScaleSet.Properties.VirtualMachineProfile.OSProfile", - "virtual_machine_security_profile": "description.VirtualMachineScaleSet.Properties.VirtualMachineProfile.SecurityProfile", - "virtual_machine_storage_profile": "description.VirtualMachineScaleSet.Properties.VirtualMachineProfile.StorageProfile", - "vm_id": "description.ScaleSetVM.Properties.VMID", - "zones": "description.ScaleSetVM.Zones", + "additional_capabilities": "Description.VirtualMachineScaleSet.Properties.AdditionalCapabilities", + "availability_set": "Description.ScaleSetVM.Properties.AvailabilitySet", + "id": "Description.NetworkInterface.ID", + "instance_id": "Description.ScaleSetVM.InstanceID", + "latest_model_applied": "Description.VirtualMachineScaleSet.Properties.LatestModelApplied", + "license_type": "Description.VirtualMachineScaleSet.Properties.LicenseType", + "location": "Description.ScaleSetVM.Location", + "model_definition_applied": "Description.ScaleSetVM.Properties.ModelDefinitionApplied", + "name": "Description.ScaleSetVM.Name", + "plan": "Description.ScaleSetVM.Plan", + "power_state": "Description.PowerState", + "protection_policy": "Description.VirtualMachineScaleSet.Properties.SpotRestorePolicy", + "provisioning_state": "Description.VirtualMachineScaleSet.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "resources": "Description.ScaleSetVM.Resources", + "scale_set_name": "Description.VirtualMachineScaleSet.Name", + "sku_capacity": "Description.ScaleSetVM.SKU.Capacity", + "sku_name": "Description.ScaleSetVM.SKU.Name", + "sku_tier": "Description.ScaleSetVM.SKU.Tier", + "tags": "Description.ScaleSetVM.Tags", + "tags_src": "Description.ScaleSetVM.Tags", + "title": "Description.ScaleSetVM.Name", + "type": "Description.ScaleSetVM.Type", + "upgrade_policy": "Description.VirtualMachineScaleSet.Properties.UpgradePolicy", + "virtual_machine_diagnostics_profile": "Description.VirtualMachineScaleSet.Properties.VirtualMachineProfile.DiagnosticsProfile", + "virtual_machine_hardware_profile": "Description.VirtualMachineScaleSet.Properties.VirtualMachineProfile.HardwareProfile", + "virtual_machine_network_profile": "Description.ScaleSetVM.Properties.NetworkProfile.NetworkInterfaces", + "virtual_machine_network_profile_configuration": "Description.ScaleSetVM.Properties.NetworkProfileConfiguration", + "virtual_machine_os_profile": "Description.VirtualMachineScaleSet.Properties.VirtualMachineProfile.OSProfile", + "virtual_machine_security_profile": "Description.VirtualMachineScaleSet.Properties.VirtualMachineProfile.SecurityProfile", + "virtual_machine_storage_profile": "Description.VirtualMachineScaleSet.Properties.VirtualMachineProfile.StorageProfile", + "vm_id": "Description.ScaleSetVM.Properties.VMID", + "zones": "Description.ScaleSetVM.Zones", } func ListComputeVirtualMachineScaleSetVm(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -7139,40 +5423,39 @@ func ListComputeVirtualMachineScaleSetVm(ctx context.Context, d *plugin.QueryDat } var getComputeVirtualMachineScaleSetVmFilters = map[string]string{ - "additional_capabilities": "description.VirtualMachineScaleSet.Properties.AdditionalCapabilities", - "availability_set": "description.ScaleSetVM.Properties.AvailabilitySet", - "id": "description.NetworkInterface.ID", + "additional_capabilities": "Description.VirtualMachineScaleSet.Properties.AdditionalCapabilities", + "availability_set": "Description.ScaleSetVM.Properties.AvailabilitySet", + "id": "Description.NetworkInterface.ID", "instance_id": "description.ScaleSetVM.InstanceID", - "og_account_id": "metadata.SourceID", - "latest_model_applied": "description.VirtualMachineScaleSet.Properties.LatestModelApplied", - "license_type": "description.VirtualMachineScaleSet.Properties.LicenseType", - "location": "description.ScaleSetVM.Location", - "model_definition_applied": "description.ScaleSetVM.Properties.ModelDefinitionApplied", - "name": "description.ScaleSetVM.Name", - "plan": "description.ScaleSetVM.Plan", - "power_state": "description.PowerState", - "protection_policy": "description.VirtualMachineScaleSet.Properties.SpotRestorePolicy", - "provisioning_state": "description.VirtualMachineScaleSet.Properties.ProvisioningState", + "latest_model_applied": "Description.VirtualMachineScaleSet.Properties.LatestModelApplied", + "license_type": "Description.VirtualMachineScaleSet.Properties.LicenseType", + "location": "Description.ScaleSetVM.Location", + "model_definition_applied": "Description.ScaleSetVM.Properties.ModelDefinitionApplied", + "name": "Description.ScaleSetVM.Name", + "plan": "Description.ScaleSetVM.Plan", + "power_state": "Description.PowerState", + "protection_policy": "Description.VirtualMachineScaleSet.Properties.SpotRestorePolicy", + "provisioning_state": "Description.VirtualMachineScaleSet.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", - "resources": "description.ScaleSetVM.Resources", + "resources": "Description.ScaleSetVM.Resources", "scale_set_name": "description.VirtualMachineScaleSet.name", - "sku_capacity": "description.ScaleSetVM.SKU.Capacity", - "sku_name": "description.ScaleSetVM.SKU.Name", - "sku_tier": "description.ScaleSetVM.SKU.Tier", - "tags": "description.ScaleSetVM.Tags", - "tags_src": "description.ScaleSetVM.Tags", - "title": "description.ScaleSetVM.Name", - "type": "description.ScaleSetVM.Type", - "upgrade_policy": "description.VirtualMachineScaleSet.Properties.UpgradePolicy", - "virtual_machine_diagnostics_profile": "description.VirtualMachineScaleSet.Properties.VirtualMachineProfile.DiagnosticsProfile", - "virtual_machine_hardware_profile": "description.VirtualMachineScaleSet.Properties.VirtualMachineProfile.HardwareProfile", - "virtual_machine_network_profile": "description.ScaleSetVM.Properties.NetworkProfile.NetworkInterfaces", - "virtual_machine_network_profile_configuration": "description.ScaleSetVM.Properties.NetworkProfileConfiguration", - "virtual_machine_os_profile": "description.VirtualMachineScaleSet.Properties.VirtualMachineProfile.OSProfile", - "virtual_machine_security_profile": "description.VirtualMachineScaleSet.Properties.VirtualMachineProfile.SecurityProfile", - "virtual_machine_storage_profile": "description.VirtualMachineScaleSet.Properties.VirtualMachineProfile.StorageProfile", - "vm_id": "description.ScaleSetVM.Properties.VMID", - "zones": "description.ScaleSetVM.Zones", + "sku_capacity": "Description.ScaleSetVM.SKU.Capacity", + "sku_name": "Description.ScaleSetVM.SKU.Name", + "sku_tier": "Description.ScaleSetVM.SKU.Tier", + "tags": "Description.ScaleSetVM.Tags", + "tags_src": "Description.ScaleSetVM.Tags", + "title": "Description.ScaleSetVM.Name", + "type": "Description.ScaleSetVM.Type", + "upgrade_policy": "Description.VirtualMachineScaleSet.Properties.UpgradePolicy", + "virtual_machine_diagnostics_profile": "Description.VirtualMachineScaleSet.Properties.VirtualMachineProfile.DiagnosticsProfile", + "virtual_machine_hardware_profile": "Description.VirtualMachineScaleSet.Properties.VirtualMachineProfile.HardwareProfile", + "virtual_machine_network_profile": "Description.ScaleSetVM.Properties.NetworkProfile.NetworkInterfaces", + "virtual_machine_network_profile_configuration": "Description.ScaleSetVM.Properties.NetworkProfileConfiguration", + "virtual_machine_os_profile": "Description.VirtualMachineScaleSet.Properties.VirtualMachineProfile.OSProfile", + "virtual_machine_security_profile": "Description.VirtualMachineScaleSet.Properties.VirtualMachineProfile.SecurityProfile", + "virtual_machine_storage_profile": "Description.VirtualMachineScaleSet.Properties.VirtualMachineProfile.StorageProfile", + "vm_id": "Description.ScaleSetVM.Properties.VMID", + "zones": "Description.ScaleSetVM.Zones", } func GetComputeVirtualMachineScaleSetVm(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -7233,72 +5516,14 @@ func GetComputeVirtualMachineScaleSetVm(ctx context.Context, d *plugin.QueryData // ========================== START: ComputeSnapshots ============================= type ComputeSnapshots struct { - Description azure.ComputeSnapshotsDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *ComputeSnapshots) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.ComputeSnapshotsDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.ComputeSnapshotsDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type ComputeSnapshotsHit struct { @@ -7369,39 +5594,38 @@ func (p ComputeSnapshotsPaginator) NextPage(ctx context.Context) ([]ComputeSnaps } var listComputeSnapshotsFilters = map[string]string{ - "create_option": "description.Snapshot.Properties.CreationData.CreateOption", - "disk_access_id": "description.Snapshot.Properties.DiskAccessID", - "disk_encryption_set_id": "description.Snapshot.Properties.Encryption.DiskEncryptionSetID", - "disk_size_bytes": "description.Snapshot.Properties.DiskSizeBytes", - "disk_size_gb": "description.Snapshot.Properties.DiskSizeGB", - "encryption_setting_collection_enabled": "description.Snapshot.Properties.EncryptionSettingsCollection.Enabled", - "encryption_setting_version": "description.Snapshot.Properties.EncryptionSettingsCollection.EncryptionSettingsVersion", - "encryption_settings": "description.Snapshot.Properties.EncryptionSettingsCollection.EncryptionSettings", - "encryption_type": "description.Snapshot.Properties.Encryption.Type", - "gallery_image_reference_id": "description.Snapshot.Properties.CreationData.GalleryImageReference.ID", - "gallery_reference_lun": "description.Snapshot.Properties.CreationData.GalleryImageReference.Lun", - "hyperv_generation": "description.Snapshot.Properties.HyperVGeneration", - "id": "description.Snapshot.ID", - "image_reference_id": "description.Snapshot.Properties.CreationData.ImageReference.ID", - "image_reference_lun": "description.Snapshot.Properties.CreationData.ImageReference.Lun", - "incremental": "description.Snapshot.Properties.Incremental", - "og_account_id": "metadata.SourceID", - "name": "description.Snapshot.Name", - "network_access_policy": "description.Snapshot.Properties.NetworkAccessPolicy", - "os_type": "description.Snapshot.Properties.OSType", - "provisioning_state": "description.Snapshot.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "sku_name": "description.Snapshot.SKU.Name", - "sku_tier": "description.Snapshot.SKU.Tier", - "source_resource_id": "description.Snapshot.Properties.CreationData.SourceResourceID", - "source_unique_id": "description.Snapshot.Properties.CreationData.SourceUniqueID", - "source_uri": "description.Snapshot.Properties.CreationData.SourceURI", - "storage_account_id": "description.Snapshot.Properties.CreationData.StorageAccountID", - "tags": "description.Snapshot.Tags", - "title": "description.Snapshot.Name", - "type": "description.Snapshot.Type", - "unique_id": "description.Snapshot.Properties.UniqueID", - "upload_size_bytes": "description.Snapshot.Properties.CreationData.UploadSizeBytes", + "create_option": "Description.Snapshot.Properties.CreationData.CreateOption", + "disk_access_id": "Description.Snapshot.Properties.DiskAccessID", + "disk_encryption_set_id": "Description.Snapshot.Properties.Encryption.DiskEncryptionSetID", + "disk_size_bytes": "Description.Snapshot.Properties.DiskSizeBytes", + "disk_size_gb": "Description.Snapshot.Properties.DiskSizeGB", + "encryption_setting_collection_enabled": "Description.Snapshot.Properties.EncryptionSettingsCollection.Enabled", + "encryption_setting_version": "Description.Snapshot.Properties.EncryptionSettingsCollection.EncryptionSettingsVersion", + "encryption_settings": "Description.Snapshot.Properties.EncryptionSettingsCollection.EncryptionSettings", + "encryption_type": "Description.Snapshot.Properties.Encryption.Type", + "gallery_image_reference_id": "Description.Snapshot.Properties.CreationData.GalleryImageReference.ID", + "gallery_reference_lun": "Description.Snapshot.Properties.CreationData.GalleryImageReference.Lun", + "hyperv_generation": "Description.Snapshot.Properties.HyperVGeneration", + "id": "Description.Snapshot.ID", + "image_reference_id": "Description.Snapshot.Properties.CreationData.ImageReference.ID", + "image_reference_lun": "Description.Snapshot.Properties.CreationData.ImageReference.Lun", + "incremental": "Description.Snapshot.Properties.Incremental", + "name": "Description.Snapshot.Name", + "network_access_policy": "Description.Snapshot.Properties.NetworkAccessPolicy", + "os_type": "Description.Snapshot.Properties.OSType", + "provisioning_state": "Description.Snapshot.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "sku_name": "Description.Snapshot.SKU.Name", + "sku_tier": "Description.Snapshot.SKU.Tier", + "source_resource_id": "Description.Snapshot.Properties.CreationData.SourceResourceID", + "source_unique_id": "Description.Snapshot.Properties.CreationData.SourceUniqueID", + "source_uri": "Description.Snapshot.Properties.CreationData.SourceURI", + "storage_account_id": "Description.Snapshot.Properties.CreationData.StorageAccountID", + "tags": "Description.Snapshot.Tags", + "title": "Description.Snapshot.Name", + "type": "Description.Snapshot.Type", + "unique_id": "Description.Snapshot.Properties.UniqueID", + "upload_size_bytes": "Description.Snapshot.Properties.CreationData.UploadSizeBytes", } func ListComputeSnapshots(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -7465,39 +5689,38 @@ func ListComputeSnapshots(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy } var getComputeSnapshotsFilters = map[string]string{ - "create_option": "description.Snapshot.Properties.CreationData.CreateOption", - "disk_access_id": "description.Snapshot.Properties.DiskAccessID", - "disk_encryption_set_id": "description.Snapshot.Properties.Encryption.DiskEncryptionSetID", - "disk_size_bytes": "description.Snapshot.Properties.DiskSizeBytes", - "disk_size_gb": "description.Snapshot.Properties.DiskSizeGB", - "encryption_setting_collection_enabled": "description.Snapshot.Properties.EncryptionSettingsCollection.Enabled", - "encryption_setting_version": "description.Snapshot.Properties.EncryptionSettingsCollection.EncryptionSettingsVersion", - "encryption_settings": "description.Snapshot.Properties.EncryptionSettingsCollection.EncryptionSettings", - "encryption_type": "description.Snapshot.Properties.Encryption.Type", - "gallery_image_reference_id": "description.Snapshot.Properties.CreationData.GalleryImageReference.ID", - "gallery_reference_lun": "description.Snapshot.Properties.CreationData.GalleryImageReference.Lun", - "hyperv_generation": "description.Snapshot.Properties.HyperVGeneration", - "id": "description.Snapshot.ID", - "image_reference_id": "description.Snapshot.Properties.CreationData.ImageReference.ID", - "image_reference_lun": "description.Snapshot.Properties.CreationData.ImageReference.Lun", - "incremental": "description.Snapshot.Properties.Incremental", - "og_account_id": "metadata.SourceID", + "create_option": "Description.Snapshot.Properties.CreationData.CreateOption", + "disk_access_id": "Description.Snapshot.Properties.DiskAccessID", + "disk_encryption_set_id": "Description.Snapshot.Properties.Encryption.DiskEncryptionSetID", + "disk_size_bytes": "Description.Snapshot.Properties.DiskSizeBytes", + "disk_size_gb": "Description.Snapshot.Properties.DiskSizeGB", + "encryption_setting_collection_enabled": "Description.Snapshot.Properties.EncryptionSettingsCollection.Enabled", + "encryption_setting_version": "Description.Snapshot.Properties.EncryptionSettingsCollection.EncryptionSettingsVersion", + "encryption_settings": "Description.Snapshot.Properties.EncryptionSettingsCollection.EncryptionSettings", + "encryption_type": "Description.Snapshot.Properties.Encryption.Type", + "gallery_image_reference_id": "Description.Snapshot.Properties.CreationData.GalleryImageReference.ID", + "gallery_reference_lun": "Description.Snapshot.Properties.CreationData.GalleryImageReference.Lun", + "hyperv_generation": "Description.Snapshot.Properties.HyperVGeneration", + "id": "Description.Snapshot.ID", + "image_reference_id": "Description.Snapshot.Properties.CreationData.ImageReference.ID", + "image_reference_lun": "Description.Snapshot.Properties.CreationData.ImageReference.Lun", + "incremental": "Description.Snapshot.Properties.Incremental", "name": "description.Snapshot.Name", - "network_access_policy": "description.Snapshot.Properties.NetworkAccessPolicy", - "os_type": "description.Snapshot.Properties.OSType", - "provisioning_state": "description.Snapshot.Properties.ProvisioningState", + "network_access_policy": "Description.Snapshot.Properties.NetworkAccessPolicy", + "os_type": "Description.Snapshot.Properties.OSType", + "provisioning_state": "Description.Snapshot.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", - "sku_name": "description.Snapshot.SKU.Name", - "sku_tier": "description.Snapshot.SKU.Tier", - "source_resource_id": "description.Snapshot.Properties.CreationData.SourceResourceID", - "source_unique_id": "description.Snapshot.Properties.CreationData.SourceUniqueID", - "source_uri": "description.Snapshot.Properties.CreationData.SourceURI", - "storage_account_id": "description.Snapshot.Properties.CreationData.StorageAccountID", - "tags": "description.Snapshot.Tags", - "title": "description.Snapshot.Name", - "type": "description.Snapshot.Type", - "unique_id": "description.Snapshot.Properties.UniqueID", - "upload_size_bytes": "description.Snapshot.Properties.CreationData.UploadSizeBytes", + "sku_name": "Description.Snapshot.SKU.Name", + "sku_tier": "Description.Snapshot.SKU.Tier", + "source_resource_id": "Description.Snapshot.Properties.CreationData.SourceResourceID", + "source_unique_id": "Description.Snapshot.Properties.CreationData.SourceUniqueID", + "source_uri": "Description.Snapshot.Properties.CreationData.SourceURI", + "storage_account_id": "Description.Snapshot.Properties.CreationData.StorageAccountID", + "tags": "Description.Snapshot.Tags", + "title": "Description.Snapshot.Name", + "type": "Description.Snapshot.Type", + "unique_id": "Description.Snapshot.Properties.UniqueID", + "upload_size_bytes": "Description.Snapshot.Properties.CreationData.UploadSizeBytes", } func GetComputeSnapshots(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -7558,72 +5781,14 @@ func GetComputeSnapshots(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd // ========================== START: ComputeAvailabilitySet ============================= type ComputeAvailabilitySet struct { - Description azure.ComputeAvailabilitySetDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *ComputeAvailabilitySet) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.ComputeAvailabilitySetDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.ComputeAvailabilitySetDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type ComputeAvailabilitySetHit struct { @@ -7694,21 +5859,20 @@ func (p ComputeAvailabilitySetPaginator) NextPage(ctx context.Context) ([]Comput } var listComputeAvailabilitySetFilters = map[string]string{ - "id": "description.AvailabilitySet.ID", - "og_account_id": "metadata.SourceID", - "name": "description.AvailabilitySet.Name", - "platform_fault_domain_count": "description.AvailabilitySet.Properties.PlatformFaultDomainCount", - "platform_update_domain_count": "description.AvailabilitySet.Properties.PlatformUpdateDomainCount", - "proximity_placement_group_id": "description.AvailabilitySet.Properties.ProximityPlacementGroup.ID", - "resource_group": "description.ResourceGroup", - "sku_capacity": "description.AvailabilitySet.SKU.Capacity", - "sku_name": "description.AvailabilitySet.SKU.Name", - "sku_tier": "description.AvailabilitySet.SKU.Tier", - "status": "description.AvailabilitySet.Properties.Statuses", - "tags": "description.AvailabilitySet.Tags", - "title": "description.AvailabilitySet.Name", - "type": "description.AvailabilitySet.Type", - "virtual_machines": "description.AvailabilitySet.Properties.VirtualMachines", + "id": "Description.AvailabilitySet.ID", + "name": "Description.AvailabilitySet.Name", + "platform_fault_domain_count": "Description.AvailabilitySet.Properties.PlatformFaultDomainCount", + "platform_update_domain_count": "Description.AvailabilitySet.Properties.PlatformUpdateDomainCount", + "proximity_placement_group_id": "Description.AvailabilitySet.Properties.ProximityPlacementGroup.ID", + "resource_group": "Description.ResourceGroup", + "sku_capacity": "Description.AvailabilitySet.SKU.Capacity", + "sku_name": "Description.AvailabilitySet.SKU.Name", + "sku_tier": "Description.AvailabilitySet.SKU.Tier", + "status": "Description.AvailabilitySet.Properties.Statuses", + "tags": "Description.AvailabilitySet.Tags", + "title": "Description.AvailabilitySet.Name", + "type": "Description.AvailabilitySet.Type", + "virtual_machines": "Description.AvailabilitySet.Properties.VirtualMachines", } func ListComputeAvailabilitySet(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -7772,21 +5936,20 @@ func ListComputeAvailabilitySet(ctx context.Context, d *plugin.QueryData, _ *plu } var getComputeAvailabilitySetFilters = map[string]string{ - "id": "description.AvailabilitySet.ID", - "og_account_id": "metadata.SourceID", + "id": "Description.AvailabilitySet.ID", "name": "description.AvailabilitySet.Name", - "platform_fault_domain_count": "description.AvailabilitySet.Properties.PlatformFaultDomainCount", - "platform_update_domain_count": "description.AvailabilitySet.Properties.PlatformUpdateDomainCount", - "proximity_placement_group_id": "description.AvailabilitySet.Properties.ProximityPlacementGroup.ID", + "platform_fault_domain_count": "Description.AvailabilitySet.Properties.PlatformFaultDomainCount", + "platform_update_domain_count": "Description.AvailabilitySet.Properties.PlatformUpdateDomainCount", + "proximity_placement_group_id": "Description.AvailabilitySet.Properties.ProximityPlacementGroup.ID", "resource_group": "description.ResourceGroup", - "sku_capacity": "description.AvailabilitySet.SKU.Capacity", - "sku_name": "description.AvailabilitySet.SKU.Name", - "sku_tier": "description.AvailabilitySet.SKU.Tier", - "status": "description.AvailabilitySet.Properties.Statuses", - "tags": "description.AvailabilitySet.Tags", - "title": "description.AvailabilitySet.Name", - "type": "description.AvailabilitySet.Type", - "virtual_machines": "description.AvailabilitySet.Properties.VirtualMachines", + "sku_capacity": "Description.AvailabilitySet.SKU.Capacity", + "sku_name": "Description.AvailabilitySet.SKU.Name", + "sku_tier": "Description.AvailabilitySet.SKU.Tier", + "status": "Description.AvailabilitySet.Properties.Statuses", + "tags": "Description.AvailabilitySet.Tags", + "title": "Description.AvailabilitySet.Name", + "type": "Description.AvailabilitySet.Type", + "virtual_machines": "Description.AvailabilitySet.Properties.VirtualMachines", } func GetComputeAvailabilitySet(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -7847,72 +6010,14 @@ func GetComputeAvailabilitySet(ctx context.Context, d *plugin.QueryData, _ *plug // ========================== START: ComputeDiskEncryptionSet ============================= type ComputeDiskEncryptionSet struct { - Description azure.ComputeDiskEncryptionSetDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *ComputeDiskEncryptionSet) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.ComputeDiskEncryptionSetDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.ComputeDiskEncryptionSetDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type ComputeDiskEncryptionSetHit struct { @@ -7983,21 +6088,20 @@ func (p ComputeDiskEncryptionSetPaginator) NextPage(ctx context.Context) ([]Comp } var listComputeDiskEncryptionSetFilters = map[string]string{ - "active_key_source_vault_id": "description.DiskEncryptionSet.Properties.ActiveKey.SourceVault.ID", - "active_key_url": "description.DiskEncryptionSet.Properties.ActiveKey.KeyURL", - "encryption_type": "description.DiskEncryptionSet.Properties.EncryptionType", - "id": "description.DiskEncryptionSet.ID", - "identity_principal_id": "description.DiskEncryptionSet.Identity.PrincipalID", - "identity_tenant_id": "description.DiskEncryptionSet.Identity.TenantID", - "identity_type": "description.DiskEncryptionSet.Identity.Type", - "og_account_id": "metadata.SourceID", - "name": "description.DiskEncryptionSet.Name", - "previous_keys": "description.DiskEncryptionSet.Properties.PreviousKeys", - "provisioning_state": "description.DiskEncryptionSet.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "tags": "description.DiskEncryptionSet.Tags", - "title": "description.DiskEncryptionSet.Name", - "type": "description.DiskEncryptionSet.Type", + "active_key_source_vault_id": "Description.DiskEncryptionSet.Properties.ActiveKey.SourceVault.ID", + "active_key_url": "Description.DiskEncryptionSet.Properties.ActiveKey.KeyURL", + "encryption_type": "Description.DiskEncryptionSet.Properties.EncryptionType", + "id": "Description.DiskEncryptionSet.ID", + "identity_principal_id": "Description.DiskEncryptionSet.Identity.PrincipalID", + "identity_tenant_id": "Description.DiskEncryptionSet.Identity.TenantID", + "identity_type": "Description.DiskEncryptionSet.Identity.Type", + "name": "Description.DiskEncryptionSet.Name", + "previous_keys": "Description.DiskEncryptionSet.Properties.PreviousKeys", + "provisioning_state": "Description.DiskEncryptionSet.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "tags": "Description.DiskEncryptionSet.Tags", + "title": "Description.DiskEncryptionSet.Name", + "type": "Description.DiskEncryptionSet.Type", } func ListComputeDiskEncryptionSet(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -8061,21 +6165,20 @@ func ListComputeDiskEncryptionSet(ctx context.Context, d *plugin.QueryData, _ *p } var getComputeDiskEncryptionSetFilters = map[string]string{ - "active_key_source_vault_id": "description.DiskEncryptionSet.Properties.ActiveKey.SourceVault.ID", - "active_key_url": "description.DiskEncryptionSet.Properties.ActiveKey.KeyURL", - "encryption_type": "description.DiskEncryptionSet.Properties.EncryptionType", - "id": "description.DiskEncryptionSet.ID", - "identity_principal_id": "description.DiskEncryptionSet.Identity.PrincipalID", - "identity_tenant_id": "description.DiskEncryptionSet.Identity.TenantID", - "identity_type": "description.DiskEncryptionSet.Identity.Type", - "og_account_id": "metadata.SourceID", + "active_key_source_vault_id": "Description.DiskEncryptionSet.Properties.ActiveKey.SourceVault.ID", + "active_key_url": "Description.DiskEncryptionSet.Properties.ActiveKey.KeyURL", + "encryption_type": "Description.DiskEncryptionSet.Properties.EncryptionType", + "id": "Description.DiskEncryptionSet.ID", + "identity_principal_id": "Description.DiskEncryptionSet.Identity.PrincipalID", + "identity_tenant_id": "Description.DiskEncryptionSet.Identity.TenantID", + "identity_type": "Description.DiskEncryptionSet.Identity.Type", "name": "description.DiskEncryptionSet.Name", - "previous_keys": "description.DiskEncryptionSet.Properties.PreviousKeys", - "provisioning_state": "description.DiskEncryptionSet.Properties.ProvisioningState", + "previous_keys": "Description.DiskEncryptionSet.Properties.PreviousKeys", + "provisioning_state": "Description.DiskEncryptionSet.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", - "tags": "description.DiskEncryptionSet.Tags", - "title": "description.DiskEncryptionSet.Name", - "type": "description.DiskEncryptionSet.Type", + "tags": "Description.DiskEncryptionSet.Tags", + "title": "Description.DiskEncryptionSet.Name", + "type": "Description.DiskEncryptionSet.Type", } func GetComputeDiskEncryptionSet(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -8136,72 +6239,14 @@ func GetComputeDiskEncryptionSet(ctx context.Context, d *plugin.QueryData, _ *pl // ========================== START: ComputeImageGallery ============================= type ComputeImageGallery struct { - Description azure.ComputeImageGalleryDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *ComputeImageGallery) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.ComputeImageGalleryDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.ComputeImageGalleryDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type ComputeImageGalleryHit struct { @@ -8272,11 +6317,10 @@ func (p ComputeImageGalleryPaginator) NextPage(ctx context.Context) ([]ComputeIm } var listComputeImageGalleryFilters = map[string]string{ - "id": "description.ImageGallery.ID", - "og_account_id": "metadata.SourceID", - "name": "description.ImageGallery.Name", - "tags": "description.ImageGallery.Tags", - "title": "description.ImageGallery.Name", + "id": "Description.ImageGallery.ID", + "name": "Description.ImageGallery.Name", + "tags": "Description.ImageGallery.Tags", + "title": "Description.ImageGallery.Name", } func ListComputeImageGallery(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -8340,12 +6384,11 @@ func ListComputeImageGallery(ctx context.Context, d *plugin.QueryData, _ *plugin } var getComputeImageGalleryFilters = map[string]string{ - "id": "description.ImageGallery.ID", - "og_account_id": "metadata.SourceID", + "id": "Description.ImageGallery.ID", "name": "description.ImageGallery.Name", "resource_group": "description.ResourceGroup", - "tags": "description.ImageGallery.Tags", - "title": "description.ImageGallery.Name", + "tags": "Description.ImageGallery.Tags", + "title": "Description.ImageGallery.Name", } func GetComputeImageGallery(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -8406,72 +6449,14 @@ func GetComputeImageGallery(ctx context.Context, d *plugin.QueryData, _ *plugin. // ========================== START: ComputeImage ============================= type ComputeImage struct { - Description azure.ComputeImageDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *ComputeImage) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.ComputeImageDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.ComputeImageDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type ComputeImageHit struct { @@ -8542,27 +6527,26 @@ func (p ComputeImagePaginator) NextPage(ctx context.Context) ([]ComputeImage, er } var listComputeImageFilters = map[string]string{ - "hyper_v_generation": "description.Image.Properties.HyperVGeneration", - "id": "description.Image.ID", - "og_account_id": "metadata.SourceID", - "name": "description.Image.Name", - "provisioning_state": "description.Image.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "source_virtual_machine_id": "description.Image.Properties.SourceVirtualMachine.ID", - "storage_profile_data_disks": "description.Image.Properties.StorageProfile.DataDisks", - "storage_profile_os_disk_blob_uri": "description.Image.Properties.StorageProfile.OSDisk.BlobURI", - "storage_profile_os_disk_caching": "description.Image.Properties.StorageProfile.OSDisk.Caching", - "storage_profile_os_disk_encryption_set": "description.Image.Properties.StorageProfile.OSDisk.DiskEncryptionSet.ID", - "storage_profile_os_disk_managed_disk_id": "description.Image.Properties.StorageProfile.OSDisk.ManagedDisk.ID", - "storage_profile_os_disk_size_gb": "description.Image.Properties.StorageProfile.OSDisk.DiskSizeGB", - "storage_profile_os_disk_snapshot_id": "description.Image.Properties.StorageProfile.OSDisk.Snapshot.ID", - "storage_profile_os_disk_state": "description.Image.Properties.StorageProfile.OSDisk.OSState", - "storage_profile_os_disk_storage_account_type": "description.Image.Properties.StorageProfile.OSDisk.StorageAccountType", - "storage_profile_os_disk_type": "description.Image.Properties.StorageProfile.OSDisk.OSType", - "storage_profile_zone_resilient": "description.Image.Properties.StorageProfile.ZoneResilient", - "tags": "description.Image.Tags", - "title": "description.Image.Name", - "type": "description.Image.Type", + "hyper_v_generation": "Description.Image.Properties.HyperVGeneration", + "id": "Description.Image.ID", + "name": "Description.Image.Name", + "provisioning_state": "Description.Image.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "source_virtual_machine_id": "Description.Image.Properties.SourceVirtualMachine.ID", + "storage_profile_data_disks": "Description.Image.Properties.StorageProfile.DataDisks", + "storage_profile_os_disk_blob_uri": "Description.Image.Properties.StorageProfile.OSDisk.BlobURI", + "storage_profile_os_disk_caching": "Description.Image.Properties.StorageProfile.OSDisk.Caching", + "storage_profile_os_disk_encryption_set": "Description.Image.Properties.StorageProfile.OSDisk.DiskEncryptionSet.ID", + "storage_profile_os_disk_managed_disk_id": "Description.Image.Properties.StorageProfile.OSDisk.ManagedDisk.ID", + "storage_profile_os_disk_size_gb": "Description.Image.Properties.StorageProfile.OSDisk.DiskSizeGB", + "storage_profile_os_disk_snapshot_id": "Description.Image.Properties.StorageProfile.OSDisk.Snapshot.ID", + "storage_profile_os_disk_state": "Description.Image.Properties.StorageProfile.OSDisk.OSState", + "storage_profile_os_disk_storage_account_type": "Description.Image.Properties.StorageProfile.OSDisk.StorageAccountType", + "storage_profile_os_disk_type": "Description.Image.Properties.StorageProfile.OSDisk.OSType", + "storage_profile_zone_resilient": "Description.Image.Properties.StorageProfile.ZoneResilient", + "tags": "Description.Image.Tags", + "title": "Description.Image.Name", + "type": "Description.Image.Type", } func ListComputeImage(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -8626,27 +6610,26 @@ func ListComputeImage(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat } var getComputeImageFilters = map[string]string{ - "hyper_v_generation": "description.Image.Properties.HyperVGeneration", - "id": "description.Image.ID", - "og_account_id": "metadata.SourceID", + "hyper_v_generation": "Description.Image.Properties.HyperVGeneration", + "id": "Description.Image.ID", "name": "Description.Image.Name", - "provisioning_state": "description.Image.Properties.ProvisioningState", + "provisioning_state": "Description.Image.Properties.ProvisioningState", "resource_group": "Description.Image.ResourceGroup", - "source_virtual_machine_id": "description.Image.Properties.SourceVirtualMachine.ID", - "storage_profile_data_disks": "description.Image.Properties.StorageProfile.DataDisks", - "storage_profile_os_disk_blob_uri": "description.Image.Properties.StorageProfile.OSDisk.BlobURI", - "storage_profile_os_disk_caching": "description.Image.Properties.StorageProfile.OSDisk.Caching", - "storage_profile_os_disk_encryption_set": "description.Image.Properties.StorageProfile.OSDisk.DiskEncryptionSet.ID", - "storage_profile_os_disk_managed_disk_id": "description.Image.Properties.StorageProfile.OSDisk.ManagedDisk.ID", - "storage_profile_os_disk_size_gb": "description.Image.Properties.StorageProfile.OSDisk.DiskSizeGB", - "storage_profile_os_disk_snapshot_id": "description.Image.Properties.StorageProfile.OSDisk.Snapshot.ID", - "storage_profile_os_disk_state": "description.Image.Properties.StorageProfile.OSDisk.OSState", - "storage_profile_os_disk_storage_account_type": "description.Image.Properties.StorageProfile.OSDisk.StorageAccountType", - "storage_profile_os_disk_type": "description.Image.Properties.StorageProfile.OSDisk.OSType", - "storage_profile_zone_resilient": "description.Image.Properties.StorageProfile.ZoneResilient", - "tags": "description.Image.Tags", - "title": "description.Image.Name", - "type": "description.Image.Type", + "source_virtual_machine_id": "Description.Image.Properties.SourceVirtualMachine.ID", + "storage_profile_data_disks": "Description.Image.Properties.StorageProfile.DataDisks", + "storage_profile_os_disk_blob_uri": "Description.Image.Properties.StorageProfile.OSDisk.BlobURI", + "storage_profile_os_disk_caching": "Description.Image.Properties.StorageProfile.OSDisk.Caching", + "storage_profile_os_disk_encryption_set": "Description.Image.Properties.StorageProfile.OSDisk.DiskEncryptionSet.ID", + "storage_profile_os_disk_managed_disk_id": "Description.Image.Properties.StorageProfile.OSDisk.ManagedDisk.ID", + "storage_profile_os_disk_size_gb": "Description.Image.Properties.StorageProfile.OSDisk.DiskSizeGB", + "storage_profile_os_disk_snapshot_id": "Description.Image.Properties.StorageProfile.OSDisk.Snapshot.ID", + "storage_profile_os_disk_state": "Description.Image.Properties.StorageProfile.OSDisk.OSState", + "storage_profile_os_disk_storage_account_type": "Description.Image.Properties.StorageProfile.OSDisk.StorageAccountType", + "storage_profile_os_disk_type": "Description.Image.Properties.StorageProfile.OSDisk.OSType", + "storage_profile_zone_resilient": "Description.Image.Properties.StorageProfile.ZoneResilient", + "tags": "Description.Image.Tags", + "title": "Description.Image.Name", + "type": "Description.Image.Type", } func GetComputeImage(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -8707,72 +6690,14 @@ func GetComputeImage(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate // ========================== START: ComputeHostGroup ============================= type ComputeHostGroup struct { - Description azure.ComputeHostGroupDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *ComputeHostGroup) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.ComputeHostGroupDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.ComputeHostGroupDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type ComputeHostGroupHit struct { @@ -8843,10 +6768,10 @@ func (p ComputeHostGroupPaginator) NextPage(ctx context.Context) ([]ComputeHostG } var listComputeHostGroupFilters = map[string]string{ - "id": "description.HostGroup.ID", - "name": "description.HostGroup.Name", - "tags": "description.HostGroup.Tags", - "title": "description.HostGroup.Name", + "id": "Description.HostGroup.ID", + "name": "Description.HostGroup.Name", + "tags": "Description.HostGroup.Tags", + "title": "Description.HostGroup.Name", } func ListComputeHostGroup(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -8910,10 +6835,10 @@ func ListComputeHostGroup(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy } var getComputeHostGroupFilters = map[string]string{ - "id": "description.HostGroup.ID", - "name": "description.HostGroup.Name", - "tags": "description.HostGroup.Tags", - "title": "description.HostGroup.Name", + "id": "Description.HostGroup.ID", + "name": "Description.HostGroup.Name", + "tags": "Description.HostGroup.Tags", + "title": "Description.HostGroup.Name", } func GetComputeHostGroup(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -8974,72 +6899,14 @@ func GetComputeHostGroup(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd // ========================== START: ComputeHostGroupHost ============================= type ComputeHostGroupHost struct { - Description azure.ComputeHostGroupHostDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *ComputeHostGroupHost) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.ComputeHostGroupHostDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.ComputeHostGroupHostDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type ComputeHostGroupHostHit struct { @@ -9110,10 +6977,10 @@ func (p ComputeHostGroupHostPaginator) NextPage(ctx context.Context) ([]ComputeH } var listComputeHostGroupHostFilters = map[string]string{ - "id": "description.Host.ID", - "name": "description.Host.Name", - "tags": "description.Host.Tags", - "title": "description.Host.Name", + "id": "Description.Host.ID", + "name": "Description.Host.Name", + "tags": "Description.Host.Tags", + "title": "Description.Host.Name", } func ListComputeHostGroupHost(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -9177,10 +7044,10 @@ func ListComputeHostGroupHost(ctx context.Context, d *plugin.QueryData, _ *plugi } var getComputeHostGroupHostFilters = map[string]string{ - "id": "description.Host.ID", - "name": "description.Host.Name", - "tags": "description.Host.Tags", - "title": "description.Host.Name", + "id": "Description.Host.ID", + "name": "Description.Host.Name", + "tags": "Description.Host.Tags", + "title": "Description.Host.Name", } func GetComputeHostGroupHost(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -9241,72 +7108,14 @@ func GetComputeHostGroupHost(ctx context.Context, d *plugin.QueryData, _ *plugin // ========================== START: ComputeRestorePointCollection ============================= type ComputeRestorePointCollection struct { - Description azure.ComputeRestorePointCollectionDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *ComputeRestorePointCollection) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.ComputeRestorePointCollectionDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.ComputeRestorePointCollectionDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type ComputeRestorePointCollectionHit struct { @@ -9377,10 +7186,10 @@ func (p ComputeRestorePointCollectionPaginator) NextPage(ctx context.Context) ([ } var listComputeRestorePointCollectionFilters = map[string]string{ - "id": "description.RestorePointCollection.ID", - "name": "description.RestorePointCollection.Name", - "tags": "description.RestorePointCollection.Tags", - "title": "description.RestorePointCollection.Name", + "id": "Description.RestorePointCollection.ID", + "name": "Description.RestorePointCollection.Name", + "tags": "Description.RestorePointCollection.Tags", + "title": "Description.RestorePointCollection.Name", } func ListComputeRestorePointCollection(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -9444,10 +7253,10 @@ func ListComputeRestorePointCollection(ctx context.Context, d *plugin.QueryData, } var getComputeRestorePointCollectionFilters = map[string]string{ - "id": "description.RestorePointCollection.ID", - "name": "description.RestorePointCollection.Name", - "tags": "description.RestorePointCollection.Tags", - "title": "description.RestorePointCollection.Name", + "id": "Description.RestorePointCollection.ID", + "name": "Description.RestorePointCollection.Name", + "tags": "Description.RestorePointCollection.Tags", + "title": "Description.RestorePointCollection.Name", } func GetComputeRestorePointCollection(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -9508,72 +7317,14 @@ func GetComputeRestorePointCollection(ctx context.Context, d *plugin.QueryData, // ========================== START: ComputeSSHPublicKey ============================= type ComputeSSHPublicKey struct { - Description azure.ComputeSSHPublicKeyDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *ComputeSSHPublicKey) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.ComputeSSHPublicKeyDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.ComputeSSHPublicKeyDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type ComputeSSHPublicKeyHit struct { @@ -9644,13 +7395,13 @@ func (p ComputeSSHPublicKeyPaginator) NextPage(ctx context.Context) ([]ComputeSS } var listComputeSSHPublicKeyFilters = map[string]string{ - "id": "description.SSHPublicKey.ID", - "name": "description.SSHPublicKey.Name", - "public_key": "description.SSHPublicKey.Properties.PublicKey", - "resource_group": "description.ResourceGroup", - "tags": "description.SSHPublicKey.Tags", - "title": "description.SSHPublicKey.Name", - "type": "description.SSHPublicKey.Type", + "id": "Description.SSHPublicKey.ID", + "name": "Description.SSHPublicKey.Name", + "public_key": "Description.SSHPublicKey.Properties.PublicKey", + "resource_group": "Description.ResourceGroup", + "tags": "Description.SSHPublicKey.Tags", + "title": "Description.SSHPublicKey.Name", + "type": "Description.SSHPublicKey.Type", } func ListComputeSSHPublicKey(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -9714,13 +7465,13 @@ func ListComputeSSHPublicKey(ctx context.Context, d *plugin.QueryData, _ *plugin } var getComputeSSHPublicKeyFilters = map[string]string{ - "id": "description.SSHPublicKey.ID", - "name": "description.SSHPublicKey.Name", - "public_key": "description.SSHPublicKey.Properties.PublicKey", - "resource_group": "description.ResourceGroup", - "tags": "description.SSHPublicKey.Tags", - "title": "description.SSHPublicKey.Name", - "type": "description.SSHPublicKey.Type", + "id": "Description.SSHPublicKey.ID", + "name": "Description.SSHPublicKey.Name", + "public_key": "Description.SSHPublicKey.Properties.PublicKey", + "resource_group": "Description.ResourceGroup", + "tags": "Description.SSHPublicKey.Tags", + "title": "Description.SSHPublicKey.Name", + "type": "Description.SSHPublicKey.Type", } func GetComputeSSHPublicKey(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -9781,72 +7532,14 @@ func GetComputeSSHPublicKey(ctx context.Context, d *plugin.QueryData, _ *plugin. // ========================== START: DataboxEdgeDevice ============================= type DataboxEdgeDevice struct { - Description azure.DataboxEdgeDeviceDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *DataboxEdgeDevice) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.DataboxEdgeDeviceDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.DataboxEdgeDeviceDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type DataboxEdgeDeviceHit struct { @@ -9917,31 +7610,30 @@ func (p DataboxEdgeDevicePaginator) NextPage(ctx context.Context) ([]DataboxEdge } var listDataboxEdgeDeviceFilters = map[string]string{ - "configured_role_types": "description.Device.Properties.ConfiguredRoleTypes", - "culture": "description.Device.Properties.Culture", - "data_box_edge_device_status": "description.Device.Properties.DataBoxEdgeDeviceStatus", - "description": "description.Device.Properties.Description", - "device_hcs_version": "description.Device.Properties.DeviceHcsVersion", - "device_local_capacity": "description.Device.Properties.DeviceLocalCapacity", - "device_model": "description.Device.Properties.DeviceModel", - "device_software_version": "description.Device.Properties.DeviceSoftwareVersion", - "device_type": "description.Device.Properties.DeviceType", - "etag": "description.Device.Etag", - "friendly_name": "description.Device.Properties.FriendlyName", - "id": "description.Device.ID", - "og_account_id": "metadata.SourceID", - "location": "description.Device.Location", - "model_description": "description.Device.Properties.ModelDescription", - "name": "description.Device.Name", - "node_count": "description.Device.Properties.NodeCount", - "resource_group": "description.ResourceGroup", - "serial_number": "description.Device.Properties.SerialNumber", - "sku_name": "description.Device.SKU.Name", - "sku_tier": "description.Device.SKU.Tier", - "tags": "description.Device.Tags", - "time_zone": "description.Device.Properties.TimeZone", - "title": "description.Device.Name", - "type": "description.Device.Type", + "configured_role_types": "Description.Device.Properties.ConfiguredRoleTypes", + "culture": "Description.Device.Properties.Culture", + "data_box_edge_device_status": "Description.Device.Properties.DataBoxEdgeDeviceStatus", + "description": "Description.Device.Properties.Description", + "device_hcs_version": "Description.Device.Properties.DeviceHcsVersion", + "device_local_capacity": "Description.Device.Properties.DeviceLocalCapacity", + "device_model": "Description.Device.Properties.DeviceModel", + "device_software_version": "Description.Device.Properties.DeviceSoftwareVersion", + "device_type": "Description.Device.Properties.DeviceType", + "etag": "Description.Device.Etag", + "friendly_name": "Description.Device.Properties.FriendlyName", + "id": "Description.Device.ID", + "location": "Description.Device.Location", + "model_description": "Description.Device.Properties.ModelDescription", + "name": "Description.Device.Name", + "node_count": "Description.Device.Properties.NodeCount", + "resource_group": "Description.ResourceGroup", + "serial_number": "Description.Device.Properties.SerialNumber", + "sku_name": "Description.Device.SKU.Name", + "sku_tier": "Description.Device.SKU.Tier", + "tags": "Description.Device.Tags", + "time_zone": "Description.Device.Properties.TimeZone", + "title": "Description.Device.Name", + "type": "Description.Device.Type", } func ListDataboxEdgeDevice(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -10005,31 +7697,30 @@ func ListDataboxEdgeDevice(ctx context.Context, d *plugin.QueryData, _ *plugin.H } var getDataboxEdgeDeviceFilters = map[string]string{ - "configured_role_types": "description.Device.Properties.ConfiguredRoleTypes", - "culture": "description.Device.Properties.Culture", - "data_box_edge_device_status": "description.Device.Properties.DataBoxEdgeDeviceStatus", - "description": "description.Device.Properties.Description", - "device_hcs_version": "description.Device.Properties.DeviceHcsVersion", - "device_local_capacity": "description.Device.Properties.DeviceLocalCapacity", - "device_model": "description.Device.Properties.DeviceModel", - "device_software_version": "description.Device.Properties.DeviceSoftwareVersion", - "device_type": "description.Device.Properties.DeviceType", - "etag": "description.Device.Etag", - "friendly_name": "description.Device.Properties.FriendlyName", - "id": "description.Device.ID", - "og_account_id": "metadata.SourceID", - "location": "description.Device.Location", - "model_description": "description.Device.Properties.ModelDescription", + "configured_role_types": "Description.Device.Properties.ConfiguredRoleTypes", + "culture": "Description.Device.Properties.Culture", + "data_box_edge_device_status": "Description.Device.Properties.DataBoxEdgeDeviceStatus", + "description": "Description.Device.Properties.Description", + "device_hcs_version": "Description.Device.Properties.DeviceHcsVersion", + "device_local_capacity": "Description.Device.Properties.DeviceLocalCapacity", + "device_model": "Description.Device.Properties.DeviceModel", + "device_software_version": "Description.Device.Properties.DeviceSoftwareVersion", + "device_type": "Description.Device.Properties.DeviceType", + "etag": "Description.Device.Etag", + "friendly_name": "Description.Device.Properties.FriendlyName", + "id": "Description.Device.ID", + "location": "Description.Device.Location", + "model_description": "Description.Device.Properties.ModelDescription", "name": "description.Device.name", - "node_count": "description.Device.Properties.NodeCount", + "node_count": "Description.Device.Properties.NodeCount", "resource_group": "description.ResourceGroup", - "serial_number": "description.Device.Properties.SerialNumber", - "sku_name": "description.Device.SKU.Name", - "sku_tier": "description.Device.SKU.Tier", - "tags": "description.Device.Tags", - "time_zone": "description.Device.Properties.TimeZone", - "title": "description.Device.Name", - "type": "description.Device.Type", + "serial_number": "Description.Device.Properties.SerialNumber", + "sku_name": "Description.Device.SKU.Name", + "sku_tier": "Description.Device.SKU.Tier", + "tags": "Description.Device.Tags", + "time_zone": "Description.Device.Properties.TimeZone", + "title": "Description.Device.Name", + "type": "Description.Device.Type", } func GetDataboxEdgeDevice(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -10090,72 +7781,14 @@ func GetDataboxEdgeDevice(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy // ========================== START: HealthcareService ============================= type HealthcareService struct { - Description azure.HealthcareServiceDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *HealthcareService) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.HealthcareServiceDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.HealthcareServiceDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type HealthcareServiceHit struct { @@ -10226,29 +7859,28 @@ func (p HealthcareServicePaginator) NextPage(ctx context.Context) ([]HealthcareS } var listHealthcareServiceFilters = map[string]string{ - "access_policies": "description.ServicesDescription.Properties.AccessPolicies", - "allow_credentials": "description.ServicesDescription.Properties.CorsConfiguration.AllowCredentials", - "audience": "description.ServicesDescription.Properties.AuthenticationConfiguration.Audience", - "authority": "description.ServicesDescription.Properties.AuthenticationConfiguration.Authority", - "cosmos_db_configuration": "description.ServicesDescription.Properties.CosmosDbConfiguration", - "diagnostic_settings": "description.DiagnosticSettingsResources", - "etag": "description.ServicesDescription.Etag", - "headers": "description.ServicesDescription.Properties.CorsConfiguration.Origins", - "id": "description.ServicesDescription.ID", - "og_account_id": "metadata.SourceID", - "kind": "description.ServicesDescription.Kind", - "location": "description.ServicesDescription.Location", - "max_age": "description.ServicesDescription.Properties.CorsConfiguration.MaxAge", - "methods": "description.ServicesDescription.Properties.CorsConfiguration.Methods", - "name": "description.ServicesDescription.Name", - "origins": "description.ServicesDescription.Properties.CorsConfiguration.Origins", - "private_endpoint_connections": "description.ServicesDescription.Properties.PrivateEndpointConnections", - "provisioning_state": "description.ServicesDescription.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "smart_proxy_enabled": "description.ServicesDescription.Properties.AuthenticationConfiguration.SmartProxyEnabled", - "tags": "description.ServicesDescription.Tags", - "title": "description.ServicesDescription.Name", - "type": "description.ServicesDescription.Type", + "access_policies": "Description.ServicesDescription.Properties.AccessPolicies", + "allow_credentials": "Description.ServicesDescription.Properties.CorsConfiguration.AllowCredentials", + "audience": "Description.ServicesDescription.Properties.AuthenticationConfiguration.Audience", + "authority": "Description.ServicesDescription.Properties.AuthenticationConfiguration.Authority", + "cosmos_db_configuration": "Description.ServicesDescription.Properties.CosmosDbConfiguration", + "diagnostic_settings": "Description.DiagnosticSettingsResources", + "etag": "Description.ServicesDescription.Etag", + "headers": "Description.ServicesDescription.Properties.CorsConfiguration.Origins", + "id": "Description.ServicesDescription.ID", + "kind": "Description.ServicesDescription.Kind", + "location": "Description.ServicesDescription.Location", + "max_age": "Description.ServicesDescription.Properties.CorsConfiguration.MaxAge", + "methods": "Description.ServicesDescription.Properties.CorsConfiguration.Methods", + "name": "Description.ServicesDescription.Name", + "origins": "Description.ServicesDescription.Properties.CorsConfiguration.Origins", + "private_endpoint_connections": "Description.ServicesDescription.Properties.PrivateEndpointConnections", + "provisioning_state": "Description.ServicesDescription.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "smart_proxy_enabled": "Description.ServicesDescription.Properties.AuthenticationConfiguration.SmartProxyEnabled", + "tags": "Description.ServicesDescription.Tags", + "title": "Description.ServicesDescription.Name", + "type": "Description.ServicesDescription.Type", } func ListHealthcareService(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -10312,29 +7944,28 @@ func ListHealthcareService(ctx context.Context, d *plugin.QueryData, _ *plugin.H } var getHealthcareServiceFilters = map[string]string{ - "access_policies": "description.ServicesDescription.Properties.AccessPolicies", - "allow_credentials": "description.ServicesDescription.Properties.CorsConfiguration.AllowCredentials", - "audience": "description.ServicesDescription.Properties.AuthenticationConfiguration.Audience", - "authority": "description.ServicesDescription.Properties.AuthenticationConfiguration.Authority", - "cosmos_db_configuration": "description.ServicesDescription.Properties.CosmosDbConfiguration", - "diagnostic_settings": "description.DiagnosticSettingsResources", - "etag": "description.ServicesDescription.Etag", - "headers": "description.ServicesDescription.Properties.CorsConfiguration.Origins", - "id": "description.ServicesDescription.ID", - "og_account_id": "metadata.SourceID", - "kind": "description.ServicesDescription.Kind", - "location": "description.ServicesDescription.Location", - "max_age": "description.ServicesDescription.Properties.CorsConfiguration.MaxAge", - "methods": "description.ServicesDescription.Properties.CorsConfiguration.Methods", + "access_policies": "Description.ServicesDescription.Properties.AccessPolicies", + "allow_credentials": "Description.ServicesDescription.Properties.CorsConfiguration.AllowCredentials", + "audience": "Description.ServicesDescription.Properties.AuthenticationConfiguration.Audience", + "authority": "Description.ServicesDescription.Properties.AuthenticationConfiguration.Authority", + "cosmos_db_configuration": "Description.ServicesDescription.Properties.CosmosDbConfiguration", + "diagnostic_settings": "Description.DiagnosticSettingsResources", + "etag": "Description.ServicesDescription.Etag", + "headers": "Description.ServicesDescription.Properties.CorsConfiguration.Origins", + "id": "Description.ServicesDescription.ID", + "kind": "Description.ServicesDescription.Kind", + "location": "Description.ServicesDescription.Location", + "max_age": "Description.ServicesDescription.Properties.CorsConfiguration.MaxAge", + "methods": "Description.ServicesDescription.Properties.CorsConfiguration.Methods", "name": "description.ServicesDescription.name", - "origins": "description.ServicesDescription.Properties.CorsConfiguration.Origins", - "private_endpoint_connections": "description.ServicesDescription.Properties.PrivateEndpointConnections", - "provisioning_state": "description.ServicesDescription.Properties.ProvisioningState", + "origins": "Description.ServicesDescription.Properties.CorsConfiguration.Origins", + "private_endpoint_connections": "Description.ServicesDescription.Properties.PrivateEndpointConnections", + "provisioning_state": "Description.ServicesDescription.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", - "smart_proxy_enabled": "description.ServicesDescription.Properties.AuthenticationConfiguration.SmartProxyEnabled", - "tags": "description.ServicesDescription.Tags", - "title": "description.ServicesDescription.Name", - "type": "description.ServicesDescription.Type", + "smart_proxy_enabled": "Description.ServicesDescription.Properties.AuthenticationConfiguration.SmartProxyEnabled", + "tags": "Description.ServicesDescription.Tags", + "title": "Description.ServicesDescription.Name", + "type": "Description.ServicesDescription.Type", } func GetHealthcareService(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -10395,72 +8026,14 @@ func GetHealthcareService(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy // ========================== START: HpcCache ============================= type HpcCache struct { - Description azure.HpcCacheDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *HpcCache) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.HpcCacheDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.HpcCacheDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type HpcCacheHit struct { @@ -10531,24 +8104,23 @@ func (p HpcCachePaginator) NextPage(ctx context.Context) ([]HpcCache, error) { } var listHpcCacheFilters = map[string]string{ - "cache_size_gb": "description.Cache.Properties.CacheSizeGB", - "directory_services_settings": "description.Cache.Properties.DirectoryServicesSettings", - "encryption_settings": "description.Cache.Properties.EncryptionSettings", - "health": "description.Cache.Properties.Health", - "id": "description.Cache.ID", - "identity": "description.Cache.Identity", - "og_account_id": "metadata.SourceID", - "mount_addresses": "description.Cache.Properties.MountAddresses", - "name": "description.Cache.Name", - "provisioning_state": "description.Cache.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "security_settings": "description.Cache.Properties.SecuritySettings", - "sku_name": "description.Cache.SKU.Name", - "subnet": "description.Cache.Properties.Subnet", - "system_data": "description.Cache.SystemData", - "tags": "description.Cache.Tags", - "title": "description.Cache.Name", - "type": "description.Cache.Type", + "cache_size_gb": "Description.Cache.Properties.CacheSizeGB", + "directory_services_settings": "Description.Cache.Properties.DirectoryServicesSettings", + "encryption_settings": "Description.Cache.Properties.EncryptionSettings", + "health": "Description.Cache.Properties.Health", + "id": "Description.Cache.ID", + "identity": "Description.Cache.Identity", + "mount_addresses": "Description.Cache.Properties.MountAddresses", + "name": "Description.Cache.Name", + "provisioning_state": "Description.Cache.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "security_settings": "Description.Cache.Properties.SecuritySettings", + "sku_name": "Description.Cache.SKU.Name", + "subnet": "Description.Cache.Properties.Subnet", + "system_data": "Description.Cache.SystemData", + "tags": "Description.Cache.Tags", + "title": "Description.Cache.Name", + "type": "Description.Cache.Type", } func ListHpcCache(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -10612,24 +8184,23 @@ func ListHpcCache(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDat } var getHpcCacheFilters = map[string]string{ - "cache_size_gb": "description.Cache.Properties.CacheSizeGB", - "directory_services_settings": "description.Cache.Properties.DirectoryServicesSettings", - "encryption_settings": "description.Cache.Properties.EncryptionSettings", - "health": "description.Cache.Properties.Health", - "id": "description.Cache.ID", - "identity": "description.Cache.Identity", - "og_account_id": "metadata.SourceID", - "mount_addresses": "description.Cache.Properties.MountAddresses", + "cache_size_gb": "Description.Cache.Properties.CacheSizeGB", + "directory_services_settings": "Description.Cache.Properties.DirectoryServicesSettings", + "encryption_settings": "Description.Cache.Properties.EncryptionSettings", + "health": "Description.Cache.Properties.Health", + "id": "Description.Cache.ID", + "identity": "Description.Cache.Identity", + "mount_addresses": "Description.Cache.Properties.MountAddresses", "name": "description.Cache.name", - "provisioning_state": "description.Cache.Properties.ProvisioningState", + "provisioning_state": "Description.Cache.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", - "security_settings": "description.Cache.Properties.SecuritySettings", - "sku_name": "description.Cache.SKU.Name", - "subnet": "description.Cache.Properties.Subnet", - "system_data": "description.Cache.SystemData", - "tags": "description.Cache.Tags", - "title": "description.Cache.Name", - "type": "description.Cache.Type", + "security_settings": "Description.Cache.Properties.SecuritySettings", + "sku_name": "Description.Cache.SKU.Name", + "subnet": "Description.Cache.Properties.Subnet", + "system_data": "Description.Cache.SystemData", + "tags": "Description.Cache.Tags", + "title": "Description.Cache.Name", + "type": "Description.Cache.Type", } func GetHpcCache(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -10690,72 +8261,14 @@ func GetHpcCache(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData // ========================== START: KeyVaultKey ============================= type KeyVaultKey struct { - Description azure.KeyVaultKeyDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *KeyVaultKey) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.KeyVaultKeyDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.KeyVaultKeyDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type KeyVaultKeyHit struct { @@ -10826,22 +8339,21 @@ func (p KeyVaultKeyPaginator) NextPage(ctx context.Context) ([]KeyVaultKey, erro } var listKeyVaultKeyFilters = map[string]string{ - "curve_name": "description.Key.Properties.CurveName", - "enabled": "description.Key.Properties.Attributes.Enabled", - "id": "description.Key.ID", - "og_account_id": "metadata.SourceID", - "key_ops": "description.Key.Properties.KeyOps", - "key_size": "description.Key.Properties.KeySize", - "key_type": "description.Key.Properties.Kty", - "key_uri": "description.Key.Properties.KeyURI", - "key_uri_with_version": "description.Key.Properties.KeyURIWithVersion", - "location": "description.Key.Location", - "name": "description.Key.Name", - "recovery_level": "description.Key.Properties.Attributes.RecoveryLevel", - "resource_group": "description.ResourceGroup", - "tags": "description.Key.Tags", - "title": "description.Key.Name", - "type": "description.Key.Type", + "curve_name": "Description.Key.Properties.CurveName", + "enabled": "Description.Key.Properties.Attributes.Enabled", + "id": "Description.Key.ID", + "key_ops": "Description.Key.Properties.KeyOps", + "key_size": "Description.Key.Properties.KeySize", + "key_type": "Description.Key.Properties.Kty", + "key_uri": "Description.Key.Properties.KeyURI", + "key_uri_with_version": "Description.Key.Properties.KeyURIWithVersion", + "location": "Description.Key.Location", + "name": "Description.Key.Name", + "recovery_level": "Description.Key.Properties.Attributes.RecoveryLevel", + "resource_group": "Description.ResourceGroup", + "tags": "Description.Key.Tags", + "title": "Description.Key.Name", + "type": "Description.Key.Type", } func ListKeyVaultKey(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -10905,22 +8417,21 @@ func ListKeyVaultKey(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate } var getKeyVaultKeyFilters = map[string]string{ - "curve_name": "description.Key.Properties.CurveName", - "enabled": "description.Key.Properties.Attributes.Enabled", - "id": "description.Key.ID", - "og_account_id": "metadata.SourceID", - "key_ops": "description.Key.Properties.KeyOps", - "key_size": "description.Key.Properties.KeySize", - "key_type": "description.Key.Properties.Kty", - "key_uri": "description.Key.Properties.KeyURI", - "key_uri_with_version": "description.Key.Properties.KeyURIWithVersion", - "location": "description.Key.Location", + "curve_name": "Description.Key.Properties.CurveName", + "enabled": "Description.Key.Properties.Attributes.Enabled", + "id": "Description.Key.ID", + "key_ops": "Description.Key.Properties.KeyOps", + "key_size": "Description.Key.Properties.KeySize", + "key_type": "Description.Key.Properties.Kty", + "key_uri": "Description.Key.Properties.KeyURI", + "key_uri_with_version": "Description.Key.Properties.KeyURIWithVersion", + "location": "Description.Key.Location", "name": "description.Key.name", - "recovery_level": "description.Key.Properties.Attributes.RecoveryLevel", + "recovery_level": "Description.Key.Properties.Attributes.RecoveryLevel", "resource_group": "description.ResourceGroup", - "tags": "description.Key.Tags", - "title": "description.Key.Name", - "type": "description.Key.Type", + "tags": "Description.Key.Tags", + "title": "Description.Key.Name", + "type": "Description.Key.Type", "vault_name": "description.Vault.name", } @@ -10982,72 +8493,14 @@ func GetKeyVaultKey(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD // ========================== START: KeyVaultKeyVersion ============================= type KeyVaultKeyVersion struct { - Description azure.KeyVaultKeyVersionDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *KeyVaultKeyVersion) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.KeyVaultKeyVersionDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.KeyVaultKeyVersionDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type KeyVaultKeyVersionHit struct { @@ -11118,25 +8571,24 @@ func (p KeyVaultKeyVersionPaginator) NextPage(ctx context.Context) ([]KeyVaultKe } var listKeyVaultKeyVersionFilters = map[string]string{ - "curve_name": "description.Version.Properties.CurveName", - "enabled": "description.Version.Properties.Attributes.Enabled", - "id": "description.Version.ID", - "og_account_id": "metadata.SourceID", - "key_id": "description.Key.ID", - "key_name": "description.Key.Name", - "key_ops": "description.Version.Properties.JSONWebKeyOperation", - "key_size": "description.Version.Properties.KeySize", - "key_type": "description.Version.Properties.Kty", - "key_uri": "description.Version.Properties.KeyURI", - "key_uri_with_version": "description.Version.Properties.KeyURIWithVersion", - "location": "description.Version.Location", - "name": "description.Version.Name", - "recovery_level": "description.Version.Properties.Attributes.RecoveryLevel", - "resource_group": "description.ResourceGroup", - "tags": "description.Version.Tags", - "title": "description.Version.Name", - "type": "description.Version.Type", - "vault_name": "description.Vault.Name", + "curve_name": "Description.Version.Properties.CurveName", + "enabled": "Description.Version.Properties.Attributes.Enabled", + "id": "Description.Version.ID", + "key_id": "Description.Key.ID", + "key_name": "Description.Key.Name", + "key_ops": "Description.Version.Properties.JSONWebKeyOperation", + "key_size": "Description.Version.Properties.KeySize", + "key_type": "Description.Version.Properties.Kty", + "key_uri": "Description.Version.Properties.KeyURI", + "key_uri_with_version": "Description.Version.Properties.KeyURIWithVersion", + "location": "Description.Version.Location", + "name": "Description.Version.Name", + "recovery_level": "Description.Version.Properties.Attributes.RecoveryLevel", + "resource_group": "Description.ResourceGroup", + "tags": "Description.Version.Tags", + "title": "Description.Version.Name", + "type": "Description.Version.Type", + "vault_name": "Description.Vault.Name", } func ListKeyVaultKeyVersion(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -11200,24 +8652,23 @@ func ListKeyVaultKeyVersion(ctx context.Context, d *plugin.QueryData, _ *plugin. } var getKeyVaultKeyVersionFilters = map[string]string{ - "curve_name": "description.Version.Properties.CurveName", - "enabled": "description.Version.Properties.Attributes.Enabled", - "id": "description.Version.ID", - "og_account_id": "metadata.SourceID", - "key_id": "description.Key.ID", - "key_name": "description.Key.Name", - "key_ops": "description.Version.Properties.JSONWebKeyOperation", - "key_size": "description.Version.Properties.KeySize", - "key_type": "description.Version.Properties.Kty", - "key_uri": "description.Version.Properties.KeyURI", - "key_uri_with_version": "description.Version.Properties.KeyURIWithVersion", - "location": "description.Version.Location", + "curve_name": "Description.Version.Properties.CurveName", + "enabled": "Description.Version.Properties.Attributes.Enabled", + "id": "Description.Version.ID", + "key_id": "Description.Key.ID", + "key_name": "Description.Key.Name", + "key_ops": "Description.Version.Properties.JSONWebKeyOperation", + "key_size": "Description.Version.Properties.KeySize", + "key_type": "Description.Version.Properties.Kty", + "key_uri": "Description.Version.Properties.KeyURI", + "key_uri_with_version": "Description.Version.Properties.KeyURIWithVersion", + "location": "Description.Version.Location", "name": "description.Version.name", - "recovery_level": "description.Version.Properties.Attributes.RecoveryLevel", + "recovery_level": "Description.Version.Properties.Attributes.RecoveryLevel", "resource_group": "description.ResourceGroup", - "tags": "description.Version.Tags", - "title": "description.Version.Name", - "type": "description.Version.Type", + "tags": "Description.Version.Tags", + "title": "Description.Version.Name", + "type": "Description.Version.Type", "vault_name": "description.Vault.name", } @@ -11279,72 +8730,14 @@ func GetKeyVaultKeyVersion(ctx context.Context, d *plugin.QueryData, _ *plugin.H // ========================== START: KubernetesCluster ============================= type KubernetesCluster struct { - Description azure.KubernetesClusterDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *KubernetesCluster) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.KubernetesClusterDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.KubernetesClusterDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type KubernetesClusterHit struct { @@ -11415,41 +8808,40 @@ func (p KubernetesClusterPaginator) NextPage(ctx context.Context) ([]KubernetesC } var listKubernetesClusterFilters = map[string]string{ - "aad_profile": "description.ManagedCluster.Properties.AADProfile", - "addon_profiles": "description.ManagedCluster.Properties.AddonProfiles", - "agent_pool_profiles": "description.ManagedCluster.Properties.AgentPoolProfiles", - "api_server_access_profile": "description.ManagedCluster.Properties.APIServerAccessProfile", - "auto_scaler_profile": "description.ManagedCluster.Properties.AutoScalerProfile", - "auto_upgrade_profile": "description.ManagedCluster.Properties.AutoUpgradeProfile", - "azure_portal_fqdn": "description.ManagedCluster.Properties.AzurePortalFQDN", - "disk_encryption_set_id": "description.ManagedCluster.Properties.DiskEncryptionSetID", - "dns_prefix": "description.ManagedCluster.Properties.DNSPrefix", - "enable_pod_security_policy": "description.ManagedCluster.Properties.EnablePodSecurityPolicy", - "enable_rbac": "description.ManagedCluster.Properties.EnableRBAC", - "fqdn": "description.ManagedCluster.Properties.Fqdn", - "fqdn_subdomain": "description.ManagedCluster.Properties.FqdnSubdomain", - "id": "description.ManagedCluster.ID", - "identity": "description.ManagedCluster.Identity", - "identity_profile": "description.ManagedCluster.Properties.IdentityProfile", - "og_account_id": "metadata.SourceID", - "kubernetes_version": "description.ManagedCluster.Properties.KubernetesVersion", - "linux_profile": "description.ManagedCluster.Properties.LinuxProfile", - "location": "description.ManagedCluster.Location", - "max_agent_pools": "description.ManagedCluster.Properties.MaxAgentPools", - "name": "description.ManagedCluster.Name", - "network_profile": "description.ManagedCluster.Properties.NetworkProfile", - "node_resource_group": "description.ManagedCluster.Properties.NodeResourceGroup", - "pod_identity_profile": "description.ManagedCluster.Properties.PodIdentityProfile", - "power_state": "description.ManagedCluster.Properties.PowerState", - "private_fqdn": "description.ManagedCluster.Properties.PrivateFQDN", - "provisioning_state": "description.ManagedCluster.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "service_principal_profile": "description.ManagedCluster.Properties.ServicePrincipalProfile", - "sku": "description.ManagedCluster.SKU", - "tags": "description.ManagedCluster.Tags", - "title": "description.ManagedCluster.Name", - "type": "description.ManagedCluster.Type", - "windows_profile": "description.ManagedCluster.Properties.WindowsProfile", + "aad_profile": "Description.ManagedCluster.Properties.AADProfile", + "addon_profiles": "Description.ManagedCluster.Properties.AddonProfiles", + "agent_pool_profiles": "Description.ManagedCluster.Properties.AgentPoolProfiles", + "api_server_access_profile": "Description.ManagedCluster.Properties.APIServerAccessProfile", + "auto_scaler_profile": "Description.ManagedCluster.Properties.AutoScalerProfile", + "auto_upgrade_profile": "Description.ManagedCluster.Properties.AutoUpgradeProfile", + "azure_portal_fqdn": "Description.ManagedCluster.Properties.AzurePortalFQDN", + "disk_encryption_set_id": "Description.ManagedCluster.Properties.DiskEncryptionSetID", + "dns_prefix": "Description.ManagedCluster.Properties.DNSPrefix", + "enable_pod_security_policy": "Description.ManagedCluster.Properties.EnablePodSecurityPolicy", + "enable_rbac": "Description.ManagedCluster.Properties.EnableRBAC", + "fqdn": "Description.ManagedCluster.Properties.Fqdn", + "fqdn_subdomain": "Description.ManagedCluster.Properties.FqdnSubdomain", + "id": "Description.ManagedCluster.ID", + "identity": "Description.ManagedCluster.Identity", + "identity_profile": "Description.ManagedCluster.Properties.IdentityProfile", + "kubernetes_version": "Description.ManagedCluster.Properties.KubernetesVersion", + "linux_profile": "Description.ManagedCluster.Properties.LinuxProfile", + "location": "Description.ManagedCluster.Location", + "max_agent_pools": "Description.ManagedCluster.Properties.MaxAgentPools", + "name": "Description.ManagedCluster.Name", + "network_profile": "Description.ManagedCluster.Properties.NetworkProfile", + "node_resource_group": "Description.ManagedCluster.Properties.NodeResourceGroup", + "pod_identity_profile": "Description.ManagedCluster.Properties.PodIdentityProfile", + "power_state": "Description.ManagedCluster.Properties.PowerState", + "private_fqdn": "Description.ManagedCluster.Properties.PrivateFQDN", + "provisioning_state": "Description.ManagedCluster.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "service_principal_profile": "Description.ManagedCluster.Properties.ServicePrincipalProfile", + "sku": "Description.ManagedCluster.SKU", + "tags": "Description.ManagedCluster.Tags", + "title": "Description.ManagedCluster.Name", + "type": "Description.ManagedCluster.Type", + "windows_profile": "Description.ManagedCluster.Properties.WindowsProfile", } func ListKubernetesCluster(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -11513,41 +8905,40 @@ func ListKubernetesCluster(ctx context.Context, d *plugin.QueryData, _ *plugin.H } var getKubernetesClusterFilters = map[string]string{ - "aad_profile": "description.ManagedCluster.Properties.AADProfile", - "addon_profiles": "description.ManagedCluster.Properties.AddonProfiles", - "agent_pool_profiles": "description.ManagedCluster.Properties.AgentPoolProfiles", - "api_server_access_profile": "description.ManagedCluster.Properties.APIServerAccessProfile", - "auto_scaler_profile": "description.ManagedCluster.Properties.AutoScalerProfile", - "auto_upgrade_profile": "description.ManagedCluster.Properties.AutoUpgradeProfile", - "azure_portal_fqdn": "description.ManagedCluster.Properties.AzurePortalFQDN", - "disk_encryption_set_id": "description.ManagedCluster.Properties.DiskEncryptionSetID", - "dns_prefix": "description.ManagedCluster.Properties.DNSPrefix", - "enable_pod_security_policy": "description.ManagedCluster.Properties.EnablePodSecurityPolicy", - "enable_rbac": "description.ManagedCluster.Properties.EnableRBAC", - "fqdn": "description.ManagedCluster.Properties.Fqdn", - "fqdn_subdomain": "description.ManagedCluster.Properties.FqdnSubdomain", - "id": "description.ManagedCluster.ID", - "identity": "description.ManagedCluster.Identity", - "identity_profile": "description.ManagedCluster.Properties.IdentityProfile", - "og_account_id": "metadata.SourceID", - "kubernetes_version": "description.ManagedCluster.Properties.KubernetesVersion", - "linux_profile": "description.ManagedCluster.Properties.LinuxProfile", - "location": "description.ManagedCluster.Location", - "max_agent_pools": "description.ManagedCluster.Properties.MaxAgentPools", + "aad_profile": "Description.ManagedCluster.Properties.AADProfile", + "addon_profiles": "Description.ManagedCluster.Properties.AddonProfiles", + "agent_pool_profiles": "Description.ManagedCluster.Properties.AgentPoolProfiles", + "api_server_access_profile": "Description.ManagedCluster.Properties.APIServerAccessProfile", + "auto_scaler_profile": "Description.ManagedCluster.Properties.AutoScalerProfile", + "auto_upgrade_profile": "Description.ManagedCluster.Properties.AutoUpgradeProfile", + "azure_portal_fqdn": "Description.ManagedCluster.Properties.AzurePortalFQDN", + "disk_encryption_set_id": "Description.ManagedCluster.Properties.DiskEncryptionSetID", + "dns_prefix": "Description.ManagedCluster.Properties.DNSPrefix", + "enable_pod_security_policy": "Description.ManagedCluster.Properties.EnablePodSecurityPolicy", + "enable_rbac": "Description.ManagedCluster.Properties.EnableRBAC", + "fqdn": "Description.ManagedCluster.Properties.Fqdn", + "fqdn_subdomain": "Description.ManagedCluster.Properties.FqdnSubdomain", + "id": "Description.ManagedCluster.ID", + "identity": "Description.ManagedCluster.Identity", + "identity_profile": "Description.ManagedCluster.Properties.IdentityProfile", + "kubernetes_version": "Description.ManagedCluster.Properties.KubernetesVersion", + "linux_profile": "Description.ManagedCluster.Properties.LinuxProfile", + "location": "Description.ManagedCluster.Location", + "max_agent_pools": "Description.ManagedCluster.Properties.MaxAgentPools", "name": "description.ManagedCluster.name", - "network_profile": "description.ManagedCluster.Properties.NetworkProfile", - "node_resource_group": "description.ManagedCluster.Properties.NodeResourceGroup", - "pod_identity_profile": "description.ManagedCluster.Properties.PodIdentityProfile", - "power_state": "description.ManagedCluster.Properties.PowerState", - "private_fqdn": "description.ManagedCluster.Properties.PrivateFQDN", - "provisioning_state": "description.ManagedCluster.Properties.ProvisioningState", + "network_profile": "Description.ManagedCluster.Properties.NetworkProfile", + "node_resource_group": "Description.ManagedCluster.Properties.NodeResourceGroup", + "pod_identity_profile": "Description.ManagedCluster.Properties.PodIdentityProfile", + "power_state": "Description.ManagedCluster.Properties.PowerState", + "private_fqdn": "Description.ManagedCluster.Properties.PrivateFQDN", + "provisioning_state": "Description.ManagedCluster.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", - "service_principal_profile": "description.ManagedCluster.Properties.ServicePrincipalProfile", - "sku": "description.ManagedCluster.SKU", - "tags": "description.ManagedCluster.Tags", - "title": "description.ManagedCluster.Name", - "type": "description.ManagedCluster.Type", - "windows_profile": "description.ManagedCluster.Properties.WindowsProfile", + "service_principal_profile": "Description.ManagedCluster.Properties.ServicePrincipalProfile", + "sku": "Description.ManagedCluster.SKU", + "tags": "Description.ManagedCluster.Tags", + "title": "Description.ManagedCluster.Name", + "type": "Description.ManagedCluster.Type", + "windows_profile": "Description.ManagedCluster.Properties.WindowsProfile", } func GetKubernetesCluster(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -11608,72 +8999,14 @@ func GetKubernetesCluster(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy // ========================== START: KubernetesServiceVersion ============================= type KubernetesServiceVersion struct { - Description azure.KubernetesServiceVersionDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *KubernetesServiceVersion) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.KubernetesServiceVersionDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.KubernetesServiceVersionDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type KubernetesServiceVersionHit struct { @@ -11744,12 +9077,11 @@ func (p KubernetesServiceVersionPaginator) NextPage(ctx context.Context) ([]Kube } var listKubernetesServiceVersionFilters = map[string]string{ - "capabilities": "description.Version.Capabilities", - "is_preview": "description.Version.IsPreview", - "og_account_id": "metadata.SourceID", - "patch_versions": "description.Version.PatchVersions", - "title": "description.Version.Version", - "version": "description.Version.Version", + "capabilities": "Description.Version.Capabilities", + "is_preview": "Description.Version.IsPreview", + "patch_versions": "Description.Version.PatchVersions", + "title": "Description.Version.Version", + "version": "Description.Version.Version", } func ListKubernetesServiceVersion(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -11813,14 +9145,13 @@ func ListKubernetesServiceVersion(ctx context.Context, d *plugin.QueryData, _ *p } var getKubernetesServiceVersionFilters = map[string]string{ - "capabilities": "description.Version.Capabilities", - "is_preview": "description.Version.IsPreview", - "og_account_id": "metadata.SourceID", + "capabilities": "Description.Version.Capabilities", + "is_preview": "Description.Version.IsPreview", "name": "description.Orchestrator.name", - "patch_versions": "description.Version.PatchVersions", + "patch_versions": "Description.Version.PatchVersions", "resource_group": "description.ResourceGroup", - "title": "description.Version.Version", - "version": "description.Version.Version", + "title": "Description.Version.Version", + "version": "Description.Version.Version", } func GetKubernetesServiceVersion(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -11881,72 +9212,14 @@ func GetKubernetesServiceVersion(ctx context.Context, d *plugin.QueryData, _ *pl // ========================== START: ContainerInstanceContainerGroup ============================= type ContainerInstanceContainerGroup struct { - Description azure.ContainerInstanceContainerGroupDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *ContainerInstanceContainerGroup) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.ContainerInstanceContainerGroupDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.ContainerInstanceContainerGroupDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type ContainerInstanceContainerGroupHit struct { @@ -12017,28 +9290,27 @@ func (p ContainerInstanceContainerGroupPaginator) NextPage(ctx context.Context) } var listContainerInstanceContainerGroupFilters = map[string]string{ - "containers": "description.ContainerGroup.Properties.Containers", - "diagnostics": "description.ContainerGroup.Properties.Diagnostics", - "dns_config": "description.ContainerGroup.Properties.DNSConfig", - "encryption_properties": "description.ContainerGroup.Properties.EncryptionProperties", - "id": "description.ContainerGroup.ID", - "identity": "description.ContainerGroup.Identity", - "image_registry_credentials": "description.ContainerGroup.Properties.ImageRegistryCredentials", - "init_containers": "description.ContainerGroup.Properties.InitContainers", - "instance_view": "description.ContainerGroup.Properties.InstanceView", - "ip_address": "description.ContainerGroup.Properties.IPAddress", - "og_account_id": "metadata.SourceID", - "name": "description.ContainerGroup.Name", - "os_type": "description.ContainerGroup.Properties.OSType", - "provisioning_state": "description.ContainerGroup.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "restart_policy": "description.ContainerGroup.Properties.RestartPolicy", - "sku": "description.ContainerGroup.Properties.SKU", - "subnet_ids": "description.ContainerGroup.Properties.SubnetIDs", - "tags": "description.ContainerGroup.Tags", - "title": "description.ContainerGroup.Name", - "type": "description.ContainerGroup.Type", - "volumes": "description.ContainerGroup.Properties.Volumes", + "containers": "Description.ContainerGroup.Properties.Containers", + "diagnostics": "Description.ContainerGroup.Properties.Diagnostics", + "dns_config": "Description.ContainerGroup.Properties.DNSConfig", + "encryption_properties": "Description.ContainerGroup.Properties.EncryptionProperties", + "id": "Description.ContainerGroup.ID", + "identity": "Description.ContainerGroup.Identity", + "image_registry_credentials": "Description.ContainerGroup.Properties.ImageRegistryCredentials", + "init_containers": "Description.ContainerGroup.Properties.InitContainers", + "instance_view": "Description.ContainerGroup.Properties.InstanceView", + "ip_address": "Description.ContainerGroup.Properties.IPAddress", + "name": "Description.ContainerGroup.Name", + "os_type": "Description.ContainerGroup.Properties.OSType", + "provisioning_state": "Description.ContainerGroup.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "restart_policy": "Description.ContainerGroup.Properties.RestartPolicy", + "sku": "Description.ContainerGroup.Properties.SKU", + "subnet_ids": "Description.ContainerGroup.Properties.SubnetIDs", + "tags": "Description.ContainerGroup.Tags", + "title": "Description.ContainerGroup.Name", + "type": "Description.ContainerGroup.Type", + "volumes": "Description.ContainerGroup.Properties.Volumes", } func ListContainerInstanceContainerGroup(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -12102,28 +9374,27 @@ func ListContainerInstanceContainerGroup(ctx context.Context, d *plugin.QueryDat } var getContainerInstanceContainerGroupFilters = map[string]string{ - "containers": "description.ContainerGroup.Properties.Containers", - "diagnostics": "description.ContainerGroup.Properties.Diagnostics", - "dns_config": "description.ContainerGroup.Properties.DNSConfig", - "encryption_properties": "description.ContainerGroup.Properties.EncryptionProperties", - "id": "description.ContainerGroup.ID", - "identity": "description.ContainerGroup.Identity", - "image_registry_credentials": "description.ContainerGroup.Properties.ImageRegistryCredentials", - "init_containers": "description.ContainerGroup.Properties.InitContainers", - "instance_view": "description.ContainerGroup.Properties.InstanceView", - "ip_address": "description.ContainerGroup.Properties.IPAddress", - "og_account_id": "metadata.SourceID", - "name": "description.ContainerGroup.Name", - "os_type": "description.ContainerGroup.Properties.OSType", - "provisioning_state": "description.ContainerGroup.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "restart_policy": "description.ContainerGroup.Properties.RestartPolicy", - "sku": "description.ContainerGroup.Properties.SKU", - "subnet_ids": "description.ContainerGroup.Properties.SubnetIDs", - "tags": "description.ContainerGroup.Tags", - "title": "description.ContainerGroup.Name", - "type": "description.ContainerGroup.Type", - "volumes": "description.ContainerGroup.Properties.Volumes", + "containers": "Description.ContainerGroup.Properties.Containers", + "diagnostics": "Description.ContainerGroup.Properties.Diagnostics", + "dns_config": "Description.ContainerGroup.Properties.DNSConfig", + "encryption_properties": "Description.ContainerGroup.Properties.EncryptionProperties", + "id": "Description.ContainerGroup.ID", + "identity": "Description.ContainerGroup.Identity", + "image_registry_credentials": "Description.ContainerGroup.Properties.ImageRegistryCredentials", + "init_containers": "Description.ContainerGroup.Properties.InitContainers", + "instance_view": "Description.ContainerGroup.Properties.InstanceView", + "ip_address": "Description.ContainerGroup.Properties.IPAddress", + "name": "Description.ContainerGroup.Name", + "os_type": "Description.ContainerGroup.Properties.OSType", + "provisioning_state": "Description.ContainerGroup.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "restart_policy": "Description.ContainerGroup.Properties.RestartPolicy", + "sku": "Description.ContainerGroup.Properties.SKU", + "subnet_ids": "Description.ContainerGroup.Properties.SubnetIDs", + "tags": "Description.ContainerGroup.Tags", + "title": "Description.ContainerGroup.Name", + "type": "Description.ContainerGroup.Type", + "volumes": "Description.ContainerGroup.Properties.Volumes", } func GetContainerInstanceContainerGroup(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -12184,72 +9455,14 @@ func GetContainerInstanceContainerGroup(ctx context.Context, d *plugin.QueryData // ========================== START: CDNProfile ============================= type CDNProfile struct { - Description azure.CDNProfileDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *CDNProfile) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.CDNProfileDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.CDNProfileDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type CDNProfileHit struct { @@ -12320,18 +9533,17 @@ func (p CDNProfilePaginator) NextPage(ctx context.Context) ([]CDNProfile, error) } var listCDNProfileFilters = map[string]string{ - "front_door_id": "description.Profile.Properties.FrontDoorID", - "id": "description.Profiles.ID", - "og_account_id": "metadata.SourceID", - "kind": "description.Profile.Kind", - "name": "description.Profile.Name", - "origin_response_timeout_seconds": "description.Profile.Properties.OriginResponseTimeoutSeconds", - "provisioning_state": "description.Profile.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "sku_name": "description.Profile.SKU.Name", - "tags": "description.Profile.Tags", - "title": "description.Profile.Name", - "type": "description.Profile.Type", + "front_door_id": "Description.Profile.Properties.FrontDoorID", + "id": "Description.Profiles.ID", + "kind": "Description.Profile.Kind", + "name": "Description.Profile.Name", + "origin_response_timeout_seconds": "Description.Profile.Properties.OriginResponseTimeoutSeconds", + "provisioning_state": "Description.Profile.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "sku_name": "Description.Profile.SKU.Name", + "tags": "Description.Profile.Tags", + "title": "Description.Profile.Name", + "type": "Description.Profile.Type", } func ListCDNProfile(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -12395,18 +9607,17 @@ func ListCDNProfile(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD } var getCDNProfileFilters = map[string]string{ - "front_door_id": "description.Profile.Properties.FrontDoorID", - "id": "description.Profiles.ID", - "og_account_id": "metadata.SourceID", - "kind": "description.Profile.Kind", - "name": "description.Profile.Name", - "origin_response_timeout_seconds": "description.Profile.Properties.OriginResponseTimeoutSeconds", - "provisioning_state": "description.Profile.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "sku_name": "description.Profile.SKU.Name", - "tags": "description.Profile.Tags", - "title": "description.Profile.Name", - "type": "description.Profile.Type", + "front_door_id": "Description.Profile.Properties.FrontDoorID", + "id": "Description.Profiles.ID", + "kind": "Description.Profile.Kind", + "name": "Description.Profile.Name", + "origin_response_timeout_seconds": "Description.Profile.Properties.OriginResponseTimeoutSeconds", + "provisioning_state": "Description.Profile.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "sku_name": "Description.Profile.SKU.Name", + "tags": "Description.Profile.Tags", + "title": "Description.Profile.Name", + "type": "Description.Profile.Type", } func GetCDNProfile(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -12467,72 +9678,14 @@ func GetCDNProfile(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDa // ========================== START: CDNEndpoint ============================= type CDNEndpoint struct { - Description azure.CDNEndpointDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *CDNEndpoint) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.CDNEndpointDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.CDNEndpointDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type CDNEndpointHit struct { @@ -12603,10 +9756,10 @@ func (p CDNEndpointPaginator) NextPage(ctx context.Context) ([]CDNEndpoint, erro } var listCDNEndpointFilters = map[string]string{ - "id": "description.Endpoint.ID", - "name": "description.Endpoint.Name", - "tags": "description.Endpoint.Tags", - "title": "description.Endpoint.Name", + "id": "Description.Endpoint.ID", + "name": "Description.Endpoint.Name", + "tags": "Description.Endpoint.Tags", + "title": "Description.Endpoint.Name", } func ListCDNEndpoint(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -12670,10 +9823,10 @@ func ListCDNEndpoint(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate } var getCDNEndpointFilters = map[string]string{ - "id": "description.Endpoint.ID", - "name": "description.Endpoint.Name", - "tags": "description.Endpoint.Tags", - "title": "description.Endpoint.Name", + "id": "Description.Endpoint.ID", + "name": "Description.Endpoint.Name", + "tags": "Description.Endpoint.Tags", + "title": "Description.Endpoint.Name", } func GetCDNEndpoint(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -12734,72 +9887,14 @@ func GetCDNEndpoint(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD // ========================== START: NetworkInterface ============================= type NetworkInterface struct { - Description azure.NetworkInterfaceDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *NetworkInterface) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.NetworkInterfaceDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.NetworkInterfaceDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type NetworkInterfaceHit struct { @@ -12870,38 +9965,37 @@ func (p NetworkInterfacePaginator) NextPage(ctx context.Context) ([]NetworkInter } var listNetworkInterfaceFilters = map[string]string{ - "applied_dns_servers": "description.Interface.Properties.DNSSettings.AppliedDNSServers", - "auxiliary_mode": "description.Interface.Properties.AuxiliaryMode", - "dns_servers": "description.Interface.Properties.DNSSettings.DNSServers", - "dscp_configuration": "description.Interface.Properties.DscpConfiguration", - "enable_accelerated_networking": "description.Interface.Properties.EnableAcceleratedNetworking", - "enable_ip_forwarding": "description.Interface.Properties.EnableIPForwarding", - "etag": "description.Interface.Etag", - "hosted_workloads": "description.Interface.Properties.HostedWorkloads", - "id": "description.Interface.ID", - "internal_dns_name_label": "description.Interface.Properties.DNSSettings.InternalDNSNameLabel", - "internal_domain_name_suffix": "description.Interface.Properties.DNSSettings.InternalDomainNameSuffix", - "internal_fqdn": "description.Interface.Properties.DNSSettings.InternalFqdn", - "ip_configurations": "description.Interface.Properties.IPConfigurations", - "is_primary": "description.Interface.Properties.Primary", - "og_account_id": "metadata.SourceID", - "mac_address": "description.Interface.Properties.MacAddress", - "migration_phase": "description.Interface.Properties.MigrationPhase", - "name": "description.Interface.Name", - "network_security_group_id": "description.Interface.Properties.NetworkSecurityGroup.ID", - "nic_type": "description.Interface.Properties.NicType", - "private_endpoint": "description.Interface.Properties.PrivateEndpoint", - "private_link_service": "description.Interface.Properties.PrivateLinkService", - "provisioning_state": "description.Interface.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "resource_guid": "description.Interface.Properties.ResourceGUID", - "tags": "description.Interface.Tags", - "tap_configurations": "description.Interface.Properties.TapConfigurations", - "title": "description.Interface.Name", - "type": "description.Interface.Type", - "virtual_machine_id": "description.Interface.Properties.VirtualMachine.ID", - "vnet_encryption_supported": "description.Interface.Properties.VnetEncryptionSupported", - "workload_type": "description.Interface.Properties.WorkloadType", + "applied_dns_servers": "Description.Interface.Properties.DNSSettings.AppliedDNSServers", + "auxiliary_mode": "Description.Interface.Properties.AuxiliaryMode", + "dns_servers": "Description.Interface.Properties.DNSSettings.DNSServers", + "dscp_configuration": "Description.Interface.Properties.DscpConfiguration", + "enable_accelerated_networking": "Description.Interface.Properties.EnableAcceleratedNetworking", + "enable_ip_forwarding": "Description.Interface.Properties.EnableIPForwarding", + "etag": "Description.Interface.Etag", + "hosted_workloads": "Description.Interface.Properties.HostedWorkloads", + "id": "Description.Interface.ID", + "internal_dns_name_label": "Description.Interface.Properties.DNSSettings.InternalDNSNameLabel", + "internal_domain_name_suffix": "Description.Interface.Properties.DNSSettings.InternalDomainNameSuffix", + "internal_fqdn": "Description.Interface.Properties.DNSSettings.InternalFqdn", + "ip_configurations": "Description.Interface.Properties.IPConfigurations", + "is_primary": "Description.Interface.Properties.Primary", + "mac_address": "Description.Interface.Properties.MacAddress", + "migration_phase": "Description.Interface.Properties.MigrationPhase", + "name": "Description.Interface.Name", + "network_security_group_id": "Description.Interface.Properties.NetworkSecurityGroup.ID", + "nic_type": "Description.Interface.Properties.NicType", + "private_endpoint": "Description.Interface.Properties.PrivateEndpoint", + "private_link_service": "Description.Interface.Properties.PrivateLinkService", + "provisioning_state": "Description.Interface.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "resource_guid": "Description.Interface.Properties.ResourceGUID", + "tags": "Description.Interface.Tags", + "tap_configurations": "Description.Interface.Properties.TapConfigurations", + "title": "Description.Interface.Name", + "type": "Description.Interface.Type", + "virtual_machine_id": "Description.Interface.Properties.VirtualMachine.ID", + "vnet_encryption_supported": "Description.Interface.Properties.VnetEncryptionSupported", + "workload_type": "Description.Interface.Properties.WorkloadType", } func ListNetworkInterface(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -12965,38 +10059,37 @@ func ListNetworkInterface(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy } var getNetworkInterfaceFilters = map[string]string{ - "applied_dns_servers": "description.Interface.Properties.DNSSettings.AppliedDNSServers", - "auxiliary_mode": "description.Interface.Properties.AuxiliaryMode", - "dns_servers": "description.Interface.Properties.DNSSettings.DNSServers", - "dscp_configuration": "description.Interface.Properties.DscpConfiguration", - "enable_accelerated_networking": "description.Interface.Properties.EnableAcceleratedNetworking", - "enable_ip_forwarding": "description.Interface.Properties.EnableIPForwarding", - "etag": "description.Interface.Etag", - "hosted_workloads": "description.Interface.Properties.HostedWorkloads", - "id": "description.Interface.ID", - "internal_dns_name_label": "description.Interface.Properties.DNSSettings.InternalDNSNameLabel", - "internal_domain_name_suffix": "description.Interface.Properties.DNSSettings.InternalDomainNameSuffix", - "internal_fqdn": "description.Interface.Properties.DNSSettings.InternalFqdn", - "ip_configurations": "description.Interface.Properties.IPConfigurations", - "is_primary": "description.Interface.Properties.Primary", - "og_account_id": "metadata.SourceID", - "mac_address": "description.Interface.Properties.MacAddress", - "migration_phase": "description.Interface.Properties.MigrationPhase", + "applied_dns_servers": "Description.Interface.Properties.DNSSettings.AppliedDNSServers", + "auxiliary_mode": "Description.Interface.Properties.AuxiliaryMode", + "dns_servers": "Description.Interface.Properties.DNSSettings.DNSServers", + "dscp_configuration": "Description.Interface.Properties.DscpConfiguration", + "enable_accelerated_networking": "Description.Interface.Properties.EnableAcceleratedNetworking", + "enable_ip_forwarding": "Description.Interface.Properties.EnableIPForwarding", + "etag": "Description.Interface.Etag", + "hosted_workloads": "Description.Interface.Properties.HostedWorkloads", + "id": "Description.Interface.ID", + "internal_dns_name_label": "Description.Interface.Properties.DNSSettings.InternalDNSNameLabel", + "internal_domain_name_suffix": "Description.Interface.Properties.DNSSettings.InternalDomainNameSuffix", + "internal_fqdn": "Description.Interface.Properties.DNSSettings.InternalFqdn", + "ip_configurations": "Description.Interface.Properties.IPConfigurations", + "is_primary": "Description.Interface.Properties.Primary", + "mac_address": "Description.Interface.Properties.MacAddress", + "migration_phase": "Description.Interface.Properties.MigrationPhase", "name": "description.Interface.name", - "network_security_group_id": "description.Interface.Properties.NetworkSecurityGroup.ID", - "nic_type": "description.Interface.Properties.NicType", - "private_endpoint": "description.Interface.Properties.PrivateEndpoint", - "private_link_service": "description.Interface.Properties.PrivateLinkService", - "provisioning_state": "description.Interface.Properties.ProvisioningState", + "network_security_group_id": "Description.Interface.Properties.NetworkSecurityGroup.ID", + "nic_type": "Description.Interface.Properties.NicType", + "private_endpoint": "Description.Interface.Properties.PrivateEndpoint", + "private_link_service": "Description.Interface.Properties.PrivateLinkService", + "provisioning_state": "Description.Interface.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", - "resource_guid": "description.Interface.Properties.ResourceGUID", - "tags": "description.Interface.Tags", - "tap_configurations": "description.Interface.Properties.TapConfigurations", - "title": "description.Interface.Name", - "type": "description.Interface.Type", - "virtual_machine_id": "description.Interface.Properties.VirtualMachine.ID", - "vnet_encryption_supported": "description.Interface.Properties.VnetEncryptionSupported", - "workload_type": "description.Interface.Properties.WorkloadType", + "resource_guid": "Description.Interface.Properties.ResourceGUID", + "tags": "Description.Interface.Tags", + "tap_configurations": "Description.Interface.Properties.TapConfigurations", + "title": "Description.Interface.Name", + "type": "Description.Interface.Type", + "virtual_machine_id": "Description.Interface.Properties.VirtualMachine.ID", + "vnet_encryption_supported": "Description.Interface.Properties.VnetEncryptionSupported", + "workload_type": "Description.Interface.Properties.WorkloadType", } func GetNetworkInterface(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -13057,72 +10150,14 @@ func GetNetworkInterface(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd // ========================== START: NetworkWatcherFlowLog ============================= type NetworkWatcherFlowLog struct { - Description azure.NetworkWatcherFlowLogDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *NetworkWatcherFlowLog) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.NetworkWatcherFlowLogDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.NetworkWatcherFlowLogDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type NetworkWatcherFlowLogHit struct { @@ -13193,25 +10228,24 @@ func (p NetworkWatcherFlowLogPaginator) NextPage(ctx context.Context) ([]Network } var listNetworkWatcherFlowLogFilters = map[string]string{ - "enabled": "description.FlowLog.Properties.Enabled", - "etag": "description.FlowLog.Etag", - "file_type": "description.FlowLog.Properties.Format.Type", - "id": "description.FlowLog.ID", - "og_account_id": "metadata.SourceID", - "name": "description.FlowLog.Name", - "network_watcher_name": "description.NetworkWatcherName", - "provisioning_state": "description.FlowLog.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "retention_policy_days": "description.FlowLog.Properties.RetentionPolicy.Days", - "retention_policy_enabled": "description.FlowLog.Properties.RetentionPolicy.Enabled", - "storage_id": "description.FlowLog.Properties.StorageID", - "tags": "description.FlowLog.Tags", - "target_resource_guid": "description.FlowLog.Properties.TargetResourceGUID", - "target_resource_id": "description.FlowLog.Properties.TargetResourceID", - "title": "description.FlowLog.Name", - "traffic_analytics": "description.FlowLog.Properties.FlowAnalyticsConfiguration.NetworkWatcherFlowAnalyticsConfiguration", - "type": "description.FlowLog.Type", - "version": "description.FlowLog.Properties.Format.Version", + "enabled": "Description.FlowLog.Properties.Enabled", + "etag": "Description.FlowLog.Etag", + "file_type": "Description.FlowLog.Properties.Format.Type", + "id": "Description.FlowLog.ID", + "name": "Description.FlowLog.Name", + "network_watcher_name": "Description.NetworkWatcherName", + "provisioning_state": "Description.FlowLog.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "retention_policy_days": "Description.FlowLog.Properties.RetentionPolicy.Days", + "retention_policy_enabled": "Description.FlowLog.Properties.RetentionPolicy.Enabled", + "storage_id": "Description.FlowLog.Properties.StorageID", + "tags": "Description.FlowLog.Tags", + "target_resource_guid": "Description.FlowLog.Properties.TargetResourceGUID", + "target_resource_id": "Description.FlowLog.Properties.TargetResourceID", + "title": "Description.FlowLog.Name", + "traffic_analytics": "Description.FlowLog.Properties.FlowAnalyticsConfiguration.NetworkWatcherFlowAnalyticsConfiguration", + "type": "Description.FlowLog.Type", + "version": "Description.FlowLog.Properties.Format.Version", } func ListNetworkWatcherFlowLog(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -13275,25 +10309,24 @@ func ListNetworkWatcherFlowLog(ctx context.Context, d *plugin.QueryData, _ *plug } var getNetworkWatcherFlowLogFilters = map[string]string{ - "enabled": "description.FlowLog.Properties.Enabled", - "etag": "description.FlowLog.Etag", - "file_type": "description.FlowLog.Properties.Format.Type", - "id": "description.FlowLog.ID", - "og_account_id": "metadata.SourceID", + "enabled": "Description.FlowLog.Properties.Enabled", + "etag": "Description.FlowLog.Etag", + "file_type": "Description.FlowLog.Properties.Format.Type", + "id": "Description.FlowLog.ID", "name": "description.ManagedCluster.name", "network_watcher_name": "description.NetworkWatcherName", - "provisioning_state": "description.FlowLog.Properties.ProvisioningState", + "provisioning_state": "Description.FlowLog.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", - "retention_policy_days": "description.FlowLog.Properties.RetentionPolicy.Days", - "retention_policy_enabled": "description.FlowLog.Properties.RetentionPolicy.Enabled", - "storage_id": "description.FlowLog.Properties.StorageID", - "tags": "description.FlowLog.Tags", - "target_resource_guid": "description.FlowLog.Properties.TargetResourceGUID", - "target_resource_id": "description.FlowLog.Properties.TargetResourceID", - "title": "description.FlowLog.Name", - "traffic_analytics": "description.FlowLog.Properties.FlowAnalyticsConfiguration.NetworkWatcherFlowAnalyticsConfiguration", - "type": "description.FlowLog.Type", - "version": "description.FlowLog.Properties.Format.Version", + "retention_policy_days": "Description.FlowLog.Properties.RetentionPolicy.Days", + "retention_policy_enabled": "Description.FlowLog.Properties.RetentionPolicy.Enabled", + "storage_id": "Description.FlowLog.Properties.StorageID", + "tags": "Description.FlowLog.Tags", + "target_resource_guid": "Description.FlowLog.Properties.TargetResourceGUID", + "target_resource_id": "Description.FlowLog.Properties.TargetResourceID", + "title": "Description.FlowLog.Name", + "traffic_analytics": "Description.FlowLog.Properties.FlowAnalyticsConfiguration.NetworkWatcherFlowAnalyticsConfiguration", + "type": "Description.FlowLog.Type", + "version": "Description.FlowLog.Properties.Format.Version", } func GetNetworkWatcherFlowLog(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -13354,72 +10387,14 @@ func GetNetworkWatcherFlowLog(ctx context.Context, d *plugin.QueryData, _ *plugi // ========================== START: RouteTables ============================= type RouteTables struct { - Description azure.RouteTablesDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *RouteTables) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.RouteTablesDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.RouteTablesDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type RouteTablesHit struct { @@ -13490,16 +10465,15 @@ func (p RouteTablesPaginator) NextPage(ctx context.Context) ([]RouteTables, erro } var listRouteTablesFilters = map[string]string{ - "disable_bgp_route_propagation": "description.RouteTable.Properties.DisableBgpRoutePropagation", - "etag": "description.RouteTable.Etag", - "og_account_id": "metadata.SourceID", - "name": "description.RouteTable.Name", - "provisioning_state": "description.RouteTable.Properties.ProvisioningState", - "routes": "description.RouteTable.Properties.Routes", - "subnets": "description.RouteTable.Properties.Subnets", - "tags": "description.RouteTable.Tags", - "title": "description.RouteTable.Name", - "type": "description.RouteTable.Type", + "disable_bgp_route_propagation": "Description.RouteTable.Properties.DisableBgpRoutePropagation", + "etag": "Description.RouteTable.Etag", + "name": "Description.RouteTable.Name", + "provisioning_state": "Description.RouteTable.Properties.ProvisioningState", + "routes": "Description.RouteTable.Properties.Routes", + "subnets": "Description.RouteTable.Properties.Subnets", + "tags": "Description.RouteTable.Tags", + "title": "Description.RouteTable.Name", + "type": "Description.RouteTable.Type", } func ListRouteTables(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -13563,17 +10537,16 @@ func ListRouteTables(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate } var getRouteTablesFilters = map[string]string{ - "disable_bgp_route_propagation": "description.RouteTable.Properties.DisableBgpRoutePropagation", - "etag": "description.RouteTable.Etag", - "og_account_id": "metadata.SourceID", + "disable_bgp_route_propagation": "Description.RouteTable.Properties.DisableBgpRoutePropagation", + "etag": "Description.RouteTable.Etag", "name": "description.RouteTable.Name", - "provisioning_state": "description.RouteTable.Properties.ProvisioningState", + "provisioning_state": "Description.RouteTable.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", - "routes": "description.RouteTable.Properties.Routes", - "subnets": "description.RouteTable.Properties.Subnets", - "tags": "description.RouteTable.Tags", - "title": "description.RouteTable.Name", - "type": "description.RouteTable.Type", + "routes": "Description.RouteTable.Properties.Routes", + "subnets": "Description.RouteTable.Properties.Subnets", + "tags": "Description.RouteTable.Tags", + "title": "Description.RouteTable.Name", + "type": "Description.RouteTable.Type", } func GetRouteTables(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -13634,72 +10607,14 @@ func GetRouteTables(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD // ========================== START: NetworkApplicationSecurityGroups ============================= type NetworkApplicationSecurityGroups struct { - Description azure.NetworkApplicationSecurityGroupsDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *NetworkApplicationSecurityGroups) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.NetworkApplicationSecurityGroupsDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.NetworkApplicationSecurityGroupsDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type NetworkApplicationSecurityGroupsHit struct { @@ -13770,15 +10685,14 @@ func (p NetworkApplicationSecurityGroupsPaginator) NextPage(ctx context.Context) } var listNetworkApplicationSecurityGroupsFilters = map[string]string{ - "etag": "description.ApplicationSecurityGroup.Etag", - "og_account_id": "metadata.SourceID", - "name": "description.ApplicationSecurityGroup.Name", - "provisioning_state": "description.ApplicationSecurityGroup.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "resource_guid": "description.ApplicationSecurityGroup.Properties.ResourceGUID", - "tags": "description.ApplicationSecurityGroup.Tags", - "title": "description.ApplicationSecurityGroup.Name", - "type": "description.ApplicationSecurityGroup.Type", + "etag": "Description.ApplicationSecurityGroup.Etag", + "name": "Description.ApplicationSecurityGroup.Name", + "provisioning_state": "Description.ApplicationSecurityGroup.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "resource_guid": "Description.ApplicationSecurityGroup.Properties.ResourceGUID", + "tags": "Description.ApplicationSecurityGroup.Tags", + "title": "Description.ApplicationSecurityGroup.Name", + "type": "Description.ApplicationSecurityGroup.Type", } func ListNetworkApplicationSecurityGroups(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -13842,15 +10756,14 @@ func ListNetworkApplicationSecurityGroups(ctx context.Context, d *plugin.QueryDa } var getNetworkApplicationSecurityGroupsFilters = map[string]string{ - "etag": "description.ApplicationSecurityGroup.Etag", - "og_account_id": "metadata.SourceID", + "etag": "Description.ApplicationSecurityGroup.Etag", "name": "description.ApplicationSecurityGroup.Name", - "provisioning_state": "description.ApplicationSecurityGroup.Properties.ProvisioningState", + "provisioning_state": "Description.ApplicationSecurityGroup.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", - "resource_guid": "description.ApplicationSecurityGroup.Properties.ResourceGUID", - "tags": "description.ApplicationSecurityGroup.Tags", - "title": "description.ApplicationSecurityGroup.Name", - "type": "description.ApplicationSecurityGroup.Type", + "resource_guid": "Description.ApplicationSecurityGroup.Properties.ResourceGUID", + "tags": "Description.ApplicationSecurityGroup.Tags", + "title": "Description.ApplicationSecurityGroup.Name", + "type": "Description.ApplicationSecurityGroup.Type", } func GetNetworkApplicationSecurityGroups(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -13911,72 +10824,14 @@ func GetNetworkApplicationSecurityGroups(ctx context.Context, d *plugin.QueryDat // ========================== START: NetworkAzureFirewall ============================= type NetworkAzureFirewall struct { - Description azure.NetworkAzureFirewallDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *NetworkAzureFirewall) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.NetworkAzureFirewallDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.NetworkAzureFirewallDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type NetworkAzureFirewallHit struct { @@ -14047,29 +10902,28 @@ func (p NetworkAzureFirewallPaginator) NextPage(ctx context.Context) ([]NetworkA } var listNetworkAzureFirewallFilters = map[string]string{ - "additional_properties": "description.AzureFirewall.Properties.AdditionalProperties", - "application_rule_collections": "description.AzureFirewall.Properties.ApplicationRuleCollections", - "availability_zones": "description.AzureFirewall.Zones", - "etag": "description.AzureFirewall.Etag", - "firewall_policy_id": "description.AzureFirewall.Properties.FirewallPolicy.ID", - "hub_private_ip_address": "description.AzureFirewall.Properties.HubIPAddresses.PrivateIPAddress", - "hub_public_ip_address_count": "description.AzureFirewall.Properties.HubIPAddresses.PublicIPs.Count", - "hub_public_ip_addresses": "description.AzureFirewall.Properties.HubIPAddresses.PublicIPs.Addresses", - "id": "description.AzureFirewall.ID", - "ip_groups": "description.AzureFirewall.Properties.IPGroups", - "og_account_id": "metadata.SourceID", - "name": "description.AzureFirewall.Name", - "nat_rule_collections": "description.AzureFirewall.Properties.NatRuleCollections", - "network_rule_collections": "description.AzureFirewall.Properties.NetworkRuleCollections", - "provisioning_state": "description.AzureFirewall.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "sku_name": "description.AzureFirewall.Properties.SKU.Name", - "sku_tier": "description.AzureFirewall.Properties.SKU.Tier", - "tags": "description.AzureFirewall.Tags", - "threat_intel_mode": "description.AzureFirewall.Properties.ThreatIntelMode", - "title": "description.AzureFirewall.Name", - "type": "description.AzureFirewall.Type", - "virtual_hub_id": "description.AzureFirewall.Properties.VirtualHub.ID", + "additional_properties": "Description.AzureFirewall.Properties.AdditionalProperties", + "application_rule_collections": "Description.AzureFirewall.Properties.ApplicationRuleCollections", + "availability_zones": "Description.AzureFirewall.Zones", + "etag": "Description.AzureFirewall.Etag", + "firewall_policy_id": "Description.AzureFirewall.Properties.FirewallPolicy.ID", + "hub_private_ip_address": "Description.AzureFirewall.Properties.HubIPAddresses.PrivateIPAddress", + "hub_public_ip_address_count": "Description.AzureFirewall.Properties.HubIPAddresses.PublicIPs.Count", + "hub_public_ip_addresses": "Description.AzureFirewall.Properties.HubIPAddresses.PublicIPs.Addresses", + "id": "Description.AzureFirewall.ID", + "ip_groups": "Description.AzureFirewall.Properties.IPGroups", + "name": "Description.AzureFirewall.Name", + "nat_rule_collections": "Description.AzureFirewall.Properties.NatRuleCollections", + "network_rule_collections": "Description.AzureFirewall.Properties.NetworkRuleCollections", + "provisioning_state": "Description.AzureFirewall.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "sku_name": "Description.AzureFirewall.Properties.SKU.Name", + "sku_tier": "Description.AzureFirewall.Properties.SKU.Tier", + "tags": "Description.AzureFirewall.Tags", + "threat_intel_mode": "Description.AzureFirewall.Properties.ThreatIntelMode", + "title": "Description.AzureFirewall.Name", + "type": "Description.AzureFirewall.Type", + "virtual_hub_id": "Description.AzureFirewall.Properties.VirtualHub.ID", } func ListNetworkAzureFirewall(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -14133,29 +10987,28 @@ func ListNetworkAzureFirewall(ctx context.Context, d *plugin.QueryData, _ *plugi } var getNetworkAzureFirewallFilters = map[string]string{ - "additional_properties": "description.AzureFirewall.Properties.AdditionalProperties", - "application_rule_collections": "description.AzureFirewall.Properties.ApplicationRuleCollections", - "availability_zones": "description.AzureFirewall.Zones", - "etag": "description.AzureFirewall.Etag", - "firewall_policy_id": "description.AzureFirewall.Properties.FirewallPolicy.ID", - "hub_private_ip_address": "description.AzureFirewall.Properties.HubIPAddresses.PrivateIPAddress", - "hub_public_ip_address_count": "description.AzureFirewall.Properties.HubIPAddresses.PublicIPs.Count", - "hub_public_ip_addresses": "description.AzureFirewall.Properties.HubIPAddresses.PublicIPs.Addresses", - "id": "description.AzureFirewall.ID", - "ip_groups": "description.AzureFirewall.Properties.IPGroups", - "og_account_id": "metadata.SourceID", + "additional_properties": "Description.AzureFirewall.Properties.AdditionalProperties", + "application_rule_collections": "Description.AzureFirewall.Properties.ApplicationRuleCollections", + "availability_zones": "Description.AzureFirewall.Zones", + "etag": "Description.AzureFirewall.Etag", + "firewall_policy_id": "Description.AzureFirewall.Properties.FirewallPolicy.ID", + "hub_private_ip_address": "Description.AzureFirewall.Properties.HubIPAddresses.PrivateIPAddress", + "hub_public_ip_address_count": "Description.AzureFirewall.Properties.HubIPAddresses.PublicIPs.Count", + "hub_public_ip_addresses": "Description.AzureFirewall.Properties.HubIPAddresses.PublicIPs.Addresses", + "id": "Description.AzureFirewall.ID", + "ip_groups": "Description.AzureFirewall.Properties.IPGroups", "name": "description.AzureFirewall.Name", - "nat_rule_collections": "description.AzureFirewall.Properties.NatRuleCollections", - "network_rule_collections": "description.AzureFirewall.Properties.NetworkRuleCollections", - "provisioning_state": "description.AzureFirewall.Properties.ProvisioningState", + "nat_rule_collections": "Description.AzureFirewall.Properties.NatRuleCollections", + "network_rule_collections": "Description.AzureFirewall.Properties.NetworkRuleCollections", + "provisioning_state": "Description.AzureFirewall.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", - "sku_name": "description.AzureFirewall.Properties.SKU.Name", - "sku_tier": "description.AzureFirewall.Properties.SKU.Tier", - "tags": "description.AzureFirewall.Tags", - "threat_intel_mode": "description.AzureFirewall.Properties.ThreatIntelMode", - "title": "description.AzureFirewall.Name", - "type": "description.AzureFirewall.Type", - "virtual_hub_id": "description.AzureFirewall.Properties.VirtualHub.ID", + "sku_name": "Description.AzureFirewall.Properties.SKU.Name", + "sku_tier": "Description.AzureFirewall.Properties.SKU.Tier", + "tags": "Description.AzureFirewall.Tags", + "threat_intel_mode": "Description.AzureFirewall.Properties.ThreatIntelMode", + "title": "Description.AzureFirewall.Name", + "type": "Description.AzureFirewall.Type", + "virtual_hub_id": "Description.AzureFirewall.Properties.VirtualHub.ID", } func GetNetworkAzureFirewall(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -14216,72 +11069,14 @@ func GetNetworkAzureFirewall(ctx context.Context, d *plugin.QueryData, _ *plugin // ========================== START: ExpressRouteCircuit ============================= type ExpressRouteCircuit struct { - Description azure.ExpressRouteCircuitDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *ExpressRouteCircuit) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.ExpressRouteCircuitDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.ExpressRouteCircuitDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type ExpressRouteCircuitHit struct { @@ -14352,28 +11147,27 @@ func (p ExpressRouteCircuitPaginator) NextPage(ctx context.Context) ([]ExpressRo } var listExpressRouteCircuitFilters = map[string]string{ - "allow_classic_operations": "description.ExpressRouteCircuit.Properties.AllowClassicOperations", - "authorizations": "description.ExpressRouteCircuit.Properties.Authorizations", - "bandwidth_in_gbps": "description.ExpressRouteCircuit.Properties.BandwidthInGbps", - "circuit_provisioning_state": "description.ExpressRouteCircuit.Properties.CircuitProvisioningState", - "etag": "description.ExpressRouteCircuit.Etag", - "express_route_port": "description.ExpressRouteCircuit.Properties.ExpressRoutePort", - "global_reach_enabled": "description.ExpressRouteCircuit.Properties.GlobalReachEnabled", - "id": "description.ExpressRouteCircuit.ID", - "og_account_id": "metadata.SourceID", - "name": "description.ExpressRouteCircuit.Name", - "peerings": "description.ExpressRouteCircuit.Properties.Peerings", - "provisioning_state": "description.ExpressRouteCircuit.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "service_key": "description.ExpressRouteCircuit.Properties.ServiceKey", - "service_provider_notes": "description.ExpressRouteCircuit.Properties.ServiceProviderNotes", - "service_provider_properties": "description.ExpressRouteCircuit.Properties.ServiceProviderProperties", - "service_provider_provisioning_state": "description.ExpressRouteCircuit.Properties.ServiceProviderProvisioningState", - "sku_family": "description.ExpressRouteCircuit.SKU.Family", - "sku_name": "description.ExpressRouteCircuit.SKU.Name", - "sku_tier": "description.ExpressRouteCircuit.SKU.Tier", - "tags": "description.ExpressRouteCircuit.Tags", - "title": "description.ExpressRouteCircuit.Name", + "allow_classic_operations": "Description.ExpressRouteCircuit.Properties.AllowClassicOperations", + "authorizations": "Description.ExpressRouteCircuit.Properties.Authorizations", + "bandwidth_in_gbps": "Description.ExpressRouteCircuit.Properties.BandwidthInGbps", + "circuit_provisioning_state": "Description.ExpressRouteCircuit.Properties.CircuitProvisioningState", + "etag": "Description.ExpressRouteCircuit.Etag", + "express_route_port": "Description.ExpressRouteCircuit.Properties.ExpressRoutePort", + "global_reach_enabled": "Description.ExpressRouteCircuit.Properties.GlobalReachEnabled", + "id": "Description.ExpressRouteCircuit.ID", + "name": "Description.ExpressRouteCircuit.Name", + "peerings": "Description.ExpressRouteCircuit.Properties.Peerings", + "provisioning_state": "Description.ExpressRouteCircuit.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "service_key": "Description.ExpressRouteCircuit.Properties.ServiceKey", + "service_provider_notes": "Description.ExpressRouteCircuit.Properties.ServiceProviderNotes", + "service_provider_properties": "Description.ExpressRouteCircuit.Properties.ServiceProviderProperties", + "service_provider_provisioning_state": "Description.ExpressRouteCircuit.Properties.ServiceProviderProvisioningState", + "sku_family": "Description.ExpressRouteCircuit.SKU.Family", + "sku_name": "Description.ExpressRouteCircuit.SKU.Name", + "sku_tier": "Description.ExpressRouteCircuit.SKU.Tier", + "tags": "Description.ExpressRouteCircuit.Tags", + "title": "Description.ExpressRouteCircuit.Name", } func ListExpressRouteCircuit(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -14437,28 +11231,27 @@ func ListExpressRouteCircuit(ctx context.Context, d *plugin.QueryData, _ *plugin } var getExpressRouteCircuitFilters = map[string]string{ - "allow_classic_operations": "description.ExpressRouteCircuit.Properties.AllowClassicOperations", - "authorizations": "description.ExpressRouteCircuit.Properties.Authorizations", - "bandwidth_in_gbps": "description.ExpressRouteCircuit.Properties.BandwidthInGbps", - "circuit_provisioning_state": "description.ExpressRouteCircuit.Properties.CircuitProvisioningState", - "etag": "description.ExpressRouteCircuit.Etag", - "express_route_port": "description.ExpressRouteCircuit.Properties.ExpressRoutePort", - "global_reach_enabled": "description.ExpressRouteCircuit.Properties.GlobalReachEnabled", - "id": "description.ExpressRouteCircuit.ID", - "og_account_id": "metadata.SourceID", + "allow_classic_operations": "Description.ExpressRouteCircuit.Properties.AllowClassicOperations", + "authorizations": "Description.ExpressRouteCircuit.Properties.Authorizations", + "bandwidth_in_gbps": "Description.ExpressRouteCircuit.Properties.BandwidthInGbps", + "circuit_provisioning_state": "Description.ExpressRouteCircuit.Properties.CircuitProvisioningState", + "etag": "Description.ExpressRouteCircuit.Etag", + "express_route_port": "Description.ExpressRouteCircuit.Properties.ExpressRoutePort", + "global_reach_enabled": "Description.ExpressRouteCircuit.Properties.GlobalReachEnabled", + "id": "Description.ExpressRouteCircuit.ID", "name": "description.ExpressRouteCircuit.name", - "peerings": "description.ExpressRouteCircuit.Properties.Peerings", - "provisioning_state": "description.ExpressRouteCircuit.Properties.ProvisioningState", + "peerings": "Description.ExpressRouteCircuit.Properties.Peerings", + "provisioning_state": "Description.ExpressRouteCircuit.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", - "service_key": "description.ExpressRouteCircuit.Properties.ServiceKey", - "service_provider_notes": "description.ExpressRouteCircuit.Properties.ServiceProviderNotes", - "service_provider_properties": "description.ExpressRouteCircuit.Properties.ServiceProviderProperties", - "service_provider_provisioning_state": "description.ExpressRouteCircuit.Properties.ServiceProviderProvisioningState", - "sku_family": "description.ExpressRouteCircuit.SKU.Family", - "sku_name": "description.ExpressRouteCircuit.SKU.Name", - "sku_tier": "description.ExpressRouteCircuit.SKU.Tier", - "tags": "description.ExpressRouteCircuit.Tags", - "title": "description.ExpressRouteCircuit.Name", + "service_key": "Description.ExpressRouteCircuit.Properties.ServiceKey", + "service_provider_notes": "Description.ExpressRouteCircuit.Properties.ServiceProviderNotes", + "service_provider_properties": "Description.ExpressRouteCircuit.Properties.ServiceProviderProperties", + "service_provider_provisioning_state": "Description.ExpressRouteCircuit.Properties.ServiceProviderProvisioningState", + "sku_family": "Description.ExpressRouteCircuit.SKU.Family", + "sku_name": "Description.ExpressRouteCircuit.SKU.Name", + "sku_tier": "Description.ExpressRouteCircuit.SKU.Tier", + "tags": "Description.ExpressRouteCircuit.Tags", + "title": "Description.ExpressRouteCircuit.Name", } func GetExpressRouteCircuit(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -14519,72 +11312,14 @@ func GetExpressRouteCircuit(ctx context.Context, d *plugin.QueryData, _ *plugin. // ========================== START: VirtualNetworkGateway ============================= type VirtualNetworkGateway struct { - Description azure.VirtualNetworkGatewayDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *VirtualNetworkGateway) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.VirtualNetworkGatewayDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.VirtualNetworkGatewayDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type VirtualNetworkGatewayHit struct { @@ -14655,33 +11390,32 @@ func (p VirtualNetworkGatewayPaginator) NextPage(ctx context.Context) ([]Virtual } var listVirtualNetworkGatewayFilters = map[string]string{ - "active_active": "description.VirtualNetworkGateway.Properties.Active", - "bgp_settings": "description.VirtualNetworkGateway.Properties.BgpSettings", - "custom_routes_address_prefixes": "description.VirtualNetworkGateway.Properties.CustomRoutes.AddressPrefixes", - "enable_bgp": "description.VirtualNetworkGateway.Properties.EnableBgp", - "enable_dns_forwarding": "description.VirtualNetworkGateway.Properties.EnableDNSForwarding", - "enable_private_ip_address": "description.VirtualNetworkGateway.Properties.EnablePrivateIPAddress", - "etag": "description.VirtualNetworkGateway.Etag", - "gateway_connections": "description.VirtualNetworkGatewayConnection", - "gateway_default_site": "description.VirtualNetworkGateway.Properties.GatewayDefaultSite.ID", - "gateway_type": "description.VirtualNetworkGateway.Properties.GatewayType", - "id": "description.VirtualNetworkGateway.ID", - "inbound_dns_forwarding_endpoint": "description.VirtualNetworkGateway.Properties.InboundDNSForwardingEndpoint", - "ip_configurations": "description.VirtualNetworkGateway.Properties.IPConfigurations", - "og_account_id": "metadata.SourceID", - "name": "description.VirtualNetworkGateway.Name", - "provisioning_state": "description.VirtualNetworkGateway.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "resource_guid": "description.VirtualNetworkGateway.Properties.ResourceGUID", - "sku_capacity": "description.VirtualNetworkGateway.Properties.SKU.Capacity", - "sku_name": "description.VirtualNetworkGateway.Properties.SKU.Name", - "sku_tier": "description.VirtualNetworkGateway.Properties.SKU.Tier", - "tags": "description.VirtualNetworkGateway.Tags", - "title": "description.VirtualNetworkGateway.Name", - "type": "description.VirtualNetworkGateway.Type", - "vpn_client_configuration": "description.VirtualNetworkGateway.Properties.VPNClientConfiguration", - "vpn_gateway_generation": "description.VirtualNetworkGateway.Properties.VPNGatewayGeneration", - "vpn_type": "description.VirtualNetworkGateway.Properties.VPNType", + "active_active": "Description.VirtualNetworkGateway.Properties.Active", + "bgp_settings": "Description.VirtualNetworkGateway.Properties.BgpSettings", + "custom_routes_address_prefixes": "Description.VirtualNetworkGateway.Properties.CustomRoutes.AddressPrefixes", + "enable_bgp": "Description.VirtualNetworkGateway.Properties.EnableBgp", + "enable_dns_forwarding": "Description.VirtualNetworkGateway.Properties.EnableDNSForwarding", + "enable_private_ip_address": "Description.VirtualNetworkGateway.Properties.EnablePrivateIPAddress", + "etag": "Description.VirtualNetworkGateway.Etag", + "gateway_connections": "Description.VirtualNetworkGatewayConnection", + "gateway_default_site": "Description.VirtualNetworkGateway.Properties.GatewayDefaultSite.ID", + "gateway_type": "Description.VirtualNetworkGateway.Properties.GatewayType", + "id": "Description.VirtualNetworkGateway.ID", + "inbound_dns_forwarding_endpoint": "Description.VirtualNetworkGateway.Properties.InboundDNSForwardingEndpoint", + "ip_configurations": "Description.VirtualNetworkGateway.Properties.IPConfigurations", + "name": "Description.VirtualNetworkGateway.Name", + "provisioning_state": "Description.VirtualNetworkGateway.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "resource_guid": "Description.VirtualNetworkGateway.Properties.ResourceGUID", + "sku_capacity": "Description.VirtualNetworkGateway.Properties.SKU.Capacity", + "sku_name": "Description.VirtualNetworkGateway.Properties.SKU.Name", + "sku_tier": "Description.VirtualNetworkGateway.Properties.SKU.Tier", + "tags": "Description.VirtualNetworkGateway.Tags", + "title": "Description.VirtualNetworkGateway.Name", + "type": "Description.VirtualNetworkGateway.Type", + "vpn_client_configuration": "Description.VirtualNetworkGateway.Properties.VPNClientConfiguration", + "vpn_gateway_generation": "Description.VirtualNetworkGateway.Properties.VPNGatewayGeneration", + "vpn_type": "Description.VirtualNetworkGateway.Properties.VPNType", } func ListVirtualNetworkGateway(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -14745,33 +11479,32 @@ func ListVirtualNetworkGateway(ctx context.Context, d *plugin.QueryData, _ *plug } var getVirtualNetworkGatewayFilters = map[string]string{ - "active_active": "description.VirtualNetworkGateway.Properties.Active", - "bgp_settings": "description.VirtualNetworkGateway.Properties.BgpSettings", - "custom_routes_address_prefixes": "description.VirtualNetworkGateway.Properties.CustomRoutes.AddressPrefixes", - "enable_bgp": "description.VirtualNetworkGateway.Properties.EnableBgp", - "enable_dns_forwarding": "description.VirtualNetworkGateway.Properties.EnableDNSForwarding", - "enable_private_ip_address": "description.VirtualNetworkGateway.Properties.EnablePrivateIPAddress", - "etag": "description.VirtualNetworkGateway.Etag", - "gateway_connections": "description.VirtualNetworkGatewayConnection", - "gateway_default_site": "description.VirtualNetworkGateway.Properties.GatewayDefaultSite.ID", - "gateway_type": "description.VirtualNetworkGateway.Properties.GatewayType", - "id": "description.VirtualNetworkGateway.ID", - "inbound_dns_forwarding_endpoint": "description.VirtualNetworkGateway.Properties.InboundDNSForwardingEndpoint", - "ip_configurations": "description.VirtualNetworkGateway.Properties.IPConfigurations", - "og_account_id": "metadata.SourceID", + "active_active": "Description.VirtualNetworkGateway.Properties.Active", + "bgp_settings": "Description.VirtualNetworkGateway.Properties.BgpSettings", + "custom_routes_address_prefixes": "Description.VirtualNetworkGateway.Properties.CustomRoutes.AddressPrefixes", + "enable_bgp": "Description.VirtualNetworkGateway.Properties.EnableBgp", + "enable_dns_forwarding": "Description.VirtualNetworkGateway.Properties.EnableDNSForwarding", + "enable_private_ip_address": "Description.VirtualNetworkGateway.Properties.EnablePrivateIPAddress", + "etag": "Description.VirtualNetworkGateway.Etag", + "gateway_connections": "Description.VirtualNetworkGatewayConnection", + "gateway_default_site": "Description.VirtualNetworkGateway.Properties.GatewayDefaultSite.ID", + "gateway_type": "Description.VirtualNetworkGateway.Properties.GatewayType", + "id": "Description.VirtualNetworkGateway.ID", + "inbound_dns_forwarding_endpoint": "Description.VirtualNetworkGateway.Properties.InboundDNSForwardingEndpoint", + "ip_configurations": "Description.VirtualNetworkGateway.Properties.IPConfigurations", "name": "description.VirtualNetworkGateway.Name", - "provisioning_state": "description.VirtualNetworkGateway.Properties.ProvisioningState", + "provisioning_state": "Description.VirtualNetworkGateway.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", - "resource_guid": "description.VirtualNetworkGateway.Properties.ResourceGUID", - "sku_capacity": "description.VirtualNetworkGateway.Properties.SKU.Capacity", - "sku_name": "description.VirtualNetworkGateway.Properties.SKU.Name", - "sku_tier": "description.VirtualNetworkGateway.Properties.SKU.Tier", - "tags": "description.VirtualNetworkGateway.Tags", - "title": "description.VirtualNetworkGateway.Name", - "type": "description.VirtualNetworkGateway.Type", - "vpn_client_configuration": "description.VirtualNetworkGateway.Properties.VPNClientConfiguration", - "vpn_gateway_generation": "description.VirtualNetworkGateway.Properties.VPNGatewayGeneration", - "vpn_type": "description.VirtualNetworkGateway.Properties.VPNType", + "resource_guid": "Description.VirtualNetworkGateway.Properties.ResourceGUID", + "sku_capacity": "Description.VirtualNetworkGateway.Properties.SKU.Capacity", + "sku_name": "Description.VirtualNetworkGateway.Properties.SKU.Name", + "sku_tier": "Description.VirtualNetworkGateway.Properties.SKU.Tier", + "tags": "Description.VirtualNetworkGateway.Tags", + "title": "Description.VirtualNetworkGateway.Name", + "type": "Description.VirtualNetworkGateway.Type", + "vpn_client_configuration": "Description.VirtualNetworkGateway.Properties.VPNClientConfiguration", + "vpn_gateway_generation": "Description.VirtualNetworkGateway.Properties.VPNGatewayGeneration", + "vpn_type": "Description.VirtualNetworkGateway.Properties.VPNType", } func GetVirtualNetworkGateway(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -14832,72 +11565,14 @@ func GetVirtualNetworkGateway(ctx context.Context, d *plugin.QueryData, _ *plugi // ========================== START: FirewallPolicy ============================= type FirewallPolicy struct { - Description azure.FirewallPolicyDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *FirewallPolicy) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.FirewallPolicyDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.FirewallPolicyDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type FirewallPolicyHit struct { @@ -14968,28 +11643,27 @@ func (p FirewallPolicyPaginator) NextPage(ctx context.Context) ([]FirewallPolicy } var listFirewallPolicyFilters = map[string]string{ - "base_policy": "description.FirewallPolicy.Properties.BasePolicy", - "child_policies": "description.FirewallPolicy.Properties.ChildPolicies", - "dns_settings": "description.FirewallPolicy.Properties.DNSSettings", - "etag": "description.FirewallPolicy.Etag", - "firewalls": "description.FirewallPolicy.Properties.Firewalls", - "id": "description.FirewallPolicy.ID", - "identity": "description.FirewallPolicy.Identity", - "intrusion_detection_configuration": "description.FirewallPolicy.Properties.IntrusionDetection.Configuration", - "intrusion_detection_mode": "description.FirewallPolicy.Properties.IntrusionDetection.Mode", - "og_account_id": "metadata.SourceID", - "name": "description.FirewallPolicy.Name", - "provisioning_state": "description.FirewallPolicy.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "rule_collection_groups": "description.FirewallPolicy.Properties.RuleCollectionGroups", - "sku_tier": "description.FirewallPolicy.Properties.SKU.Tier", - "tags": "description.FirewallPolicy.Tags", - "threat_intel_mode": "description.FirewallPolicy.Properties.ThreatIntelMode", - "threat_intel_whitelist_fqdns": "description.FirewallPolicy.Properties.ThreatIntelWhitelist.Fqdns", - "threat_intel_whitelist_ip_addresses": "description.FirewallPolicy.Properties.ThreatIntelWhitelist.IPAddresses", - "title": "description.FirewallPolicy.Name", - "transport_security_certificate_authority": "description.FirewallPolicy.Properties.TransportSecurity.CertificateAuthority", - "type": "description.FirewallPolicy.Type", + "base_policy": "Description.FirewallPolicy.Properties.BasePolicy", + "child_policies": "Description.FirewallPolicy.Properties.ChildPolicies", + "dns_settings": "Description.FirewallPolicy.Properties.DNSSettings", + "etag": "Description.FirewallPolicy.Etag", + "firewalls": "Description.FirewallPolicy.Properties.Firewalls", + "id": "Description.FirewallPolicy.ID", + "identity": "Description.FirewallPolicy.Identity", + "intrusion_detection_configuration": "Description.FirewallPolicy.Properties.IntrusionDetection.Configuration", + "intrusion_detection_mode": "Description.FirewallPolicy.Properties.IntrusionDetection.Mode", + "name": "Description.FirewallPolicy.Name", + "provisioning_state": "Description.FirewallPolicy.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "rule_collection_groups": "Description.FirewallPolicy.Properties.RuleCollectionGroups", + "sku_tier": "Description.FirewallPolicy.Properties.SKU.Tier", + "tags": "Description.FirewallPolicy.Tags", + "threat_intel_mode": "Description.FirewallPolicy.Properties.ThreatIntelMode", + "threat_intel_whitelist_fqdns": "Description.FirewallPolicy.Properties.ThreatIntelWhitelist.Fqdns", + "threat_intel_whitelist_ip_addresses": "Description.FirewallPolicy.Properties.ThreatIntelWhitelist.IPAddresses", + "title": "Description.FirewallPolicy.Name", + "transport_security_certificate_authority": "Description.FirewallPolicy.Properties.TransportSecurity.CertificateAuthority", + "type": "Description.FirewallPolicy.Type", } func ListFirewallPolicy(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -15053,28 +11727,27 @@ func ListFirewallPolicy(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr } var getFirewallPolicyFilters = map[string]string{ - "base_policy": "description.FirewallPolicy.Properties.BasePolicy", - "child_policies": "description.FirewallPolicy.Properties.ChildPolicies", - "dns_settings": "description.FirewallPolicy.Properties.DNSSettings", - "etag": "description.FirewallPolicy.Etag", - "firewalls": "description.FirewallPolicy.Properties.Firewalls", - "id": "description.FirewallPolicy.ID", - "identity": "description.FirewallPolicy.Identity", - "intrusion_detection_configuration": "description.FirewallPolicy.Properties.IntrusionDetection.Configuration", - "intrusion_detection_mode": "description.FirewallPolicy.Properties.IntrusionDetection.Mode", - "og_account_id": "metadata.SourceID", + "base_policy": "Description.FirewallPolicy.Properties.BasePolicy", + "child_policies": "Description.FirewallPolicy.Properties.ChildPolicies", + "dns_settings": "Description.FirewallPolicy.Properties.DNSSettings", + "etag": "Description.FirewallPolicy.Etag", + "firewalls": "Description.FirewallPolicy.Properties.Firewalls", + "id": "Description.FirewallPolicy.ID", + "identity": "Description.FirewallPolicy.Identity", + "intrusion_detection_configuration": "Description.FirewallPolicy.Properties.IntrusionDetection.Configuration", + "intrusion_detection_mode": "Description.FirewallPolicy.Properties.IntrusionDetection.Mode", "name": "description.FirewallPolicy.Name", - "provisioning_state": "description.FirewallPolicy.Properties.ProvisioningState", + "provisioning_state": "Description.FirewallPolicy.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", - "rule_collection_groups": "description.FirewallPolicy.Properties.RuleCollectionGroups", - "sku_tier": "description.FirewallPolicy.Properties.SKU.Tier", - "tags": "description.FirewallPolicy.Tags", - "threat_intel_mode": "description.FirewallPolicy.Properties.ThreatIntelMode", - "threat_intel_whitelist_fqdns": "description.FirewallPolicy.Properties.ThreatIntelWhitelist.Fqdns", - "threat_intel_whitelist_ip_addresses": "description.FirewallPolicy.Properties.ThreatIntelWhitelist.IPAddresses", - "title": "description.FirewallPolicy.Name", - "transport_security_certificate_authority": "description.FirewallPolicy.Properties.TransportSecurity.CertificateAuthority", - "type": "description.FirewallPolicy.Type", + "rule_collection_groups": "Description.FirewallPolicy.Properties.RuleCollectionGroups", + "sku_tier": "Description.FirewallPolicy.Properties.SKU.Tier", + "tags": "Description.FirewallPolicy.Tags", + "threat_intel_mode": "Description.FirewallPolicy.Properties.ThreatIntelMode", + "threat_intel_whitelist_fqdns": "Description.FirewallPolicy.Properties.ThreatIntelWhitelist.Fqdns", + "threat_intel_whitelist_ip_addresses": "Description.FirewallPolicy.Properties.ThreatIntelWhitelist.IPAddresses", + "title": "Description.FirewallPolicy.Name", + "transport_security_certificate_authority": "Description.FirewallPolicy.Properties.TransportSecurity.CertificateAuthority", + "type": "Description.FirewallPolicy.Type", } func GetFirewallPolicy(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -15135,72 +11808,14 @@ func GetFirewallPolicy(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra // ========================== START: LocalNetworkGateway ============================= type LocalNetworkGateway struct { - Description azure.LocalNetworkGatewayDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *LocalNetworkGateway) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.LocalNetworkGatewayDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.LocalNetworkGatewayDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type LocalNetworkGatewayHit struct { @@ -15271,11 +11886,10 @@ func (p LocalNetworkGatewayPaginator) NextPage(ctx context.Context) ([]LocalNetw } var listLocalNetworkGatewayFilters = map[string]string{ - "id": "description.LocalNetworkGateways.ID", - "og_account_id": "metadata.SourceID", - "name": "description.LocalNetworkGateway.Name", - "tags": "description.LocalNetworkGateway.Tags", - "title": "description.LocalNetworkGateway.Name", + "id": "Description.LocalNetworkGateways.ID", + "name": "Description.LocalNetworkGateway.Name", + "tags": "Description.LocalNetworkGateway.Tags", + "title": "Description.LocalNetworkGateway.Name", } func ListLocalNetworkGateway(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -15339,12 +11953,11 @@ func ListLocalNetworkGateway(ctx context.Context, d *plugin.QueryData, _ *plugin } var getLocalNetworkGatewayFilters = map[string]string{ - "id": "description.LocalNetworkGateways.ID", - "og_account_id": "metadata.SourceID", + "id": "Description.LocalNetworkGateways.ID", "name": "description.LocalNetworkGateway.Name", "resource_group": "description.ResourceGroup", - "tags": "description.LocalNetworkGateway.Tags", - "title": "description.LocalNetworkGateway.Name", + "tags": "Description.LocalNetworkGateway.Tags", + "title": "Description.LocalNetworkGateway.Name", } func GetLocalNetworkGateway(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -15405,72 +12018,14 @@ func GetLocalNetworkGateway(ctx context.Context, d *plugin.QueryData, _ *plugin. // ========================== START: NatGateway ============================= type NatGateway struct { - Description azure.NatGatewayDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *NatGateway) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.NatGatewayDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.NatGatewayDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type NatGatewayHit struct { @@ -15541,16 +12096,15 @@ func (p NatGatewayPaginator) NextPage(ctx context.Context) ([]NatGateway, error) } var listNatGatewayFilters = map[string]string{ - "etag": "description.NatGateway.Etag", - "id": "description.NatGateway.ID", - "og_account_id": "metadata.SourceID", - "name": "description.NatGateway.Name", - "resource_group": "description.ResourceGroup", - "sku_name": "description.NatGateway.SKU.Name", - "tags": "description.NatGateway.Tags", - "title": "description.NatGateway.Name", - "type": "description.NatGateway.Type", - "zones": "description.NatGateway.Zones", + "etag": "Description.NatGateway.Etag", + "id": "Description.NatGateway.ID", + "name": "Description.NatGateway.Name", + "resource_group": "Description.ResourceGroup", + "sku_name": "Description.NatGateway.SKU.Name", + "tags": "Description.NatGateway.Tags", + "title": "Description.NatGateway.Name", + "type": "Description.NatGateway.Type", + "zones": "Description.NatGateway.Zones", } func ListNatGateway(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -15614,16 +12168,15 @@ func ListNatGateway(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD } var getNatGatewayFilters = map[string]string{ - "etag": "description.NatGateway.Etag", - "id": "description.NatGateway.ID", - "og_account_id": "metadata.SourceID", + "etag": "Description.NatGateway.Etag", + "id": "Description.NatGateway.ID", "name": "description.NatGateway.Name", "resource_group": "description.ResourceGroup", - "sku_name": "description.NatGateway.SKU.Name", - "tags": "description.NatGateway.Tags", - "title": "description.NatGateway.Name", - "type": "description.NatGateway.Type", - "zones": "description.NatGateway.Zones", + "sku_name": "Description.NatGateway.SKU.Name", + "tags": "Description.NatGateway.Tags", + "title": "Description.NatGateway.Name", + "type": "Description.NatGateway.Type", + "zones": "Description.NatGateway.Zones", } func GetNatGateway(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -15684,72 +12237,14 @@ func GetNatGateway(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDa // ========================== START: PrivateLinkService ============================= type PrivateLinkService struct { - Description azure.PrivateLinkServiceDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *PrivateLinkService) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.PrivateLinkServiceDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.PrivateLinkServiceDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type PrivateLinkServiceHit struct { @@ -15820,11 +12315,10 @@ func (p PrivateLinkServicePaginator) NextPage(ctx context.Context) ([]PrivateLin } var listPrivateLinkServiceFilters = map[string]string{ - "id": "description.PrivateLinkServices.ID", - "og_account_id": "metadata.SourceID", - "name": "description.PrivateLinkService.Name", - "tags": "description.PrivateLinkService.Tags", - "title": "description.PrivateLinkService.Name", + "id": "Description.PrivateLinkServices.ID", + "name": "Description.PrivateLinkService.Name", + "tags": "Description.PrivateLinkService.Tags", + "title": "Description.PrivateLinkService.Name", } func ListPrivateLinkService(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -15888,12 +12382,11 @@ func ListPrivateLinkService(ctx context.Context, d *plugin.QueryData, _ *plugin. } var getPrivateLinkServiceFilters = map[string]string{ - "id": "description.PrivateLinkServices.ID", - "og_account_id": "metadata.SourceID", + "id": "Description.PrivateLinkServices.ID", "name": "description.PrivateLinkService.Name", "resource_group": "description.ResourceGroup", - "tags": "description.PrivateLinkService.Tags", - "title": "description.PrivateLinkService.Name", + "tags": "Description.PrivateLinkService.Tags", + "title": "Description.PrivateLinkService.Name", } func GetPrivateLinkService(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -15954,72 +12447,14 @@ func GetPrivateLinkService(ctx context.Context, d *plugin.QueryData, _ *plugin.H // ========================== START: VpnGateway ============================= type VpnGateway struct { - Description azure.VpnGatewayDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *VpnGateway) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.VpnGatewayDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.VpnGatewayDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type VpnGatewayHit struct { @@ -16090,11 +12525,10 @@ func (p VpnGatewayPaginator) NextPage(ctx context.Context) ([]VpnGateway, error) } var listVpnGatewayFilters = map[string]string{ - "id": "description.VPNGateways.ID", - "og_account_id": "metadata.SourceID", - "name": "description.VpnGateway.Name", - "tags": "description.VpnGateway.Tags", - "title": "description.VpnGateway.Name", + "id": "Description.VPNGateways.ID", + "name": "Description.VpnGateway.Name", + "tags": "Description.VpnGateway.Tags", + "title": "Description.VpnGateway.Name", } func ListVpnGateway(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -16158,12 +12592,11 @@ func ListVpnGateway(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD } var getVpnGatewayFilters = map[string]string{ - "id": "description.VPNGateways.ID", - "og_account_id": "metadata.SourceID", + "id": "Description.VPNGateways.ID", "name": "description.VpnGateway.Name", "resource_group": "description.ResourceGroup", - "tags": "description.VpnGateway.Tags", - "title": "description.VpnGateway.Name", + "tags": "Description.VpnGateway.Tags", + "title": "Description.VpnGateway.Name", } func GetVpnGateway(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -16224,72 +12657,14 @@ func GetVpnGateway(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDa // ========================== START: VpnGatewayVpnConnection ============================= type VpnGatewayVpnConnection struct { - Description azure.VpnGatewayVpnConnectionDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *VpnGatewayVpnConnection) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.VpnGatewayVpnConnectionDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.VpnGatewayVpnConnectionDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type VpnGatewayVpnConnectionHit struct { @@ -16360,11 +12735,10 @@ func (p VpnGatewayVpnConnectionPaginator) NextPage(ctx context.Context) ([]VpnGa } var listVpnGatewayVpnConnectionFilters = map[string]string{ - "id": "description.VPNConnections.ID", - "og_account_id": "metadata.SourceID", - "name": "description.VpnConnection.Name", - "tags": "description.VpnConnection.Etag", - "title": "description.VpnConnection.Name", + "id": "Description.VPNConnections.ID", + "name": "Description.VpnConnection.Name", + "tags": "Description.VpnConnection.Etag", + "title": "Description.VpnConnection.Name", } func ListVpnGatewayVpnConnection(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -16428,11 +12802,10 @@ func ListVpnGatewayVpnConnection(ctx context.Context, d *plugin.QueryData, _ *pl } var getVpnGatewayVpnConnectionFilters = map[string]string{ - "id": "description.VPNConnections.ID", - "og_account_id": "metadata.SourceID", - "name": "description.VpnConnection.Name", - "tags": "description.VpnConnection.Etag", - "title": "description.VpnConnection.Name", + "id": "Description.VPNConnections.ID", + "name": "Description.VpnConnection.Name", + "tags": "Description.VpnConnection.Etag", + "title": "Description.VpnConnection.Name", } func GetVpnGatewayVpnConnection(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -16493,72 +12866,14 @@ func GetVpnGatewayVpnConnection(ctx context.Context, d *plugin.QueryData, _ *plu // ========================== START: VpnSite ============================= type VpnSite struct { - Description azure.VpnSiteDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *VpnSite) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.VpnSiteDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.VpnSiteDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type VpnSiteHit struct { @@ -16629,11 +12944,10 @@ func (p VpnSitePaginator) NextPage(ctx context.Context) ([]VpnSite, error) { } var listVpnSiteFilters = map[string]string{ - "id": "description.VPNSites.ID", - "og_account_id": "metadata.SourceID", - "name": "description.VpnSite.Name", - "tags": "description.VpnSite.Tags", - "title": "description.VpnSite.Name", + "id": "Description.VPNSites.ID", + "name": "Description.VpnSite.Name", + "tags": "Description.VpnSite.Tags", + "title": "Description.VpnSite.Name", } func ListVpnSite(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -16697,11 +13011,10 @@ func ListVpnSite(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData } var getVpnSiteFilters = map[string]string{ - "id": "description.VPNSites.ID", - "og_account_id": "metadata.SourceID", - "name": "description.VpnSite.Name", - "tags": "description.VpnSite.Tags", - "title": "description.VpnSite.Name", + "id": "Description.VPNSites.ID", + "name": "Description.VpnSite.Name", + "tags": "Description.VpnSite.Tags", + "title": "Description.VpnSite.Name", } func GetVpnSite(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -16762,72 +13075,14 @@ func GetVpnSite(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) // ========================== START: PublicIPAddress ============================= type PublicIPAddress struct { - Description azure.PublicIPAddressDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *PublicIPAddress) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.PublicIPAddressDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.PublicIPAddressDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type PublicIPAddressHit struct { @@ -16898,31 +13153,30 @@ func (p PublicIPAddressPaginator) NextPage(ctx context.Context) ([]PublicIPAddre } var listPublicIPAddressFilters = map[string]string{ - "ddos_custom_policy_id": "description.PublicIPAddress.Properties.DdosSettings.DdosCustomPolicy.ID", - "ddos_settings_protected_ip": "description.PublicIPAddress.Properties.DdosSettings.ProtectedIP", - "ddos_settings_protection_coverage": "description.PublicIPAddress.Properties.DdosSettings.ProtectionCoverage", - "dns_settings_domain_name_label": "description.PublicIPAddress.Properties.DNSSettings.DomainNameLabel", - "dns_settings_fqdn": "description.PublicIPAddress.Properties.DNSSettings.Fqdn", - "dns_settings_reverse_fqdn": "description.PublicIPAddress.Properties.DNSSettings.ReverseFqdn", - "etag": "description.PublicIPAddress.Etag", - "id": "description.PublicIPAddress.ID", - "idle_timeout_in_minutes": "description.PublicIPAddress.Properties.IdleTimeoutInMinutes", - "ip_address": "description.PublicIPAddress.Properties.IPAddress", - "ip_configuration_id": "description.PublicIPAddress.Properties.IPConfiguration.ID", - "ip_tags": "description.PublicIPAddress.PublicIPAddressPropertiesFormat.IPTags", - "og_account_id": "metadata.SourceID", - "name": "description.PublicIPAddress.Name", - "provisioning_state": "description.PublicIPAddress.Properties.ProvisioningState", - "public_ip_address_version": "description.PublicIPAddress.Properties.PublicIPAddressVersion", - "public_ip_allocation_method": "description.PublicIPAddress.Properties.PublicIPAllocationMethod", - "public_ip_prefix_id": "description.PublicIPAddress.Properties.PublicIPPrefix.ID", - "resource_group": "description.ResourceGroup", - "resource_guid": "description.PublicIPAddress.Properties.ResourceGUID", - "sku_name": "description.PublicIPAddress.SKU.Name", - "tags": "description.PublicIPAddress.Tags", - "title": "description.PublicIPAddress.Name", - "type": "description.PublicIPAddress.Type", - "zones": "description.PublicIPAddress.Zones", + "ddos_custom_policy_id": "Description.PublicIPAddress.Properties.DdosSettings.DdosCustomPolicy.ID", + "ddos_settings_protected_ip": "Description.PublicIPAddress.Properties.DdosSettings.ProtectedIP", + "ddos_settings_protection_coverage": "Description.PublicIPAddress.Properties.DdosSettings.ProtectionCoverage", + "dns_settings_domain_name_label": "Description.PublicIPAddress.Properties.DNSSettings.DomainNameLabel", + "dns_settings_fqdn": "Description.PublicIPAddress.Properties.DNSSettings.Fqdn", + "dns_settings_reverse_fqdn": "Description.PublicIPAddress.Properties.DNSSettings.ReverseFqdn", + "etag": "Description.PublicIPAddress.Etag", + "id": "Description.PublicIPAddress.ID", + "idle_timeout_in_minutes": "Description.PublicIPAddress.Properties.IdleTimeoutInMinutes", + "ip_address": "Description.PublicIPAddress.Properties.IPAddress", + "ip_configuration_id": "Description.PublicIPAddress.Properties.IPConfiguration.ID", + "ip_tags": "Description.PublicIPAddress.PublicIPAddressPropertiesFormat.IPTags", + "name": "Description.PublicIPAddress.Name", + "provisioning_state": "Description.PublicIPAddress.Properties.ProvisioningState", + "public_ip_address_version": "Description.PublicIPAddress.Properties.PublicIPAddressVersion", + "public_ip_allocation_method": "Description.PublicIPAddress.Properties.PublicIPAllocationMethod", + "public_ip_prefix_id": "Description.PublicIPAddress.Properties.PublicIPPrefix.ID", + "resource_group": "Description.ResourceGroup", + "resource_guid": "Description.PublicIPAddress.Properties.ResourceGUID", + "sku_name": "Description.PublicIPAddress.SKU.Name", + "tags": "Description.PublicIPAddress.Tags", + "title": "Description.PublicIPAddress.Name", + "type": "Description.PublicIPAddress.Type", + "zones": "Description.PublicIPAddress.Zones", } func ListPublicIPAddress(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -16986,31 +13240,30 @@ func ListPublicIPAddress(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd } var getPublicIPAddressFilters = map[string]string{ - "ddos_custom_policy_id": "description.PublicIPAddress.Properties.DdosSettings.DdosCustomPolicy.ID", - "ddos_settings_protected_ip": "description.PublicIPAddress.Properties.DdosSettings.ProtectedIP", - "ddos_settings_protection_coverage": "description.PublicIPAddress.Properties.DdosSettings.ProtectionCoverage", - "dns_settings_domain_name_label": "description.PublicIPAddress.Properties.DNSSettings.DomainNameLabel", - "dns_settings_fqdn": "description.PublicIPAddress.Properties.DNSSettings.Fqdn", - "dns_settings_reverse_fqdn": "description.PublicIPAddress.Properties.DNSSettings.ReverseFqdn", - "etag": "description.PublicIPAddress.Etag", - "id": "description.PublicIPAddress.ID", - "idle_timeout_in_minutes": "description.PublicIPAddress.Properties.IdleTimeoutInMinutes", - "ip_address": "description.PublicIPAddress.Properties.IPAddress", - "ip_configuration_id": "description.PublicIPAddress.Properties.IPConfiguration.ID", - "ip_tags": "description.PublicIPAddress.PublicIPAddressPropertiesFormat.IPTags", - "og_account_id": "metadata.SourceID", + "ddos_custom_policy_id": "Description.PublicIPAddress.Properties.DdosSettings.DdosCustomPolicy.ID", + "ddos_settings_protected_ip": "Description.PublicIPAddress.Properties.DdosSettings.ProtectedIP", + "ddos_settings_protection_coverage": "Description.PublicIPAddress.Properties.DdosSettings.ProtectionCoverage", + "dns_settings_domain_name_label": "Description.PublicIPAddress.Properties.DNSSettings.DomainNameLabel", + "dns_settings_fqdn": "Description.PublicIPAddress.Properties.DNSSettings.Fqdn", + "dns_settings_reverse_fqdn": "Description.PublicIPAddress.Properties.DNSSettings.ReverseFqdn", + "etag": "Description.PublicIPAddress.Etag", + "id": "Description.PublicIPAddress.ID", + "idle_timeout_in_minutes": "Description.PublicIPAddress.Properties.IdleTimeoutInMinutes", + "ip_address": "Description.PublicIPAddress.Properties.IPAddress", + "ip_configuration_id": "Description.PublicIPAddress.Properties.IPConfiguration.ID", + "ip_tags": "Description.PublicIPAddress.PublicIPAddressPropertiesFormat.IPTags", "name": "description.PublicIPAddress.Name", - "provisioning_state": "description.PublicIPAddress.Properties.ProvisioningState", - "public_ip_address_version": "description.PublicIPAddress.Properties.PublicIPAddressVersion", - "public_ip_allocation_method": "description.PublicIPAddress.Properties.PublicIPAllocationMethod", - "public_ip_prefix_id": "description.PublicIPAddress.Properties.PublicIPPrefix.ID", + "provisioning_state": "Description.PublicIPAddress.Properties.ProvisioningState", + "public_ip_address_version": "Description.PublicIPAddress.Properties.PublicIPAddressVersion", + "public_ip_allocation_method": "Description.PublicIPAddress.Properties.PublicIPAllocationMethod", + "public_ip_prefix_id": "Description.PublicIPAddress.Properties.PublicIPPrefix.ID", "resource_group": "description.ResourceGroup", - "resource_guid": "description.PublicIPAddress.Properties.ResourceGUID", - "sku_name": "description.PublicIPAddress.SKU.Name", - "tags": "description.PublicIPAddress.Tags", - "title": "description.PublicIPAddress.Name", - "type": "description.PublicIPAddress.Type", - "zones": "description.PublicIPAddress.Zones", + "resource_guid": "Description.PublicIPAddress.Properties.ResourceGUID", + "sku_name": "Description.PublicIPAddress.SKU.Name", + "tags": "Description.PublicIPAddress.Tags", + "title": "Description.PublicIPAddress.Name", + "type": "Description.PublicIPAddress.Type", + "zones": "Description.PublicIPAddress.Zones", } func GetPublicIPAddress(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -17071,72 +13324,14 @@ func GetPublicIPAddress(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr // ========================== START: PublicIPPrefix ============================= type PublicIPPrefix struct { - Description azure.PublicIPPrefixDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *PublicIPPrefix) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.PublicIPPrefixDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.PublicIPPrefixDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type PublicIPPrefixHit struct { @@ -17207,11 +13402,10 @@ func (p PublicIPPrefixPaginator) NextPage(ctx context.Context) ([]PublicIPPrefix } var listPublicIPPrefixFilters = map[string]string{ - "id": "description.PublicIPPrefixes.ID", - "og_account_id": "metadata.SourceID", - "name": "description.PublicIPPrefix.Name", - "tags": "description.PublicIPPrefix.Tags", - "title": "description.PublicIPPrefix.Name", + "id": "Description.PublicIPPrefixes.ID", + "name": "Description.PublicIPPrefix.Name", + "tags": "Description.PublicIPPrefix.Tags", + "title": "Description.PublicIPPrefix.Name", } func ListPublicIPPrefix(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -17275,11 +13469,10 @@ func ListPublicIPPrefix(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr } var getPublicIPPrefixFilters = map[string]string{ - "id": "description.PublicIPPrefixes.ID", - "og_account_id": "metadata.SourceID", - "name": "description.PublicIPPrefix.Name", - "tags": "description.PublicIPPrefix.Tags", - "title": "description.PublicIPPrefix.Name", + "id": "Description.PublicIPPrefixes.ID", + "name": "Description.PublicIPPrefix.Name", + "tags": "Description.PublicIPPrefix.Tags", + "title": "Description.PublicIPPrefix.Name", } func GetPublicIPPrefix(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -17340,72 +13533,14 @@ func GetPublicIPPrefix(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra // ========================== START: DNSZones ============================= type DNSZones struct { - Description azure.DNSZonesDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *DNSZones) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.DNSZonesDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.DNSZonesDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type DNSZonesHit struct { @@ -17476,21 +13611,20 @@ func (p DNSZonesPaginator) NextPage(ctx context.Context) ([]DNSZones, error) { } var listDNSZonesFilters = map[string]string{ - "etag": "description.Zone.Etag", - "id": "description.Zone.ID", - "og_account_id": "metadata.SourceID", - "max_number_of_record_sets": "description.Zone.Properties.MaxNumberOfRecordSets", - "max_number_of_records_per_record_set": "description.Zone.Properties.MaxNumberOfRecordsPerRecordSet", - "name": "description.Zone.Name", - "name_servers": "description.Zone.Properties.NameServers", - "number_of_record_sets": "description.Zone.Properties.NumberOfRecordSets", - "registration_virtual_networks": "description.Zone.Properties.RegistrationVirtualNetworks", - "resolution_virtual_networks": "description.Zone.Properties.ResolutionVirtualNetworks", - "resource_group": "description.ResourceGroup", - "tags": "description.Zone.Tags", - "title": "description.Zone.Name", - "type": "description.Zone.Type", - "zone_type": "description.Zone.Properties.ZoneType", + "etag": "Description.Zone.Etag", + "id": "Description.Zone.ID", + "max_number_of_record_sets": "Description.Zone.Properties.MaxNumberOfRecordSets", + "max_number_of_records_per_record_set": "Description.Zone.Properties.MaxNumberOfRecordsPerRecordSet", + "name": "Description.Zone.Name", + "name_servers": "Description.Zone.Properties.NameServers", + "number_of_record_sets": "Description.Zone.Properties.NumberOfRecordSets", + "registration_virtual_networks": "Description.Zone.Properties.RegistrationVirtualNetworks", + "resolution_virtual_networks": "Description.Zone.Properties.ResolutionVirtualNetworks", + "resource_group": "Description.ResourceGroup", + "tags": "Description.Zone.Tags", + "title": "Description.Zone.Name", + "type": "Description.Zone.Type", + "zone_type": "Description.Zone.Properties.ZoneType", } func ListDNSZones(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -17554,21 +13688,20 @@ func ListDNSZones(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDat } var getDNSZonesFilters = map[string]string{ - "etag": "description.Zone.Etag", - "id": "description.Zone.ID", - "og_account_id": "metadata.SourceID", - "max_number_of_record_sets": "description.Zone.Properties.MaxNumberOfRecordSets", - "max_number_of_records_per_record_set": "description.Zone.Properties.MaxNumberOfRecordsPerRecordSet", - "name": "description.Zone.Name", - "name_servers": "description.Zone.Properties.NameServers", - "number_of_record_sets": "description.Zone.Properties.NumberOfRecordSets", - "registration_virtual_networks": "description.Zone.Properties.RegistrationVirtualNetworks", - "resolution_virtual_networks": "description.Zone.Properties.ResolutionVirtualNetworks", - "resource_group": "description.ResourceGroup", - "tags": "description.Zone.Tags", - "title": "description.Zone.Name", - "type": "description.Zone.Type", - "zone_type": "description.Zone.Properties.ZoneType", + "etag": "Description.Zone.Etag", + "id": "Description.Zone.ID", + "max_number_of_record_sets": "Description.Zone.Properties.MaxNumberOfRecordSets", + "max_number_of_records_per_record_set": "Description.Zone.Properties.MaxNumberOfRecordsPerRecordSet", + "name": "Description.Zone.Name", + "name_servers": "Description.Zone.Properties.NameServers", + "number_of_record_sets": "Description.Zone.Properties.NumberOfRecordSets", + "registration_virtual_networks": "Description.Zone.Properties.RegistrationVirtualNetworks", + "resolution_virtual_networks": "Description.Zone.Properties.ResolutionVirtualNetworks", + "resource_group": "Description.ResourceGroup", + "tags": "Description.Zone.Tags", + "title": "Description.Zone.Name", + "type": "Description.Zone.Type", + "zone_type": "Description.Zone.Properties.ZoneType", } func GetDNSZones(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -17629,72 +13762,14 @@ func GetDNSZones(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData // ========================== START: BastionHosts ============================= type BastionHosts struct { - Description azure.BastionHostsDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *BastionHosts) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.BastionHostsDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.BastionHostsDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type BastionHostsHit struct { @@ -17765,18 +13840,17 @@ func (p BastionHostsPaginator) NextPage(ctx context.Context) ([]BastionHosts, er } var listBastionHostsFilters = map[string]string{ - "dns_name": "description.BastianHost.Properties.DNSName", - "etag": "description.BastianHost.Etag", - "id": "description.BastianHost.ID", - "ip_configurations": "description.BastianHost.Properties.IPConfigurations", - "og_account_id": "metadata.SourceID", - "name": "description.BastianHost.Name", - "provisioning_state": "description.BastianHost.Properties.ProvisioningState", - "region": "description.BastianHost.Location", - "resource_group": "description.ResourceGroup", - "tags": "description.BastianHost.Tags", - "title": "description.BastianHost.Name", - "type": "description.BastianHost.Type", + "dns_name": "Description.BastianHost.Properties.DNSName", + "etag": "Description.BastianHost.Etag", + "id": "Description.BastianHost.ID", + "ip_configurations": "Description.BastianHost.Properties.IPConfigurations", + "name": "Description.BastianHost.Name", + "provisioning_state": "Description.BastianHost.Properties.ProvisioningState", + "region": "Description.BastianHost.Location", + "resource_group": "Description.ResourceGroup", + "tags": "Description.BastianHost.Tags", + "title": "Description.BastianHost.Name", + "type": "Description.BastianHost.Type", } func ListBastionHosts(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -17840,18 +13914,17 @@ func ListBastionHosts(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat } var getBastionHostsFilters = map[string]string{ - "dns_name": "description.BastianHost.Properties.DNSName", - "etag": "description.BastianHost.Etag", - "id": "description.BastianHost.ID", - "ip_configurations": "description.BastianHost.Properties.IPConfigurations", - "og_account_id": "metadata.SourceID", - "name": "description.BastianHost.Name", - "provisioning_state": "description.BastianHost.Properties.ProvisioningState", - "region": "description.BastianHost.Location", - "resource_group": "description.ResourceGroup", - "tags": "description.BastianHost.Tags", - "title": "description.BastianHost.Name", - "type": "description.BastianHost.Type", + "dns_name": "Description.BastianHost.Properties.DNSName", + "etag": "Description.BastianHost.Etag", + "id": "Description.BastianHost.ID", + "ip_configurations": "Description.BastianHost.Properties.IPConfigurations", + "name": "Description.BastianHost.Name", + "provisioning_state": "Description.BastianHost.Properties.ProvisioningState", + "region": "Description.BastianHost.Location", + "resource_group": "Description.ResourceGroup", + "tags": "Description.BastianHost.Tags", + "title": "Description.BastianHost.Name", + "type": "Description.BastianHost.Type", } func GetBastionHosts(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -17912,72 +13985,14 @@ func GetBastionHosts(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate // ========================== START: Connection ============================= type Connection struct { - Description azure.ConnectionDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *Connection) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.ConnectionDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.ConnectionDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type ConnectionHit struct { @@ -18048,11 +14063,10 @@ func (p ConnectionPaginator) NextPage(ctx context.Context) ([]Connection, error) } var listConnectionFilters = map[string]string{ - "id": "description.Connection.ID", - "og_account_id": "metadata.SourceID", - "name": "description.Connection.Name", - "tags": "description.Connection.Tags", - "title": "description.Connection.Name", + "id": "Description.Connection.ID", + "name": "Description.Connection.Name", + "tags": "Description.Connection.Tags", + "title": "Description.Connection.Name", } func ListConnection(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -18116,11 +14130,10 @@ func ListConnection(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD } var getConnectionFilters = map[string]string{ - "id": "description.Connection.ID", - "og_account_id": "metadata.SourceID", - "name": "description.Connection.Name", - "tags": "description.Connection.Tags", - "title": "description.Connection.Name", + "id": "Description.Connection.ID", + "name": "Description.Connection.Name", + "tags": "Description.Connection.Tags", + "title": "Description.Connection.Name", } func GetConnection(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -18181,72 +14194,14 @@ func GetConnection(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDa // ========================== START: VirtualHubs ============================= type VirtualHubs struct { - Description azure.VirtualHubsDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *VirtualHubs) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.VirtualHubsDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.VirtualHubsDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type VirtualHubsHit struct { @@ -18317,11 +14272,10 @@ func (p VirtualHubsPaginator) NextPage(ctx context.Context) ([]VirtualHubs, erro } var listVirtualHubsFilters = map[string]string{ - "id": "description.VirtualHubs.ID", - "og_account_id": "metadata.SourceID", - "name": "description.VirtualHub.Name", - "tags": "description.VirtualHub.Tags", - "title": "description.VirtualHub.Name", + "id": "Description.VirtualHubs.ID", + "name": "Description.VirtualHub.Name", + "tags": "Description.VirtualHub.Tags", + "title": "Description.VirtualHub.Name", } func ListVirtualHubs(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -18385,11 +14339,10 @@ func ListVirtualHubs(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate } var getVirtualHubsFilters = map[string]string{ - "id": "description.VirtualHubs.ID", - "og_account_id": "metadata.SourceID", - "name": "description.VirtualHub.Name", - "tags": "description.VirtualHub.Tags", - "title": "description.VirtualHub.Name", + "id": "Description.VirtualHubs.ID", + "name": "Description.VirtualHub.Name", + "tags": "Description.VirtualHub.Tags", + "title": "Description.VirtualHub.Name", } func GetVirtualHubs(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -18450,72 +14403,14 @@ func GetVirtualHubs(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD // ========================== START: VirtualWans ============================= type VirtualWans struct { - Description azure.VirtualWansDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *VirtualWans) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.VirtualWansDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.VirtualWansDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type VirtualWansHit struct { @@ -18586,11 +14481,10 @@ func (p VirtualWansPaginator) NextPage(ctx context.Context) ([]VirtualWans, erro } var listVirtualWansFilters = map[string]string{ - "id": "description.VirtualWans.ID", - "og_account_id": "metadata.SourceID", - "name": "description.VirtualWan.Name", - "tags": "description.VirtualWan.Tags", - "title": "description.VirtualWan.Name", + "id": "Description.VirtualWans.ID", + "name": "Description.VirtualWan.Name", + "tags": "Description.VirtualWan.Tags", + "title": "Description.VirtualWan.Name", } func ListVirtualWans(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -18654,11 +14548,10 @@ func ListVirtualWans(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate } var getVirtualWansFilters = map[string]string{ - "id": "description.VirtualWans.ID", - "og_account_id": "metadata.SourceID", - "name": "description.VirtualWan.Name", - "tags": "description.VirtualWan.Tags", - "title": "description.VirtualWan.Name", + "id": "Description.VirtualWans.ID", + "name": "Description.VirtualWan.Name", + "tags": "Description.VirtualWan.Tags", + "title": "Description.VirtualWan.Name", } func GetVirtualWans(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -18719,72 +14612,14 @@ func GetVirtualWans(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD // ========================== START: DNSResolver ============================= type DNSResolver struct { - Description azure.DNSResolverDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *DNSResolver) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.DNSResolverDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.DNSResolverDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type DNSResolverHit struct { @@ -18855,11 +14690,10 @@ func (p DNSResolverPaginator) NextPage(ctx context.Context) ([]DNSResolver, erro } var listDNSResolverFilters = map[string]string{ - "id": "description.DNSResolver.ID", - "og_account_id": "metadata.SourceID", - "name": "description.DNSResolver.Name", - "tags": "description.DNSResolver.Tags", - "title": "description.DNSResolver.Name", + "id": "Description.DNSResolver.ID", + "name": "Description.DNSResolver.Name", + "tags": "Description.DNSResolver.Tags", + "title": "Description.DNSResolver.Name", } func ListDNSResolver(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -18923,11 +14757,10 @@ func ListDNSResolver(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate } var getDNSResolverFilters = map[string]string{ - "id": "description.DNSResolver.ID", - "og_account_id": "metadata.SourceID", - "name": "description.DNSResolver.Name", - "tags": "description.DNSResolver.Tags", - "title": "description.DNSResolver.Name", + "id": "Description.DNSResolver.ID", + "name": "Description.DNSResolver.Name", + "tags": "Description.DNSResolver.Tags", + "title": "Description.DNSResolver.Name", } func GetDNSResolver(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -18988,72 +14821,14 @@ func GetDNSResolver(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD // ========================== START: TrafficManagerProfile ============================= type TrafficManagerProfile struct { - Description azure.TrafficManagerProfileDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *TrafficManagerProfile) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.TrafficManagerProfileDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.TrafficManagerProfileDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type TrafficManagerProfileHit struct { @@ -19124,10 +14899,10 @@ func (p TrafficManagerProfilePaginator) NextPage(ctx context.Context) ([]Traffic } var listTrafficManagerProfileFilters = map[string]string{ - "id": "description.Profile.ID", - "name": "description.Profile.Name", - "tags": "description.Profile.Tags", - "title": "description.Profile.Name", + "id": "Description.Profile.ID", + "name": "Description.Profile.Name", + "tags": "Description.Profile.Tags", + "title": "Description.Profile.Name", } func ListTrafficManagerProfile(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -19191,10 +14966,10 @@ func ListTrafficManagerProfile(ctx context.Context, d *plugin.QueryData, _ *plug } var getTrafficManagerProfileFilters = map[string]string{ - "id": "description.Profile.ID", - "name": "description.Profile.Name", - "tags": "description.Profile.Tags", - "title": "description.Profile.Name", + "id": "Description.Profile.ID", + "name": "Description.Profile.Name", + "tags": "Description.Profile.Tags", + "title": "Description.Profile.Name", } func GetTrafficManagerProfile(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -19255,72 +15030,14 @@ func GetTrafficManagerProfile(ctx context.Context, d *plugin.QueryData, _ *plugi // ========================== START: PrivateDNSZones ============================= type PrivateDNSZones struct { - Description azure.PrivateDNSZonesDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *PrivateDNSZones) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.PrivateDNSZonesDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.PrivateDNSZonesDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type PrivateDNSZonesHit struct { @@ -19391,21 +15108,20 @@ func (p PrivateDNSZonesPaginator) NextPage(ctx context.Context) ([]PrivateDNSZon } var listPrivateDNSZonesFilters = map[string]string{ - "etag": "description.PrivateZone.Etag", - "id": "description.PrivateZone.ID", - "og_account_id": "metadata.SourceID", - "max_number_of_record_sets": "description.PrivateZone.Properties.MaxNumberOfRecordSets", - "max_number_of_virtual_network_links": "description.PrivateZone.Properties.MaxNumberOfVirtualNetworkLinks", - "max_number_of_virtual_network_links_with_registration": "description.PrivateZone.Properties.MaxNumberOfVirtualNetworkLinksWithRegistration", - "name": "description.PrivateZone.Name", - "number_of_record_sets": "description.PrivateZone.Properties.NumberOfRecordSets", - "number_of_virtual_network_links": "description.PrivateZone.Properties.NumberOfVirtualNetworkLinks", - "number_of_virtual_network_links_with_registration": "description.PrivateZone.Properties.NumberOfVirtualNetworkLinksWithRegistration", - "provisioning_state": "description.PrivateZone.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "tags": "description.PrivateZone.Tags", - "title": "description.PrivateZone.Name", - "type": "description.PrivateZone.Type", + "etag": "Description.PrivateZone.Etag", + "id": "Description.PrivateZone.ID", + "max_number_of_record_sets": "Description.PrivateZone.Properties.MaxNumberOfRecordSets", + "max_number_of_virtual_network_links": "Description.PrivateZone.Properties.MaxNumberOfVirtualNetworkLinks", + "max_number_of_virtual_network_links_with_registration": "Description.PrivateZone.Properties.MaxNumberOfVirtualNetworkLinksWithRegistration", + "name": "Description.PrivateZone.Name", + "number_of_record_sets": "Description.PrivateZone.Properties.NumberOfRecordSets", + "number_of_virtual_network_links": "Description.PrivateZone.Properties.NumberOfVirtualNetworkLinks", + "number_of_virtual_network_links_with_registration": "Description.PrivateZone.Properties.NumberOfVirtualNetworkLinksWithRegistration", + "provisioning_state": "Description.PrivateZone.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "tags": "Description.PrivateZone.Tags", + "title": "Description.PrivateZone.Name", + "type": "Description.PrivateZone.Type", } func ListPrivateDNSZones(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -19469,21 +15185,20 @@ func ListPrivateDNSZones(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd } var getPrivateDNSZonesFilters = map[string]string{ - "etag": "description.PrivateZone.Etag", - "id": "description.PrivateZone.ID", - "og_account_id": "metadata.SourceID", - "max_number_of_record_sets": "description.PrivateZone.Properties.MaxNumberOfRecordSets", - "max_number_of_virtual_network_links": "description.PrivateZone.Properties.MaxNumberOfVirtualNetworkLinks", - "max_number_of_virtual_network_links_with_registration": "description.PrivateZone.Properties.MaxNumberOfVirtualNetworkLinksWithRegistration", - "name": "description.PrivateZone.Name", - "number_of_record_sets": "description.PrivateZone.Properties.NumberOfRecordSets", - "number_of_virtual_network_links": "description.PrivateZone.Properties.NumberOfVirtualNetworkLinks", - "number_of_virtual_network_links_with_registration": "description.PrivateZone.Properties.NumberOfVirtualNetworkLinksWithRegistration", - "provisioning_state": "description.PrivateZone.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "tags": "description.PrivateZone.Tags", - "title": "description.PrivateZone.Name", - "type": "description.PrivateZone.Type", + "etag": "Description.PrivateZone.Etag", + "id": "Description.PrivateZone.ID", + "max_number_of_record_sets": "Description.PrivateZone.Properties.MaxNumberOfRecordSets", + "max_number_of_virtual_network_links": "Description.PrivateZone.Properties.MaxNumberOfVirtualNetworkLinks", + "max_number_of_virtual_network_links_with_registration": "Description.PrivateZone.Properties.MaxNumberOfVirtualNetworkLinksWithRegistration", + "name": "Description.PrivateZone.Name", + "number_of_record_sets": "Description.PrivateZone.Properties.NumberOfRecordSets", + "number_of_virtual_network_links": "Description.PrivateZone.Properties.NumberOfVirtualNetworkLinks", + "number_of_virtual_network_links_with_registration": "Description.PrivateZone.Properties.NumberOfVirtualNetworkLinksWithRegistration", + "provisioning_state": "Description.PrivateZone.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "tags": "Description.PrivateZone.Tags", + "title": "Description.PrivateZone.Name", + "type": "Description.PrivateZone.Type", } func GetPrivateDNSZones(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -19544,72 +15259,14 @@ func GetPrivateDNSZones(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr // ========================== START: PrivateEndpoint ============================= type PrivateEndpoint struct { - Description azure.PrivateEndpointDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *PrivateEndpoint) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.PrivateEndpointDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.PrivateEndpointDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type PrivateEndpointHit struct { @@ -19680,11 +15337,10 @@ func (p PrivateEndpointPaginator) NextPage(ctx context.Context) ([]PrivateEndpoi } var listPrivateEndpointFilters = map[string]string{ - "id": "description.PrivateEndpoints.ID", - "og_account_id": "metadata.SourceID", - "name": "description.PrivateEndpoint.Name", - "tags": "description.PrivateEndpoint.Tags", - "title": "description.PrivateEndpoint.Name", + "id": "Description.PrivateEndpoints.ID", + "name": "Description.PrivateEndpoint.Name", + "tags": "Description.PrivateEndpoint.Tags", + "title": "Description.PrivateEndpoint.Name", } func ListPrivateEndpoint(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -19748,11 +15404,10 @@ func ListPrivateEndpoint(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd } var getPrivateEndpointFilters = map[string]string{ - "id": "description.PrivateEndpoints.ID", - "og_account_id": "metadata.SourceID", - "name": "description.PrivateEndpoint.Name", - "tags": "description.PrivateEndpoint.Tags", - "title": "description.PrivateEndpoint.Name", + "id": "Description.PrivateEndpoints.ID", + "name": "Description.PrivateEndpoint.Name", + "tags": "Description.PrivateEndpoint.Tags", + "title": "Description.PrivateEndpoint.Name", } func GetPrivateEndpoint(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -19813,72 +15468,14 @@ func GetPrivateEndpoint(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr // ========================== START: NetworkDDoSProtectionPlan ============================= type NetworkDDoSProtectionPlan struct { - Description azure.NetworkDDoSProtectionPlanDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *NetworkDDoSProtectionPlan) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.NetworkDDoSProtectionPlanDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.NetworkDDoSProtectionPlanDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type NetworkDDoSProtectionPlanHit struct { @@ -19949,10 +15546,10 @@ func (p NetworkDDoSProtectionPlanPaginator) NextPage(ctx context.Context) ([]Net } var listNetworkDDoSProtectionPlanFilters = map[string]string{ - "id": "description.DDoSProtectionPlan.ID", - "name": "description.DDoSProtectionPlan.Name", - "tags": "description.DDoSProtectionPlan.Tags", - "title": "description.DDoSProtectionPlan.Name", + "id": "Description.DDoSProtectionPlan.ID", + "name": "Description.DDoSProtectionPlan.Name", + "tags": "Description.DDoSProtectionPlan.Tags", + "title": "Description.DDoSProtectionPlan.Name", } func ListNetworkDDoSProtectionPlan(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -20016,10 +15613,10 @@ func ListNetworkDDoSProtectionPlan(ctx context.Context, d *plugin.QueryData, _ * } var getNetworkDDoSProtectionPlanFilters = map[string]string{ - "id": "description.DDoSProtectionPlan.ID", - "name": "description.DDoSProtectionPlan.Name", - "tags": "description.DDoSProtectionPlan.Tags", - "title": "description.DDoSProtectionPlan.Name", + "id": "Description.DDoSProtectionPlan.ID", + "name": "Description.DDoSProtectionPlan.Name", + "tags": "Description.DDoSProtectionPlan.Tags", + "title": "Description.DDoSProtectionPlan.Name", } func GetNetworkDDoSProtectionPlan(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -20080,72 +15677,14 @@ func GetNetworkDDoSProtectionPlan(ctx context.Context, d *plugin.QueryData, _ *p // ========================== START: PolicyAssignment ============================= type PolicyAssignment struct { - Description azure.PolicyAssignmentDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *PolicyAssignment) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.PolicyAssignmentDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.PolicyAssignmentDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type PolicyAssignmentHit struct { @@ -20216,22 +15755,21 @@ func (p PolicyAssignmentPaginator) NextPage(ctx context.Context) ([]PolicyAssign } var listPolicyAssignmentFilters = map[string]string{ - "description": "description.Assignment.Properties.Description", - "display_name": "description.Assignment.Properties.DisplayName", - "enforcement_mode": "description.Assignment.Properties.EnforcementMode", - "id": "description.Assignment.ID", - "identity": "description.Assignment.Identity", - "og_account_id": "metadata.SourceID", - "metadata": "description.Assignment.Properties.Metadata", - "name": "description.Assignment.Name", - "not_scopes": "description.Assignment.Properties.NotScopes", - "parameters": "description.Assignment.Properties.Parameters", - "policy_definition_id": "description.Assignment.Properties.PolicyDefinitionID", - "scope": "description.Assignment.Properties.Scope", - "sku_name": "description.Resource.SKU.Name", - "sku_tier": "description.Resource.SKU.Tier", - "title": "description.Assignment.Name", - "type": "description.Assignment.Type", + "description": "Description.Assignment.Properties.Description", + "display_name": "Description.Assignment.Properties.DisplayName", + "enforcement_mode": "Description.Assignment.Properties.EnforcementMode", + "id": "Description.Assignment.ID", + "identity": "Description.Assignment.Identity", + "metadata": "Description.Assignment.Properties.Metadata", + "name": "Description.Assignment.Name", + "not_scopes": "Description.Assignment.Properties.NotScopes", + "parameters": "Description.Assignment.Properties.Parameters", + "policy_definition_id": "Description.Assignment.Properties.PolicyDefinitionID", + "scope": "Description.Assignment.Properties.Scope", + "sku_name": "Description.Resource.SKU.Name", + "sku_tier": "Description.Resource.SKU.Tier", + "title": "Description.Assignment.Name", + "type": "Description.Assignment.Type", } func ListPolicyAssignment(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -20295,22 +15833,21 @@ func ListPolicyAssignment(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy } var getPolicyAssignmentFilters = map[string]string{ - "description": "description.Assignment.Properties.Description", - "display_name": "description.Assignment.Properties.DisplayName", - "enforcement_mode": "description.Assignment.Properties.EnforcementMode", - "id": "description.Assignment.ID", - "identity": "description.Assignment.Identity", - "og_account_id": "metadata.SourceID", - "metadata": "description.Assignment.Properties.Metadata", + "description": "Description.Assignment.Properties.Description", + "display_name": "Description.Assignment.Properties.DisplayName", + "enforcement_mode": "Description.Assignment.Properties.EnforcementMode", + "id": "Description.Assignment.ID", + "identity": "Description.Assignment.Identity", + "metadata": "Description.Assignment.Properties.Metadata", "name": "description.Assignment.name", - "not_scopes": "description.Assignment.Properties.NotScopes", - "parameters": "description.Assignment.Properties.Parameters", - "policy_definition_id": "description.Assignment.Properties.PolicyDefinitionID", - "scope": "description.Assignment.Properties.Scope", - "sku_name": "description.Resource.SKU.Name", - "sku_tier": "description.Resource.SKU.Tier", - "title": "description.Assignment.Name", - "type": "description.Assignment.Type", + "not_scopes": "Description.Assignment.Properties.NotScopes", + "parameters": "Description.Assignment.Properties.Parameters", + "policy_definition_id": "Description.Assignment.Properties.PolicyDefinitionID", + "scope": "Description.Assignment.Properties.Scope", + "sku_name": "Description.Resource.SKU.Name", + "sku_tier": "Description.Resource.SKU.Tier", + "title": "Description.Assignment.Name", + "type": "Description.Assignment.Type", } func GetPolicyAssignment(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -20371,72 +15908,14 @@ func GetPolicyAssignment(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd // ========================== START: RedisCache ============================= type RedisCache struct { - Description azure.RedisCacheDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *RedisCache) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.RedisCacheDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.RedisCacheDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type RedisCacheHit struct { @@ -20507,34 +15986,33 @@ func (p RedisCachePaginator) NextPage(ctx context.Context) ([]RedisCache, error) } var listRedisCacheFilters = map[string]string{ - "access_keys": "description.ResourceInfo.Properties.AccessKeys", - "enable_non_ssl_port": "description.ResourceInfo.Properties.EnableNonSSLPort", - "host_name": "description.ResourceInfo.Properties.HostName", - "id": "description.ResourceInfo.ID", - "instances": "description.ResourceInfo.Properties.Instances", - "og_account_id": "metadata.SourceID", - "linked_servers": "description.ResourceInfo.Properties.LinkedServers", - "name": "description.ResourceInfo.Name", - "port": "description.ResourceInfo.Properties.Port", - "private_endpoint_connections": "description.ResourceInfo.Properties.PrivateEndpointConnections", - "provisioning_state": "description.ResourceInfo.Properties.ProvisioningState", - "public_network_access": "description.ResourceInfo.Properties.PublicNetworkAccess", - "redis_configuration": "description.ResourceInfo.Properties.RedisConfiguration", - "redis_version": "description.ResourceInfo.Properties.RedisVersion", - "replicas_per_master": "description.ResourceInfo.Properties.ReplicasPerMaster", - "resource_group": "description.ResourceGroup", - "shard_count": "description.ResourceInfo.Properties.ShardCount", - "sku_capacity": "description.ResourceInfo.Properties.SKU.Capacity", - "sku_family": "description.ResourceInfo.Properties.SKU.Family", - "sku_name": "description.ResourceInfo.Properties.SKU.Name", - "ssl_port": "description.ResourceInfo.Properties.SSLPort", - "static_ip": "description.ResourceInfo.Properties.StaticIP", - "subnet_id": "description.ResourceInfo.Properties.SubnetID", - "tags": "description.ResourceInfo.Tags", - "tenant_settings": "description.ResourceInfo.Properties.TenantSettings", - "title": "description.ResourceInfo.Name", - "type": "description.ResourceInfo.Type", - "zones": "description.ResourceInfo.Zones", + "access_keys": "Description.ResourceInfo.Properties.AccessKeys", + "enable_non_ssl_port": "Description.ResourceInfo.Properties.EnableNonSSLPort", + "host_name": "Description.ResourceInfo.Properties.HostName", + "id": "Description.ResourceInfo.ID", + "instances": "Description.ResourceInfo.Properties.Instances", + "linked_servers": "Description.ResourceInfo.Properties.LinkedServers", + "name": "Description.ResourceInfo.Name", + "port": "Description.ResourceInfo.Properties.Port", + "private_endpoint_connections": "Description.ResourceInfo.Properties.PrivateEndpointConnections", + "provisioning_state": "Description.ResourceInfo.Properties.ProvisioningState", + "public_network_access": "Description.ResourceInfo.Properties.PublicNetworkAccess", + "redis_configuration": "Description.ResourceInfo.Properties.RedisConfiguration", + "redis_version": "Description.ResourceInfo.Properties.RedisVersion", + "replicas_per_master": "Description.ResourceInfo.Properties.ReplicasPerMaster", + "resource_group": "Description.ResourceGroup", + "shard_count": "Description.ResourceInfo.Properties.ShardCount", + "sku_capacity": "Description.ResourceInfo.Properties.SKU.Capacity", + "sku_family": "Description.ResourceInfo.Properties.SKU.Family", + "sku_name": "Description.ResourceInfo.Properties.SKU.Name", + "ssl_port": "Description.ResourceInfo.Properties.SSLPort", + "static_ip": "Description.ResourceInfo.Properties.StaticIP", + "subnet_id": "Description.ResourceInfo.Properties.SubnetID", + "tags": "Description.ResourceInfo.Tags", + "tenant_settings": "Description.ResourceInfo.Properties.TenantSettings", + "title": "Description.ResourceInfo.Name", + "type": "Description.ResourceInfo.Type", + "zones": "Description.ResourceInfo.Zones", } func ListRedisCache(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -20598,34 +16076,33 @@ func ListRedisCache(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD } var getRedisCacheFilters = map[string]string{ - "access_keys": "description.ResourceInfo.Properties.AccessKeys", - "enable_non_ssl_port": "description.ResourceInfo.Properties.EnableNonSSLPort", - "host_name": "description.ResourceInfo.Properties.HostName", - "id": "description.ResourceInfo.ID", - "instances": "description.ResourceInfo.Properties.Instances", - "og_account_id": "metadata.SourceID", - "linked_servers": "description.ResourceInfo.Properties.LinkedServers", + "access_keys": "Description.ResourceInfo.Properties.AccessKeys", + "enable_non_ssl_port": "Description.ResourceInfo.Properties.EnableNonSSLPort", + "host_name": "Description.ResourceInfo.Properties.HostName", + "id": "Description.ResourceInfo.ID", + "instances": "Description.ResourceInfo.Properties.Instances", + "linked_servers": "Description.ResourceInfo.Properties.LinkedServers", "name": "description.ResourceType.name", - "port": "description.ResourceInfo.Properties.Port", - "private_endpoint_connections": "description.ResourceInfo.Properties.PrivateEndpointConnections", - "provisioning_state": "description.ResourceInfo.Properties.ProvisioningState", - "public_network_access": "description.ResourceInfo.Properties.PublicNetworkAccess", - "redis_configuration": "description.ResourceInfo.Properties.RedisConfiguration", - "redis_version": "description.ResourceInfo.Properties.RedisVersion", - "replicas_per_master": "description.ResourceInfo.Properties.ReplicasPerMaster", + "port": "Description.ResourceInfo.Properties.Port", + "private_endpoint_connections": "Description.ResourceInfo.Properties.PrivateEndpointConnections", + "provisioning_state": "Description.ResourceInfo.Properties.ProvisioningState", + "public_network_access": "Description.ResourceInfo.Properties.PublicNetworkAccess", + "redis_configuration": "Description.ResourceInfo.Properties.RedisConfiguration", + "redis_version": "Description.ResourceInfo.Properties.RedisVersion", + "replicas_per_master": "Description.ResourceInfo.Properties.ReplicasPerMaster", "resource_group": "description.ResourceGroup", - "shard_count": "description.ResourceInfo.Properties.ShardCount", - "sku_capacity": "description.ResourceInfo.Properties.SKU.Capacity", - "sku_family": "description.ResourceInfo.Properties.SKU.Family", - "sku_name": "description.ResourceInfo.Properties.SKU.Name", - "ssl_port": "description.ResourceInfo.Properties.SSLPort", - "static_ip": "description.ResourceInfo.Properties.StaticIP", - "subnet_id": "description.ResourceInfo.Properties.SubnetID", - "tags": "description.ResourceInfo.Tags", - "tenant_settings": "description.ResourceInfo.Properties.TenantSettings", - "title": "description.ResourceInfo.Name", - "type": "description.ResourceInfo.Type", - "zones": "description.ResourceInfo.Zones", + "shard_count": "Description.ResourceInfo.Properties.ShardCount", + "sku_capacity": "Description.ResourceInfo.Properties.SKU.Capacity", + "sku_family": "Description.ResourceInfo.Properties.SKU.Family", + "sku_name": "Description.ResourceInfo.Properties.SKU.Name", + "ssl_port": "Description.ResourceInfo.Properties.SSLPort", + "static_ip": "Description.ResourceInfo.Properties.StaticIP", + "subnet_id": "Description.ResourceInfo.Properties.SubnetID", + "tags": "Description.ResourceInfo.Tags", + "tenant_settings": "Description.ResourceInfo.Properties.TenantSettings", + "title": "Description.ResourceInfo.Name", + "type": "Description.ResourceInfo.Type", + "zones": "Description.ResourceInfo.Zones", } func GetRedisCache(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -20686,72 +16163,14 @@ func GetRedisCache(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDa // ========================== START: RedisEnterpriseCache ============================= type RedisEnterpriseCache struct { - Description azure.RedisEnterpriseCacheDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *RedisEnterpriseCache) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.RedisEnterpriseCacheDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.RedisEnterpriseCacheDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type RedisEnterpriseCacheHit struct { @@ -20822,11 +16241,10 @@ func (p RedisEnterpriseCachePaginator) NextPage(ctx context.Context) ([]RedisEnt } var listRedisEnterpriseCacheFilters = map[string]string{ - "id": "description.RedisEnterprise.ID", - "og_account_id": "metadata.SourceID", - "name": "description.RedisEnterprise.Name", - "tags": "description.RedisEnterprise.Tags", - "title": "description.RedisEnterprise.Name", + "id": "Description.RedisEnterprise.ID", + "name": "Description.RedisEnterprise.Name", + "tags": "Description.RedisEnterprise.Tags", + "title": "Description.RedisEnterprise.Name", } func ListRedisEnterpriseCache(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -20890,11 +16308,10 @@ func ListRedisEnterpriseCache(ctx context.Context, d *plugin.QueryData, _ *plugi } var getRedisEnterpriseCacheFilters = map[string]string{ - "id": "description.RedisEnterprise.ID", - "og_account_id": "metadata.SourceID", - "name": "description.RedisEnterprise.Name", - "tags": "description.RedisEnterprise.Tags", - "title": "description.RedisEnterprise.Name", + "id": "Description.RedisEnterprise.ID", + "name": "Description.RedisEnterprise.Name", + "tags": "Description.RedisEnterprise.Tags", + "title": "Description.RedisEnterprise.Name", } func GetRedisEnterpriseCache(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -20955,72 +16372,14 @@ func GetRedisEnterpriseCache(ctx context.Context, d *plugin.QueryData, _ *plugin // ========================== START: ResourceLink ============================= type ResourceLink struct { - Description azure.ResourceLinkDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *ResourceLink) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.ResourceLinkDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.ResourceLinkDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type ResourceLinkHit struct { @@ -21091,15 +16450,14 @@ func (p ResourceLinkPaginator) NextPage(ctx context.Context) ([]ResourceLink, er } var listResourceLinkFilters = map[string]string{ - "id": "description.ResourceLink.ID", - "og_account_id": "metadata.SourceID", - "name": "description.ResourceLink.Name", - "notes": "description.ResourceLink.Properties.Notes", - "resource_group": "description.ResourceLink.Properties.SourceID", - "source_id": "description.ResourceLink.Properties.SourceID", - "target_id": "description.ResourceLink.Properties.TargetID", - "title": "description.ResourceLink.Name", - "type": "description.ResourceLink.Type", + "id": "Description.ResourceLink.ID", + "name": "Description.ResourceLink.Name", + "notes": "Description.ResourceLink.Properties.Notes", + "resource_group": "Description.ResourceLink.Properties.SourceID", + "source_id": "Description.ResourceLink.Properties.SourceID", + "target_id": "Description.ResourceLink.Properties.TargetID", + "title": "Description.ResourceLink.Name", + "type": "Description.ResourceLink.Type", } func ListResourceLink(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -21164,14 +16522,13 @@ func ListResourceLink(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat var getResourceLinkFilters = map[string]string{ "id": "description.ResourceLink.id", - "og_account_id": "metadata.SourceID", - "name": "description.ResourceLink.Name", - "notes": "description.ResourceLink.Properties.Notes", - "resource_group": "description.ResourceLink.Properties.SourceID", - "source_id": "description.ResourceLink.Properties.SourceID", - "target_id": "description.ResourceLink.Properties.TargetID", - "title": "description.ResourceLink.Name", - "type": "description.ResourceLink.Type", + "name": "Description.ResourceLink.Name", + "notes": "Description.ResourceLink.Properties.Notes", + "resource_group": "Description.ResourceLink.Properties.SourceID", + "source_id": "Description.ResourceLink.Properties.SourceID", + "target_id": "Description.ResourceLink.Properties.TargetID", + "title": "Description.ResourceLink.Name", + "type": "Description.ResourceLink.Type", } func GetResourceLink(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -21232,72 +16589,14 @@ func GetResourceLink(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate // ========================== START: RoleAssignment ============================= type RoleAssignment struct { - Description azure.RoleAssignmentDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *RoleAssignment) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.RoleAssignmentDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.RoleAssignmentDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type RoleAssignmentHit struct { @@ -21368,17 +16667,16 @@ func (p RoleAssignmentPaginator) NextPage(ctx context.Context) ([]RoleAssignment } var listRoleAssignmentFilters = map[string]string{ - "created_on": "description.RoleAssignment.Properties.CreatedOn", - "id": "description.RoleAssignment.ID", - "og_account_id": "metadata.SourceID", - "name": "description.RoleAssignment.Name", - "principal_id": "description.RoleAssignment.Properties.PrincipalID", - "principal_type": "description.RoleAssignment.Properties.PrincipalType", - "role_definition_id": "description.RoleAssignment.Properties.RoleDefinitionID", - "scope": "description.RoleAssignment.Properties.Scope", - "title": "description.RoleAssignment.Name", - "type": "description.RoleAssignment.Type", - "updated_on": "description.RoleAssignment.Properties.UpdatedOn", + "created_on": "Description.RoleAssignment.Properties.CreatedOn", + "id": "Description.RoleAssignment.ID", + "name": "Description.RoleAssignment.Name", + "principal_id": "Description.RoleAssignment.Properties.PrincipalID", + "principal_type": "Description.RoleAssignment.Properties.PrincipalType", + "role_definition_id": "Description.RoleAssignment.Properties.RoleDefinitionID", + "scope": "Description.RoleAssignment.Properties.Scope", + "title": "Description.RoleAssignment.Name", + "type": "Description.RoleAssignment.Type", + "updated_on": "Description.RoleAssignment.Properties.UpdatedOn", } func ListRoleAssignment(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -21442,17 +16740,16 @@ func ListRoleAssignment(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr } var getRoleAssignmentFilters = map[string]string{ - "created_on": "description.RoleAssignment.Properties.CreatedOn", + "created_on": "Description.RoleAssignment.Properties.CreatedOn", "id": "description.RoleAssignment.id", - "og_account_id": "metadata.SourceID", - "name": "description.RoleAssignment.Name", - "principal_id": "description.RoleAssignment.Properties.PrincipalID", - "principal_type": "description.RoleAssignment.Properties.PrincipalType", - "role_definition_id": "description.RoleAssignment.Properties.RoleDefinitionID", - "scope": "description.RoleAssignment.Properties.Scope", - "title": "description.RoleAssignment.Name", - "type": "description.RoleAssignment.Type", - "updated_on": "description.RoleAssignment.Properties.UpdatedOn", + "name": "Description.RoleAssignment.Name", + "principal_id": "Description.RoleAssignment.Properties.PrincipalID", + "principal_type": "Description.RoleAssignment.Properties.PrincipalType", + "role_definition_id": "Description.RoleAssignment.Properties.RoleDefinitionID", + "scope": "Description.RoleAssignment.Properties.Scope", + "title": "Description.RoleAssignment.Name", + "type": "Description.RoleAssignment.Type", + "updated_on": "Description.RoleAssignment.Properties.UpdatedOn", } func GetRoleAssignment(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -21513,72 +16810,14 @@ func GetRoleAssignment(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra // ========================== START: RoleDefinition ============================= type RoleDefinition struct { - Description azure.RoleDefinitionDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *RoleDefinition) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.RoleDefinitionDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.RoleDefinitionDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type RoleDefinitionHit struct { @@ -21649,15 +16888,14 @@ func (p RoleDefinitionPaginator) NextPage(ctx context.Context) ([]RoleDefinition } var listRoleDefinitionFilters = map[string]string{ - "assignable_scopes": "description.RoleDefinition.Properties.AssignableScopes", - "description": "description.RoleDefinition.Properties.Description", - "id": "description.RoleDefinition.ID", - "og_account_id": "metadata.SourceID", - "name": "description.RoleDefinition.Name", - "permissions": "description.RoleDefinition.Properties.Permissions", - "role_name": "description.RoleDefinition.Properties.RoleName", - "role_type": "description.RoleDefinition.Properties.RoleType", - "type": "description.RoleDefinition.Type", + "assignable_scopes": "Description.RoleDefinition.Properties.AssignableScopes", + "description": "Description.RoleDefinition.Properties.Description", + "id": "Description.RoleDefinition.ID", + "name": "Description.RoleDefinition.Name", + "permissions": "Description.RoleDefinition.Properties.Permissions", + "role_name": "Description.RoleDefinition.Properties.RoleName", + "role_type": "Description.RoleDefinition.Properties.RoleType", + "type": "Description.RoleDefinition.Type", } func ListRoleDefinition(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -21721,15 +16959,14 @@ func ListRoleDefinition(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr } var getRoleDefinitionFilters = map[string]string{ - "assignable_scopes": "description.RoleDefinition.Properties.AssignableScopes", - "description": "description.RoleDefinition.Properties.Description", - "id": "description.RoleDefinition.ID", - "og_account_id": "metadata.SourceID", - "name": "description.RoleDefinition.Name", - "permissions": "description.RoleDefinition.Properties.Permissions", - "role_name": "description.RoleDefinition.Properties.RoleName", - "role_type": "description.RoleDefinition.Properties.RoleType", - "type": "description.RoleDefinition.Type", + "assignable_scopes": "Description.RoleDefinition.Properties.AssignableScopes", + "description": "Description.RoleDefinition.Properties.Description", + "id": "Description.RoleDefinition.ID", + "name": "Description.RoleDefinition.Name", + "permissions": "Description.RoleDefinition.Properties.Permissions", + "role_name": "Description.RoleDefinition.Properties.RoleName", + "role_type": "Description.RoleDefinition.Properties.RoleType", + "type": "Description.RoleDefinition.Type", } func GetRoleDefinition(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -21790,72 +17027,14 @@ func GetRoleDefinition(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra // ========================== START: PolicyDefinition ============================= type PolicyDefinition struct { - Description azure.PolicyDefinitionDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *PolicyDefinition) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.PolicyDefinitionDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.PolicyDefinitionDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type PolicyDefinitionHit struct { @@ -21926,19 +17105,18 @@ func (p PolicyDefinitionPaginator) NextPage(ctx context.Context) ([]PolicyDefini } var listPolicyDefinitionFilters = map[string]string{ - "akas": "description.TurboData.Akas", - "description": "description.Definition.Properties.Description", - "display_name": "description.Definition.Properties.DisplayName", - "id": "ID", - "og_account_id": "metadata.SourceID", - "metadata": "description.Definition.Properties.Metadata", - "mode": "description.Definition.Properties.Mode", - "name": "description.Definition.Name", - "parameters": "description.Definition.Properties.Parameters", - "policy_rule": "description.Definition.Properties.PolicyRule", - "policy_type": "description.Definition.Properties.PolicyType", - "title": "description.Definition.Properties.DisplayName", - "type": "description.Definition.Type", + "akas": "Description.TurboData.Akas", + "description": "Description.Definition.Properties.Description", + "display_name": "Description.Definition.Properties.DisplayName", + "id": "ResourceID", + "metadata": "Description.Definition.Properties.Metadata", + "mode": "Description.Definition.Properties.Mode", + "name": "Description.Definition.Name", + "parameters": "Description.Definition.Properties.Parameters", + "policy_rule": "Description.Definition.Properties.PolicyRule", + "policy_type": "Description.Definition.Properties.PolicyType", + "title": "Description.Definition.Properties.DisplayName", + "type": "Description.Definition.Type", } func ListPolicyDefinition(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -22002,19 +17180,18 @@ func ListPolicyDefinition(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy } var getPolicyDefinitionFilters = map[string]string{ - "akas": "description.TurboData.Akas", - "description": "description.Definition.Properties.Description", - "display_name": "description.Definition.Properties.DisplayName", - "id": "ID", - "og_account_id": "metadata.SourceID", - "metadata": "description.Definition.Properties.Metadata", - "mode": "description.Definition.Properties.Mode", - "name": "description.Definition.Name", - "parameters": "description.Definition.Properties.Parameters", - "policy_rule": "description.Definition.Properties.PolicyRule", - "policy_type": "description.Definition.Properties.PolicyType", - "title": "description.Definition.Properties.DisplayName", - "type": "description.Definition.Type", + "akas": "Description.TurboData.Akas", + "description": "Description.Definition.Properties.Description", + "display_name": "Description.Definition.Properties.DisplayName", + "id": "ResourceID", + "metadata": "Description.Definition.Properties.Metadata", + "mode": "Description.Definition.Properties.Mode", + "name": "description.Definition.Name", + "parameters": "Description.Definition.Properties.Parameters", + "policy_rule": "Description.Definition.Properties.PolicyRule", + "policy_type": "Description.Definition.Properties.PolicyType", + "title": "Description.Definition.Properties.DisplayName", + "type": "Description.Definition.Type", } func GetPolicyDefinition(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -22075,72 +17252,14 @@ func GetPolicyDefinition(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd // ========================== START: UserEffectiveAccess ============================= type UserEffectiveAccess struct { - Description azure.UserEffectiveAccessDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *UserEffectiveAccess) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.UserEffectiveAccessDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.UserEffectiveAccessDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type UserEffectiveAccessHit struct { @@ -22211,16 +17330,15 @@ func (p UserEffectiveAccessPaginator) NextPage(ctx context.Context) ([]UserEffec } var listUserEffectiveAccessFilters = map[string]string{ - "assignment_type": "description.AssignmentType", - "id": "ID", - "og_account_id": "metadata.SourceID", - "parent_principal_id": "description.ParentPrincipalId", - "principal_id": "description.PrincipalId", - "principal_name": "description.PrincipalName", - "principal_type": "description.PrincipalType", - "role_definition_id": "description.RoleAssignment.Properties.RoleDefinitionID", - "scope": "description.Scope", - "scope_type": "description.ScopeType", + "assignment_type": "Description.AssignmentType", + "id": "ResourceID", + "parent_principal_id": "Description.ParentPrincipalId", + "principal_id": "Description.PrincipalId", + "principal_name": "Description.PrincipalName", + "principal_type": "Description.PrincipalType", + "role_definition_id": "Description.RoleAssignment.Properties.RoleDefinitionID", + "scope": "Description.Scope", + "scope_type": "Description.ScopeType", } func ListUserEffectiveAccess(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -22284,16 +17402,15 @@ func ListUserEffectiveAccess(ctx context.Context, d *plugin.QueryData, _ *plugin } var getUserEffectiveAccessFilters = map[string]string{ - "assignment_type": "description.AssignmentType", - "id": "ID", - "og_account_id": "metadata.SourceID", - "parent_principal_id": "description.ParentPrincipalId", - "principal_id": "description.PrincipalId", - "principal_name": "description.PrincipalName", - "principal_type": "description.PrincipalType", - "role_definition_id": "description.RoleAssignment.Properties.RoleDefinitionID", - "scope": "description.Scope", - "scope_type": "description.ScopeType", + "assignment_type": "Description.AssignmentType", + "id": "ResourceID", + "parent_principal_id": "Description.ParentPrincipalId", + "principal_id": "Description.PrincipalId", + "principal_name": "Description.PrincipalName", + "principal_type": "Description.PrincipalType", + "role_definition_id": "Description.RoleAssignment.Properties.RoleDefinitionID", + "scope": "Description.Scope", + "scope_type": "Description.ScopeType", } func GetUserEffectiveAccess(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -22354,72 +17471,14 @@ func GetUserEffectiveAccess(ctx context.Context, d *plugin.QueryData, _ *plugin. // ========================== START: SecurityCenterAutoProvisioning ============================= type SecurityCenterAutoProvisioning struct { - Description azure.SecurityCenterAutoProvisioningDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *SecurityCenterAutoProvisioning) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.SecurityCenterAutoProvisioningDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.SecurityCenterAutoProvisioningDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type SecurityCenterAutoProvisioningHit struct { @@ -22490,12 +17549,11 @@ func (p SecurityCenterAutoProvisioningPaginator) NextPage(ctx context.Context) ( } var listSecurityCenterAutoProvisioningFilters = map[string]string{ - "auto_provision": "description.AutoProvisioningSetting.Properties.AutoProvision", - "id": "description.AutoProvisioningSetting.ID", - "og_account_id": "metadata.SourceID", - "name": "description.AutoProvisioningSetting.Name", - "title": "description.AutoProvisioningSetting.Name", - "type": "description.AutoProvisioningSetting.Type", + "auto_provision": "Description.AutoProvisioningSetting.Properties.AutoProvision", + "id": "Description.AutoProvisioningSetting.ID", + "name": "Description.AutoProvisioningSetting.Name", + "title": "Description.AutoProvisioningSetting.Name", + "type": "Description.AutoProvisioningSetting.Type", } func ListSecurityCenterAutoProvisioning(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -22559,12 +17617,11 @@ func ListSecurityCenterAutoProvisioning(ctx context.Context, d *plugin.QueryData } var getSecurityCenterAutoProvisioningFilters = map[string]string{ - "auto_provision": "description.AutoProvisioningSetting.Properties.AutoProvision", - "id": "description.AutoProvisioningSetting.ID", - "og_account_id": "metadata.SourceID", + "auto_provision": "Description.AutoProvisioningSetting.Properties.AutoProvision", + "id": "Description.AutoProvisioningSetting.ID", "name": "description.AutoProvisioningSetting.name", - "title": "description.AutoProvisioningSetting.Name", - "type": "description.AutoProvisioningSetting.Type", + "title": "Description.AutoProvisioningSetting.Name", + "type": "Description.AutoProvisioningSetting.Type", } func GetSecurityCenterAutoProvisioning(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -22625,72 +17682,14 @@ func GetSecurityCenterAutoProvisioning(ctx context.Context, d *plugin.QueryData, // ========================== START: SecurityCenterContact ============================= type SecurityCenterContact struct { - Description azure.SecurityCenterContactDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *SecurityCenterContact) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.SecurityCenterContactDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.SecurityCenterContactDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type SecurityCenterContactHit struct { @@ -22761,15 +17760,14 @@ func (p SecurityCenterContactPaginator) NextPage(ctx context.Context) ([]Securit } var listSecurityCenterContactFilters = map[string]string{ - "alert_notifications": "description.Contact.Properties.AlertNotifications", - "alerts_to_admins": "description.Contact.Properties.AlertNotifications", - "email": "description.Contact.Properties.Emails", - "id": "description.Contact.ID", - "og_account_id": "metadata.SourceID", - "name": "description.Contact.Name", - "phone": "description.Contact.Properties.Phone", - "title": "description.Contact.Name", - "type": "description.Contact.Type", + "alert_notifications": "Description.Contact.Properties.AlertNotifications", + "alerts_to_admins": "Description.Contact.Properties.AlertNotifications", + "email": "Description.Contact.Properties.Emails", + "id": "Description.Contact.ID", + "name": "Description.Contact.Name", + "phone": "Description.Contact.Properties.Phone", + "title": "Description.Contact.Name", + "type": "Description.Contact.Type", } func ListSecurityCenterContact(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -22833,15 +17831,14 @@ func ListSecurityCenterContact(ctx context.Context, d *plugin.QueryData, _ *plug } var getSecurityCenterContactFilters = map[string]string{ - "alert_notifications": "description.Contact.Properties.AlertNotifications", - "alerts_to_admins": "description.Contact.Properties.AlertNotifications", - "email": "description.Contact.Properties.Emails", - "id": "description.Contact.ID", - "og_account_id": "metadata.SourceID", + "alert_notifications": "Description.Contact.Properties.AlertNotifications", + "alerts_to_admins": "Description.Contact.Properties.AlertNotifications", + "email": "Description.Contact.Properties.Emails", + "id": "Description.Contact.ID", "name": "description.Contact.name", - "phone": "description.Contact.Properties.Phone", - "title": "description.Contact.Name", - "type": "description.Contact.Type", + "phone": "Description.Contact.Properties.Phone", + "title": "Description.Contact.Name", + "type": "Description.Contact.Type", } func GetSecurityCenterContact(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -22902,72 +17899,14 @@ func GetSecurityCenterContact(ctx context.Context, d *plugin.QueryData, _ *plugi // ========================== START: SecurityCenterJitNetworkAccessPolicy ============================= type SecurityCenterJitNetworkAccessPolicy struct { - Description azure.SecurityCenterJitNetworkAccessPolicyDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *SecurityCenterJitNetworkAccessPolicy) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.SecurityCenterJitNetworkAccessPolicyDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.SecurityCenterJitNetworkAccessPolicyDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type SecurityCenterJitNetworkAccessPolicyHit struct { @@ -23038,14 +17977,13 @@ func (p SecurityCenterJitNetworkAccessPolicyPaginator) NextPage(ctx context.Cont } var listSecurityCenterJitNetworkAccessPolicyFilters = map[string]string{ - "id": "description.JitNetworkAccessPolicy.ID", - "og_account_id": "metadata.SourceID", - "kind": "description.JitNetworkAccessPolicy.Kind", - "name": "description.JitNetworkAccessPolicy.Name", - "provisioning_state": "description.JitNetworkAccessPolicy.Properties.ProvisioningState", - "title": "description.JitNetworkAccessPolicy.Name", - "type": "description.JitNetworkAccessPolicy.Type", - "virtual_machines": "description.JitNetworkAccessPolicy.Properties.VirtualMachines", + "id": "Description.JitNetworkAccessPolicy.ID", + "kind": "Description.JitNetworkAccessPolicy.Kind", + "name": "Description.JitNetworkAccessPolicy.Name", + "provisioning_state": "Description.JitNetworkAccessPolicy.Properties.ProvisioningState", + "title": "Description.JitNetworkAccessPolicy.Name", + "type": "Description.JitNetworkAccessPolicy.Type", + "virtual_machines": "Description.JitNetworkAccessPolicy.Properties.VirtualMachines", } func ListSecurityCenterJitNetworkAccessPolicy(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -23109,14 +18047,13 @@ func ListSecurityCenterJitNetworkAccessPolicy(ctx context.Context, d *plugin.Que } var getSecurityCenterJitNetworkAccessPolicyFilters = map[string]string{ - "id": "description.JitNetworkAccessPolicy.ID", - "og_account_id": "metadata.SourceID", - "kind": "description.JitNetworkAccessPolicy.Kind", - "name": "description.JitNetworkAccessPolicy.Name", - "provisioning_state": "description.JitNetworkAccessPolicy.Properties.ProvisioningState", - "title": "description.JitNetworkAccessPolicy.Name", - "type": "description.JitNetworkAccessPolicy.Type", - "virtual_machines": "description.JitNetworkAccessPolicy.Properties.VirtualMachines", + "id": "Description.JitNetworkAccessPolicy.ID", + "kind": "Description.JitNetworkAccessPolicy.Kind", + "name": "Description.JitNetworkAccessPolicy.Name", + "provisioning_state": "Description.JitNetworkAccessPolicy.Properties.ProvisioningState", + "title": "Description.JitNetworkAccessPolicy.Name", + "type": "Description.JitNetworkAccessPolicy.Type", + "virtual_machines": "Description.JitNetworkAccessPolicy.Properties.VirtualMachines", } func GetSecurityCenterJitNetworkAccessPolicy(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -23177,72 +18114,14 @@ func GetSecurityCenterJitNetworkAccessPolicy(ctx context.Context, d *plugin.Quer // ========================== START: SecurityCenterSetting ============================= type SecurityCenterSetting struct { - Description azure.SecurityCenterSettingDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *SecurityCenterSetting) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.SecurityCenterSettingDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.SecurityCenterSettingDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type SecurityCenterSettingHit struct { @@ -23313,13 +18192,12 @@ func (p SecurityCenterSettingPaginator) NextPage(ctx context.Context) ([]Securit } var listSecurityCenterSettingFilters = map[string]string{ - "enabled": "description.ExportSettingStatus", - "id": "description.Setting.ID", - "og_account_id": "metadata.SourceID", - "kind": "description.Setting.Kind", - "name": "description.Setting.Name", - "title": "description.Setting.Name", - "type": "description.Setting.Type", + "enabled": "Description.ExportSettingStatus", + "id": "Description.Setting.ID", + "kind": "Description.Setting.Kind", + "name": "Description.Setting.Name", + "title": "Description.Setting.Name", + "type": "Description.Setting.Type", } func ListSecurityCenterSetting(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -23383,13 +18261,12 @@ func ListSecurityCenterSetting(ctx context.Context, d *plugin.QueryData, _ *plug } var getSecurityCenterSettingFilters = map[string]string{ - "enabled": "description.ExportSettingStatus", - "id": "description.Setting.ID", - "og_account_id": "metadata.SourceID", - "kind": "description.Setting.Kind", - "name": "description.Setting.name", - "title": "description.Setting.Name", - "type": "description.Setting.Type", + "enabled": "Description.ExportSettingStatus", + "id": "Description.Setting.ID", + "kind": "Description.Setting.Kind", + "name": "description.Setting.name", + "title": "Description.Setting.Name", + "type": "Description.Setting.Type", } func GetSecurityCenterSetting(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -23450,72 +18327,14 @@ func GetSecurityCenterSetting(ctx context.Context, d *plugin.QueryData, _ *plugi // ========================== START: SecurityCenterSubscriptionPricing ============================= type SecurityCenterSubscriptionPricing struct { - Description azure.SecurityCenterSubscriptionPricingDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *SecurityCenterSubscriptionPricing) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.SecurityCenterSubscriptionPricingDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.SecurityCenterSubscriptionPricingDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type SecurityCenterSubscriptionPricingHit struct { @@ -23586,13 +18405,12 @@ func (p SecurityCenterSubscriptionPricingPaginator) NextPage(ctx context.Context } var listSecurityCenterSubscriptionPricingFilters = map[string]string{ - "free_trial_remaining_time": "description.Pricing.Properties.FreeTrialRemainingTime", - "id": "description.Pricing.ID", - "og_account_id": "metadata.SourceID", - "name": "description.Pricing.Name", - "pricing_tier": "description.Pricing.Properties.PricingTier", - "title": "description.Pricing.Name", - "type": "description.Pricing.Type", + "free_trial_remaining_time": "Description.Pricing.Properties.FreeTrialRemainingTime", + "id": "Description.Pricing.ID", + "name": "Description.Pricing.Name", + "pricing_tier": "Description.Pricing.Properties.PricingTier", + "title": "Description.Pricing.Name", + "type": "Description.Pricing.Type", } func ListSecurityCenterSubscriptionPricing(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -23656,13 +18474,12 @@ func ListSecurityCenterSubscriptionPricing(ctx context.Context, d *plugin.QueryD } var getSecurityCenterSubscriptionPricingFilters = map[string]string{ - "free_trial_remaining_time": "description.Pricing.Properties.FreeTrialRemainingTime", - "id": "description.Pricing.ID", - "og_account_id": "metadata.SourceID", + "free_trial_remaining_time": "Description.Pricing.Properties.FreeTrialRemainingTime", + "id": "Description.Pricing.ID", "name": "description.Pricing.Name", - "pricing_tier": "description.Pricing.Properties.PricingTier", - "title": "description.Pricing.Name", - "type": "description.Pricing.Type", + "pricing_tier": "Description.Pricing.Properties.PricingTier", + "title": "Description.Pricing.Name", + "type": "Description.Pricing.Type", } func GetSecurityCenterSubscriptionPricing(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -23723,72 +18540,14 @@ func GetSecurityCenterSubscriptionPricing(ctx context.Context, d *plugin.QueryDa // ========================== START: SecurityCenterAutomation ============================= type SecurityCenterAutomation struct { - Description azure.SecurityCenterAutomationDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *SecurityCenterAutomation) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.SecurityCenterAutomationDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.SecurityCenterAutomationDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type SecurityCenterAutomationHit struct { @@ -23859,20 +18618,19 @@ func (p SecurityCenterAutomationPaginator) NextPage(ctx context.Context) ([]Secu } var listSecurityCenterAutomationFilters = map[string]string{ - "actions": "description.Automation.Properties.Actions", - "description": "description.Automation.Properties.Description", - "etag": "description.Automation.Etag", - "id": "description.Automation.ID", - "is_enabled": "description.Automation.Properties.IsEnabled", - "og_account_id": "metadata.SourceID", - "kind": "description.Automation.Kind", - "name": "description.Automation.Name", - "resource_group": "description.ResourceGroup", - "scopes": "description.Automation.Properties.Scopes", - "sources": "description.Automation.Properties.Sources", - "tags": "description.Automation.Tags", - "title": "description.Automation.Name", - "type": "description.Automation.Type", + "actions": "Description.Automation.Properties.Actions", + "description": "Description.Automation.Properties.Description", + "etag": "Description.Automation.Etag", + "id": "Description.Automation.ID", + "is_enabled": "Description.Automation.Properties.IsEnabled", + "kind": "Description.Automation.Kind", + "name": "Description.Automation.Name", + "resource_group": "Description.ResourceGroup", + "scopes": "Description.Automation.Properties.Scopes", + "sources": "Description.Automation.Properties.Sources", + "tags": "Description.Automation.Tags", + "title": "Description.Automation.Name", + "type": "Description.Automation.Type", } func ListSecurityCenterAutomation(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -23936,20 +18694,19 @@ func ListSecurityCenterAutomation(ctx context.Context, d *plugin.QueryData, _ *p } var getSecurityCenterAutomationFilters = map[string]string{ - "actions": "description.Automation.Properties.Actions", - "description": "description.Automation.Properties.Description", - "etag": "description.Automation.Etag", - "id": "description.Automation.ID", - "is_enabled": "description.Automation.Properties.IsEnabled", - "og_account_id": "metadata.SourceID", - "kind": "description.Automation.Kind", + "actions": "Description.Automation.Properties.Actions", + "description": "Description.Automation.Properties.Description", + "etag": "Description.Automation.Etag", + "id": "Description.Automation.ID", + "is_enabled": "Description.Automation.Properties.IsEnabled", + "kind": "Description.Automation.Kind", "name": "description.Automation.name", "resource_group": "description.ResourceGroup", - "scopes": "description.Automation.Properties.Scopes", - "sources": "description.Automation.Properties.Sources", - "tags": "description.Automation.Tags", - "title": "description.Automation.Name", - "type": "description.Automation.Type", + "scopes": "Description.Automation.Properties.Scopes", + "sources": "Description.Automation.Properties.Sources", + "tags": "Description.Automation.Tags", + "title": "Description.Automation.Name", + "type": "Description.Automation.Type", } func GetSecurityCenterAutomation(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -24010,72 +18767,14 @@ func GetSecurityCenterAutomation(ctx context.Context, d *plugin.QueryData, _ *pl // ========================== START: SecurityCenterSubAssessment ============================= type SecurityCenterSubAssessment struct { - Description azure.SecurityCenterSubAssessmentDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *SecurityCenterSubAssessment) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.SecurityCenterSubAssessmentDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.SecurityCenterSubAssessmentDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type SecurityCenterSubAssessmentHit struct { @@ -24146,18 +18845,17 @@ func (p SecurityCenterSubAssessmentPaginator) NextPage(ctx context.Context) ([]S } var listSecurityCenterSubAssessmentFilters = map[string]string{ - "category": "description.SubAssessment.Properties.Category", - "description": "description.SubAssessment.Properties.Description", - "display_name": "description.SubAssessment.Properties.DisplayName", - "id": "description.SubAssessment.ID", - "impact": "description.SubAssessment.Properties.Impact", - "og_account_id": "metadata.SourceID", - "name": "description.SubAssessment.Name", - "remediation": "description.SubAssessment.Properties.Remediation", - "resource_group": "description.ResourceGroup", - "time_generated": "description.SubAssessment.Properties.TimeGenerated", - "title": "description.SubAssessment.Name", - "type": "description.SubAssessment.Type", + "category": "Description.SubAssessment.Properties.Category", + "description": "Description.SubAssessment.Properties.Description", + "display_name": "Description.SubAssessment.Properties.DisplayName", + "id": "Description.SubAssessment.ID", + "impact": "Description.SubAssessment.Properties.Impact", + "name": "Description.SubAssessment.Name", + "remediation": "Description.SubAssessment.Properties.Remediation", + "resource_group": "Description.ResourceGroup", + "time_generated": "Description.SubAssessment.Properties.TimeGenerated", + "title": "Description.SubAssessment.Name", + "type": "Description.SubAssessment.Type", } func ListSecurityCenterSubAssessment(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -24221,18 +18919,17 @@ func ListSecurityCenterSubAssessment(ctx context.Context, d *plugin.QueryData, _ } var getSecurityCenterSubAssessmentFilters = map[string]string{ - "category": "description.SubAssessment.Properties.Category", - "description": "description.SubAssessment.Properties.Description", - "display_name": "description.SubAssessment.Properties.DisplayName", - "id": "description.SubAssessment.ID", - "impact": "description.SubAssessment.Properties.Impact", - "og_account_id": "metadata.SourceID", - "name": "description.SubAssessment.Name", - "remediation": "description.SubAssessment.Properties.Remediation", - "resource_group": "description.ResourceGroup", - "time_generated": "description.SubAssessment.Properties.TimeGenerated", - "title": "description.SubAssessment.Name", - "type": "description.SubAssessment.Type", + "category": "Description.SubAssessment.Properties.Category", + "description": "Description.SubAssessment.Properties.Description", + "display_name": "Description.SubAssessment.Properties.DisplayName", + "id": "Description.SubAssessment.ID", + "impact": "Description.SubAssessment.Properties.Impact", + "name": "Description.SubAssessment.Name", + "remediation": "Description.SubAssessment.Properties.Remediation", + "resource_group": "Description.ResourceGroup", + "time_generated": "Description.SubAssessment.Properties.TimeGenerated", + "title": "Description.SubAssessment.Name", + "type": "Description.SubAssessment.Type", } func GetSecurityCenterSubAssessment(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -24293,72 +18990,14 @@ func GetSecurityCenterSubAssessment(ctx context.Context, d *plugin.QueryData, _ // ========================== START: StorageContainer ============================= type StorageContainer struct { - Description azure.StorageContainerDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *StorageContainer) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.StorageContainerDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.StorageContainerDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type StorageContainerHit struct { @@ -24429,27 +19068,26 @@ func (p StorageContainerPaginator) NextPage(ctx context.Context) ([]StorageConta } var listStorageContainerFilters = map[string]string{ - "account_name": "description.AccountName", - "default_encryption_scope": "description.ListContainerItem.Properties.DefaultEncryptionScope", - "deleted": "description.ListContainerItem.Properties.Deleted", - "deny_encryption_scope_override": "description.ListContainerItem.Properties.DenyEncryptionScopeOverride", - "has_immutability_policy": "description.ListContainerItem.Properties.HasImmutabilityPolicy", - "has_legal_hold": "description.ListContainerItem.Properties.HasLegalHold", - "id": "description.ListContainerItem.ID", - "immutability_policy": "description.ImmutabilityPolicy", - "og_account_id": "metadata.SourceID", - "lease_duration": "description.ListContainerItem.Properties.LeaseDuration", - "lease_state": "description.ListContainerItem.Properties.LeaseState", - "lease_status": "description.ListContainerItem.Properties.LeaseStatus", - "legal_hold": "description.ListContainerItem.Properties.LegalHold", - "metadata": "description.ListContainerItem.Properties.Metadata", - "name": "description.ListContainerItem.Name", - "public_access": "description.ListContainerItem.Properties.PublicAccess", - "remaining_retention_days": "description.ListContainerItem.Properties.RemainingRetentionDays", - "resource_group": "description.ResourceGroup", - "title": "description.ListContainerItem.Name", - "type": "description.ListContainerItem.Type", - "version": "description.ListContainerItem.Properties.Version", + "account_name": "Description.AccountName", + "default_encryption_scope": "Description.ListContainerItem.Properties.DefaultEncryptionScope", + "deleted": "Description.ListContainerItem.Properties.Deleted", + "deny_encryption_scope_override": "Description.ListContainerItem.Properties.DenyEncryptionScopeOverride", + "has_immutability_policy": "Description.ListContainerItem.Properties.HasImmutabilityPolicy", + "has_legal_hold": "Description.ListContainerItem.Properties.HasLegalHold", + "id": "Description.ListContainerItem.ID", + "immutability_policy": "Description.ImmutabilityPolicy", + "lease_duration": "Description.ListContainerItem.Properties.LeaseDuration", + "lease_state": "Description.ListContainerItem.Properties.LeaseState", + "lease_status": "Description.ListContainerItem.Properties.LeaseStatus", + "legal_hold": "Description.ListContainerItem.Properties.LegalHold", + "metadata": "Description.ListContainerItem.Properties.Metadata", + "name": "Description.ListContainerItem.Name", + "public_access": "Description.ListContainerItem.Properties.PublicAccess", + "remaining_retention_days": "Description.ListContainerItem.Properties.RemainingRetentionDays", + "resource_group": "Description.ResourceGroup", + "title": "Description.ListContainerItem.Name", + "type": "Description.ListContainerItem.Type", + "version": "Description.ListContainerItem.Properties.Version", } func ListStorageContainer(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -24514,26 +19152,25 @@ func ListStorageContainer(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy var getStorageContainerFilters = map[string]string{ "account_name": "description.AccountName", - "default_encryption_scope": "description.ListContainerItem.Properties.DefaultEncryptionScope", - "deleted": "description.ListContainerItem.Properties.Deleted", - "deny_encryption_scope_override": "description.ListContainerItem.Properties.DenyEncryptionScopeOverride", - "has_immutability_policy": "description.ListContainerItem.Properties.HasImmutabilityPolicy", - "has_legal_hold": "description.ListContainerItem.Properties.HasLegalHold", - "id": "description.ListContainerItem.ID", - "immutability_policy": "description.ImmutabilityPolicy", - "og_account_id": "metadata.SourceID", - "lease_duration": "description.ListContainerItem.Properties.LeaseDuration", - "lease_state": "description.ListContainerItem.Properties.LeaseState", - "lease_status": "description.ListContainerItem.Properties.LeaseStatus", - "legal_hold": "description.ListContainerItem.Properties.LegalHold", - "metadata": "description.ListContainerItem.Properties.Metadata", + "default_encryption_scope": "Description.ListContainerItem.Properties.DefaultEncryptionScope", + "deleted": "Description.ListContainerItem.Properties.Deleted", + "deny_encryption_scope_override": "Description.ListContainerItem.Properties.DenyEncryptionScopeOverride", + "has_immutability_policy": "Description.ListContainerItem.Properties.HasImmutabilityPolicy", + "has_legal_hold": "Description.ListContainerItem.Properties.HasLegalHold", + "id": "Description.ListContainerItem.ID", + "immutability_policy": "Description.ImmutabilityPolicy", + "lease_duration": "Description.ListContainerItem.Properties.LeaseDuration", + "lease_state": "Description.ListContainerItem.Properties.LeaseState", + "lease_status": "Description.ListContainerItem.Properties.LeaseStatus", + "legal_hold": "Description.ListContainerItem.Properties.LegalHold", + "metadata": "Description.ListContainerItem.Properties.Metadata", "name": "description.ListContainerItem.name", - "public_access": "description.ListContainerItem.Properties.PublicAccess", - "remaining_retention_days": "description.ListContainerItem.Properties.RemainingRetentionDays", + "public_access": "Description.ListContainerItem.Properties.PublicAccess", + "remaining_retention_days": "Description.ListContainerItem.Properties.RemainingRetentionDays", "resource_group": "description.ResourceGroup", - "title": "description.ListContainerItem.Name", - "type": "description.ListContainerItem.Type", - "version": "description.ListContainerItem.Properties.Version", + "title": "Description.ListContainerItem.Name", + "type": "Description.ListContainerItem.Type", + "version": "Description.ListContainerItem.Properties.Version", } func GetStorageContainer(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -24594,72 +19231,14 @@ func GetStorageContainer(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd // ========================== START: StorageBlob ============================= type StorageBlob struct { - Description azure.StorageBlobDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *StorageBlob) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.StorageBlobDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.StorageBlobDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type StorageBlobHit struct { @@ -24730,52 +19309,51 @@ func (p StorageBlobPaginator) NextPage(ctx context.Context) ([]StorageBlob, erro } var listStorageBlobFilters = map[string]string{ - "access_tier": "description.Blob.Properties.AccessTier", - "access_tier_change_time": "description.Blob.Properties.AccessTierChangeTime", - "access_tier_inferred": "description.Blob.Properties.AccessTierInferred", - "archive_status": "description.Blob.Properties.ArchiveStatus", - "blob_sequence_number": "description.Blob.Properties.BlobSequenceNumber", - "blob_tag_set": "description.Blob.BlobTags.BlobTagSet", - "cache_control": "description.Blob.Properties.CacheControl", - "container_name": "description.ContainerName", - "content_disposition": "description.Blob.Properties.ContentDisposition", - "content_encoding": "description.Blob.Properties.ContentEncoding", - "content_language": "description.Blob.Properties.ContentLanguage", - "content_length": "description.Blob.Properties.ContentLength", - "content_md5": "description.Blob.Properties.ContentMD5", - "content_type": "description.Blob.Properties.ContentType", - "copy_completion_time": "description.Blob.Properties.CopyCompletionTime", - "copy_id": "description.Blob.Properties.CopyID", - "copy_progress": "description.Blob.Properties.CopyProgress", - "copy_source": "description.Blob.Properties.CopySource", - "copy_status": "description.Blob.Properties.CopyStatus", - "copy_status_description": "description.Blob.Properties.CopyStatusDescription", - "creation_time": "description.Blob.Properties.CreationTime", - "deleted": "description.Blob.Deleted", - "deleted_time": "description.Blob.Properties.DeletedTime", - "destination_snapshot": "description.Blob.Properties.DestinationSnapshot", - "encryption_key_sha256": "description.Blob.Properties.CustomerProvidedKeySha256", - "encryption_scope": "description.Blob.Properties.EncryptionScope", - "etag": "description.Blob.Properties.Etag", - "incremental_copy": "description.Blob.Properties.IncrementalCopy", - "is_current_version": "description.Blob.IsCurrentVersion", - "is_sealed": "description.Blob.Properties.IsSealed", - "is_snapshot": "description.IsSnapshot", - "og_account_id": "metadata.SourceID", - "last_modified": "description.Blob.Properties.LastModified", - "lease_duration": "description.Blob.Properties.LeaseDuration", - "lease_state": "description.Blob.Properties.LeaseState", - "lease_status": "description.Blob.Properties.LeaseStatus", - "metadata": "description.Blob.Metadata", - "name": "description.Blob.Name", - "remaining_retention_days": "description.Blob.Properties.RemainingRetentionDays", + "access_tier": "Description.Blob.Properties.AccessTier", + "access_tier_change_time": "Description.Blob.Properties.AccessTierChangeTime", + "access_tier_inferred": "Description.Blob.Properties.AccessTierInferred", + "archive_status": "Description.Blob.Properties.ArchiveStatus", + "blob_sequence_number": "Description.Blob.Properties.BlobSequenceNumber", + "blob_tag_set": "Description.Blob.BlobTags.BlobTagSet", + "cache_control": "Description.Blob.Properties.CacheControl", + "container_name": "Description.ContainerName", + "content_disposition": "Description.Blob.Properties.ContentDisposition", + "content_encoding": "Description.Blob.Properties.ContentEncoding", + "content_language": "Description.Blob.Properties.ContentLanguage", + "content_length": "Description.Blob.Properties.ContentLength", + "content_md5": "Description.Blob.Properties.ContentMD5", + "content_type": "Description.Blob.Properties.ContentType", + "copy_completion_time": "Description.Blob.Properties.CopyCompletionTime", + "copy_id": "Description.Blob.Properties.CopyID", + "copy_progress": "Description.Blob.Properties.CopyProgress", + "copy_source": "Description.Blob.Properties.CopySource", + "copy_status": "Description.Blob.Properties.CopyStatus", + "copy_status_description": "Description.Blob.Properties.CopyStatusDescription", + "creation_time": "Description.Blob.Properties.CreationTime", + "deleted": "Description.Blob.Deleted", + "deleted_time": "Description.Blob.Properties.DeletedTime", + "destination_snapshot": "Description.Blob.Properties.DestinationSnapshot", + "encryption_key_sha256": "Description.Blob.Properties.CustomerProvidedKeySha256", + "encryption_scope": "Description.Blob.Properties.EncryptionScope", + "etag": "Description.Blob.Properties.Etag", + "incremental_copy": "Description.Blob.Properties.IncrementalCopy", + "is_current_version": "Description.Blob.IsCurrentVersion", + "is_sealed": "Description.Blob.Properties.IsSealed", + "is_snapshot": "Description.IsSnapshot", + "last_modified": "Description.Blob.Properties.LastModified", + "lease_duration": "Description.Blob.Properties.LeaseDuration", + "lease_state": "Description.Blob.Properties.LeaseState", + "lease_status": "Description.Blob.Properties.LeaseStatus", + "metadata": "Description.Blob.Metadata", + "name": "Description.Blob.Name", + "remaining_retention_days": "Description.Blob.Properties.RemainingRetentionDays", "resource_group": "description.ResourceGroup", - "server_encrypted": "description.Blob.Properties.ServerEncrypted", - "snapshot": "description.Blob.Snapshot", + "server_encrypted": "Description.Blob.Properties.ServerEncrypted", + "snapshot": "Description.Blob.Snapshot", "storage_account_name": "description.AccountName", - "title": "description.Blob.Name", - "type": "description.Blob.Properties.BlobType", - "version_id": "description.Blob.VersionID", + "title": "Description.Blob.Name", + "type": "Description.Blob.Properties.BlobType", + "version_id": "Description.Blob.VersionID", } func ListStorageBlob(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -24839,51 +19417,50 @@ func ListStorageBlob(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate } var getStorageBlobFilters = map[string]string{ - "access_tier": "description.Blob.Properties.AccessTier", - "access_tier_change_time": "description.Blob.Properties.AccessTierChangeTime", - "access_tier_inferred": "description.Blob.Properties.AccessTierInferred", - "archive_status": "description.Blob.Properties.ArchiveStatus", - "blob_sequence_number": "description.Blob.Properties.BlobSequenceNumber", - "blob_tag_set": "description.Blob.BlobTags.BlobTagSet", - "cache_control": "description.Blob.Properties.CacheControl", - "container_name": "description.ContainerName", - "content_disposition": "description.Blob.Properties.ContentDisposition", - "content_encoding": "description.Blob.Properties.ContentEncoding", - "content_language": "description.Blob.Properties.ContentLanguage", - "content_length": "description.Blob.Properties.ContentLength", - "content_md5": "description.Blob.Properties.ContentMD5", - "content_type": "description.Blob.Properties.ContentType", - "copy_completion_time": "description.Blob.Properties.CopyCompletionTime", - "copy_id": "description.Blob.Properties.CopyID", - "copy_progress": "description.Blob.Properties.CopyProgress", - "copy_source": "description.Blob.Properties.CopySource", - "copy_status": "description.Blob.Properties.CopyStatus", - "copy_status_description": "description.Blob.Properties.CopyStatusDescription", - "creation_time": "description.Blob.Properties.CreationTime", - "deleted": "description.Blob.Deleted", - "deleted_time": "description.Blob.Properties.DeletedTime", - "destination_snapshot": "description.Blob.Properties.DestinationSnapshot", - "encryption_key_sha256": "description.Blob.Properties.CustomerProvidedKeySha256", - "encryption_scope": "description.Blob.Properties.EncryptionScope", - "etag": "description.Blob.Properties.Etag", - "incremental_copy": "description.Blob.Properties.IncrementalCopy", - "is_current_version": "description.Blob.IsCurrentVersion", - "is_sealed": "description.Blob.Properties.IsSealed", - "is_snapshot": "description.IsSnapshot", - "og_account_id": "metadata.SourceID", - "last_modified": "description.Blob.Properties.LastModified", - "lease_duration": "description.Blob.Properties.LeaseDuration", - "lease_state": "description.Blob.Properties.LeaseState", - "lease_status": "description.Blob.Properties.LeaseStatus", - "metadata": "description.Blob.Metadata", - "name": "description.Blob.Name", - "remaining_retention_days": "description.Blob.Properties.RemainingRetentionDays", - "server_encrypted": "description.Blob.Properties.ServerEncrypted", - "snapshot": "description.Blob.Snapshot", - "storage_account_name": "description.AccountName", - "title": "description.Blob.Name", - "type": "description.Blob.Properties.BlobType", - "version_id": "description.Blob.VersionID", + "access_tier": "Description.Blob.Properties.AccessTier", + "access_tier_change_time": "Description.Blob.Properties.AccessTierChangeTime", + "access_tier_inferred": "Description.Blob.Properties.AccessTierInferred", + "archive_status": "Description.Blob.Properties.ArchiveStatus", + "blob_sequence_number": "Description.Blob.Properties.BlobSequenceNumber", + "blob_tag_set": "Description.Blob.BlobTags.BlobTagSet", + "cache_control": "Description.Blob.Properties.CacheControl", + "container_name": "Description.ContainerName", + "content_disposition": "Description.Blob.Properties.ContentDisposition", + "content_encoding": "Description.Blob.Properties.ContentEncoding", + "content_language": "Description.Blob.Properties.ContentLanguage", + "content_length": "Description.Blob.Properties.ContentLength", + "content_md5": "Description.Blob.Properties.ContentMD5", + "content_type": "Description.Blob.Properties.ContentType", + "copy_completion_time": "Description.Blob.Properties.CopyCompletionTime", + "copy_id": "Description.Blob.Properties.CopyID", + "copy_progress": "Description.Blob.Properties.CopyProgress", + "copy_source": "Description.Blob.Properties.CopySource", + "copy_status": "Description.Blob.Properties.CopyStatus", + "copy_status_description": "Description.Blob.Properties.CopyStatusDescription", + "creation_time": "Description.Blob.Properties.CreationTime", + "deleted": "Description.Blob.Deleted", + "deleted_time": "Description.Blob.Properties.DeletedTime", + "destination_snapshot": "Description.Blob.Properties.DestinationSnapshot", + "encryption_key_sha256": "Description.Blob.Properties.CustomerProvidedKeySha256", + "encryption_scope": "Description.Blob.Properties.EncryptionScope", + "etag": "Description.Blob.Properties.Etag", + "incremental_copy": "Description.Blob.Properties.IncrementalCopy", + "is_current_version": "Description.Blob.IsCurrentVersion", + "is_sealed": "Description.Blob.Properties.IsSealed", + "is_snapshot": "Description.IsSnapshot", + "last_modified": "Description.Blob.Properties.LastModified", + "lease_duration": "Description.Blob.Properties.LeaseDuration", + "lease_state": "Description.Blob.Properties.LeaseState", + "lease_status": "Description.Blob.Properties.LeaseStatus", + "metadata": "Description.Blob.Metadata", + "name": "Description.Blob.Name", + "remaining_retention_days": "Description.Blob.Properties.RemainingRetentionDays", + "server_encrypted": "Description.Blob.Properties.ServerEncrypted", + "snapshot": "Description.Blob.Snapshot", + "storage_account_name": "Description.AccountName", + "title": "Description.Blob.Name", + "type": "Description.Blob.Properties.BlobType", + "version_id": "Description.Blob.VersionID", } func GetStorageBlob(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -24944,72 +19521,14 @@ func GetStorageBlob(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD // ========================== START: StorageBlobService ============================= type StorageBlobService struct { - Description azure.StorageBlobServiceDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *StorageBlobService) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.StorageBlobServiceDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.StorageBlobServiceDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type StorageBlobServiceHit struct { @@ -25080,23 +19599,22 @@ func (p StorageBlobServicePaginator) NextPage(ctx context.Context) ([]StorageBlo } var listStorageBlobServiceFilters = map[string]string{ - "automatic_snapshot_policy_enabled": "description.BlobService.BlobServiceProperties.AutomaticSnapshotPolicyEnabled", - "change_feed_enabled": "description.BlobService.BlobServiceProperties.ChangeFeed.Enabled", - "container_delete_retention_policy": "description.BlobService.BlobServiceProperties.ContainerDeleteRetentionPolicy", - "cors_rules": "description.BlobService.BlobServiceProperties.Cors.CorsRules", - "default_service_version": "description.BlobService.BlobServiceProperties.DefaultServiceVersion", - "delete_retention_policy": "description.BlobService.BlobServiceProperties.ContainerDeleteRetentionPolicy", - "id": "description.BlobService.ID", - "is_versioning_enabled": "description.BlobService.BlobServiceProperties.IsVersioningEnabled", - "og_account_id": "metadata.SourceID", - "name": "description.BlobService.Name", + "automatic_snapshot_policy_enabled": "Description.BlobService.BlobServiceProperties.AutomaticSnapshotPolicyEnabled", + "change_feed_enabled": "Description.BlobService.BlobServiceProperties.ChangeFeed.Enabled", + "container_delete_retention_policy": "Description.BlobService.BlobServiceProperties.ContainerDeleteRetentionPolicy", + "cors_rules": "Description.BlobService.BlobServiceProperties.Cors.CorsRules", + "default_service_version": "Description.BlobService.BlobServiceProperties.DefaultServiceVersion", + "delete_retention_policy": "Description.BlobService.BlobServiceProperties.ContainerDeleteRetentionPolicy", + "id": "Description.BlobService.ID", + "is_versioning_enabled": "Description.BlobService.BlobServiceProperties.IsVersioningEnabled", + "name": "Description.BlobService.Name", "resource_group": "description.ResourceGroup", - "restore_policy": "description.BlobService.BlobServiceProperties.RestorePolicy", - "sku_name": "description.BlobService.SKU.Name", - "sku_tier": "description.BlobService.SKU.Tier", + "restore_policy": "Description.BlobService.BlobServiceProperties.RestorePolicy", + "sku_name": "Description.BlobService.SKU.Name", + "sku_tier": "Description.BlobService.SKU.Tier", "storage_account_name": "description.AccountName", - "title": "description.BlobService.Name", - "type": "description.BlobService.Type", + "title": "Description.BlobService.Name", + "type": "Description.BlobService.Type", } func ListStorageBlobService(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -25160,23 +19678,22 @@ func ListStorageBlobService(ctx context.Context, d *plugin.QueryData, _ *plugin. } var getStorageBlobServiceFilters = map[string]string{ - "automatic_snapshot_policy_enabled": "description.BlobService.BlobServiceProperties.AutomaticSnapshotPolicyEnabled", - "change_feed_enabled": "description.BlobService.BlobServiceProperties.ChangeFeed.Enabled", - "container_delete_retention_policy": "description.BlobService.BlobServiceProperties.ContainerDeleteRetentionPolicy", - "cors_rules": "description.BlobService.BlobServiceProperties.Cors.CorsRules", - "default_service_version": "description.BlobService.BlobServiceProperties.DefaultServiceVersion", - "delete_retention_policy": "description.BlobService.BlobServiceProperties.ContainerDeleteRetentionPolicy", - "id": "description.BlobService.ID", - "is_versioning_enabled": "description.BlobService.BlobServiceProperties.IsVersioningEnabled", - "og_account_id": "metadata.SourceID", - "name": "description.BlobService.Name", - "resource_group": "description.ResourceGroup", - "restore_policy": "description.BlobService.BlobServiceProperties.RestorePolicy", - "sku_name": "description.BlobService.SKU.Name", - "sku_tier": "description.BlobService.SKU.Tier", - "storage_account_name": "description.AccountName", - "title": "description.BlobService.Name", - "type": "description.BlobService.Type", + "automatic_snapshot_policy_enabled": "Description.BlobService.BlobServiceProperties.AutomaticSnapshotPolicyEnabled", + "change_feed_enabled": "Description.BlobService.BlobServiceProperties.ChangeFeed.Enabled", + "container_delete_retention_policy": "Description.BlobService.BlobServiceProperties.ContainerDeleteRetentionPolicy", + "cors_rules": "Description.BlobService.BlobServiceProperties.Cors.CorsRules", + "default_service_version": "Description.BlobService.BlobServiceProperties.DefaultServiceVersion", + "delete_retention_policy": "Description.BlobService.BlobServiceProperties.ContainerDeleteRetentionPolicy", + "id": "Description.BlobService.ID", + "is_versioning_enabled": "Description.BlobService.BlobServiceProperties.IsVersioningEnabled", + "name": "Description.BlobService.Name", + "resource_group": "Description.ResourceGroup", + "restore_policy": "Description.BlobService.BlobServiceProperties.RestorePolicy", + "sku_name": "Description.BlobService.SKU.Name", + "sku_tier": "Description.BlobService.SKU.Tier", + "storage_account_name": "Description.AccountName", + "title": "Description.BlobService.Name", + "type": "Description.BlobService.Type", } func GetStorageBlobService(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -25237,72 +19754,14 @@ func GetStorageBlobService(ctx context.Context, d *plugin.QueryData, _ *plugin.H // ========================== START: StorageQueue ============================= type StorageQueue struct { - Description azure.StorageQueueDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *StorageQueue) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.StorageQueueDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.StorageQueueDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type StorageQueueHit struct { @@ -25373,14 +19832,13 @@ func (p StorageQueuePaginator) NextPage(ctx context.Context) ([]StorageQueue, er } var listStorageQueueFilters = map[string]string{ - "id": "description.Queue.ID", - "og_account_id": "metadata.SourceID", - "metadata": "description.Queue.QueueProperties.Metadata", + "id": "Description.Queue.ID", + "metadata": "Description.Queue.QueueProperties.Metadata", "name": "description.Queue.Name", "resource_group": "description.ResourceGroup", "storage_account_name": "description.AccountName", - "title": "description.Queue.Name", - "type": "description.Queue.Type", + "title": "Description.Queue.Name", + "type": "Description.Queue.Type", } func ListStorageQueue(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -25444,14 +19902,13 @@ func ListStorageQueue(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat } var getStorageQueueFilters = map[string]string{ - "id": "description.Queue.ID", - "og_account_id": "metadata.SourceID", - "metadata": "description.Queue.QueueProperties.Metadata", - "name": "description.Queue.Name", - "resource_group": "description.ResourceGroup", - "storage_account_name": "description.AccountName", - "title": "description.Queue.Name", - "type": "description.Queue.Type", + "id": "Description.Queue.ID", + "metadata": "Description.Queue.QueueProperties.Metadata", + "name": "Description.Queue.Name", + "resource_group": "Description.ResourceGroup", + "storage_account_name": "Description.AccountName", + "title": "Description.Queue.Name", + "type": "Description.Queue.Type", } func GetStorageQueue(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -25512,72 +19969,14 @@ func GetStorageQueue(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate // ========================== START: StorageFileShare ============================= type StorageFileShare struct { - Description azure.StorageFileShareDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *StorageFileShare) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.StorageFileShareDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.StorageFileShareDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type StorageFileShareHit struct { @@ -25648,23 +20047,22 @@ func (p StorageFileSharePaginator) NextPage(ctx context.Context) ([]StorageFileS } var listStorageFileShareFilters = map[string]string{ - "access_tier": "description.FileShare.Properties.AccessTier", - "access_tier_status": "description.FileShare.Properties.AccessTierStatus", - "deleted": "description.FileShare.Properties.Deleted", - "enabled_protocols": "description.FileShare.Properties.EnabledProtocols", - "id": "description.FileShare.ID", - "og_account_id": "metadata.SourceID", - "metadata": "description.FileShare.Properties.Metadata", + "access_tier": "Description.FileShare.Properties.AccessTier", + "access_tier_status": "Description.FileShare.Properties.AccessTierStatus", + "deleted": "Description.FileShare.Properties.Deleted", + "enabled_protocols": "Description.FileShare.Properties.EnabledProtocols", + "id": "Description.FileShare.ID", + "metadata": "Description.FileShare.Properties.Metadata", "name": "description.FileShare.Name", - "remaining_retention_days": "description.FileShare.Properties.RemainingRetentionDays", + "remaining_retention_days": "Description.FileShare.Properties.RemainingRetentionDays", "resource_group": "description.ResourceGroup", - "root_squash": "description.FileShare.Properties.RootSquash", - "share_quota": "description.FileShare.Properties.ShareQuota", - "share_usage_bytes": "description.FileShare.Properties.ShareUsageBytes", + "root_squash": "Description.FileShare.Properties.RootSquash", + "share_quota": "Description.FileShare.Properties.ShareQuota", + "share_usage_bytes": "Description.FileShare.Properties.ShareUsageBytes", "storage_account_name": "description.AccountName", - "title": "description.FileShare.Name", - "type": "description.FileShare.Type", - "version": "description.FileShare.Properties.Version", + "title": "Description.FileShare.Name", + "type": "Description.FileShare.Type", + "version": "Description.FileShare.Properties.Version", } func ListStorageFileShare(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -25728,22 +20126,21 @@ func ListStorageFileShare(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy } var getStorageFileShareFilters = map[string]string{ - "access_tier": "description.FileShare.Properties.AccessTier", - "access_tier_status": "description.FileShare.Properties.AccessTierStatus", - "deleted": "description.FileShare.Properties.Deleted", - "enabled_protocols": "description.FileShare.Properties.EnabledProtocols", - "id": "description.FileShare.ID", - "og_account_id": "metadata.SourceID", - "metadata": "description.FileShare.Properties.Metadata", - "name": "description.FileShare.Name", - "remaining_retention_days": "description.FileShare.Properties.RemainingRetentionDays", - "root_squash": "description.FileShare.Properties.RootSquash", - "share_quota": "description.FileShare.Properties.ShareQuota", - "share_usage_bytes": "description.FileShare.Properties.ShareUsageBytes", - "storage_account_name": "description.AccountName", - "title": "description.FileShare.Name", - "type": "description.FileShare.Type", - "version": "description.FileShare.Properties.Version", + "access_tier": "Description.FileShare.Properties.AccessTier", + "access_tier_status": "Description.FileShare.Properties.AccessTierStatus", + "deleted": "Description.FileShare.Properties.Deleted", + "enabled_protocols": "Description.FileShare.Properties.EnabledProtocols", + "id": "Description.FileShare.ID", + "metadata": "Description.FileShare.Properties.Metadata", + "name": "Description.FileShare.Name", + "remaining_retention_days": "Description.FileShare.Properties.RemainingRetentionDays", + "root_squash": "Description.FileShare.Properties.RootSquash", + "share_quota": "Description.FileShare.Properties.ShareQuota", + "share_usage_bytes": "Description.FileShare.Properties.ShareUsageBytes", + "storage_account_name": "Description.AccountName", + "title": "Description.FileShare.Name", + "type": "Description.FileShare.Type", + "version": "Description.FileShare.Properties.Version", } func GetStorageFileShare(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -25804,72 +20201,14 @@ func GetStorageFileShare(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd // ========================== START: StorageTable ============================= type StorageTable struct { - Description azure.StorageTableDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *StorageTable) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.StorageTableDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.StorageTableDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type StorageTableHit struct { @@ -25940,13 +20279,12 @@ func (p StorageTablePaginator) NextPage(ctx context.Context) ([]StorageTable, er } var listStorageTableFilters = map[string]string{ - "id": "description.Table.ID", - "og_account_id": "metadata.SourceID", + "id": "Description.Table.ID", "name": "description.Table.Name", "resource_group": "description.ResourceGroup", "storage_account_name": "description.AccountName", - "title": "description.Table.Name", - "type": "description.Table.Type", + "title": "Description.Table.Name", + "type": "Description.Table.Type", } func ListStorageTable(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -26010,12 +20348,11 @@ func ListStorageTable(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat } var getStorageTableFilters = map[string]string{ - "id": "description.Table.ID", - "og_account_id": "metadata.SourceID", - "name": "description.Table.Name", - "storage_account_name": "description.AccountName", - "title": "description.Table.Name", - "type": "description.Table.Type", + "id": "Description.Table.ID", + "name": "Description.Table.Name", + "storage_account_name": "Description.AccountName", + "title": "Description.Table.Name", + "type": "Description.Table.Type", } func GetStorageTable(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -26076,72 +20413,14 @@ func GetStorageTable(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate // ========================== START: StorageTableService ============================= type StorageTableService struct { - Description azure.StorageTableServiceDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *StorageTableService) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.StorageTableServiceDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.StorageTableServiceDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type StorageTableServiceHit struct { @@ -26212,14 +20491,13 @@ func (p StorageTableServicePaginator) NextPage(ctx context.Context) ([]StorageTa } var listStorageTableServiceFilters = map[string]string{ - "cors_rules": "description.TableService.TableServiceProperties.Cors.CorsRules", - "id": "description.TableService.ID", - "og_account_id": "metadata.SourceID", + "cors_rules": "Description.TableService.TableServiceProperties.Cors.CorsRules", + "id": "Description.TableService.ID", "name": "description.TableService.Name", "resource_group": "description.ResourceGroup", "storage_account_name": "description.AccountName", - "title": "description.TableService.Name", - "type": "description.TableService.Type", + "title": "Description.TableService.Name", + "type": "Description.TableService.Type", } func ListStorageTableService(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -26283,13 +20561,12 @@ func ListStorageTableService(ctx context.Context, d *plugin.QueryData, _ *plugin } var getStorageTableServiceFilters = map[string]string{ - "cors_rules": "description.TableService.TableServiceProperties.Cors.CorsRules", - "id": "description.TableService.ID", - "og_account_id": "metadata.SourceID", - "name": "description.TableService.Name", - "storage_account_name": "description.AccountName", - "title": "description.TableService.Name", - "type": "description.TableService.Type", + "cors_rules": "Description.TableService.TableServiceProperties.Cors.CorsRules", + "id": "Description.TableService.ID", + "name": "Description.TableService.Name", + "storage_account_name": "Description.AccountName", + "title": "Description.TableService.Name", + "type": "Description.TableService.Type", } func GetStorageTableService(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -26350,72 +20627,14 @@ func GetStorageTableService(ctx context.Context, d *plugin.QueryData, _ *plugin. // ========================== START: Subnet ============================= type Subnet struct { - Description azure.SubnetDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *Subnet) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.SubnetDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.SubnetDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type SubnetHit struct { @@ -26486,24 +20705,23 @@ func (p SubnetPaginator) NextPage(ctx context.Context) ([]Subnet, error) { } var listSubnetFilters = map[string]string{ - "address_prefix": "description.Subnet.Properties.AddressPrefix", - "delegations": "description.Subnet.Properties.Delegations", - "etag": "description.Subnet.Etag", - "id": "description.Subnet.ID", - "ip_configurations": "description.Subnet.Properties.IPConfigurations", - "og_account_id": "metadata.SourceID", - "name": "description.Subnet.Name", - "nat_gateway_id": "description.Subnet.Properties.NatGateway.ID", - "network_security_group_id": "description.Subnet.Properties.NetworkSecurityGroup.ID", - "private_endpoint_network_policies": "description.Subnet.Properties.PrivateEndpointNetworkPolicies", - "private_link_service_network_policies": "description.Subnet.Properties.PrivateLinkServiceNetworkPolicies", - "provisioning_state": "description.Subnet.Properties.ProvisioningState", - "route_table_id": "description.Subnet.Properties.RouteTable.ID", - "service_endpoint_policies": "description.Subnet.Properties.ServiceEndpointPolicies", - "service_endpoints": "description.Subnet.Properties.ServiceEndpoints", - "title": "description.Subnet.Name", - "type": "description.Subnet.Properties.RouteTable.Type", - "virtual_network_name": "description.VirtualNetworkName", + "address_prefix": "Description.Subnet.Properties.AddressPrefix", + "delegations": "Description.Subnet.Properties.Delegations", + "etag": "Description.Subnet.Etag", + "id": "Description.Subnet.ID", + "ip_configurations": "Description.Subnet.Properties.IPConfigurations", + "name": "Description.Subnet.Name", + "nat_gateway_id": "Description.Subnet.Properties.NatGateway.ID", + "network_security_group_id": "Description.Subnet.Properties.NetworkSecurityGroup.ID", + "private_endpoint_network_policies": "Description.Subnet.Properties.PrivateEndpointNetworkPolicies", + "private_link_service_network_policies": "Description.Subnet.Properties.PrivateLinkServiceNetworkPolicies", + "provisioning_state": "Description.Subnet.Properties.ProvisioningState", + "route_table_id": "Description.Subnet.Properties.RouteTable.ID", + "service_endpoint_policies": "Description.Subnet.Properties.ServiceEndpointPolicies", + "service_endpoints": "Description.Subnet.Properties.ServiceEndpoints", + "title": "Description.Subnet.Name", + "type": "Description.Subnet.Properties.RouteTable.Type", + "virtual_network_name": "Description.VirtualNetworkName", } func ListSubnet(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -26567,24 +20785,23 @@ func ListSubnet(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) } var getSubnetFilters = map[string]string{ - "address_prefix": "description.Subnet.Properties.AddressPrefix", - "delegations": "description.Subnet.Properties.Delegations", - "etag": "description.Subnet.Etag", - "id": "description.Subnet.ID", - "ip_configurations": "description.Subnet.Properties.IPConfigurations", - "og_account_id": "metadata.SourceID", + "address_prefix": "Description.Subnet.Properties.AddressPrefix", + "delegations": "Description.Subnet.Properties.Delegations", + "etag": "Description.Subnet.Etag", + "id": "Description.Subnet.ID", + "ip_configurations": "Description.Subnet.Properties.IPConfigurations", "name": "description.Subnet.name", - "nat_gateway_id": "description.Subnet.Properties.NatGateway.ID", - "network_security_group_id": "description.Subnet.Properties.NetworkSecurityGroup.ID", - "private_endpoint_network_policies": "description.Subnet.Properties.PrivateEndpointNetworkPolicies", - "private_link_service_network_policies": "description.Subnet.Properties.PrivateLinkServiceNetworkPolicies", - "provisioning_state": "description.Subnet.Properties.ProvisioningState", + "nat_gateway_id": "Description.Subnet.Properties.NatGateway.ID", + "network_security_group_id": "Description.Subnet.Properties.NetworkSecurityGroup.ID", + "private_endpoint_network_policies": "Description.Subnet.Properties.PrivateEndpointNetworkPolicies", + "private_link_service_network_policies": "Description.Subnet.Properties.PrivateLinkServiceNetworkPolicies", + "provisioning_state": "Description.Subnet.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", - "route_table_id": "description.Subnet.Properties.RouteTable.ID", - "service_endpoint_policies": "description.Subnet.Properties.ServiceEndpointPolicies", - "service_endpoints": "description.Subnet.Properties.ServiceEndpoints", - "title": "description.Subnet.Name", - "type": "description.Subnet.Properties.RouteTable.Type", + "route_table_id": "Description.Subnet.Properties.RouteTable.ID", + "service_endpoint_policies": "Description.Subnet.Properties.ServiceEndpointPolicies", + "service_endpoints": "Description.Subnet.Properties.ServiceEndpoints", + "title": "Description.Subnet.Name", + "type": "Description.Subnet.Properties.RouteTable.Type", "virtual_network_name": "description.VirtualNetworkName", } @@ -26646,72 +20863,14 @@ func GetSubnet(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) // ========================== START: VirtualNetwork ============================= type VirtualNetwork struct { - Description azure.VirtualNetworkDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *VirtualNetwork) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.VirtualNetworkDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.VirtualNetworkDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type VirtualNetworkHit struct { @@ -26782,21 +20941,20 @@ func (p VirtualNetworkPaginator) NextPage(ctx context.Context) ([]VirtualNetwork } var listVirtualNetworkFilters = map[string]string{ - "address_prefixes": "description.VirtualNetwork.Properties.AddressSpace.AddressPrefixes", - "enable_ddos_protection": "description.VirtualNetwork.Properties.EnableDdosProtection", - "enable_vm_protection": "description.VirtualNetwork.Properties.EnableVMProtection", - "etag": "description.VirtualNetwork.Etag", - "id": "description.VirtualNetwork.ID", - "og_account_id": "metadata.SourceID", - "name": "description.VirtualNetwork.Name", - "network_peerings": "description.VirtualNetwork.Properties.VirtualNetworkPeerings", - "provisioning_state": "description.VirtualNetwork.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "resource_guid": "description.VirtualNetwork.Properties.ResourceGUID", - "subnets": "description.VirtualNetwork.Properties.Subnets", - "tags": "description.VirtualNetwork.Tags", - "title": "description.VirtualNetwork.Name", - "type": "description.VirtualNetwork.Type", + "address_prefixes": "Description.VirtualNetwork.Properties.AddressSpace.AddressPrefixes", + "enable_ddos_protection": "Description.VirtualNetwork.Properties.EnableDdosProtection", + "enable_vm_protection": "Description.VirtualNetwork.Properties.EnableVMProtection", + "etag": "Description.VirtualNetwork.Etag", + "id": "Description.VirtualNetwork.ID", + "name": "Description.VirtualNetwork.Name", + "network_peerings": "Description.VirtualNetwork.Properties.VirtualNetworkPeerings", + "provisioning_state": "Description.VirtualNetwork.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "resource_guid": "Description.VirtualNetwork.Properties.ResourceGUID", + "subnets": "Description.VirtualNetwork.Properties.Subnets", + "tags": "Description.VirtualNetwork.Tags", + "title": "Description.VirtualNetwork.Name", + "type": "Description.VirtualNetwork.Type", } func ListVirtualNetwork(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -26860,21 +21018,20 @@ func ListVirtualNetwork(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr } var getVirtualNetworkFilters = map[string]string{ - "address_prefixes": "description.VirtualNetwork.Properties.AddressSpace.AddressPrefixes", - "enable_ddos_protection": "description.VirtualNetwork.Properties.EnableDdosProtection", - "enable_vm_protection": "description.VirtualNetwork.Properties.EnableVMProtection", - "etag": "description.VirtualNetwork.Etag", - "id": "description.VirtualNetwork.ID", - "og_account_id": "metadata.SourceID", + "address_prefixes": "Description.VirtualNetwork.Properties.AddressSpace.AddressPrefixes", + "enable_ddos_protection": "Description.VirtualNetwork.Properties.EnableDdosProtection", + "enable_vm_protection": "Description.VirtualNetwork.Properties.EnableVMProtection", + "etag": "Description.VirtualNetwork.Etag", + "id": "Description.VirtualNetwork.ID", "name": "description.VirtualNetwork.name", - "network_peerings": "description.VirtualNetwork.Properties.VirtualNetworkPeerings", - "provisioning_state": "description.VirtualNetwork.Properties.ProvisioningState", + "network_peerings": "Description.VirtualNetwork.Properties.VirtualNetworkPeerings", + "provisioning_state": "Description.VirtualNetwork.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", - "resource_guid": "description.VirtualNetwork.Properties.ResourceGUID", - "subnets": "description.VirtualNetwork.Properties.Subnets", - "tags": "description.VirtualNetwork.Tags", - "title": "description.VirtualNetwork.Name", - "type": "description.VirtualNetwork.Type", + "resource_guid": "Description.VirtualNetwork.Properties.ResourceGUID", + "subnets": "Description.VirtualNetwork.Properties.Subnets", + "tags": "Description.VirtualNetwork.Tags", + "title": "Description.VirtualNetwork.Name", + "type": "Description.VirtualNetwork.Type", } func GetVirtualNetwork(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -26935,72 +21092,14 @@ func GetVirtualNetwork(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra // ========================== START: Tenant ============================= type Tenant struct { - Description azure.TenantDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *Tenant) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.TenantDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.TenantDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type TenantHit struct { @@ -27071,13 +21170,12 @@ func (p TenantPaginator) NextPage(ctx context.Context) ([]Tenant, error) { } var listTenantFilters = map[string]string{ - "display_name": "description.TenantIDDescription.Name", - "id": "description.TenantIDDescription.ID", - "og_account_id": "metadata.SourceID", - "name": "description.TenantIDDescription.Name", + "display_name": "Description.TenantIDDescription.Name", + "id": "Description.TenantIDDescription.ID", + "name": "Description.TenantIDDescription.Name", "tenant_category": "TenantCategory", - "tenant_id": "description.TenantIDDescription.TenantID", - "title": "description.TenantIDDescription.Name", + "tenant_id": "Description.TenantIDDescription.TenantID", + "title": "Description.TenantIDDescription.Name", } func ListTenant(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -27141,13 +21239,12 @@ func ListTenant(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) } var getTenantFilters = map[string]string{ - "display_name": "description.TenantIDDescription.Name", - "id": "description.TenantIDDescription.ID", - "og_account_id": "metadata.SourceID", - "name": "description.TenantIDDescription.Name", + "display_name": "Description.TenantIDDescription.Name", + "id": "Description.TenantIDDescription.ID", + "name": "Description.TenantIDDescription.Name", "tenant_category": "TenantCategory", - "tenant_id": "description.TenantIDDescription.TenantID", - "title": "description.TenantIDDescription.Name", + "tenant_id": "Description.TenantIDDescription.TenantID", + "title": "Description.TenantIDDescription.Name", } func GetTenant(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -27208,72 +21305,14 @@ func GetTenant(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) // ========================== START: Subscription ============================= type Subscription struct { - Description azure.SubscriptionDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *Subscription) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.SubscriptionDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.SubscriptionDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type SubscriptionHit struct { @@ -27344,16 +21383,15 @@ func (p SubscriptionPaginator) NextPage(ctx context.Context) ([]Subscription, er } var listSubscriptionFilters = map[string]string{ - "authorization_source": "description.Subscription.AuthorizationSource", - "display_name": "description.Subscription.DisplayName", - "id": "description.Subscription.ID", - "og_account_id": "metadata.SourceID", - "state": "description.Subscription.State", - "subscription_id": "description.Subscription.SubscriptionID", - "subscription_policies": "description.Subscription.SubscriptionPolicies", - "tags": "description.Tags", + "authorization_source": "Description.Subscription.AuthorizationSource", + "display_name": "Description.Subscription.DisplayName", + "id": "Description.Subscription.ID", + "state": "Description.Subscription.State", + "subscription_id": "Description.Subscription.SubscriptionID", + "subscription_policies": "Description.Subscription.SubscriptionPolicies", + "tags": "Description.Tags", "tenant_id": "TenantID", - "title": "description.Subscription.DisplayName", + "title": "Description.Subscription.DisplayName", } func ListSubscription(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -27417,16 +21455,15 @@ func ListSubscription(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat } var getSubscriptionFilters = map[string]string{ - "authorization_source": "description.Subscription.AuthorizationSource", - "display_name": "description.Subscription.DisplayName", - "id": "description.Subscription.ID", - "og_account_id": "metadata.SourceID", - "state": "description.Subscription.State", - "subscription_id": "description.Subscription.SubscriptionID", - "subscription_policies": "description.Subscription.SubscriptionPolicies", - "tags": "description.Tags", + "authorization_source": "Description.Subscription.AuthorizationSource", + "display_name": "Description.Subscription.DisplayName", + "id": "Description.Subscription.ID", + "state": "Description.Subscription.State", + "subscription_id": "Description.Subscription.SubscriptionID", + "subscription_policies": "Description.Subscription.SubscriptionPolicies", + "tags": "Description.Tags", "tenant_id": "TenantID", - "title": "description.Subscription.DisplayName", + "title": "Description.Subscription.DisplayName", } func GetSubscription(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -27487,72 +21524,14 @@ func GetSubscription(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate // ========================== START: ApplicationGateway ============================= type ApplicationGateway struct { - Description azure.ApplicationGatewayDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *ApplicationGateway) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.ApplicationGatewayDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.ApplicationGatewayDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type ApplicationGatewayHit struct { @@ -27623,30 +21602,29 @@ func (p ApplicationGatewayPaginator) NextPage(ctx context.Context) ([]Applicatio } var listApplicationGatewayFilters = map[string]string{ - "autoscale_configuration": "description.ApplicationGateway.Properties.AutoscaleConfiguration", - "custom_error_configurations": "description.ApplicationGateway.Properties.CustomErrorConfigurations", - "diagnostic_settings": "description.DiagnosticSettingsResources", - "enable_fips": "description.ApplicationGateway.Properties.EnableFips", - "enable_http2": "description.ApplicationGateway.Properties.EnableHTTP2", - "etag": "description.ApplicationGateway.Etag", - "firewall_policy": "description.ApplicationGateway.Properties.FirewallPolicy", - "force_firewall_policy_association": "description.ApplicationGateway.Properties.ForceFirewallPolicyAssociation", - "id": "description.ApplicationGateway.ID", - "identity": "description.ApplicationGateway.Identity", - "og_account_id": "metadata.SourceID", - "name": "description.ApplicationGateway.Name", - "operational_state": "description.ApplicationGateway.Properties.OperationalState", - "provisioning_state": "description.ApplicationGateway.Properties.ProvisioningState", - "redirect_configurations": "description.ApplicationGateway.Properties.RedirectConfigurations", - "resource_group": "description.ResourceGroup", - "resource_guid": "description.ApplicationGateway.Properties.ResourceGUID", - "sku": "description.ApplicationGateway.Properties.SKU", - "ssl_policy": "description.ApplicationGateway.Properties.SSLPolicy", - "tags": "description.ApplicationGateway.Tags", - "title": "description.ApplicationGateway.Name", - "type": "description.ApplicationGateway.Type", - "web_application_firewall_configuration": "description.ApplicationGateway.Properties.WebApplicationFirewallConfiguration", - "zones": "description.ApplicationGateway.Zones", + "autoscale_configuration": "Description.ApplicationGateway.Properties.AutoscaleConfiguration", + "custom_error_configurations": "Description.ApplicationGateway.Properties.CustomErrorConfigurations", + "diagnostic_settings": "Description.DiagnosticSettingsResources", + "enable_fips": "Description.ApplicationGateway.Properties.EnableFips", + "enable_http2": "Description.ApplicationGateway.Properties.EnableHTTP2", + "etag": "Description.ApplicationGateway.Etag", + "firewall_policy": "Description.ApplicationGateway.Properties.FirewallPolicy", + "force_firewall_policy_association": "Description.ApplicationGateway.Properties.ForceFirewallPolicyAssociation", + "id": "Description.ApplicationGateway.ID", + "identity": "Description.ApplicationGateway.Identity", + "name": "Description.ApplicationGateway.Name", + "operational_state": "Description.ApplicationGateway.Properties.OperationalState", + "provisioning_state": "Description.ApplicationGateway.Properties.ProvisioningState", + "redirect_configurations": "Description.ApplicationGateway.Properties.RedirectConfigurations", + "resource_group": "Description.ResourceGroup", + "resource_guid": "Description.ApplicationGateway.Properties.ResourceGUID", + "sku": "Description.ApplicationGateway.Properties.SKU", + "ssl_policy": "Description.ApplicationGateway.Properties.SSLPolicy", + "tags": "Description.ApplicationGateway.Tags", + "title": "Description.ApplicationGateway.Name", + "type": "Description.ApplicationGateway.Type", + "web_application_firewall_configuration": "Description.ApplicationGateway.Properties.WebApplicationFirewallConfiguration", + "zones": "Description.ApplicationGateway.Zones", } func ListApplicationGateway(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -27710,30 +21688,29 @@ func ListApplicationGateway(ctx context.Context, d *plugin.QueryData, _ *plugin. } var getApplicationGatewayFilters = map[string]string{ - "autoscale_configuration": "description.ApplicationGateway.Properties.AutoscaleConfiguration", - "custom_error_configurations": "description.ApplicationGateway.Properties.CustomErrorConfigurations", - "diagnostic_settings": "description.DiagnosticSettingsResources", - "enable_fips": "description.ApplicationGateway.Properties.EnableFips", - "enable_http2": "description.ApplicationGateway.Properties.EnableHTTP2", - "etag": "description.ApplicationGateway.Etag", - "firewall_policy": "description.ApplicationGateway.Properties.FirewallPolicy", - "force_firewall_policy_association": "description.ApplicationGateway.Properties.ForceFirewallPolicyAssociation", - "id": "description.ApplicationGateway.ID", - "identity": "description.ApplicationGateway.Identity", - "og_account_id": "metadata.SourceID", + "autoscale_configuration": "Description.ApplicationGateway.Properties.AutoscaleConfiguration", + "custom_error_configurations": "Description.ApplicationGateway.Properties.CustomErrorConfigurations", + "diagnostic_settings": "Description.DiagnosticSettingsResources", + "enable_fips": "Description.ApplicationGateway.Properties.EnableFips", + "enable_http2": "Description.ApplicationGateway.Properties.EnableHTTP2", + "etag": "Description.ApplicationGateway.Etag", + "firewall_policy": "Description.ApplicationGateway.Properties.FirewallPolicy", + "force_firewall_policy_association": "Description.ApplicationGateway.Properties.ForceFirewallPolicyAssociation", + "id": "Description.ApplicationGateway.ID", + "identity": "Description.ApplicationGateway.Identity", "name": "description.ApplicationGateway.name", - "operational_state": "description.ApplicationGateway.Properties.OperationalState", - "provisioning_state": "description.ApplicationGateway.Properties.ProvisioningState", - "redirect_configurations": "description.ApplicationGateway.Properties.RedirectConfigurations", + "operational_state": "Description.ApplicationGateway.Properties.OperationalState", + "provisioning_state": "Description.ApplicationGateway.Properties.ProvisioningState", + "redirect_configurations": "Description.ApplicationGateway.Properties.RedirectConfigurations", "resource_group": "description.ResourceGroup", - "resource_guid": "description.ApplicationGateway.Properties.ResourceGUID", - "sku": "description.ApplicationGateway.Properties.SKU", - "ssl_policy": "description.ApplicationGateway.Properties.SSLPolicy", - "tags": "description.ApplicationGateway.Tags", - "title": "description.ApplicationGateway.Name", - "type": "description.ApplicationGateway.Type", - "web_application_firewall_configuration": "description.ApplicationGateway.Properties.WebApplicationFirewallConfiguration", - "zones": "description.ApplicationGateway.Zones", + "resource_guid": "Description.ApplicationGateway.Properties.ResourceGUID", + "sku": "Description.ApplicationGateway.Properties.SKU", + "ssl_policy": "Description.ApplicationGateway.Properties.SSLPolicy", + "tags": "Description.ApplicationGateway.Tags", + "title": "Description.ApplicationGateway.Name", + "type": "Description.ApplicationGateway.Type", + "web_application_firewall_configuration": "Description.ApplicationGateway.Properties.WebApplicationFirewallConfiguration", + "zones": "Description.ApplicationGateway.Zones", } func GetApplicationGateway(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -27794,72 +21771,14 @@ func GetApplicationGateway(ctx context.Context, d *plugin.QueryData, _ *plugin.H // ========================== START: BatchAccount ============================= type BatchAccount struct { - Description azure.BatchAccountDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *BatchAccount) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.BatchAccountDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.BatchAccountDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type BatchAccountHit struct { @@ -27930,29 +21849,28 @@ func (p BatchAccountPaginator) NextPage(ctx context.Context) ([]BatchAccount, er } var listBatchAccountFilters = map[string]string{ - "account_endpoint": "description.Account.Properties.AccountEndpoint", - "active_job_and_job_schedule_quota": "description.Account.Properties.ActiveJobAndJobScheduleQuota", - "auto_storage": "description.Account.Properties.AutoStorage", - "dedicated_core_quota": "description.Account.Properties.DedicatedCoreQuota", - "dedicated_core_quota_per_vm_family": "description.Account.Properties.DedicatedCoreQuotaPerVMFamily", - "dedicated_core_quota_per_vm_family_enforced": "description.Account.Properties.DedicatedCoreQuotaPerVMFamilyEnforced", - "diagnostic_settings": "description.DiagnosticSettingsResources", - "encryption": "description.Account.Properties.Encryption", - "id": "description.Account.ID", - "identity": "description.Account.Identity", - "og_account_id": "metadata.SourceID", - "key_vault_reference": "description.Account.Properties.KeyVaultReference", - "low_priority_core_quota": "description.Account.Properties.LowPriorityCoreQuota", - "name": "description.Account.Name", - "pool_allocation_mode": "description.Account.Properties.PoolAllocationMode", - "pool_quota": "description.Account.Properties.PoolQuota", - "private_endpoint_connections": "description.Account.Properties.PrivateEndpointConnections", - "provisioning_state": "description.Account.Properties.ProvisioningState", - "public_network_access": "description.Account.Properties.PublicNetworkAccess", - "resource_group": "description.ResourceGroup", - "tags": "description.Account.Tags", - "title": "description.Account.Name", - "type": "description.Account.Type", + "account_endpoint": "Description.Account.Properties.AccountEndpoint", + "active_job_and_job_schedule_quota": "Description.Account.Properties.ActiveJobAndJobScheduleQuota", + "auto_storage": "Description.Account.Properties.AutoStorage", + "dedicated_core_quota": "Description.Account.Properties.DedicatedCoreQuota", + "dedicated_core_quota_per_vm_family": "Description.Account.Properties.DedicatedCoreQuotaPerVMFamily", + "dedicated_core_quota_per_vm_family_enforced": "Description.Account.Properties.DedicatedCoreQuotaPerVMFamilyEnforced", + "diagnostic_settings": "Description.DiagnosticSettingsResources", + "encryption": "Description.Account.Properties.Encryption", + "id": "Description.Account.ID", + "identity": "Description.Account.Identity", + "key_vault_reference": "Description.Account.Properties.KeyVaultReference", + "low_priority_core_quota": "Description.Account.Properties.LowPriorityCoreQuota", + "name": "Description.Account.Name", + "pool_allocation_mode": "Description.Account.Properties.PoolAllocationMode", + "pool_quota": "Description.Account.Properties.PoolQuota", + "private_endpoint_connections": "Description.Account.Properties.PrivateEndpointConnections", + "provisioning_state": "Description.Account.Properties.ProvisioningState", + "public_network_access": "Description.Account.Properties.PublicNetworkAccess", + "resource_group": "Description.ResourceGroup", + "tags": "Description.Account.Tags", + "title": "Description.Account.Name", + "type": "Description.Account.Type", } func ListBatchAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -28016,29 +21934,28 @@ func ListBatchAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat } var getBatchAccountFilters = map[string]string{ - "account_endpoint": "description.Account.Properties.AccountEndpoint", - "active_job_and_job_schedule_quota": "description.Account.Properties.ActiveJobAndJobScheduleQuota", - "auto_storage": "description.Account.Properties.AutoStorage", - "dedicated_core_quota": "description.Account.Properties.DedicatedCoreQuota", - "dedicated_core_quota_per_vm_family": "description.Account.Properties.DedicatedCoreQuotaPerVMFamily", - "dedicated_core_quota_per_vm_family_enforced": "description.Account.Properties.DedicatedCoreQuotaPerVMFamilyEnforced", - "diagnostic_settings": "description.DiagnosticSettingsResources", - "encryption": "description.Account.Properties.Encryption", - "id": "description.Account.ID", - "identity": "description.Account.Identity", - "og_account_id": "metadata.SourceID", - "key_vault_reference": "description.Account.Properties.KeyVaultReference", - "low_priority_core_quota": "description.Account.Properties.LowPriorityCoreQuota", + "account_endpoint": "Description.Account.Properties.AccountEndpoint", + "active_job_and_job_schedule_quota": "Description.Account.Properties.ActiveJobAndJobScheduleQuota", + "auto_storage": "Description.Account.Properties.AutoStorage", + "dedicated_core_quota": "Description.Account.Properties.DedicatedCoreQuota", + "dedicated_core_quota_per_vm_family": "Description.Account.Properties.DedicatedCoreQuotaPerVMFamily", + "dedicated_core_quota_per_vm_family_enforced": "Description.Account.Properties.DedicatedCoreQuotaPerVMFamilyEnforced", + "diagnostic_settings": "Description.DiagnosticSettingsResources", + "encryption": "Description.Account.Properties.Encryption", + "id": "Description.Account.ID", + "identity": "Description.Account.Identity", + "key_vault_reference": "Description.Account.Properties.KeyVaultReference", + "low_priority_core_quota": "Description.Account.Properties.LowPriorityCoreQuota", "name": "description.Account.name", - "pool_allocation_mode": "description.Account.Properties.PoolAllocationMode", - "pool_quota": "description.Account.Properties.PoolQuota", - "private_endpoint_connections": "description.Account.Properties.PrivateEndpointConnections", - "provisioning_state": "description.Account.Properties.ProvisioningState", - "public_network_access": "description.Account.Properties.PublicNetworkAccess", + "pool_allocation_mode": "Description.Account.Properties.PoolAllocationMode", + "pool_quota": "Description.Account.Properties.PoolQuota", + "private_endpoint_connections": "Description.Account.Properties.PrivateEndpointConnections", + "provisioning_state": "Description.Account.Properties.ProvisioningState", + "public_network_access": "Description.Account.Properties.PublicNetworkAccess", "resource_group": "description.ResourceGroup", - "tags": "description.Account.Tags", - "title": "description.Account.Name", - "type": "description.Account.Type", + "tags": "Description.Account.Tags", + "title": "Description.Account.Name", + "type": "Description.Account.Type", } func GetBatchAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -28099,72 +22016,14 @@ func GetBatchAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate // ========================== START: CognitiveAccount ============================= type CognitiveAccount struct { - Description azure.CognitiveAccountDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *CognitiveAccount) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.CognitiveAccountDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.CognitiveAccountDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type CognitiveAccountHit struct { @@ -28235,39 +22094,38 @@ func (p CognitiveAccountPaginator) NextPage(ctx context.Context) ([]CognitiveAcc } var listCognitiveAccountFilters = map[string]string{ - "allowed_fqdn_list": "description.Account.Properties.AllowedFqdnList", - "api_properties": "description.Account.Properties.APIProperties", - "call_rate_limit": "description.Account.Properties.CallRateLimit", - "capabilities": "description.Account.Properties.Capabilities", - "custom_sub_domain_name": "description.Account.Properties.CustomSubDomainName", - "date_created": "description.Account.Properties.DateCreated", - "diagnostic_settings": "description.DiagnosticSettingsResources", - "disable_local_auth": "description.Account.Properties.DisableLocalAuth", - "encryption": "description.Account.Properties.Encryption", - "endpoint": "description.Account.Properties.Endpoint", - "endpoints": "description.Account.Properties.Endpoints", - "etag": "description.Account.Etag", - "id": "description.Account.ID", - "identity": "description.Account.Identity", - "is_migrated": "description.Account.Properties.IsMigrated", - "og_account_id": "metadata.SourceID", - "kind": "description.Account.Kind", - "migration_token": "description.Account.Properties.MigrationToken", - "name": "description.Account.Name", - "network_acls": "description.Account.Properties.NetworkACLs", - "provisioning_state": "description.Account.Properties.ProvisioningState", - "public_network_access": "description.Account.Properties.PublicNetworkAccess", - "quota_limit": "description.Account.Properties.QuotaLimit", - "resource_group": "description.ResourceGroup", - "restore": "description.Account.Properties.Restore", - "restrict_outbound_network_access": "description.Account.Properties.RestrictOutboundNetworkAccess", - "sku": "description.Account.SKU", - "sku_change_info": "description.Account.Properties.SKUChangeInfo", - "system_data": "description.Account.SystemData", - "tags": "description.Account.Tags", - "title": "description.Account.Name", - "type": "description.Account.Type", - "user_owned_storage": "description.Account.Properties.UserOwnedStorage", + "allowed_fqdn_list": "Description.Account.Properties.AllowedFqdnList", + "api_properties": "Description.Account.Properties.APIProperties", + "call_rate_limit": "Description.Account.Properties.CallRateLimit", + "capabilities": "Description.Account.Properties.Capabilities", + "custom_sub_domain_name": "Description.Account.Properties.CustomSubDomainName", + "date_created": "Description.Account.Properties.DateCreated", + "diagnostic_settings": "Description.DiagnosticSettingsResources", + "disable_local_auth": "Description.Account.Properties.DisableLocalAuth", + "encryption": "Description.Account.Properties.Encryption", + "endpoint": "Description.Account.Properties.Endpoint", + "endpoints": "Description.Account.Properties.Endpoints", + "etag": "Description.Account.Etag", + "id": "Description.Account.ID", + "identity": "Description.Account.Identity", + "is_migrated": "Description.Account.Properties.IsMigrated", + "kind": "Description.Account.Kind", + "migration_token": "Description.Account.Properties.MigrationToken", + "name": "Description.Account.Name", + "network_acls": "Description.Account.Properties.NetworkACLs", + "provisioning_state": "Description.Account.Properties.ProvisioningState", + "public_network_access": "Description.Account.Properties.PublicNetworkAccess", + "quota_limit": "Description.Account.Properties.QuotaLimit", + "resource_group": "Description.ResourceGroup", + "restore": "Description.Account.Properties.Restore", + "restrict_outbound_network_access": "Description.Account.Properties.RestrictOutboundNetworkAccess", + "sku": "Description.Account.SKU", + "sku_change_info": "Description.Account.Properties.SKUChangeInfo", + "system_data": "Description.Account.SystemData", + "tags": "Description.Account.Tags", + "title": "Description.Account.Name", + "type": "Description.Account.Type", + "user_owned_storage": "Description.Account.Properties.UserOwnedStorage", } func ListCognitiveAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -28331,39 +22189,38 @@ func ListCognitiveAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy } var getCognitiveAccountFilters = map[string]string{ - "allowed_fqdn_list": "description.Account.Properties.AllowedFqdnList", - "api_properties": "description.Account.Properties.APIProperties", - "call_rate_limit": "description.Account.Properties.CallRateLimit", - "capabilities": "description.Account.Properties.Capabilities", - "custom_sub_domain_name": "description.Account.Properties.CustomSubDomainName", - "date_created": "description.Account.Properties.DateCreated", - "diagnostic_settings": "description.DiagnosticSettingsResources", - "disable_local_auth": "description.Account.Properties.DisableLocalAuth", - "encryption": "description.Account.Properties.Encryption", - "endpoint": "description.Account.Properties.Endpoint", - "endpoints": "description.Account.Properties.Endpoints", - "etag": "description.Account.Etag", - "id": "description.Account.ID", - "identity": "description.Account.Identity", - "is_migrated": "description.Account.Properties.IsMigrated", - "og_account_id": "metadata.SourceID", - "kind": "description.Account.Kind", - "migration_token": "description.Account.Properties.MigrationToken", + "allowed_fqdn_list": "Description.Account.Properties.AllowedFqdnList", + "api_properties": "Description.Account.Properties.APIProperties", + "call_rate_limit": "Description.Account.Properties.CallRateLimit", + "capabilities": "Description.Account.Properties.Capabilities", + "custom_sub_domain_name": "Description.Account.Properties.CustomSubDomainName", + "date_created": "Description.Account.Properties.DateCreated", + "diagnostic_settings": "Description.DiagnosticSettingsResources", + "disable_local_auth": "Description.Account.Properties.DisableLocalAuth", + "encryption": "Description.Account.Properties.Encryption", + "endpoint": "Description.Account.Properties.Endpoint", + "endpoints": "Description.Account.Properties.Endpoints", + "etag": "Description.Account.Etag", + "id": "Description.Account.ID", + "identity": "Description.Account.Identity", + "is_migrated": "Description.Account.Properties.IsMigrated", + "kind": "Description.Account.Kind", + "migration_token": "Description.Account.Properties.MigrationToken", "name": "description.Account.name", - "network_acls": "description.Account.Properties.NetworkACLs", - "provisioning_state": "description.Account.Properties.ProvisioningState", - "public_network_access": "description.Account.Properties.PublicNetworkAccess", - "quota_limit": "description.Account.Properties.QuotaLimit", + "network_acls": "Description.Account.Properties.NetworkACLs", + "provisioning_state": "Description.Account.Properties.ProvisioningState", + "public_network_access": "Description.Account.Properties.PublicNetworkAccess", + "quota_limit": "Description.Account.Properties.QuotaLimit", "resource_group": "description.ResourceGroup", - "restore": "description.Account.Properties.Restore", - "restrict_outbound_network_access": "description.Account.Properties.RestrictOutboundNetworkAccess", - "sku": "description.Account.SKU", - "sku_change_info": "description.Account.Properties.SKUChangeInfo", - "system_data": "description.Account.SystemData", - "tags": "description.Account.Tags", - "title": "description.Account.Name", - "type": "description.Account.Type", - "user_owned_storage": "description.Account.Properties.UserOwnedStorage", + "restore": "Description.Account.Properties.Restore", + "restrict_outbound_network_access": "Description.Account.Properties.RestrictOutboundNetworkAccess", + "sku": "Description.Account.SKU", + "sku_change_info": "Description.Account.Properties.SKUChangeInfo", + "system_data": "Description.Account.SystemData", + "tags": "Description.Account.Tags", + "title": "Description.Account.Name", + "type": "Description.Account.Type", + "user_owned_storage": "Description.Account.Properties.UserOwnedStorage", } func GetCognitiveAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -28424,72 +22281,14 @@ func GetCognitiveAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd // ========================== START: ComputeVirtualMachine ============================= type ComputeVirtualMachine struct { - Description azure.ComputeVirtualMachineDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *ComputeVirtualMachine) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.ComputeVirtualMachineDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.ComputeVirtualMachineDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type ComputeVirtualMachineHit struct { @@ -28560,61 +22359,60 @@ func (p ComputeVirtualMachinePaginator) NextPage(ctx context.Context) ([]Compute } var listComputeVirtualMachineFilters = map[string]string{ - "additional_unattend_content": "description.VirtualMachine.Properties.OSProfile.WindowsConfiguration.AdditionalUnattendContent", - "admin_user_name": "description.VirtualMachine.Properties.OSProfile.AdminUsername", - "allow_extension_operations": "description.VirtualMachine.Properties.OSProfile.AllowExtensionOperations", - "availability_set_id": "description.VirtualMachine.Properties.AvailabilitySet.ID", - "billing_profile_max_price": "description.VirtualMachine.Properties.BillingProfile.MaxPrice", - "boot_diagnostics_enabled": "description.VirtualMachine.Properties.DiagnosticsProfile.BootDiagnostics.Enabled", - "boot_diagnostics_storage_uri": "description.VirtualMachine.Properties.DiagnosticsProfile.BootDiagnostics.StorageURI", - "computer_name": "description.VirtualMachine.Properties.OSProfile.ComputerName", - "data_disks": "description.VirtualMachine.Properties.StorageProfile.DataDisks", - "disable_password_authentication": "description.VirtualMachine.Properties.OSProfile.LinuxConfiguration.DisablePasswordAuthentication", - "enable_automatic_updates": "description.VirtualMachine.Properties.OSProfile.WindowsConfiguration.EnableAutomaticUpdates", - "eviction_policy": "description.VirtualMachine.Properties.EvictionPolicy", - "extensions": "description.VirtualMachineExtension", - "extensions_settings": "description.ExtensionsSettings", - "guest_configuration_assignments": "description.Assignments", - "id": "description.VirtualMachine.ID", - "identity": "description.VirtualMachine.Identity", - "image_exact_version": "description.VirtualMachine.Properties.StorageProfile.ImageReference.ExactVersion", - "image_id": "description.VirtualMachine.Properties.StorageProfile.ImageReference.ID", - "image_offer": "description.VirtualMachine.Properties.StorageProfile.ImageReference.Offer", - "image_publisher": "description.VirtualMachine.Properties.StorageProfile.ImageReference.Publisher", - "image_sku": "description.VirtualMachine.Properties.StorageProfile.ImageReference.SKU", - "image_version": "description.VirtualMachine.Properties.StorageProfile.ImageReference.Version", - "og_account_id": "metadata.SourceID", - "linux_configuration_ssh_public_keys": "description.VirtualMachine.Properties.OSProfile.LinuxConfiguration.SSH.PublicKeys", - "managed_disk_id": "description.VirtualMachine.Properties.StorageProfile.OSDisk.ManagedDisk.ID", - "name": "description.VirtualMachine.Name", - "network_interfaces": "description.VirtualMachine.Properties.NetworkProfile.NetworkInterfaces", - "os_disk_caching": "description.VirtualMachine.Properties.StorageProfile.OSDisk.Caching", - "os_disk_create_option": "description.VirtualMachine.Properties.StorageProfile.OSDisk.CreateOption", - "os_disk_name": "description.VirtualMachine.Properties.StorageProfile.OSDisk.Name", - "os_disk_vhd_uri": "description.VirtualMachine.Properties.StorageProfile.OSDisk.Vhd.URI", - "os_name": "description.VirtualMachineInstanceView.OSName", - "os_type": "description.VirtualMachine.Properties.StorageProfile.OSDisk.OSType", - "os_version": "description.VirtualMachineInstanceView.OSVersion", - "patch_settings": "description.VirtualMachine.Properties.OSProfile.WindowsConfiguration.PatchSettings", - "priority": "description.VirtualMachine.Properties.Priority", - "provision_vm_agent": "description.VirtualMachine.Properties.OSProfile.LinuxConfiguration.ProvisionVMAgent", - "provision_vm_agent_windows": "description.VirtualMachine.Properties.OSProfile.WindowsConfiguration.ProvisionVMAgent", - "provisioning_state": "description.VirtualMachine.Properties.ProvisioningState", - "public_ips": "description.PublicIPs", - "require_guest_provision_signal": "description.VirtualMachine.Properties.OSProfile.RequireGuestProvisionSignal", - "resource_group": "description.ResourceGroup", - "secrets": "description.VirtualMachine.Properties.OSProfile.Secrets", - "security_profile": "description.VirtualMachine.Properties.SecurityProfile", - "size": "description.VirtualMachine.Properties.HardwareProfile.VMSize", - "statuses": "description.VirtualMachineInstanceView.Statuses", - "tags": "description.VirtualMachine.Tags", - "time_zone": "description.VirtualMachine.Properties.OSProfile.WindowsConfiguration.TimeZone", - "title": "description.VirtualMachine.Name", - "type": "description.VirtualMachine.Type", - "ultra_ssd_enabled": "description.VirtualMachine.Properties.AdditionalCapabilities.UltraSSDEnabled", - "vm_id": "description.VirtualMachine.Properties.VMID", - "win_rm": "description.VirtualMachine.Properties.OSProfile.WindowsConfiguration.WinRM", - "zones": "description.VirtualMachine.Zones", + "additional_unattend_content": "Description.VirtualMachine.Properties.OSProfile.WindowsConfiguration.AdditionalUnattendContent", + "admin_user_name": "Description.VirtualMachine.Properties.OSProfile.AdminUsername", + "allow_extension_operations": "Description.VirtualMachine.Properties.OSProfile.AllowExtensionOperations", + "availability_set_id": "Description.VirtualMachine.Properties.AvailabilitySet.ID", + "billing_profile_max_price": "Description.VirtualMachine.Properties.BillingProfile.MaxPrice", + "boot_diagnostics_enabled": "Description.VirtualMachine.Properties.DiagnosticsProfile.BootDiagnostics.Enabled", + "boot_diagnostics_storage_uri": "Description.VirtualMachine.Properties.DiagnosticsProfile.BootDiagnostics.StorageURI", + "computer_name": "Description.VirtualMachine.Properties.OSProfile.ComputerName", + "data_disks": "Description.VirtualMachine.Properties.StorageProfile.DataDisks", + "disable_password_authentication": "Description.VirtualMachine.Properties.OSProfile.LinuxConfiguration.DisablePasswordAuthentication", + "enable_automatic_updates": "Description.VirtualMachine.Properties.OSProfile.WindowsConfiguration.EnableAutomaticUpdates", + "eviction_policy": "Description.VirtualMachine.Properties.EvictionPolicy", + "extensions": "Description.VirtualMachineExtension", + "extensions_settings": "Description.ExtensionsSettings", + "guest_configuration_assignments": "Description.Assignments", + "id": "Description.VirtualMachine.ID", + "identity": "Description.VirtualMachine.Identity", + "image_exact_version": "Description.VirtualMachine.Properties.StorageProfile.ImageReference.ExactVersion", + "image_id": "Description.VirtualMachine.Properties.StorageProfile.ImageReference.ID", + "image_offer": "Description.VirtualMachine.Properties.StorageProfile.ImageReference.Offer", + "image_publisher": "Description.VirtualMachine.Properties.StorageProfile.ImageReference.Publisher", + "image_sku": "Description.VirtualMachine.Properties.StorageProfile.ImageReference.SKU", + "image_version": "Description.VirtualMachine.Properties.StorageProfile.ImageReference.Version", + "linux_configuration_ssh_public_keys": "Description.VirtualMachine.Properties.OSProfile.LinuxConfiguration.SSH.PublicKeys", + "managed_disk_id": "Description.VirtualMachine.Properties.StorageProfile.OSDisk.ManagedDisk.ID", + "name": "Description.VirtualMachine.Name", + "network_interfaces": "Description.VirtualMachine.Properties.NetworkProfile.NetworkInterfaces", + "os_disk_caching": "Description.VirtualMachine.Properties.StorageProfile.OSDisk.Caching", + "os_disk_create_option": "Description.VirtualMachine.Properties.StorageProfile.OSDisk.CreateOption", + "os_disk_name": "Description.VirtualMachine.Properties.StorageProfile.OSDisk.Name", + "os_disk_vhd_uri": "Description.VirtualMachine.Properties.StorageProfile.OSDisk.Vhd.URI", + "os_name": "Description.VirtualMachineInstanceView.OSName", + "os_type": "Description.VirtualMachine.Properties.StorageProfile.OSDisk.OSType", + "os_version": "Description.VirtualMachineInstanceView.OSVersion", + "patch_settings": "Description.VirtualMachine.Properties.OSProfile.WindowsConfiguration.PatchSettings", + "priority": "Description.VirtualMachine.Properties.Priority", + "provision_vm_agent": "Description.VirtualMachine.Properties.OSProfile.LinuxConfiguration.ProvisionVMAgent", + "provision_vm_agent_windows": "Description.VirtualMachine.Properties.OSProfile.WindowsConfiguration.ProvisionVMAgent", + "provisioning_state": "Description.VirtualMachine.Properties.ProvisioningState", + "public_ips": "Description.PublicIPs", + "require_guest_provision_signal": "Description.VirtualMachine.Properties.OSProfile.RequireGuestProvisionSignal", + "resource_group": "Description.ResourceGroup", + "secrets": "Description.VirtualMachine.Properties.OSProfile.Secrets", + "security_profile": "Description.VirtualMachine.Properties.SecurityProfile", + "size": "Description.VirtualMachine.Properties.HardwareProfile.VMSize", + "statuses": "Description.VirtualMachineInstanceView.Statuses", + "tags": "Description.VirtualMachine.Tags", + "time_zone": "Description.VirtualMachine.Properties.OSProfile.WindowsConfiguration.TimeZone", + "title": "Description.VirtualMachine.Name", + "type": "Description.VirtualMachine.Type", + "ultra_ssd_enabled": "Description.VirtualMachine.Properties.AdditionalCapabilities.UltraSSDEnabled", + "vm_id": "Description.VirtualMachine.Properties.VMID", + "win_rm": "Description.VirtualMachine.Properties.OSProfile.WindowsConfiguration.WinRM", + "zones": "Description.VirtualMachine.Zones", } func ListComputeVirtualMachine(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -28678,61 +22476,60 @@ func ListComputeVirtualMachine(ctx context.Context, d *plugin.QueryData, _ *plug } var getComputeVirtualMachineFilters = map[string]string{ - "additional_unattend_content": "description.VirtualMachine.Properties.OSProfile.WindowsConfiguration.AdditionalUnattendContent", - "admin_user_name": "description.VirtualMachine.Properties.OSProfile.AdminUsername", - "allow_extension_operations": "description.VirtualMachine.Properties.OSProfile.AllowExtensionOperations", - "availability_set_id": "description.VirtualMachine.Properties.AvailabilitySet.ID", - "billing_profile_max_price": "description.VirtualMachine.Properties.BillingProfile.MaxPrice", - "boot_diagnostics_enabled": "description.VirtualMachine.Properties.DiagnosticsProfile.BootDiagnostics.Enabled", - "boot_diagnostics_storage_uri": "description.VirtualMachine.Properties.DiagnosticsProfile.BootDiagnostics.StorageURI", - "computer_name": "description.VirtualMachine.Properties.OSProfile.ComputerName", - "data_disks": "description.VirtualMachine.Properties.StorageProfile.DataDisks", - "disable_password_authentication": "description.VirtualMachine.Properties.OSProfile.LinuxConfiguration.DisablePasswordAuthentication", - "enable_automatic_updates": "description.VirtualMachine.Properties.OSProfile.WindowsConfiguration.EnableAutomaticUpdates", - "eviction_policy": "description.VirtualMachine.Properties.EvictionPolicy", - "extensions": "description.VirtualMachineExtension", - "extensions_settings": "description.ExtensionsSettings", - "guest_configuration_assignments": "description.Assignments", - "id": "description.VirtualMachine.ID", - "identity": "description.VirtualMachine.Identity", - "image_exact_version": "description.VirtualMachine.Properties.StorageProfile.ImageReference.ExactVersion", - "image_id": "description.VirtualMachine.Properties.StorageProfile.ImageReference.ID", - "image_offer": "description.VirtualMachine.Properties.StorageProfile.ImageReference.Offer", - "image_publisher": "description.VirtualMachine.Properties.StorageProfile.ImageReference.Publisher", - "image_sku": "description.VirtualMachine.Properties.StorageProfile.ImageReference.SKU", - "image_version": "description.VirtualMachine.Properties.StorageProfile.ImageReference.Version", - "og_account_id": "metadata.SourceID", - "linux_configuration_ssh_public_keys": "description.VirtualMachine.Properties.OSProfile.LinuxConfiguration.SSH.PublicKeys", - "managed_disk_id": "description.VirtualMachine.Properties.StorageProfile.OSDisk.ManagedDisk.ID", + "additional_unattend_content": "Description.VirtualMachine.Properties.OSProfile.WindowsConfiguration.AdditionalUnattendContent", + "admin_user_name": "Description.VirtualMachine.Properties.OSProfile.AdminUsername", + "allow_extension_operations": "Description.VirtualMachine.Properties.OSProfile.AllowExtensionOperations", + "availability_set_id": "Description.VirtualMachine.Properties.AvailabilitySet.ID", + "billing_profile_max_price": "Description.VirtualMachine.Properties.BillingProfile.MaxPrice", + "boot_diagnostics_enabled": "Description.VirtualMachine.Properties.DiagnosticsProfile.BootDiagnostics.Enabled", + "boot_diagnostics_storage_uri": "Description.VirtualMachine.Properties.DiagnosticsProfile.BootDiagnostics.StorageURI", + "computer_name": "Description.VirtualMachine.Properties.OSProfile.ComputerName", + "data_disks": "Description.VirtualMachine.Properties.StorageProfile.DataDisks", + "disable_password_authentication": "Description.VirtualMachine.Properties.OSProfile.LinuxConfiguration.DisablePasswordAuthentication", + "enable_automatic_updates": "Description.VirtualMachine.Properties.OSProfile.WindowsConfiguration.EnableAutomaticUpdates", + "eviction_policy": "Description.VirtualMachine.Properties.EvictionPolicy", + "extensions": "Description.VirtualMachineExtension", + "extensions_settings": "Description.ExtensionsSettings", + "guest_configuration_assignments": "Description.Assignments", + "id": "Description.VirtualMachine.ID", + "identity": "Description.VirtualMachine.Identity", + "image_exact_version": "Description.VirtualMachine.Properties.StorageProfile.ImageReference.ExactVersion", + "image_id": "Description.VirtualMachine.Properties.StorageProfile.ImageReference.ID", + "image_offer": "Description.VirtualMachine.Properties.StorageProfile.ImageReference.Offer", + "image_publisher": "Description.VirtualMachine.Properties.StorageProfile.ImageReference.Publisher", + "image_sku": "Description.VirtualMachine.Properties.StorageProfile.ImageReference.SKU", + "image_version": "Description.VirtualMachine.Properties.StorageProfile.ImageReference.Version", + "linux_configuration_ssh_public_keys": "Description.VirtualMachine.Properties.OSProfile.LinuxConfiguration.SSH.PublicKeys", + "managed_disk_id": "Description.VirtualMachine.Properties.StorageProfile.OSDisk.ManagedDisk.ID", "name": "description.VirtualMachine.name", - "network_interfaces": "description.VirtualMachine.Properties.NetworkProfile.NetworkInterfaces", - "os_disk_caching": "description.VirtualMachine.Properties.StorageProfile.OSDisk.Caching", - "os_disk_create_option": "description.VirtualMachine.Properties.StorageProfile.OSDisk.CreateOption", - "os_disk_name": "description.VirtualMachine.Properties.StorageProfile.OSDisk.Name", - "os_disk_vhd_uri": "description.VirtualMachine.Properties.StorageProfile.OSDisk.Vhd.URI", - "os_name": "description.VirtualMachineInstanceView.OSName", - "os_type": "description.VirtualMachine.Properties.StorageProfile.OSDisk.OSType", - "os_version": "description.VirtualMachineInstanceView.OSVersion", - "patch_settings": "description.VirtualMachine.Properties.OSProfile.WindowsConfiguration.PatchSettings", - "priority": "description.VirtualMachine.Properties.Priority", - "provision_vm_agent": "description.VirtualMachine.Properties.OSProfile.LinuxConfiguration.ProvisionVMAgent", - "provision_vm_agent_windows": "description.VirtualMachine.Properties.OSProfile.WindowsConfiguration.ProvisionVMAgent", - "provisioning_state": "description.VirtualMachine.Properties.ProvisioningState", - "public_ips": "description.PublicIPs", - "require_guest_provision_signal": "description.VirtualMachine.Properties.OSProfile.RequireGuestProvisionSignal", + "network_interfaces": "Description.VirtualMachine.Properties.NetworkProfile.NetworkInterfaces", + "os_disk_caching": "Description.VirtualMachine.Properties.StorageProfile.OSDisk.Caching", + "os_disk_create_option": "Description.VirtualMachine.Properties.StorageProfile.OSDisk.CreateOption", + "os_disk_name": "Description.VirtualMachine.Properties.StorageProfile.OSDisk.Name", + "os_disk_vhd_uri": "Description.VirtualMachine.Properties.StorageProfile.OSDisk.Vhd.URI", + "os_name": "Description.VirtualMachineInstanceView.OSName", + "os_type": "Description.VirtualMachine.Properties.StorageProfile.OSDisk.OSType", + "os_version": "Description.VirtualMachineInstanceView.OSVersion", + "patch_settings": "Description.VirtualMachine.Properties.OSProfile.WindowsConfiguration.PatchSettings", + "priority": "Description.VirtualMachine.Properties.Priority", + "provision_vm_agent": "Description.VirtualMachine.Properties.OSProfile.LinuxConfiguration.ProvisionVMAgent", + "provision_vm_agent_windows": "Description.VirtualMachine.Properties.OSProfile.WindowsConfiguration.ProvisionVMAgent", + "provisioning_state": "Description.VirtualMachine.Properties.ProvisioningState", + "public_ips": "Description.PublicIPs", + "require_guest_provision_signal": "Description.VirtualMachine.Properties.OSProfile.RequireGuestProvisionSignal", "resource_group": "description.ResourceGroup", - "secrets": "description.VirtualMachine.Properties.OSProfile.Secrets", - "security_profile": "description.VirtualMachine.Properties.SecurityProfile", - "size": "description.VirtualMachine.Properties.HardwareProfile.VMSize", - "statuses": "description.VirtualMachineInstanceView.Statuses", - "tags": "description.VirtualMachine.Tags", - "time_zone": "description.VirtualMachine.Properties.OSProfile.WindowsConfiguration.TimeZone", - "title": "description.VirtualMachine.Name", - "type": "description.VirtualMachine.Type", - "ultra_ssd_enabled": "description.VirtualMachine.Properties.AdditionalCapabilities.UltraSSDEnabled", - "vm_id": "description.VirtualMachine.Properties.VMID", - "win_rm": "description.VirtualMachine.Properties.OSProfile.WindowsConfiguration.WinRM", - "zones": "description.VirtualMachine.Zones", + "secrets": "Description.VirtualMachine.Properties.OSProfile.Secrets", + "security_profile": "Description.VirtualMachine.Properties.SecurityProfile", + "size": "Description.VirtualMachine.Properties.HardwareProfile.VMSize", + "statuses": "Description.VirtualMachineInstanceView.Statuses", + "tags": "Description.VirtualMachine.Tags", + "time_zone": "Description.VirtualMachine.Properties.OSProfile.WindowsConfiguration.TimeZone", + "title": "Description.VirtualMachine.Name", + "type": "Description.VirtualMachine.Type", + "ultra_ssd_enabled": "Description.VirtualMachine.Properties.AdditionalCapabilities.UltraSSDEnabled", + "vm_id": "Description.VirtualMachine.Properties.VMID", + "win_rm": "Description.VirtualMachine.Properties.OSProfile.WindowsConfiguration.WinRM", + "zones": "Description.VirtualMachine.Zones", } func GetComputeVirtualMachine(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -28793,72 +22590,14 @@ func GetComputeVirtualMachine(ctx context.Context, d *plugin.QueryData, _ *plugi // ========================== START: ComputeResourceSKU ============================= type ComputeResourceSKU struct { - Description azure.ComputeResourceSKUDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *ComputeResourceSKU) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.ComputeResourceSKUDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.ComputeResourceSKUDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type ComputeResourceSKUHit struct { @@ -28929,20 +22668,19 @@ func (p ComputeResourceSKUPaginator) NextPage(ctx context.Context) ([]ComputeRes } var listComputeResourceSKUFilters = map[string]string{ - "api_versions": "description.ResourceSKU.APIVersions", - "default_capacity": "description.ResourceSKU.Capacity.Default", - "family": "description.ResourceSKU.Family", - "og_account_id": "metadata.SourceID", - "kind": "description.ResourceSKU.Kind", - "locations": "description.ResourceSKU.Locations", - "maximum_capacity": "description.ResourceSKU.Capacity.Maximum", - "minimum_capacity": "description.ResourceSKU.Capacity.Minimum", - "name": "description.ResourceSKU.Name", - "resource_type": "description.ResourceSKU.ResourceType", - "scale_type": "description.ResourceSKU.Capacity.ScaleType", - "size": "description.ResourceSKU.Size", - "tier": "description.ResourceSKU.Tier", - "title": "description.ResourceSKU.Name", + "api_versions": "Description.ResourceSKU.APIVersions", + "default_capacity": "Description.ResourceSKU.Capacity.Default", + "family": "Description.ResourceSKU.Family", + "kind": "Description.ResourceSKU.Kind", + "locations": "Description.ResourceSKU.Locations", + "maximum_capacity": "Description.ResourceSKU.Capacity.Maximum", + "minimum_capacity": "Description.ResourceSKU.Capacity.Minimum", + "name": "Description.ResourceSKU.Name", + "resource_type": "Description.ResourceSKU.ResourceType", + "scale_type": "Description.ResourceSKU.Capacity.ScaleType", + "size": "Description.ResourceSKU.Size", + "tier": "Description.ResourceSKU.Tier", + "title": "Description.ResourceSKU.Name", } func ListComputeResourceSKU(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -29006,20 +22744,19 @@ func ListComputeResourceSKU(ctx context.Context, d *plugin.QueryData, _ *plugin. } var getComputeResourceSKUFilters = map[string]string{ - "api_versions": "description.ResourceSKU.APIVersions", - "default_capacity": "description.ResourceSKU.Capacity.Default", - "family": "description.ResourceSKU.Family", - "og_account_id": "metadata.SourceID", - "kind": "description.ResourceSKU.Kind", - "locations": "description.ResourceSKU.Locations", - "maximum_capacity": "description.ResourceSKU.Capacity.Maximum", - "minimum_capacity": "description.ResourceSKU.Capacity.Minimum", - "name": "description.ResourceSKU.Name", - "resource_type": "description.ResourceSKU.ResourceType", - "scale_type": "description.ResourceSKU.Capacity.ScaleType", - "size": "description.ResourceSKU.Size", - "tier": "description.ResourceSKU.Tier", - "title": "description.ResourceSKU.Name", + "api_versions": "Description.ResourceSKU.APIVersions", + "default_capacity": "Description.ResourceSKU.Capacity.Default", + "family": "Description.ResourceSKU.Family", + "kind": "Description.ResourceSKU.Kind", + "locations": "Description.ResourceSKU.Locations", + "maximum_capacity": "Description.ResourceSKU.Capacity.Maximum", + "minimum_capacity": "Description.ResourceSKU.Capacity.Minimum", + "name": "Description.ResourceSKU.Name", + "resource_type": "Description.ResourceSKU.ResourceType", + "scale_type": "Description.ResourceSKU.Capacity.ScaleType", + "size": "Description.ResourceSKU.Size", + "tier": "Description.ResourceSKU.Tier", + "title": "Description.ResourceSKU.Name", } func GetComputeResourceSKU(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -29080,72 +22817,14 @@ func GetComputeResourceSKU(ctx context.Context, d *plugin.QueryData, _ *plugin.H // ========================== START: ComputeVirtualMachineCpuUtilization ============================= type ComputeVirtualMachineCpuUtilization struct { - Description azure.ComputeVirtualMachineCpuUtilizationDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *ComputeVirtualMachineCpuUtilization) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.ComputeVirtualMachineCpuUtilizationDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.ComputeVirtualMachineCpuUtilizationDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type ComputeVirtualMachineCpuUtilizationHit struct { @@ -29215,9 +22894,7 @@ func (p ComputeVirtualMachineCpuUtilizationPaginator) NextPage(ctx context.Conte return values, nil } -var listComputeVirtualMachineCpuUtilizationFilters = map[string]string{ - "og_account_id": "metadata.SourceID", -} +var listComputeVirtualMachineCpuUtilizationFilters = map[string]string{} func ListComputeVirtualMachineCpuUtilization(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { plugin.Logger(ctx).Trace("ListComputeVirtualMachineCpuUtilization") @@ -29279,9 +22956,7 @@ func ListComputeVirtualMachineCpuUtilization(ctx context.Context, d *plugin.Quer return nil, nil } -var getComputeVirtualMachineCpuUtilizationFilters = map[string]string{ - "og_account_id": "metadata.SourceID", -} +var getComputeVirtualMachineCpuUtilizationFilters = map[string]string{} func GetComputeVirtualMachineCpuUtilization(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { plugin.Logger(ctx).Trace("GetComputeVirtualMachineCpuUtilization") @@ -29341,72 +23016,14 @@ func GetComputeVirtualMachineCpuUtilization(ctx context.Context, d *plugin.Query // ========================== START: ComputeVirtualMachineCpuUtilizationDaily ============================= type ComputeVirtualMachineCpuUtilizationDaily struct { - Description azure.ComputeVirtualMachineCpuUtilizationDailyDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *ComputeVirtualMachineCpuUtilizationDaily) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.ComputeVirtualMachineCpuUtilizationDailyDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.ComputeVirtualMachineCpuUtilizationDailyDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type ComputeVirtualMachineCpuUtilizationDailyHit struct { @@ -29476,9 +23093,7 @@ func (p ComputeVirtualMachineCpuUtilizationDailyPaginator) NextPage(ctx context. return values, nil } -var listComputeVirtualMachineCpuUtilizationDailyFilters = map[string]string{ - "og_account_id": "metadata.SourceID", -} +var listComputeVirtualMachineCpuUtilizationDailyFilters = map[string]string{} func ListComputeVirtualMachineCpuUtilizationDaily(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { plugin.Logger(ctx).Trace("ListComputeVirtualMachineCpuUtilizationDaily") @@ -29540,9 +23155,7 @@ func ListComputeVirtualMachineCpuUtilizationDaily(ctx context.Context, d *plugin return nil, nil } -var getComputeVirtualMachineCpuUtilizationDailyFilters = map[string]string{ - "og_account_id": "metadata.SourceID", -} +var getComputeVirtualMachineCpuUtilizationDailyFilters = map[string]string{} func GetComputeVirtualMachineCpuUtilizationDaily(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { plugin.Logger(ctx).Trace("GetComputeVirtualMachineCpuUtilizationDaily") @@ -29602,72 +23215,14 @@ func GetComputeVirtualMachineCpuUtilizationDaily(ctx context.Context, d *plugin. // ========================== START: ComputeVirtualMachineCpuUtilizationHourly ============================= type ComputeVirtualMachineCpuUtilizationHourly struct { - Description azure.ComputeVirtualMachineCpuUtilizationHourlyDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *ComputeVirtualMachineCpuUtilizationHourly) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.ComputeVirtualMachineCpuUtilizationHourlyDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.ComputeVirtualMachineCpuUtilizationHourlyDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type ComputeVirtualMachineCpuUtilizationHourlyHit struct { @@ -29737,9 +23292,7 @@ func (p ComputeVirtualMachineCpuUtilizationHourlyPaginator) NextPage(ctx context return values, nil } -var listComputeVirtualMachineCpuUtilizationHourlyFilters = map[string]string{ - "og_account_id": "metadata.SourceID", -} +var listComputeVirtualMachineCpuUtilizationHourlyFilters = map[string]string{} func ListComputeVirtualMachineCpuUtilizationHourly(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { plugin.Logger(ctx).Trace("ListComputeVirtualMachineCpuUtilizationHourly") @@ -29801,9 +23354,7 @@ func ListComputeVirtualMachineCpuUtilizationHourly(ctx context.Context, d *plugi return nil, nil } -var getComputeVirtualMachineCpuUtilizationHourlyFilters = map[string]string{ - "og_account_id": "metadata.SourceID", -} +var getComputeVirtualMachineCpuUtilizationHourlyFilters = map[string]string{} func GetComputeVirtualMachineCpuUtilizationHourly(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { plugin.Logger(ctx).Trace("GetComputeVirtualMachineCpuUtilizationHourly") @@ -29863,72 +23414,14 @@ func GetComputeVirtualMachineCpuUtilizationHourly(ctx context.Context, d *plugin // ========================== START: ComputeCloudService ============================= type ComputeCloudService struct { - Description azure.ComputeCloudServiceDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *ComputeCloudService) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.ComputeCloudServiceDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.ComputeCloudServiceDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type ComputeCloudServiceHit struct { @@ -29999,11 +23492,10 @@ func (p ComputeCloudServicePaginator) NextPage(ctx context.Context) ([]ComputeCl } var listComputeCloudServiceFilters = map[string]string{ - "id": "description.CloudServices.ID", - "og_account_id": "metadata.SourceID", - "name": "description.CloudService.Name", - "tags": "description.CloudService.Tags", - "title": "description.CloudService.Name", + "id": "Description.CloudServices.ID", + "name": "Description.CloudService.Name", + "tags": "Description.CloudService.Tags", + "title": "Description.CloudService.Name", } func ListComputeCloudService(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -30067,11 +23559,10 @@ func ListComputeCloudService(ctx context.Context, d *plugin.QueryData, _ *plugin } var getComputeCloudServiceFilters = map[string]string{ - "id": "description.CloudServices.ID", - "og_account_id": "metadata.SourceID", - "name": "description.CloudService.Name", - "tags": "description.CloudService.Tags", - "title": "description.CloudService.Name", + "id": "Description.CloudServices.ID", + "name": "Description.CloudService.Name", + "tags": "Description.CloudService.Tags", + "title": "Description.CloudService.Name", } func GetComputeCloudService(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -30132,72 +23623,14 @@ func GetComputeCloudService(ctx context.Context, d *plugin.QueryData, _ *plugin. // ========================== START: ContainerRegistry ============================= type ContainerRegistry struct { - Description azure.ContainerRegistryDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *ContainerRegistry) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.ContainerRegistryDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.ContainerRegistryDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type ContainerRegistryHit struct { @@ -30268,35 +23701,34 @@ func (p ContainerRegistryPaginator) NextPage(ctx context.Context) ([]ContainerRe } var listContainerRegistryFilters = map[string]string{ - "admin_user_enabled": "description.Registry.Properties.AdminUserEnabled", - "data_endpoint_enabled": "description.Registry.Properties.DataEndpointEnabled", - "data_endpoint_host_names": "description.Registry.Properties.DataEndpointHostNames", - "encryption": "description.Registry.Properties.Encryption", - "id": "description.Registry.ID", - "identity": "description.Registry.Identity", - "og_account_id": "metadata.SourceID", - "login_credentials": "description.RegistryListCredentialsResult", - "login_server": "description.Registry.Properties.LoginServer", - "name": "description.Registry.Name", - "network_rule_bypass_options": "description.Registry.Properties.NetworkRuleBypassOptions", - "network_rule_set": "description.Registry.Properties.NetworkRuleSet", - "policies": "description.Registry.Properties.Policies", - "private_endpoint_connections": "description.Registry.Properties.PrivateEndpointConnections", - "provisioning_state": "description.Registry.Properties.ProvisioningState", - "public_network_access": "description.Registry.Properties.PublicNetworkAccess", - "resource_group": "description.ResourceGroup", - "sku_name": "description.Registry.SKU.Name", - "sku_tier": "description.Registry.SKU.Tier", - "status": "description.Registry.Properties.Status.DisplayStatus", - "status_message": "description.Registry.Properties.Status.Message", + "admin_user_enabled": "Description.Registry.Properties.AdminUserEnabled", + "data_endpoint_enabled": "Description.Registry.Properties.DataEndpointEnabled", + "data_endpoint_host_names": "Description.Registry.Properties.DataEndpointHostNames", + "encryption": "Description.Registry.Properties.Encryption", + "id": "Description.Registry.ID", + "identity": "Description.Registry.Identity", + "login_credentials": "Description.RegistryListCredentialsResult", + "login_server": "Description.Registry.Properties.LoginServer", + "name": "Description.Registry.Name", + "network_rule_bypass_options": "Description.Registry.Properties.NetworkRuleBypassOptions", + "network_rule_set": "Description.Registry.Properties.NetworkRuleSet", + "policies": "Description.Registry.Properties.Policies", + "private_endpoint_connections": "Description.Registry.Properties.PrivateEndpointConnections", + "provisioning_state": "Description.Registry.Properties.ProvisioningState", + "public_network_access": "Description.Registry.Properties.PublicNetworkAccess", + "resource_group": "Description.ResourceGroup", + "sku_name": "Description.Registry.SKU.Name", + "sku_tier": "Description.Registry.SKU.Tier", + "status": "Description.Registry.Properties.Status.DisplayStatus", + "status_message": "Description.Registry.Properties.Status.Message", "storage_account_id": "RegistryProperties.StorageAccount.ID", - "system_data": "description.Registry.SystemData", - "tags": "description.Registry.Tags", - "title": "description.Registry.Name", - "type": "description.Registry.Type", - "usages": "description.RegistryUsages", - "webhooks": "description.Webhooks", - "zone_redundancy": "description.Registry.Properties.ZoneRedundancy", + "system_data": "Description.Registry.SystemData", + "tags": "Description.Registry.Tags", + "title": "Description.Registry.Name", + "type": "Description.Registry.Type", + "usages": "Description.RegistryUsages", + "webhooks": "Description.Webhooks", + "zone_redundancy": "Description.Registry.Properties.ZoneRedundancy", } func ListContainerRegistry(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -30360,35 +23792,34 @@ func ListContainerRegistry(ctx context.Context, d *plugin.QueryData, _ *plugin.H } var getContainerRegistryFilters = map[string]string{ - "admin_user_enabled": "description.Registry.Properties.AdminUserEnabled", - "data_endpoint_enabled": "description.Registry.Properties.DataEndpointEnabled", - "data_endpoint_host_names": "description.Registry.Properties.DataEndpointHostNames", - "encryption": "description.Registry.Properties.Encryption", - "id": "description.Registry.ID", - "identity": "description.Registry.Identity", - "og_account_id": "metadata.SourceID", - "login_credentials": "description.RegistryListCredentialsResult", - "login_server": "description.Registry.Properties.LoginServer", + "admin_user_enabled": "Description.Registry.Properties.AdminUserEnabled", + "data_endpoint_enabled": "Description.Registry.Properties.DataEndpointEnabled", + "data_endpoint_host_names": "Description.Registry.Properties.DataEndpointHostNames", + "encryption": "Description.Registry.Properties.Encryption", + "id": "Description.Registry.ID", + "identity": "Description.Registry.Identity", + "login_credentials": "Description.RegistryListCredentialsResult", + "login_server": "Description.Registry.Properties.LoginServer", "name": "description.Registry.name", - "network_rule_bypass_options": "description.Registry.Properties.NetworkRuleBypassOptions", - "network_rule_set": "description.Registry.Properties.NetworkRuleSet", - "policies": "description.Registry.Properties.Policies", - "private_endpoint_connections": "description.Registry.Properties.PrivateEndpointConnections", - "provisioning_state": "description.Registry.Properties.ProvisioningState", - "public_network_access": "description.Registry.Properties.PublicNetworkAccess", + "network_rule_bypass_options": "Description.Registry.Properties.NetworkRuleBypassOptions", + "network_rule_set": "Description.Registry.Properties.NetworkRuleSet", + "policies": "Description.Registry.Properties.Policies", + "private_endpoint_connections": "Description.Registry.Properties.PrivateEndpointConnections", + "provisioning_state": "Description.Registry.Properties.ProvisioningState", + "public_network_access": "Description.Registry.Properties.PublicNetworkAccess", "resource_group": "description.ResourceGroup", - "sku_name": "description.Registry.SKU.Name", - "sku_tier": "description.Registry.SKU.Tier", - "status": "description.Registry.Properties.Status.DisplayStatus", - "status_message": "description.Registry.Properties.Status.Message", + "sku_name": "Description.Registry.SKU.Name", + "sku_tier": "Description.Registry.SKU.Tier", + "status": "Description.Registry.Properties.Status.DisplayStatus", + "status_message": "Description.Registry.Properties.Status.Message", "storage_account_id": "RegistryProperties.StorageAccount.ID", - "system_data": "description.Registry.SystemData", - "tags": "description.Registry.Tags", - "title": "description.Registry.Name", - "type": "description.Registry.Type", - "usages": "description.RegistryUsages", - "webhooks": "description.Webhooks", - "zone_redundancy": "description.Registry.Properties.ZoneRedundancy", + "system_data": "Description.Registry.SystemData", + "tags": "Description.Registry.Tags", + "title": "Description.Registry.Name", + "type": "Description.Registry.Type", + "usages": "Description.RegistryUsages", + "webhooks": "Description.Webhooks", + "zone_redundancy": "Description.Registry.Properties.ZoneRedundancy", } func GetContainerRegistry(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -30449,72 +23880,14 @@ func GetContainerRegistry(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy // ========================== START: CosmosdbAccount ============================= type CosmosdbAccount struct { - Description azure.CosmosdbAccountDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *CosmosdbAccount) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.CosmosdbAccountDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.CosmosdbAccountDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type CosmosdbAccountHit struct { @@ -30585,42 +23958,41 @@ func (p CosmosdbAccountPaginator) NextPage(ctx context.Context) ([]CosmosdbAccou } var listCosmosdbAccountFilters = map[string]string{ - "backup_policy": "description.DatabaseAccountGetResults.Properties.BackupPolicy", - "capabilities": "description.DatabaseAccountGetResults.Properties.Capabilities", - "connector_offer": "description.DatabaseAccountGetResults.Properties.ConnectorOffer", - "consistency_policy_max_interval": "description.DatabaseAccountGetResults.Properties.ConsistencyPolicy.MaxIntervalInSeconds", - "consistency_policy_max_staleness_prefix": "description.DatabaseAccountGetResults.Properties.ConsistencyPolicy.MaxStalenessPrefix", - "cors": "description.DatabaseAccountGetResults.Properties.Cors", - "database_account_offer_type": "description.DatabaseAccountGetResults.Properties.DatabaseAccountOfferType", - "default_consistency_level": "description.DatabaseAccountGetResults.Properties.ConsistencyPolicy.DefaultConsistencyLevel", - "disable_key_based_metadata_write_access": "description.DatabaseAccountGetResults.Properties.DisableKeyBasedMetadataWriteAccess", - "disable_local_auth": "description.DatabaseAccountGetResults.Properties.DisableLocalAuth", - "document_endpoint": "description.DatabaseAccountGetResults.Properties.DocumentEndpoint", - "enable_analytical_storage": "description.DatabaseAccountGetResults.Properties.EnableAnalyticalStorage", - "enable_automatic_failover": "description.DatabaseAccountGetResults.Properties.EnableAutomaticFailover", - "enable_cassandra_connector": "description.DatabaseAccountGetResults.Properties.EnableCassandraConnector", - "enable_free_tier": "description.DatabaseAccountGetResults.Properties.EnableFreeTier", - "enable_multiple_write_locations": "description.DatabaseAccountGetResults.Properties.EnableMultipleWriteLocations", - "failover_policies": "description.DatabaseAccountGetResults.Properties.FailoverPolicies", - "id": "description.DatabaseAccountGetResults.ID", - "ip_rules": "description.DatabaseAccountGetResults.Properties.IPRules", - "is_virtual_network_filter_enabled": "description.DatabaseAccountGetResults.Properties.IsVirtualNetworkFilterEnabled", - "og_account_id": "metadata.SourceID", - "key_vault_key_uri": "description.DatabaseAccountGetResults.Properties.KeyVaultKeyURI", - "kind": "description.DatabaseAccountGetResults.Kind", - "locations": "description.DatabaseAccountGetResults.Properties.Locations", - "name": "description.DatabaseAccountGetResults.Name", - "private_endpoint_connections": "description.DatabaseAccountGetResults.Properties.PrivateEndpointConnections", - "provisioning_state": "description.DatabaseAccountGetResults.Properties.ProvisioningState", - "public_network_access": "description.DatabaseAccountGetResults.Properties.PublicNetworkAccess", - "read_locations": "description.DatabaseAccountGetResults.Properties.ReadLocations", - "restore_parameters": "description.DatabaseAccountGetResults.Properties.RestoreParameters", - "server_version": "description.DatabaseAccountGetResults.Properties.APIProperties.ServerVersion", - "tags": "description.DatabaseAccountGetResults.Tags", - "title": "description.DatabaseAccountGetResults.Name", - "type": "description.DatabaseAccountGetResults.Type", - "virtual_network_rules": "description.DatabaseAccountGetResults.Properties.VirtualNetworkRules", - "write_locations": "description.DatabaseAccountGetResults.Properties.WriteLocations", + "backup_policy": "Description.DatabaseAccountGetResults.Properties.BackupPolicy", + "capabilities": "Description.DatabaseAccountGetResults.Properties.Capabilities", + "connector_offer": "Description.DatabaseAccountGetResults.Properties.ConnectorOffer", + "consistency_policy_max_interval": "Description.DatabaseAccountGetResults.Properties.ConsistencyPolicy.MaxIntervalInSeconds", + "consistency_policy_max_staleness_prefix": "Description.DatabaseAccountGetResults.Properties.ConsistencyPolicy.MaxStalenessPrefix", + "cors": "Description.DatabaseAccountGetResults.Properties.Cors", + "database_account_offer_type": "Description.DatabaseAccountGetResults.Properties.DatabaseAccountOfferType", + "default_consistency_level": "Description.DatabaseAccountGetResults.Properties.ConsistencyPolicy.DefaultConsistencyLevel", + "disable_key_based_metadata_write_access": "Description.DatabaseAccountGetResults.Properties.DisableKeyBasedMetadataWriteAccess", + "disable_local_auth": "Description.DatabaseAccountGetResults.Properties.DisableLocalAuth", + "document_endpoint": "Description.DatabaseAccountGetResults.Properties.DocumentEndpoint", + "enable_analytical_storage": "Description.DatabaseAccountGetResults.Properties.EnableAnalyticalStorage", + "enable_automatic_failover": "Description.DatabaseAccountGetResults.Properties.EnableAutomaticFailover", + "enable_cassandra_connector": "Description.DatabaseAccountGetResults.Properties.EnableCassandraConnector", + "enable_free_tier": "Description.DatabaseAccountGetResults.Properties.EnableFreeTier", + "enable_multiple_write_locations": "Description.DatabaseAccountGetResults.Properties.EnableMultipleWriteLocations", + "failover_policies": "Description.DatabaseAccountGetResults.Properties.FailoverPolicies", + "id": "Description.DatabaseAccountGetResults.ID", + "ip_rules": "Description.DatabaseAccountGetResults.Properties.IPRules", + "is_virtual_network_filter_enabled": "Description.DatabaseAccountGetResults.Properties.IsVirtualNetworkFilterEnabled", + "key_vault_key_uri": "Description.DatabaseAccountGetResults.Properties.KeyVaultKeyURI", + "kind": "Description.DatabaseAccountGetResults.Kind", + "locations": "Description.DatabaseAccountGetResults.Properties.Locations", + "name": "Description.DatabaseAccountGetResults.Name", + "private_endpoint_connections": "Description.DatabaseAccountGetResults.Properties.PrivateEndpointConnections", + "provisioning_state": "Description.DatabaseAccountGetResults.Properties.ProvisioningState", + "public_network_access": "Description.DatabaseAccountGetResults.Properties.PublicNetworkAccess", + "read_locations": "Description.DatabaseAccountGetResults.Properties.ReadLocations", + "restore_parameters": "Description.DatabaseAccountGetResults.Properties.RestoreParameters", + "server_version": "Description.DatabaseAccountGetResults.Properties.APIProperties.ServerVersion", + "tags": "Description.DatabaseAccountGetResults.Tags", + "title": "Description.DatabaseAccountGetResults.Name", + "type": "Description.DatabaseAccountGetResults.Type", + "virtual_network_rules": "Description.DatabaseAccountGetResults.Properties.VirtualNetworkRules", + "write_locations": "Description.DatabaseAccountGetResults.Properties.WriteLocations", } func ListCosmosdbAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -30684,43 +24056,42 @@ func ListCosmosdbAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd } var getCosmosdbAccountFilters = map[string]string{ - "backup_policy": "description.DatabaseAccountGetResults.Properties.BackupPolicy", - "capabilities": "description.DatabaseAccountGetResults.Properties.Capabilities", - "connector_offer": "description.DatabaseAccountGetResults.Properties.ConnectorOffer", - "consistency_policy_max_interval": "description.DatabaseAccountGetResults.Properties.ConsistencyPolicy.MaxIntervalInSeconds", - "consistency_policy_max_staleness_prefix": "description.DatabaseAccountGetResults.Properties.ConsistencyPolicy.MaxStalenessPrefix", - "cors": "description.DatabaseAccountGetResults.Properties.Cors", - "database_account_offer_type": "description.DatabaseAccountGetResults.Properties.DatabaseAccountOfferType", - "default_consistency_level": "description.DatabaseAccountGetResults.Properties.ConsistencyPolicy.DefaultConsistencyLevel", - "disable_key_based_metadata_write_access": "description.DatabaseAccountGetResults.Properties.DisableKeyBasedMetadataWriteAccess", - "disable_local_auth": "description.DatabaseAccountGetResults.Properties.DisableLocalAuth", - "document_endpoint": "description.DatabaseAccountGetResults.Properties.DocumentEndpoint", - "enable_analytical_storage": "description.DatabaseAccountGetResults.Properties.EnableAnalyticalStorage", - "enable_automatic_failover": "description.DatabaseAccountGetResults.Properties.EnableAutomaticFailover", - "enable_cassandra_connector": "description.DatabaseAccountGetResults.Properties.EnableCassandraConnector", - "enable_free_tier": "description.DatabaseAccountGetResults.Properties.EnableFreeTier", - "enable_multiple_write_locations": "description.DatabaseAccountGetResults.Properties.EnableMultipleWriteLocations", - "failover_policies": "description.DatabaseAccountGetResults.Properties.FailoverPolicies", - "id": "description.DatabaseAccountGetResults.ID", - "ip_rules": "description.DatabaseAccountGetResults.Properties.IPRules", - "is_virtual_network_filter_enabled": "description.DatabaseAccountGetResults.Properties.IsVirtualNetworkFilterEnabled", - "og_account_id": "metadata.SourceID", - "key_vault_key_uri": "description.DatabaseAccountGetResults.Properties.KeyVaultKeyURI", - "kind": "description.DatabaseAccountGetResults.Kind", - "locations": "description.DatabaseAccountGetResults.Properties.Locations", + "backup_policy": "Description.DatabaseAccountGetResults.Properties.BackupPolicy", + "capabilities": "Description.DatabaseAccountGetResults.Properties.Capabilities", + "connector_offer": "Description.DatabaseAccountGetResults.Properties.ConnectorOffer", + "consistency_policy_max_interval": "Description.DatabaseAccountGetResults.Properties.ConsistencyPolicy.MaxIntervalInSeconds", + "consistency_policy_max_staleness_prefix": "Description.DatabaseAccountGetResults.Properties.ConsistencyPolicy.MaxStalenessPrefix", + "cors": "Description.DatabaseAccountGetResults.Properties.Cors", + "database_account_offer_type": "Description.DatabaseAccountGetResults.Properties.DatabaseAccountOfferType", + "default_consistency_level": "Description.DatabaseAccountGetResults.Properties.ConsistencyPolicy.DefaultConsistencyLevel", + "disable_key_based_metadata_write_access": "Description.DatabaseAccountGetResults.Properties.DisableKeyBasedMetadataWriteAccess", + "disable_local_auth": "Description.DatabaseAccountGetResults.Properties.DisableLocalAuth", + "document_endpoint": "Description.DatabaseAccountGetResults.Properties.DocumentEndpoint", + "enable_analytical_storage": "Description.DatabaseAccountGetResults.Properties.EnableAnalyticalStorage", + "enable_automatic_failover": "Description.DatabaseAccountGetResults.Properties.EnableAutomaticFailover", + "enable_cassandra_connector": "Description.DatabaseAccountGetResults.Properties.EnableCassandraConnector", + "enable_free_tier": "Description.DatabaseAccountGetResults.Properties.EnableFreeTier", + "enable_multiple_write_locations": "Description.DatabaseAccountGetResults.Properties.EnableMultipleWriteLocations", + "failover_policies": "Description.DatabaseAccountGetResults.Properties.FailoverPolicies", + "id": "Description.DatabaseAccountGetResults.ID", + "ip_rules": "Description.DatabaseAccountGetResults.Properties.IPRules", + "is_virtual_network_filter_enabled": "Description.DatabaseAccountGetResults.Properties.IsVirtualNetworkFilterEnabled", + "key_vault_key_uri": "Description.DatabaseAccountGetResults.Properties.KeyVaultKeyURI", + "kind": "Description.DatabaseAccountGetResults.Kind", + "locations": "Description.DatabaseAccountGetResults.Properties.Locations", "name": "description.DatabaseAccountGetResults.name", - "private_endpoint_connections": "description.DatabaseAccountGetResults.Properties.PrivateEndpointConnections", - "provisioning_state": "description.DatabaseAccountGetResults.Properties.ProvisioningState", - "public_network_access": "description.DatabaseAccountGetResults.Properties.PublicNetworkAccess", - "read_locations": "description.DatabaseAccountGetResults.Properties.ReadLocations", + "private_endpoint_connections": "Description.DatabaseAccountGetResults.Properties.PrivateEndpointConnections", + "provisioning_state": "Description.DatabaseAccountGetResults.Properties.ProvisioningState", + "public_network_access": "Description.DatabaseAccountGetResults.Properties.PublicNetworkAccess", + "read_locations": "Description.DatabaseAccountGetResults.Properties.ReadLocations", "resource_group": "description.ResourceGroup", - "restore_parameters": "description.DatabaseAccountGetResults.Properties.RestoreParameters", - "server_version": "description.DatabaseAccountGetResults.Properties.APIProperties.ServerVersion", - "tags": "description.DatabaseAccountGetResults.Tags", - "title": "description.DatabaseAccountGetResults.Name", - "type": "description.DatabaseAccountGetResults.Type", - "virtual_network_rules": "description.DatabaseAccountGetResults.Properties.VirtualNetworkRules", - "write_locations": "description.DatabaseAccountGetResults.Properties.WriteLocations", + "restore_parameters": "Description.DatabaseAccountGetResults.Properties.RestoreParameters", + "server_version": "Description.DatabaseAccountGetResults.Properties.APIProperties.ServerVersion", + "tags": "Description.DatabaseAccountGetResults.Tags", + "title": "Description.DatabaseAccountGetResults.Name", + "type": "Description.DatabaseAccountGetResults.Type", + "virtual_network_rules": "Description.DatabaseAccountGetResults.Properties.VirtualNetworkRules", + "write_locations": "Description.DatabaseAccountGetResults.Properties.WriteLocations", } func GetCosmosdbAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -30781,72 +24152,14 @@ func GetCosmosdbAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr // ========================== START: CosmosdbRestorableDatabaseAccount ============================= type CosmosdbRestorableDatabaseAccount struct { - Description azure.CosmosdbRestorableDatabaseAccountDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *CosmosdbRestorableDatabaseAccount) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.CosmosdbRestorableDatabaseAccountDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.CosmosdbRestorableDatabaseAccountDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type CosmosdbRestorableDatabaseAccountHit struct { @@ -30917,17 +24230,16 @@ func (p CosmosdbRestorableDatabaseAccountPaginator) NextPage(ctx context.Context } var listCosmosdbRestorableDatabaseAccountFilters = map[string]string{ - "account_name": "description.Account.Properties.AccountName", - "api_type": "description.Account.Properties.APIType", - "creation_time": "description.Account.Properties.CreationTime", - "deletion_time": "description.Account.Properties.DeletionTime", - "id": "description.Account.ID", - "og_account_id": "metadata.SourceID", - "name": "description.Account.Name", - "resource_group": "description.ResourceGroup", - "restorable_locations": "description.Account.Properties.RestorableLocations", - "title": "description.Account.Name", - "type": "description.Account.Type", + "account_name": "Description.Account.Properties.AccountName", + "api_type": "Description.Account.Properties.APIType", + "creation_time": "Description.Account.Properties.CreationTime", + "deletion_time": "Description.Account.Properties.DeletionTime", + "id": "Description.Account.ID", + "name": "Description.Account.Name", + "resource_group": "Description.ResourceGroup", + "restorable_locations": "Description.Account.Properties.RestorableLocations", + "title": "Description.Account.Name", + "type": "Description.Account.Type", } func ListCosmosdbRestorableDatabaseAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -30991,17 +24303,16 @@ func ListCosmosdbRestorableDatabaseAccount(ctx context.Context, d *plugin.QueryD } var getCosmosdbRestorableDatabaseAccountFilters = map[string]string{ - "account_name": "description.Account.Properties.AccountName", - "api_type": "description.Account.Properties.APIType", - "creation_time": "description.Account.Properties.CreationTime", - "deletion_time": "description.Account.Properties.DeletionTime", - "id": "description.Account.ID", - "og_account_id": "metadata.SourceID", + "account_name": "Description.Account.Properties.AccountName", + "api_type": "Description.Account.Properties.APIType", + "creation_time": "Description.Account.Properties.CreationTime", + "deletion_time": "Description.Account.Properties.DeletionTime", + "id": "Description.Account.ID", "name": "description.Account.Name", "resource_group": "description.ResourceGroup", - "restorable_locations": "description.Account.Properties.RestorableLocations", - "title": "description.Account.Name", - "type": "description.Account.Type", + "restorable_locations": "Description.Account.Properties.RestorableLocations", + "title": "Description.Account.Name", + "type": "Description.Account.Type", } func GetCosmosdbRestorableDatabaseAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -31062,72 +24373,14 @@ func GetCosmosdbRestorableDatabaseAccount(ctx context.Context, d *plugin.QueryDa // ========================== START: CosmosdbMongoDatabase ============================= type CosmosdbMongoDatabase struct { - Description azure.CosmosdbMongoDatabaseDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *CosmosdbMongoDatabase) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.CosmosdbMongoDatabaseDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.CosmosdbMongoDatabaseDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type CosmosdbMongoDatabaseHit struct { @@ -31198,19 +24451,18 @@ func (p CosmosdbMongoDatabasePaginator) NextPage(ctx context.Context) ([]Cosmosd } var listCosmosdbMongoDatabaseFilters = map[string]string{ - "account_name": "description.Account.Name", - "autoscale_settings_max_throughput": "description.MongoDatabase.Properties.Options.AutoscaleSettings.MaxThroughput", - "database_etag": "description.MongoDatabase.Properties.Resource.Etag", - "database_id": "description.MongoDatabase.Properties.Resource.ID", - "database_rid": "description.MongoDatabase.Properties.Resource.Rid", - "id": "description.MongoDatabase.ID", - "og_account_id": "metadata.SourceID", - "name": "description.MongoDatabase.Name", - "tags": "description.MongoDatabase.Tags", - "throughput": "description.MongoDatabase.Properties.Options.Throughput", - "throughput_settings": "description.MongoDatabase.Properties.Options.Throughput.ThroughputSettingsGetResults.Properties.Resource", - "title": "description.MongoDatabase.Name", - "type": "description.MongoDatabase.Type", + "account_name": "Description.Account.Name", + "autoscale_settings_max_throughput": "Description.MongoDatabase.Properties.Options.AutoscaleSettings.MaxThroughput", + "database_etag": "Description.MongoDatabase.Properties.Resource.Etag", + "database_id": "Description.MongoDatabase.Properties.Resource.ID", + "database_rid": "Description.MongoDatabase.Properties.Resource.Rid", + "id": "Description.MongoDatabase.ID", + "name": "Description.MongoDatabase.Name", + "tags": "Description.MongoDatabase.Tags", + "throughput": "Description.MongoDatabase.Properties.Options.Throughput", + "throughput_settings": "Description.MongoDatabase.Properties.Options.Throughput.ThroughputSettingsGetResults.Properties.Resource", + "title": "Description.MongoDatabase.Name", + "type": "Description.MongoDatabase.Type", } func ListCosmosdbMongoDatabase(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -31275,19 +24527,18 @@ func ListCosmosdbMongoDatabase(ctx context.Context, d *plugin.QueryData, _ *plug var getCosmosdbMongoDatabaseFilters = map[string]string{ "account_name": "description.Account.name", - "autoscale_settings_max_throughput": "description.MongoDatabase.Properties.Options.AutoscaleSettings.MaxThroughput", - "database_etag": "description.MongoDatabase.Properties.Resource.Etag", - "database_id": "description.MongoDatabase.Properties.Resource.ID", - "database_rid": "description.MongoDatabase.Properties.Resource.Rid", - "id": "description.MongoDatabase.ID", - "og_account_id": "metadata.SourceID", + "autoscale_settings_max_throughput": "Description.MongoDatabase.Properties.Options.AutoscaleSettings.MaxThroughput", + "database_etag": "Description.MongoDatabase.Properties.Resource.Etag", + "database_id": "Description.MongoDatabase.Properties.Resource.ID", + "database_rid": "Description.MongoDatabase.Properties.Resource.Rid", + "id": "Description.MongoDatabase.ID", "name": "description.MongoDatabase.name", "resource_group": "description.ResourceGroup", - "tags": "description.MongoDatabase.Tags", - "throughput": "description.MongoDatabase.Properties.Options.Throughput", - "throughput_settings": "description.MongoDatabase.Properties.Options.Throughput.ThroughputSettingsGetResults.Properties.Resource", - "title": "description.MongoDatabase.Name", - "type": "description.MongoDatabase.Type", + "tags": "Description.MongoDatabase.Tags", + "throughput": "Description.MongoDatabase.Properties.Options.Throughput", + "throughput_settings": "Description.MongoDatabase.Properties.Options.Throughput.ThroughputSettingsGetResults.Properties.Resource", + "title": "Description.MongoDatabase.Name", + "type": "Description.MongoDatabase.Type", } func GetCosmosdbMongoDatabase(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -31348,72 +24599,14 @@ func GetCosmosdbMongoDatabase(ctx context.Context, d *plugin.QueryData, _ *plugi // ========================== START: CosmosdbMongoCollection ============================= type CosmosdbMongoCollection struct { - Description azure.CosmosdbMongoCollectionDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *CosmosdbMongoCollection) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.CosmosdbMongoCollectionDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.CosmosdbMongoCollectionDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type CosmosdbMongoCollectionHit struct { @@ -31484,24 +24677,23 @@ func (p CosmosdbMongoCollectionPaginator) NextPage(ctx context.Context) ([]Cosmo } var listCosmosdbMongoCollectionFilters = map[string]string{ - "account_name": "description.Account.Name", - "analytical_storage_ttl": "description.MongoCollection.Properties.Resource.AnalyticalStorageTTL", - "autoscale_settings_max_throughput": "description.MongoCollection.Properties.AutoscaleSettings.MaxThroughput", - "collection_etag": "description.MongoCollection.Properties.Resource.Etag", - "collection_id": "description.MongoCollection.Properties.Resource.ID", - "collection_rid": "description.MongoCollection.Properties.Resource.Rid", - "database_name": "description.MongoDatabase.Name", - "id": "description.MongoCollection.ID", - "indexes": "description.MongoCollection.Properties.Resource.Indexes", - "og_account_id": "metadata.SourceID", - "name": "description.MongoCollection.Name", - "resource_group": "description.ResourceGroup", - "shard_key": "description.MongoCollection.Properties.Resource.ShardKey", - "tags": "description.MongoCollection.Tags", - "throughput": "description.MongoCollection.Properties.Options.Throughput", - "throughput_settings": "description.Throughput", - "title": "description.MongoCollection.Name", - "type": "description.MongoCollection.Type", + "account_name": "Description.Account.Name", + "analytical_storage_ttl": "Description.MongoCollection.Properties.Resource.AnalyticalStorageTTL", + "autoscale_settings_max_throughput": "Description.MongoCollection.Properties.AutoscaleSettings.MaxThroughput", + "collection_etag": "Description.MongoCollection.Properties.Resource.Etag", + "collection_id": "Description.MongoCollection.Properties.Resource.ID", + "collection_rid": "Description.MongoCollection.Properties.Resource.Rid", + "database_name": "Description.MongoDatabase.Name", + "id": "Description.MongoCollection.ID", + "indexes": "Description.MongoCollection.Properties.Resource.Indexes", + "name": "Description.MongoCollection.Name", + "resource_group": "Description.ResourceGroup", + "shard_key": "Description.MongoCollection.Properties.Resource.ShardKey", + "tags": "Description.MongoCollection.Tags", + "throughput": "Description.MongoCollection.Properties.Options.Throughput", + "throughput_settings": "Description.Throughput", + "title": "Description.MongoCollection.Name", + "type": "Description.MongoCollection.Type", } func ListCosmosdbMongoCollection(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -31566,23 +24758,22 @@ func ListCosmosdbMongoCollection(ctx context.Context, d *plugin.QueryData, _ *pl var getCosmosdbMongoCollectionFilters = map[string]string{ "account_name": "description.Account.name", - "analytical_storage_ttl": "description.MongoCollection.Properties.Resource.AnalyticalStorageTTL", - "autoscale_settings_max_throughput": "description.MongoCollection.Properties.AutoscaleSettings.MaxThroughput", - "collection_etag": "description.MongoCollection.Properties.Resource.Etag", - "collection_id": "description.MongoCollection.Properties.Resource.ID", - "collection_rid": "description.MongoCollection.Properties.Resource.Rid", - "database_name": "description.MongoDatabase.Name", - "id": "description.MongoCollection.ID", - "indexes": "description.MongoCollection.Properties.Resource.Indexes", - "og_account_id": "metadata.SourceID", + "analytical_storage_ttl": "Description.MongoCollection.Properties.Resource.AnalyticalStorageTTL", + "autoscale_settings_max_throughput": "Description.MongoCollection.Properties.AutoscaleSettings.MaxThroughput", + "collection_etag": "Description.MongoCollection.Properties.Resource.Etag", + "collection_id": "Description.MongoCollection.Properties.Resource.ID", + "collection_rid": "Description.MongoCollection.Properties.Resource.Rid", + "database_name": "Description.MongoDatabase.Name", + "id": "Description.MongoCollection.ID", + "indexes": "Description.MongoCollection.Properties.Resource.Indexes", "name": "description.MongoCollection.name", "resource_group": "description.ResourceGroup", - "shard_key": "description.MongoCollection.Properties.Resource.ShardKey", - "tags": "description.MongoCollection.Tags", - "throughput": "description.MongoCollection.Properties.Options.Throughput", - "throughput_settings": "description.Throughput", - "title": "description.MongoCollection.Name", - "type": "description.MongoCollection.Type", + "shard_key": "Description.MongoCollection.Properties.Resource.ShardKey", + "tags": "Description.MongoCollection.Tags", + "throughput": "Description.MongoCollection.Properties.Options.Throughput", + "throughput_settings": "Description.Throughput", + "title": "Description.MongoCollection.Name", + "type": "Description.MongoCollection.Type", } func GetCosmosdbMongoCollection(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -31643,72 +24834,14 @@ func GetCosmosdbMongoCollection(ctx context.Context, d *plugin.QueryData, _ *plu // ========================== START: CosmosdbSqlDatabase ============================= type CosmosdbSqlDatabase struct { - Description azure.CosmosdbSqlDatabaseDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *CosmosdbSqlDatabase) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.CosmosdbSqlDatabaseDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.CosmosdbSqlDatabaseDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type CosmosdbSqlDatabaseHit struct { @@ -31779,20 +24912,19 @@ func (p CosmosdbSqlDatabasePaginator) NextPage(ctx context.Context) ([]CosmosdbS } var listCosmosdbSqlDatabaseFilters = map[string]string{ - "account_name": "description.Account.Name", - "autoscale_settings_max_throughput": "description.SqlDatabase.Properties.Options.AutoscaleSettings.MaxThroughput", - "database_colls": "description.SqlDatabase.Properties.Resource.Colls", - "database_etag": "description.SqlDatabase.Properties.Resource.Etag", - "database_id": "description.SqlDatabase.Properties.Resource.ID", - "database_rid": "description.SqlDatabase.Properties.Resource.Rid", - "database_users": "description.SqlDatabase.Properties.Resource.Users", - "id": "description.SqlDatabase.ID", - "og_account_id": "metadata.SourceID", - "name": "description.SqlDatabase.Name", - "tags": "description.SqlDatabase.Tags", - "throughput": "description.SqlDatabase.Properties.Options.Throughput", - "title": "description.SqlDatabase.Name", - "type": "description.SqlDatabase.Type", + "account_name": "Description.Account.Name", + "autoscale_settings_max_throughput": "Description.SqlDatabase.Properties.Options.AutoscaleSettings.MaxThroughput", + "database_colls": "Description.SqlDatabase.Properties.Resource.Colls", + "database_etag": "Description.SqlDatabase.Properties.Resource.Etag", + "database_id": "Description.SqlDatabase.Properties.Resource.ID", + "database_rid": "Description.SqlDatabase.Properties.Resource.Rid", + "database_users": "Description.SqlDatabase.Properties.Resource.Users", + "id": "Description.SqlDatabase.ID", + "name": "Description.SqlDatabase.Name", + "tags": "Description.SqlDatabase.Tags", + "throughput": "Description.SqlDatabase.Properties.Options.Throughput", + "title": "Description.SqlDatabase.Name", + "type": "Description.SqlDatabase.Type", } func ListCosmosdbSqlDatabase(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -31857,20 +24989,19 @@ func ListCosmosdbSqlDatabase(ctx context.Context, d *plugin.QueryData, _ *plugin var getCosmosdbSqlDatabaseFilters = map[string]string{ "account_name": "description.Account.name", - "autoscale_settings_max_throughput": "description.SqlDatabase.Properties.Options.AutoscaleSettings.MaxThroughput", - "database_colls": "description.SqlDatabase.Properties.Resource.Colls", - "database_etag": "description.SqlDatabase.Properties.Resource.Etag", - "database_id": "description.SqlDatabase.Properties.Resource.ID", - "database_rid": "description.SqlDatabase.Properties.Resource.Rid", - "database_users": "description.SqlDatabase.Properties.Resource.Users", - "id": "description.SqlDatabase.ID", - "og_account_id": "metadata.SourceID", + "autoscale_settings_max_throughput": "Description.SqlDatabase.Properties.Options.AutoscaleSettings.MaxThroughput", + "database_colls": "Description.SqlDatabase.Properties.Resource.Colls", + "database_etag": "Description.SqlDatabase.Properties.Resource.Etag", + "database_id": "Description.SqlDatabase.Properties.Resource.ID", + "database_rid": "Description.SqlDatabase.Properties.Resource.Rid", + "database_users": "Description.SqlDatabase.Properties.Resource.Users", + "id": "Description.SqlDatabase.ID", "name": "description.SqlDatabase.name", "resource_group": "description.ResourceGroup", - "tags": "description.SqlDatabase.Tags", - "throughput": "description.SqlDatabase.Properties.Options.Throughput", - "title": "description.SqlDatabase.Name", - "type": "description.SqlDatabase.Type", + "tags": "Description.SqlDatabase.Tags", + "throughput": "Description.SqlDatabase.Properties.Options.Throughput", + "title": "Description.SqlDatabase.Name", + "type": "Description.SqlDatabase.Type", } func GetCosmosdbSqlDatabase(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -31931,72 +25062,14 @@ func GetCosmosdbSqlDatabase(ctx context.Context, d *plugin.QueryData, _ *plugin. // ========================== START: CosmosdbCassandraCluster ============================= type CosmosdbCassandraCluster struct { - Description azure.CosmosdbCassandraClusterDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *CosmosdbCassandraCluster) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.CosmosdbCassandraClusterDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.CosmosdbCassandraClusterDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type CosmosdbCassandraClusterHit struct { @@ -32067,10 +25140,10 @@ func (p CosmosdbCassandraClusterPaginator) NextPage(ctx context.Context) ([]Cosm } var listCosmosdbCassandraClusterFilters = map[string]string{ - "id": "description.CassandraCluster.ID", - "name": "description.CassandraCluster.Name", - "tags": "description.CassandraCluster.Tags", - "title": "description.CassandraCluster.Name", + "id": "Description.CassandraCluster.ID", + "name": "Description.CassandraCluster.Name", + "tags": "Description.CassandraCluster.Tags", + "title": "Description.CassandraCluster.Name", } func ListCosmosdbCassandraCluster(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -32134,10 +25207,10 @@ func ListCosmosdbCassandraCluster(ctx context.Context, d *plugin.QueryData, _ *p } var getCosmosdbCassandraClusterFilters = map[string]string{ - "id": "description.CassandraCluster.ID", - "name": "description.CassandraCluster.Name", - "tags": "description.CassandraCluster.Tags", - "title": "description.CassandraCluster.Name", + "id": "Description.CassandraCluster.ID", + "name": "Description.CassandraCluster.Name", + "tags": "Description.CassandraCluster.Tags", + "title": "Description.CassandraCluster.Name", } func GetCosmosdbCassandraCluster(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -32198,72 +25271,14 @@ func GetCosmosdbCassandraCluster(ctx context.Context, d *plugin.QueryData, _ *pl // ========================== START: DatabricksWorkspace ============================= type DatabricksWorkspace struct { - Description azure.DatabricksWorkspaceDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *DatabricksWorkspace) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.DatabricksWorkspaceDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.DatabricksWorkspaceDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type DatabricksWorkspaceHit struct { @@ -32334,25 +25349,24 @@ func (p DatabricksWorkspacePaginator) NextPage(ctx context.Context) ([]Databrick } var listDatabricksWorkspaceFilters = map[string]string{ - "authorizations": "description.Workspace.Properties.Authorizations", - "created_by": "description.Workspace.Properties.CreatedBy", - "id": "description.Workspace.ID", - "og_account_id": "metadata.SourceID", - "location": "description.Workspace.Location", - "managed_resource_group_id": "description.Workspace.Properties.ManagedResourceGroupID", - "name": "description.Workspace.Name", - "parameters": "description.Workspace.Properties.Parameters", - "provisioning_state": "description.Workspace.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "sku": "description.Workspace.SKU", - "storage_account_identity": "description.Workspace.Properties.StorageAccountIdentity", - "tags": "description.Workspace.Tags", - "title": "description.Workspace.Name", - "type": "description.Workspace.Type", - "ui_definition_uri": "description.Workspace.Properties.UIDefinitionURI", - "updated_by": "description.Workspace.Properties.UpdatedBy", - "workspace_id": "description.Workspace.Properties.WorkspaceID", - "workspace_url": "description.Workspace.Properties.WorkspaceURL", + "authorizations": "Description.Workspace.Properties.Authorizations", + "created_by": "Description.Workspace.Properties.CreatedBy", + "id": "Description.Workspace.ID", + "location": "Description.Workspace.Location", + "managed_resource_group_id": "Description.Workspace.Properties.ManagedResourceGroupID", + "name": "Description.Workspace.Name", + "parameters": "Description.Workspace.Properties.Parameters", + "provisioning_state": "Description.Workspace.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "sku": "Description.Workspace.SKU", + "storage_account_identity": "Description.Workspace.Properties.StorageAccountIdentity", + "tags": "Description.Workspace.Tags", + "title": "Description.Workspace.Name", + "type": "Description.Workspace.Type", + "ui_definition_uri": "Description.Workspace.Properties.UIDefinitionURI", + "updated_by": "Description.Workspace.Properties.UpdatedBy", + "workspace_id": "Description.Workspace.Properties.WorkspaceID", + "workspace_url": "Description.Workspace.Properties.WorkspaceURL", } func ListDatabricksWorkspace(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -32416,25 +25430,24 @@ func ListDatabricksWorkspace(ctx context.Context, d *plugin.QueryData, _ *plugin } var getDatabricksWorkspaceFilters = map[string]string{ - "authorizations": "description.Workspace.Properties.Authorizations", - "created_by": "description.Workspace.Properties.CreatedBy", - "id": "description.Workspace.ID", - "og_account_id": "metadata.SourceID", - "location": "description.Workspace.Location", - "managed_resource_group_id": "description.Workspace.Properties.ManagedResourceGroupID", - "name": "description.Workspace.Name", - "parameters": "description.Workspace.Properties.Parameters", - "provisioning_state": "description.Workspace.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "sku": "description.Workspace.SKU", - "storage_account_identity": "description.Workspace.Properties.StorageAccountIdentity", - "tags": "description.Workspace.Tags", - "title": "description.Workspace.Name", - "type": "description.Workspace.Type", - "ui_definition_uri": "description.Workspace.Properties.UIDefinitionURI", - "updated_by": "description.Workspace.Properties.UpdatedBy", - "workspace_id": "description.Workspace.Properties.WorkspaceID", - "workspace_url": "description.Workspace.Properties.WorkspaceURL", + "authorizations": "Description.Workspace.Properties.Authorizations", + "created_by": "Description.Workspace.Properties.CreatedBy", + "id": "Description.Workspace.ID", + "location": "Description.Workspace.Location", + "managed_resource_group_id": "Description.Workspace.Properties.ManagedResourceGroupID", + "name": "Description.Workspace.Name", + "parameters": "Description.Workspace.Properties.Parameters", + "provisioning_state": "Description.Workspace.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "sku": "Description.Workspace.SKU", + "storage_account_identity": "Description.Workspace.Properties.StorageAccountIdentity", + "tags": "Description.Workspace.Tags", + "title": "Description.Workspace.Name", + "type": "Description.Workspace.Type", + "ui_definition_uri": "Description.Workspace.Properties.UIDefinitionURI", + "updated_by": "Description.Workspace.Properties.UpdatedBy", + "workspace_id": "Description.Workspace.Properties.WorkspaceID", + "workspace_url": "Description.Workspace.Properties.WorkspaceURL", } func GetDatabricksWorkspace(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -32495,72 +25508,14 @@ func GetDatabricksWorkspace(ctx context.Context, d *plugin.QueryData, _ *plugin. // ========================== START: DataMigrationService ============================= type DataMigrationService struct { - Description azure.DataMigrationServiceDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *DataMigrationService) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.DataMigrationServiceDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.DataMigrationServiceDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type DataMigrationServiceHit struct { @@ -32631,11 +25586,10 @@ func (p DataMigrationServicePaginator) NextPage(ctx context.Context) ([]DataMigr } var listDataMigrationServiceFilters = map[string]string{ - "id": "description.Service.ID", - "og_account_id": "metadata.SourceID", - "name": "description.Service.Name", - "tags": "description.Service.Tags", - "title": "description.Service.Name", + "id": "Description.Service.ID", + "name": "Description.Service.Name", + "tags": "Description.Service.Tags", + "title": "Description.Service.Name", } func ListDataMigrationService(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -32699,11 +25653,10 @@ func ListDataMigrationService(ctx context.Context, d *plugin.QueryData, _ *plugi } var getDataMigrationServiceFilters = map[string]string{ - "id": "description.Service.ID", - "og_account_id": "metadata.SourceID", - "name": "description.Service.Name", - "tags": "description.Service.Tags", - "title": "description.Service.Name", + "id": "Description.Service.ID", + "name": "Description.Service.Name", + "tags": "Description.Service.Tags", + "title": "Description.Service.Name", } func GetDataMigrationService(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -32764,72 +25717,14 @@ func GetDataMigrationService(ctx context.Context, d *plugin.QueryData, _ *plugin // ========================== START: DataProtectionBackupVaults ============================= type DataProtectionBackupVaults struct { - Description azure.DataProtectionBackupVaultsDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *DataProtectionBackupVaults) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.DataProtectionBackupVaultsDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.DataProtectionBackupVaultsDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type DataProtectionBackupVaultsHit struct { @@ -32900,18 +25795,17 @@ func (p DataProtectionBackupVaultsPaginator) NextPage(ctx context.Context) ([]Da } var listDataProtectionBackupVaultsFilters = map[string]string{ - "id": "description.BackupVaults.ID", - "identity": "description.BackupVaults.Identity", - "og_account_id": "metadata.SourceID", - "monitoring_settings": "description.BackupVaults.Properties.MonitoringSettings", - "name": "description.BackupVaults.Name", - "provisioning_state": "description.BackupVaults.Properties.ProvisioningState", - "resource_move_state": "description.BackupVaults.Properties.ResourceMoveState", - "storage_settings": "description.BackupVaults.Properties.StorageSettings", - "system_data": "description.BackupVaults.SystemData", - "tags": "description.BackupVaults.Tags", - "title": "description.BackupVaults.Name", - "type": "description.BackupVaults.Type", + "id": "Description.BackupVaults.ID", + "identity": "Description.BackupVaults.Identity", + "monitoring_settings": "Description.BackupVaults.Properties.MonitoringSettings", + "name": "Description.BackupVaults.Name", + "provisioning_state": "Description.BackupVaults.Properties.ProvisioningState", + "resource_move_state": "Description.BackupVaults.Properties.ResourceMoveState", + "storage_settings": "Description.BackupVaults.Properties.StorageSettings", + "system_data": "Description.BackupVaults.SystemData", + "tags": "Description.BackupVaults.Tags", + "title": "Description.BackupVaults.Name", + "type": "Description.BackupVaults.Type", } func ListDataProtectionBackupVaults(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -32975,18 +25869,17 @@ func ListDataProtectionBackupVaults(ctx context.Context, d *plugin.QueryData, _ } var getDataProtectionBackupVaultsFilters = map[string]string{ - "id": "description.BackupVaults.ID", - "identity": "description.BackupVaults.Identity", - "og_account_id": "metadata.SourceID", - "monitoring_settings": "description.BackupVaults.Properties.MonitoringSettings", - "name": "description.BackupVaults.Name", - "provisioning_state": "description.BackupVaults.Properties.ProvisioningState", - "resource_move_state": "description.BackupVaults.Properties.ResourceMoveState", - "storage_settings": "description.BackupVaults.Properties.StorageSettings", - "system_data": "description.BackupVaults.SystemData", - "tags": "description.BackupVaults.Tags", - "title": "description.BackupVaults.Name", - "type": "description.BackupVaults.Type", + "id": "Description.BackupVaults.ID", + "identity": "Description.BackupVaults.Identity", + "monitoring_settings": "Description.BackupVaults.Properties.MonitoringSettings", + "name": "Description.BackupVaults.Name", + "provisioning_state": "Description.BackupVaults.Properties.ProvisioningState", + "resource_move_state": "Description.BackupVaults.Properties.ResourceMoveState", + "storage_settings": "Description.BackupVaults.Properties.StorageSettings", + "system_data": "Description.BackupVaults.SystemData", + "tags": "Description.BackupVaults.Tags", + "title": "Description.BackupVaults.Name", + "type": "Description.BackupVaults.Type", } func GetDataProtectionBackupVaults(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -33047,72 +25940,14 @@ func GetDataProtectionBackupVaults(ctx context.Context, d *plugin.QueryData, _ * // ========================== START: DataProtectionBackupVaultsBackupPolicies ============================= type DataProtectionBackupVaultsBackupPolicies struct { - Description azure.DataProtectionBackupVaultsBackupPoliciesDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *DataProtectionBackupVaultsBackupPolicies) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.DataProtectionBackupVaultsBackupPoliciesDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.DataProtectionBackupVaultsBackupPoliciesDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type DataProtectionBackupVaultsBackupPoliciesHit struct { @@ -33183,10 +26018,9 @@ func (p DataProtectionBackupVaultsBackupPoliciesPaginator) NextPage(ctx context. } var listDataProtectionBackupVaultsBackupPoliciesFilters = map[string]string{ - "id": "description.BackupPolicies.ID", - "og_account_id": "metadata.SourceID", - "name": "description.BackupPolicies.Name", - "title": "description.BackupPolicies.Name", + "id": "Description.BackupPolicies.ID", + "name": "Description.BackupPolicies.Name", + "title": "Description.BackupPolicies.Name", } func ListDataProtectionBackupVaultsBackupPolicies(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -33250,10 +26084,9 @@ func ListDataProtectionBackupVaultsBackupPolicies(ctx context.Context, d *plugin } var getDataProtectionBackupVaultsBackupPoliciesFilters = map[string]string{ - "id": "description.BackupPolicies.ID", - "og_account_id": "metadata.SourceID", - "name": "description.BackupPolicies.Name", - "title": "description.BackupPolicies.Name", + "id": "Description.BackupPolicies.ID", + "name": "Description.BackupPolicies.Name", + "title": "Description.BackupPolicies.Name", } func GetDataProtectionBackupVaultsBackupPolicies(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -33314,72 +26147,14 @@ func GetDataProtectionBackupVaultsBackupPolicies(ctx context.Context, d *plugin. // ========================== START: DataProtectionJob ============================= type DataProtectionJob struct { - Description azure.DataProtectionJobDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *DataProtectionJob) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.DataProtectionJobDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.DataProtectionJobDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type DataProtectionJobHit struct { @@ -33450,39 +26225,39 @@ func (p DataProtectionJobPaginator) NextPage(ctx context.Context) ([]DataProtect } var listDataProtectionJobFilters = map[string]string{ - "activity_id": "description.DataProtectionJob.Properties.ActivityID", - "backup_instance_friendly_name": "description.DataProtectionJob.Properties.BackupInstanceFriendlyName", - "backup_instance_id": "description.DataProtectionJob.Properties.BackupInstanceID", - "data_source_id": "description.DataProtectionJob.Properties.DataSourceID", - "data_source_location": "description.DataProtectionJob.Properties.DataSourceLocation", - "data_source_name": "description.DataProtectionJob.Properties.DataSourceName", - "data_source_set_name": "description.DataProtectionJob.Properties.DataSourceSetName", - "data_source_type": "description.DataProtectionJob.Properties.DataSourceType", - "destination_data_store_name": "description.DataProtectionJob.Properties.DestinationDataStoreName", - "duration": "description.DataProtectionJob.Properties.Duration", - "error_details": "description.DataProtectionJob.Properties.ErrorDetails", - "etag": "description.DataProtectionJob.Properties.Etag", - "extended_info": "description.DataProtectionJob.Properties.ExtendedInfo", - "id": "description.DataProtectionJob.ID", - "is_user_triggered": "description.DataProtectionJob.Properties.IsUserTriggered", - "name": "description.DataProtectionJob.Name", - "operation": "description.DataProtectionJob.Properties.Operation", - "operation_category": "description.DataProtectionJob.Properties.OperationCategory", - "policy_id": "description.DataProtectionJob.Properties.PolicyID", - "policy_name": "description.DataProtectionJob.Properties.PolicyName", - "progress_enabled": "description.DataProtectionJob.Properties.ProgressEnabled", - "progress_url": "description.DataProtectionJob.Properties.ProgressURL", - "resource_group": "description.ResourceGroup", - "restore_type": "description.DataProtectionJob.Properties.RestoreType", - "source_data_store_name": "description.DataProtectionJob.Properties.SourceDataStoreName", - "source_resource_group": "description.DataProtectionJob.Properties.SourceResourceGroup", - "source_subscription_id": "description.DataProtectionJob.Properties.SourceSubscriptionID", - "start_time": "description.DataProtectionJob.Properties.StartTime", - "status": "description.DataProtectionJob.Properties.Status", - "supported_actions": "description.DataProtectionJob.Properties.SupportedActions", - "title": "description.DataProtectionJob.Name", - "type": "description.DataProtectionJob.Type", - "vault_name": "description.VaultName", + "activity_id": "Description.DataProtectionJob.Properties.ActivityID", + "backup_instance_friendly_name": "Description.DataProtectionJob.Properties.BackupInstanceFriendlyName", + "backup_instance_id": "Description.DataProtectionJob.Properties.BackupInstanceID", + "data_source_id": "Description.DataProtectionJob.Properties.DataSourceID", + "data_source_location": "Description.DataProtectionJob.Properties.DataSourceLocation", + "data_source_name": "Description.DataProtectionJob.Properties.DataSourceName", + "data_source_set_name": "Description.DataProtectionJob.Properties.DataSourceSetName", + "data_source_type": "Description.DataProtectionJob.Properties.DataSourceType", + "destination_data_store_name": "Description.DataProtectionJob.Properties.DestinationDataStoreName", + "duration": "Description.DataProtectionJob.Properties.Duration", + "error_details": "Description.DataProtectionJob.Properties.ErrorDetails", + "etag": "Description.DataProtectionJob.Properties.Etag", + "extended_info": "Description.DataProtectionJob.Properties.ExtendedInfo", + "id": "Description.DataProtectionJob.ID", + "is_user_triggered": "Description.DataProtectionJob.Properties.IsUserTriggered", + "name": "Description.DataProtectionJob.Name", + "operation": "Description.DataProtectionJob.Properties.Operation", + "operation_category": "Description.DataProtectionJob.Properties.OperationCategory", + "policy_id": "Description.DataProtectionJob.Properties.PolicyID", + "policy_name": "Description.DataProtectionJob.Properties.PolicyName", + "progress_enabled": "Description.DataProtectionJob.Properties.ProgressEnabled", + "progress_url": "Description.DataProtectionJob.Properties.ProgressURL", + "resource_group": "Description.ResourceGroup", + "restore_type": "Description.DataProtectionJob.Properties.RestoreType", + "source_data_store_name": "Description.DataProtectionJob.Properties.SourceDataStoreName", + "source_resource_group": "Description.DataProtectionJob.Properties.SourceResourceGroup", + "source_subscription_id": "Description.DataProtectionJob.Properties.SourceSubscriptionID", + "start_time": "Description.DataProtectionJob.Properties.StartTime", + "status": "Description.DataProtectionJob.Properties.Status", + "supported_actions": "Description.DataProtectionJob.Properties.SupportedActions", + "title": "Description.DataProtectionJob.Name", + "type": "Description.DataProtectionJob.Type", + "vault_name": "Description.VaultName", } func ListDataProtectionJob(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -33546,39 +26321,39 @@ func ListDataProtectionJob(ctx context.Context, d *plugin.QueryData, _ *plugin.H } var getDataProtectionJobFilters = map[string]string{ - "activity_id": "description.DataProtectionJob.Properties.ActivityID", - "backup_instance_friendly_name": "description.DataProtectionJob.Properties.BackupInstanceFriendlyName", - "backup_instance_id": "description.DataProtectionJob.Properties.BackupInstanceID", - "data_source_id": "description.DataProtectionJob.Properties.DataSourceID", - "data_source_location": "description.DataProtectionJob.Properties.DataSourceLocation", - "data_source_name": "description.DataProtectionJob.Properties.DataSourceName", - "data_source_set_name": "description.DataProtectionJob.Properties.DataSourceSetName", - "data_source_type": "description.DataProtectionJob.Properties.DataSourceType", - "destination_data_store_name": "description.DataProtectionJob.Properties.DestinationDataStoreName", - "duration": "description.DataProtectionJob.Properties.Duration", - "error_details": "description.DataProtectionJob.Properties.ErrorDetails", - "etag": "description.DataProtectionJob.Properties.Etag", - "extended_info": "description.DataProtectionJob.Properties.ExtendedInfo", - "id": "description.DataProtectionJob.ID", - "is_user_triggered": "description.DataProtectionJob.Properties.IsUserTriggered", - "name": "description.DataProtectionJob.Name", - "operation": "description.DataProtectionJob.Properties.Operation", - "operation_category": "description.DataProtectionJob.Properties.OperationCategory", - "policy_id": "description.DataProtectionJob.Properties.PolicyID", - "policy_name": "description.DataProtectionJob.Properties.PolicyName", - "progress_enabled": "description.DataProtectionJob.Properties.ProgressEnabled", - "progress_url": "description.DataProtectionJob.Properties.ProgressURL", - "resource_group": "description.ResourceGroup", - "restore_type": "description.DataProtectionJob.Properties.RestoreType", - "source_data_store_name": "description.DataProtectionJob.Properties.SourceDataStoreName", - "source_resource_group": "description.DataProtectionJob.Properties.SourceResourceGroup", - "source_subscription_id": "description.DataProtectionJob.Properties.SourceSubscriptionID", - "start_time": "description.DataProtectionJob.Properties.StartTime", - "status": "description.DataProtectionJob.Properties.Status", - "supported_actions": "description.DataProtectionJob.Properties.SupportedActions", - "title": "description.DataProtectionJob.Name", - "type": "description.DataProtectionJob.Type", - "vault_name": "description.VaultName", + "activity_id": "Description.DataProtectionJob.Properties.ActivityID", + "backup_instance_friendly_name": "Description.DataProtectionJob.Properties.BackupInstanceFriendlyName", + "backup_instance_id": "Description.DataProtectionJob.Properties.BackupInstanceID", + "data_source_id": "Description.DataProtectionJob.Properties.DataSourceID", + "data_source_location": "Description.DataProtectionJob.Properties.DataSourceLocation", + "data_source_name": "Description.DataProtectionJob.Properties.DataSourceName", + "data_source_set_name": "Description.DataProtectionJob.Properties.DataSourceSetName", + "data_source_type": "Description.DataProtectionJob.Properties.DataSourceType", + "destination_data_store_name": "Description.DataProtectionJob.Properties.DestinationDataStoreName", + "duration": "Description.DataProtectionJob.Properties.Duration", + "error_details": "Description.DataProtectionJob.Properties.ErrorDetails", + "etag": "Description.DataProtectionJob.Properties.Etag", + "extended_info": "Description.DataProtectionJob.Properties.ExtendedInfo", + "id": "Description.DataProtectionJob.ID", + "is_user_triggered": "Description.DataProtectionJob.Properties.IsUserTriggered", + "name": "Description.DataProtectionJob.Name", + "operation": "Description.DataProtectionJob.Properties.Operation", + "operation_category": "Description.DataProtectionJob.Properties.OperationCategory", + "policy_id": "Description.DataProtectionJob.Properties.PolicyID", + "policy_name": "Description.DataProtectionJob.Properties.PolicyName", + "progress_enabled": "Description.DataProtectionJob.Properties.ProgressEnabled", + "progress_url": "Description.DataProtectionJob.Properties.ProgressURL", + "resource_group": "Description.ResourceGroup", + "restore_type": "Description.DataProtectionJob.Properties.RestoreType", + "source_data_store_name": "Description.DataProtectionJob.Properties.SourceDataStoreName", + "source_resource_group": "Description.DataProtectionJob.Properties.SourceResourceGroup", + "source_subscription_id": "Description.DataProtectionJob.Properties.SourceSubscriptionID", + "start_time": "Description.DataProtectionJob.Properties.StartTime", + "status": "Description.DataProtectionJob.Properties.Status", + "supported_actions": "Description.DataProtectionJob.Properties.SupportedActions", + "title": "Description.DataProtectionJob.Name", + "type": "Description.DataProtectionJob.Type", + "vault_name": "Description.VaultName", } func GetDataProtectionJob(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -33639,72 +26414,14 @@ func GetDataProtectionJob(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy // ========================== START: DataFactory ============================= type DataFactory struct { - Description azure.DataFactoryDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *DataFactory) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.DataFactoryDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.DataFactoryDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type DataFactoryHit struct { @@ -33775,23 +26492,22 @@ func (p DataFactoryPaginator) NextPage(ctx context.Context) ([]DataFactory, erro } var listDataFactoryFilters = map[string]string{ - "additional_properties": "description.Factory.AdditionalProperties", - "encryption": "description.Factory.Properties.Encryption", - "etag": "description.Factory.ETag", - "global_parameters": "description.Factory.Properties.GlobalParameters", - "id": "description.Factory.ID", - "identity": "description.Factory.Identity", - "og_account_id": "metadata.SourceID", - "name": "description.Factory.Name", - "private_endpoint_connections": "description.PrivateEndPointConnections", - "provisioning_state": "description.Factory.Properties.ProvisioningState", - "public_network_access": "description.Factory.Properties.PublicNetworkAccess", - "repo_configuration": "description.Factory.Properties.RepoConfiguration", - "resource_group": "description.ResourceGroup", - "tags": "description.Factory.Tags", - "title": "description.Factory.Name", - "type": "description.Factory.Type", - "version": "description.Factory.Properties.Version", + "additional_properties": "Description.Factory.AdditionalProperties", + "encryption": "Description.Factory.Properties.Encryption", + "etag": "Description.Factory.ETag", + "global_parameters": "Description.Factory.Properties.GlobalParameters", + "id": "Description.Factory.ID", + "identity": "Description.Factory.Identity", + "name": "Description.Factory.Name", + "private_endpoint_connections": "Description.PrivateEndPointConnections", + "provisioning_state": "Description.Factory.Properties.ProvisioningState", + "public_network_access": "Description.Factory.Properties.PublicNetworkAccess", + "repo_configuration": "Description.Factory.Properties.RepoConfiguration", + "resource_group": "Description.ResourceGroup", + "tags": "Description.Factory.Tags", + "title": "Description.Factory.Name", + "type": "Description.Factory.Type", + "version": "Description.Factory.Properties.Version", } func ListDataFactory(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -33855,23 +26571,22 @@ func ListDataFactory(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate } var getDataFactoryFilters = map[string]string{ - "additional_properties": "description.Factory.AdditionalProperties", - "encryption": "description.Factory.Properties.Encryption", - "etag": "description.Factory.ETag", - "global_parameters": "description.Factory.Properties.GlobalParameters", - "id": "description.Factory.ID", - "identity": "description.Factory.Identity", - "og_account_id": "metadata.SourceID", + "additional_properties": "Description.Factory.AdditionalProperties", + "encryption": "Description.Factory.Properties.Encryption", + "etag": "Description.Factory.ETag", + "global_parameters": "Description.Factory.Properties.GlobalParameters", + "id": "Description.Factory.ID", + "identity": "Description.Factory.Identity", "name": "description.Factory.name", - "private_endpoint_connections": "description.PrivateEndPointConnections", - "provisioning_state": "description.Factory.Properties.ProvisioningState", - "public_network_access": "description.Factory.Properties.PublicNetworkAccess", - "repo_configuration": "description.Factory.Properties.RepoConfiguration", + "private_endpoint_connections": "Description.PrivateEndPointConnections", + "provisioning_state": "Description.Factory.Properties.ProvisioningState", + "public_network_access": "Description.Factory.Properties.PublicNetworkAccess", + "repo_configuration": "Description.Factory.Properties.RepoConfiguration", "resource_group": "description.ResourceGroup", - "tags": "description.Factory.Tags", - "title": "description.Factory.Name", - "type": "description.Factory.Type", - "version": "description.Factory.Properties.Version", + "tags": "Description.Factory.Tags", + "title": "Description.Factory.Name", + "type": "Description.Factory.Type", + "version": "Description.Factory.Properties.Version", } func GetDataFactory(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -33932,72 +26647,14 @@ func GetDataFactory(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD // ========================== START: DataFactoryDataset ============================= type DataFactoryDataset struct { - Description azure.DataFactoryDatasetDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *DataFactoryDataset) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.DataFactoryDatasetDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.DataFactoryDatasetDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type DataFactoryDatasetHit struct { @@ -34068,15 +26725,14 @@ func (p DataFactoryDatasetPaginator) NextPage(ctx context.Context) ([]DataFactor } var listDataFactoryDatasetFilters = map[string]string{ - "etag": "description.Dataset.Etag", - "factory_name": "description.Factory.Name", - "id": "description.Dataset.ID", - "og_account_id": "metadata.SourceID", - "name": "description.Dataset.Name", - "properties": "description.Dataset.Properties", - "resource_group": "description.ResourceGroup", - "title": "description.Dataset.Name", - "type": "description.Dataset.Type", + "etag": "Description.Dataset.Etag", + "factory_name": "Description.Factory.Name", + "id": "Description.Dataset.ID", + "name": "Description.Dataset.Name", + "properties": "Description.Dataset.Properties", + "resource_group": "Description.ResourceGroup", + "title": "Description.Dataset.Name", + "type": "Description.Dataset.Type", } func ListDataFactoryDataset(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -34140,15 +26796,14 @@ func ListDataFactoryDataset(ctx context.Context, d *plugin.QueryData, _ *plugin. } var getDataFactoryDatasetFilters = map[string]string{ - "etag": "description.Dataset.Etag", + "etag": "Description.Dataset.Etag", "factory_name": "description.Factory.name", - "id": "description.Dataset.ID", - "og_account_id": "metadata.SourceID", + "id": "Description.Dataset.ID", "name": "description.Dataset.name", - "properties": "description.Dataset.Properties", + "properties": "Description.Dataset.Properties", "resource_group": "description.ResourceGroup", - "title": "description.Dataset.Name", - "type": "description.Dataset.Type", + "title": "Description.Dataset.Name", + "type": "Description.Dataset.Type", } func GetDataFactoryDataset(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -34209,72 +26864,14 @@ func GetDataFactoryDataset(ctx context.Context, d *plugin.QueryData, _ *plugin.H // ========================== START: DataFactoryPipeline ============================= type DataFactoryPipeline struct { - Description azure.DataFactoryPipelineDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *DataFactoryPipeline) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.DataFactoryPipelineDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.DataFactoryPipelineDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type DataFactoryPipelineHit struct { @@ -34345,23 +26942,22 @@ func (p DataFactoryPipelinePaginator) NextPage(ctx context.Context) ([]DataFacto } var listDataFactoryPipelineFilters = map[string]string{ - "activities": "description.Pipeline.Properties.Activities", - "annotations": "description.Pipeline.Properties.Annotations", - "concurrency": "description.Pipeline.Properties.Concurrency", - "description": "description.Pipeline.Properties.Description", - "etag": "description.Pipeline.Etag", - "factory_name": "description.Factory.Name", - "id": "description.Pipeline.ID", - "og_account_id": "metadata.SourceID", - "name": "description.Pipeline.Name", - "parameters": "description.Pipeline.Properties.Parameters", - "pipeline_folder": "description.Pipeline.Properties.Folder.Name", - "pipeline_policy": "description.Pipeline.Properties.Policy", - "resource_group": "description.ResourceGroup", - "run_dimensions": "description.Pipeline.Properties.RunDimensions", - "title": "description.Pipeline.Name", - "type": "description.Pipeline.Type", - "variables": "description.Pipeline.Properties.Variables", + "activities": "Description.Pipeline.Properties.Activities", + "annotations": "Description.Pipeline.Properties.Annotations", + "concurrency": "Description.Pipeline.Properties.Concurrency", + "description": "Description.Pipeline.Properties.Description", + "etag": "Description.Pipeline.Etag", + "factory_name": "Description.Factory.Name", + "id": "Description.Pipeline.ID", + "name": "Description.Pipeline.Name", + "parameters": "Description.Pipeline.Properties.Parameters", + "pipeline_folder": "Description.Pipeline.Properties.Folder.Name", + "pipeline_policy": "Description.Pipeline.Properties.Policy", + "resource_group": "Description.ResourceGroup", + "run_dimensions": "Description.Pipeline.Properties.RunDimensions", + "title": "Description.Pipeline.Name", + "type": "Description.Pipeline.Type", + "variables": "Description.Pipeline.Properties.Variables", } func ListDataFactoryPipeline(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -34425,23 +27021,22 @@ func ListDataFactoryPipeline(ctx context.Context, d *plugin.QueryData, _ *plugin } var getDataFactoryPipelineFilters = map[string]string{ - "activities": "description.Pipeline.Properties.Activities", - "annotations": "description.Pipeline.Properties.Annotations", - "concurrency": "description.Pipeline.Properties.Concurrency", - "description": "description.Pipeline.Properties.Description", - "etag": "description.Pipeline.Etag", + "activities": "Description.Pipeline.Properties.Activities", + "annotations": "Description.Pipeline.Properties.Annotations", + "concurrency": "Description.Pipeline.Properties.Concurrency", + "description": "Description.Pipeline.Properties.Description", + "etag": "Description.Pipeline.Etag", "factory_name": "description.Factory.name", - "id": "description.Pipeline.ID", - "og_account_id": "metadata.SourceID", + "id": "Description.Pipeline.ID", "name": "description.Pipeline.name", - "parameters": "description.Pipeline.Properties.Parameters", - "pipeline_folder": "description.Pipeline.Properties.Folder.Name", - "pipeline_policy": "description.Pipeline.Properties.Policy", + "parameters": "Description.Pipeline.Properties.Parameters", + "pipeline_folder": "Description.Pipeline.Properties.Folder.Name", + "pipeline_policy": "Description.Pipeline.Properties.Policy", "resource_group": "description.ResourceGroup", - "run_dimensions": "description.Pipeline.Properties.RunDimensions", - "title": "description.Pipeline.Name", - "type": "description.Pipeline.Type", - "variables": "description.Pipeline.Properties.Variables", + "run_dimensions": "Description.Pipeline.Properties.RunDimensions", + "title": "Description.Pipeline.Name", + "type": "Description.Pipeline.Type", + "variables": "Description.Pipeline.Properties.Variables", } func GetDataFactoryPipeline(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -34502,72 +27097,14 @@ func GetDataFactoryPipeline(ctx context.Context, d *plugin.QueryData, _ *plugin. // ========================== START: DataLakeAnalyticsAccount ============================= type DataLakeAnalyticsAccount struct { - Description azure.DataLakeAnalyticsAccountDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *DataLakeAnalyticsAccount) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.DataLakeAnalyticsAccountDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.DataLakeAnalyticsAccountDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type DataLakeAnalyticsAccountHit struct { @@ -34638,34 +27175,33 @@ func (p DataLakeAnalyticsAccountPaginator) NextPage(ctx context.Context) ([]Data } var listDataLakeAnalyticsAccountFilters = map[string]string{ - "account_id": "description.DataLakeAnalyticsAccount.Properties.AccountID", - "compute_policies": "description.DataLakeAnalyticsAccount.Properties.ComputePolicies", - "current_tier": "description.DataLakeAnalyticsAccount.Properties.CurrentTier", - "data_lake_store_accounts": "description.DataLakeAnalyticsAccount.Properties.DataLakeStoreAccounts", - "default_data_lake_store_account": "description.DataLakeAnalyticsAccount.Properties.DefaultDataLakeStoreAccount", - "diagnostic_settings": "description.DiagnosticSettingsResource", - "endpoint": "description.DataLakeAnalyticsAccount.Properties.Endpoint", - "firewall_allow_azure_ips": "description.DataLakeAnalyticsAccount.Properties.FirewallAllowAzureIPs", - "firewall_rules": "description.DataLakeAnalyticsAccount.Properties.FirewallRules", - "firewall_state": "description.DataLakeAnalyticsAccount.Properties.FirewallState", - "id": "description.DataLakeAnalyticsAccount.ID", - "og_account_id": "metadata.SourceID", - "max_degree_of_parallelism": "description.DataLakeAnalyticsAccount.Properties.MaxDegreeOfParallelism", - "max_degree_of_parallelism_per_job": "description.DataLakeAnalyticsAccount.Properties.MaxDegreeOfParallelismPerJob", - "max_job_count": "description.DataLakeAnalyticsAccount.Properties.MaxJobCount", - "min_priority_per_job": "description.DataLakeAnalyticsAccount.Properties.MinPriorityPerJob", - "name": "description.DataLakeAnalyticsAccount.Name", - "new_tier": "description.DataLakeAnalyticsAccount.Properties.NewTier", - "provisioning_state": "description.DataLakeAnalyticsAccount.Properties.ProvisioningState", - "query_store_retention": "description.DataLakeAnalyticsAccount.Properties.QueryStoreRetention", - "resource_group": "description.ResourceGroup", - "state": "description.DataLakeAnalyticsAccount.Properties.State", - "storage_accounts": "description.DataLakeAnalyticsAccount.Properties.StorageAccounts", - "system_max_degree_of_parallelism": "description.DataLakeAnalyticsAccount.Properties.SystemMaxDegreeOfParallelism", - "system_max_job_count": "description.DataLakeAnalyticsAccount.Properties.SystemMaxJobCount", - "tags": "description.DataLakeAnalyticsAccount.Tags", - "title": "description.DataLakeAnalyticsAccount.Name", - "type": "description.DataLakeAnalyticsAccount.Type", + "account_id": "Description.DataLakeAnalyticsAccount.Properties.AccountID", + "compute_policies": "Description.DataLakeAnalyticsAccount.Properties.ComputePolicies", + "current_tier": "Description.DataLakeAnalyticsAccount.Properties.CurrentTier", + "data_lake_store_accounts": "Description.DataLakeAnalyticsAccount.Properties.DataLakeStoreAccounts", + "default_data_lake_store_account": "Description.DataLakeAnalyticsAccount.Properties.DefaultDataLakeStoreAccount", + "diagnostic_settings": "Description.DiagnosticSettingsResource", + "endpoint": "Description.DataLakeAnalyticsAccount.Properties.Endpoint", + "firewall_allow_azure_ips": "Description.DataLakeAnalyticsAccount.Properties.FirewallAllowAzureIPs", + "firewall_rules": "Description.DataLakeAnalyticsAccount.Properties.FirewallRules", + "firewall_state": "Description.DataLakeAnalyticsAccount.Properties.FirewallState", + "id": "Description.DataLakeAnalyticsAccount.ID", + "max_degree_of_parallelism": "Description.DataLakeAnalyticsAccount.Properties.MaxDegreeOfParallelism", + "max_degree_of_parallelism_per_job": "Description.DataLakeAnalyticsAccount.Properties.MaxDegreeOfParallelismPerJob", + "max_job_count": "Description.DataLakeAnalyticsAccount.Properties.MaxJobCount", + "min_priority_per_job": "Description.DataLakeAnalyticsAccount.Properties.MinPriorityPerJob", + "name": "Description.DataLakeAnalyticsAccount.Name", + "new_tier": "Description.DataLakeAnalyticsAccount.Properties.NewTier", + "provisioning_state": "Description.DataLakeAnalyticsAccount.Properties.ProvisioningState", + "query_store_retention": "Description.DataLakeAnalyticsAccount.Properties.QueryStoreRetention", + "resource_group": "Description.ResourceGroup", + "state": "Description.DataLakeAnalyticsAccount.Properties.State", + "storage_accounts": "Description.DataLakeAnalyticsAccount.Properties.StorageAccounts", + "system_max_degree_of_parallelism": "Description.DataLakeAnalyticsAccount.Properties.SystemMaxDegreeOfParallelism", + "system_max_job_count": "Description.DataLakeAnalyticsAccount.Properties.SystemMaxJobCount", + "tags": "Description.DataLakeAnalyticsAccount.Tags", + "title": "Description.DataLakeAnalyticsAccount.Name", + "type": "Description.DataLakeAnalyticsAccount.Type", } func ListDataLakeAnalyticsAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -34729,34 +27265,33 @@ func ListDataLakeAnalyticsAccount(ctx context.Context, d *plugin.QueryData, _ *p } var getDataLakeAnalyticsAccountFilters = map[string]string{ - "account_id": "description.DataLakeAnalyticsAccount.Properties.AccountID", - "compute_policies": "description.DataLakeAnalyticsAccount.Properties.ComputePolicies", - "current_tier": "description.DataLakeAnalyticsAccount.Properties.CurrentTier", - "data_lake_store_accounts": "description.DataLakeAnalyticsAccount.Properties.DataLakeStoreAccounts", - "default_data_lake_store_account": "description.DataLakeAnalyticsAccount.Properties.DefaultDataLakeStoreAccount", - "diagnostic_settings": "description.DiagnosticSettingsResource", - "endpoint": "description.DataLakeAnalyticsAccount.Properties.Endpoint", - "firewall_allow_azure_ips": "description.DataLakeAnalyticsAccount.Properties.FirewallAllowAzureIPs", - "firewall_rules": "description.DataLakeAnalyticsAccount.Properties.FirewallRules", - "firewall_state": "description.DataLakeAnalyticsAccount.Properties.FirewallState", - "id": "description.DataLakeAnalyticsAccount.ID", - "og_account_id": "metadata.SourceID", - "max_degree_of_parallelism": "description.DataLakeAnalyticsAccount.Properties.MaxDegreeOfParallelism", - "max_degree_of_parallelism_per_job": "description.DataLakeAnalyticsAccount.Properties.MaxDegreeOfParallelismPerJob", - "max_job_count": "description.DataLakeAnalyticsAccount.Properties.MaxJobCount", - "min_priority_per_job": "description.DataLakeAnalyticsAccount.Properties.MinPriorityPerJob", + "account_id": "Description.DataLakeAnalyticsAccount.Properties.AccountID", + "compute_policies": "Description.DataLakeAnalyticsAccount.Properties.ComputePolicies", + "current_tier": "Description.DataLakeAnalyticsAccount.Properties.CurrentTier", + "data_lake_store_accounts": "Description.DataLakeAnalyticsAccount.Properties.DataLakeStoreAccounts", + "default_data_lake_store_account": "Description.DataLakeAnalyticsAccount.Properties.DefaultDataLakeStoreAccount", + "diagnostic_settings": "Description.DiagnosticSettingsResource", + "endpoint": "Description.DataLakeAnalyticsAccount.Properties.Endpoint", + "firewall_allow_azure_ips": "Description.DataLakeAnalyticsAccount.Properties.FirewallAllowAzureIPs", + "firewall_rules": "Description.DataLakeAnalyticsAccount.Properties.FirewallRules", + "firewall_state": "Description.DataLakeAnalyticsAccount.Properties.FirewallState", + "id": "Description.DataLakeAnalyticsAccount.ID", + "max_degree_of_parallelism": "Description.DataLakeAnalyticsAccount.Properties.MaxDegreeOfParallelism", + "max_degree_of_parallelism_per_job": "Description.DataLakeAnalyticsAccount.Properties.MaxDegreeOfParallelismPerJob", + "max_job_count": "Description.DataLakeAnalyticsAccount.Properties.MaxJobCount", + "min_priority_per_job": "Description.DataLakeAnalyticsAccount.Properties.MinPriorityPerJob", "name": "description.DataLakeAnalyticsAccount.name", - "new_tier": "description.DataLakeAnalyticsAccount.Properties.NewTier", - "provisioning_state": "description.DataLakeAnalyticsAccount.Properties.ProvisioningState", - "query_store_retention": "description.DataLakeAnalyticsAccount.Properties.QueryStoreRetention", + "new_tier": "Description.DataLakeAnalyticsAccount.Properties.NewTier", + "provisioning_state": "Description.DataLakeAnalyticsAccount.Properties.ProvisioningState", + "query_store_retention": "Description.DataLakeAnalyticsAccount.Properties.QueryStoreRetention", "resource_group": "description.ResourceGroup", - "state": "description.DataLakeAnalyticsAccount.Properties.State", - "storage_accounts": "description.DataLakeAnalyticsAccount.Properties.StorageAccounts", - "system_max_degree_of_parallelism": "description.DataLakeAnalyticsAccount.Properties.SystemMaxDegreeOfParallelism", - "system_max_job_count": "description.DataLakeAnalyticsAccount.Properties.SystemMaxJobCount", - "tags": "description.DataLakeAnalyticsAccount.Tags", - "title": "description.DataLakeAnalyticsAccount.Name", - "type": "description.DataLakeAnalyticsAccount.Type", + "state": "Description.DataLakeAnalyticsAccount.Properties.State", + "storage_accounts": "Description.DataLakeAnalyticsAccount.Properties.StorageAccounts", + "system_max_degree_of_parallelism": "Description.DataLakeAnalyticsAccount.Properties.SystemMaxDegreeOfParallelism", + "system_max_job_count": "Description.DataLakeAnalyticsAccount.Properties.SystemMaxJobCount", + "tags": "Description.DataLakeAnalyticsAccount.Tags", + "title": "Description.DataLakeAnalyticsAccount.Name", + "type": "Description.DataLakeAnalyticsAccount.Type", } func GetDataLakeAnalyticsAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -34817,72 +27352,14 @@ func GetDataLakeAnalyticsAccount(ctx context.Context, d *plugin.QueryData, _ *pl // ========================== START: DataLakeStore ============================= type DataLakeStore struct { - Description azure.DataLakeStoreDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *DataLakeStore) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.DataLakeStoreDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.DataLakeStoreDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type DataLakeStoreHit struct { @@ -34953,31 +27430,30 @@ func (p DataLakeStorePaginator) NextPage(ctx context.Context) ([]DataLakeStore, } var listDataLakeStoreFilters = map[string]string{ - "account_id": "description.DataLakeStoreAccount.Properties.AccountID", - "current_tier": "description.DataLakeStoreAccount.Properties.CurrentTier", - "default_group": "description.DataLakeStoreAccount.Properties.DefaultGroup", - "diagnostic_settings": "description.DiagnosticSettingsResource", - "encryption_config": "description.DataLakeStoreAccount.Properties.EncryptionConfig", - "encryption_provisioning_state": "description.DataLakeStoreAccount.Properties.EncryptionProvisioningState", - "encryption_state": "description.DataLakeStoreAccount.Properties.EncryptionState", - "endpoint": "description.DataLakeStoreAccount.Properties.Endpoint", - "firewall_allow_azure_ips": "description.DataLakeStoreAccount.Properties.FirewallAllowAzureIPs", - "firewall_rules": "description.DataLakeStoreAccount.Properties.FirewallRules", - "firewall_state": "description.DataLakeStoreAccount.Properties.FirewallState", - "id": "description.DataLakeStoreAccount.ID", - "identity": "description.DataLakeStoreAccount.Identity", - "og_account_id": "metadata.SourceID", - "name": "description.DataLakeStoreAccount.Name", - "new_tier": "description.DataLakeStoreAccount.Properties.NewTier", - "provisioning_state": "description.DataLakeStoreAccount.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "state": "description.DataLakeStoreAccount.Properties.State", - "tags": "description.DataLakeStoreAccount.Tags", - "title": "description.DataLakeStoreAccount.Name", - "trusted_id_provider_state": "description.DataLakeStoreAccount.Properties.TrustedIDProviderState", - "trusted_id_providers": "description.DataLakeStoreAccount.Properties.TrustedIDProviders", - "type": "description.DataLakeStoreAccount.Type", - "virtual_network_rules": "description.DataLakeStoreAccount.Properties.VirtualNetworkRules", + "account_id": "Description.DataLakeStoreAccount.Properties.AccountID", + "current_tier": "Description.DataLakeStoreAccount.Properties.CurrentTier", + "default_group": "Description.DataLakeStoreAccount.Properties.DefaultGroup", + "diagnostic_settings": "Description.DiagnosticSettingsResource", + "encryption_config": "Description.DataLakeStoreAccount.Properties.EncryptionConfig", + "encryption_provisioning_state": "Description.DataLakeStoreAccount.Properties.EncryptionProvisioningState", + "encryption_state": "Description.DataLakeStoreAccount.Properties.EncryptionState", + "endpoint": "Description.DataLakeStoreAccount.Properties.Endpoint", + "firewall_allow_azure_ips": "Description.DataLakeStoreAccount.Properties.FirewallAllowAzureIPs", + "firewall_rules": "Description.DataLakeStoreAccount.Properties.FirewallRules", + "firewall_state": "Description.DataLakeStoreAccount.Properties.FirewallState", + "id": "Description.DataLakeStoreAccount.ID", + "identity": "Description.DataLakeStoreAccount.Identity", + "name": "Description.DataLakeStoreAccount.Name", + "new_tier": "Description.DataLakeStoreAccount.Properties.NewTier", + "provisioning_state": "Description.DataLakeStoreAccount.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "state": "Description.DataLakeStoreAccount.Properties.State", + "tags": "Description.DataLakeStoreAccount.Tags", + "title": "Description.DataLakeStoreAccount.Name", + "trusted_id_provider_state": "Description.DataLakeStoreAccount.Properties.TrustedIDProviderState", + "trusted_id_providers": "Description.DataLakeStoreAccount.Properties.TrustedIDProviders", + "type": "Description.DataLakeStoreAccount.Type", + "virtual_network_rules": "Description.DataLakeStoreAccount.Properties.VirtualNetworkRules", } func ListDataLakeStore(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -35041,31 +27517,30 @@ func ListDataLakeStore(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra } var getDataLakeStoreFilters = map[string]string{ - "account_id": "description.DataLakeStoreAccount.Properties.AccountID", - "current_tier": "description.DataLakeStoreAccount.Properties.CurrentTier", - "default_group": "description.DataLakeStoreAccount.Properties.DefaultGroup", - "diagnostic_settings": "description.DiagnosticSettingsResource", - "encryption_config": "description.DataLakeStoreAccount.Properties.EncryptionConfig", - "encryption_provisioning_state": "description.DataLakeStoreAccount.Properties.EncryptionProvisioningState", - "encryption_state": "description.DataLakeStoreAccount.Properties.EncryptionState", - "endpoint": "description.DataLakeStoreAccount.Properties.Endpoint", - "firewall_allow_azure_ips": "description.DataLakeStoreAccount.Properties.FirewallAllowAzureIPs", - "firewall_rules": "description.DataLakeStoreAccount.Properties.FirewallRules", - "firewall_state": "description.DataLakeStoreAccount.Properties.FirewallState", - "id": "description.DataLakeStoreAccount.ID", - "identity": "description.DataLakeStoreAccount.Identity", - "og_account_id": "metadata.SourceID", + "account_id": "Description.DataLakeStoreAccount.Properties.AccountID", + "current_tier": "Description.DataLakeStoreAccount.Properties.CurrentTier", + "default_group": "Description.DataLakeStoreAccount.Properties.DefaultGroup", + "diagnostic_settings": "Description.DiagnosticSettingsResource", + "encryption_config": "Description.DataLakeStoreAccount.Properties.EncryptionConfig", + "encryption_provisioning_state": "Description.DataLakeStoreAccount.Properties.EncryptionProvisioningState", + "encryption_state": "Description.DataLakeStoreAccount.Properties.EncryptionState", + "endpoint": "Description.DataLakeStoreAccount.Properties.Endpoint", + "firewall_allow_azure_ips": "Description.DataLakeStoreAccount.Properties.FirewallAllowAzureIPs", + "firewall_rules": "Description.DataLakeStoreAccount.Properties.FirewallRules", + "firewall_state": "Description.DataLakeStoreAccount.Properties.FirewallState", + "id": "Description.DataLakeStoreAccount.ID", + "identity": "Description.DataLakeStoreAccount.Identity", "name": "description.DataLakeStoreAccount.name", - "new_tier": "description.DataLakeStoreAccount.Properties.NewTier", - "provisioning_state": "description.DataLakeStoreAccount.Properties.ProvisioningState", + "new_tier": "Description.DataLakeStoreAccount.Properties.NewTier", + "provisioning_state": "Description.DataLakeStoreAccount.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", - "state": "description.DataLakeStoreAccount.Properties.State", - "tags": "description.DataLakeStoreAccount.Tags", - "title": "description.DataLakeStoreAccount.Name", - "trusted_id_provider_state": "description.DataLakeStoreAccount.Properties.TrustedIDProviderState", - "trusted_id_providers": "description.DataLakeStoreAccount.Properties.TrustedIDProviders", - "type": "description.DataLakeStoreAccount.Type", - "virtual_network_rules": "description.DataLakeStoreAccount.Properties.VirtualNetworkRules", + "state": "Description.DataLakeStoreAccount.Properties.State", + "tags": "Description.DataLakeStoreAccount.Tags", + "title": "Description.DataLakeStoreAccount.Name", + "trusted_id_provider_state": "Description.DataLakeStoreAccount.Properties.TrustedIDProviderState", + "trusted_id_providers": "Description.DataLakeStoreAccount.Properties.TrustedIDProviders", + "type": "Description.DataLakeStoreAccount.Type", + "virtual_network_rules": "Description.DataLakeStoreAccount.Properties.VirtualNetworkRules", } func GetDataLakeStore(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -35126,72 +27601,14 @@ func GetDataLakeStore(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat // ========================== START: DiagnosticSetting ============================= type DiagnosticSetting struct { - Description azure.DiagnosticSettingDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *DiagnosticSetting) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.DiagnosticSettingDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.DiagnosticSettingDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type DiagnosticSettingHit struct { @@ -35262,20 +27679,19 @@ func (p DiagnosticSettingPaginator) NextPage(ctx context.Context) ([]DiagnosticS } var listDiagnosticSettingFilters = map[string]string{ - "event_hub_authorization_rule_id": "description.DiagnosticSettingsResource.Properties.EventHubAuthorizationRuleID", - "event_hub_name": "description.DiagnosticSettingsResource.Properties.EventHubName", - "id": "description.DiagnosticSettingsResource.ID", - "og_account_id": "metadata.SourceID", - "log_analytics_destination_type": "description.DiagnosticSettingsResource.Properties.LogAnalyticsDestinationType", - "logs": "description.DiagnosticSettingsResource.Properties.Logs", - "metrics": "description.DiagnosticSettingsResource.Properties.Metrics", - "name": "description.DiagnosticSettingsResource.Name", - "resource_group": "description.ResourceGroup", - "service_bus_rule_id": "description.DiagnosticSettingsResource.Properties.ServiceBusRuleID", - "storage_account_id": "description.DiagnosticSettingsResource.Properties.StorageAccountID", - "title": "description.DiagnosticSettingsResource.Name", - "type": "description.DiagnosticSettingsResource.Type", - "workspace_id": "description.DiagnosticSettingsResource.Properties.WorkspaceID", + "event_hub_authorization_rule_id": "Description.DiagnosticSettingsResource.Properties.EventHubAuthorizationRuleID", + "event_hub_name": "Description.DiagnosticSettingsResource.Properties.EventHubName", + "id": "Description.DiagnosticSettingsResource.ID", + "log_analytics_destination_type": "Description.DiagnosticSettingsResource.Properties.LogAnalyticsDestinationType", + "logs": "Description.DiagnosticSettingsResource.Properties.Logs", + "metrics": "Description.DiagnosticSettingsResource.Properties.Metrics", + "name": "Description.DiagnosticSettingsResource.Name", + "resource_group": "Description.ResourceGroup", + "service_bus_rule_id": "Description.DiagnosticSettingsResource.Properties.ServiceBusRuleID", + "storage_account_id": "Description.DiagnosticSettingsResource.Properties.StorageAccountID", + "title": "Description.DiagnosticSettingsResource.Name", + "type": "Description.DiagnosticSettingsResource.Type", + "workspace_id": "Description.DiagnosticSettingsResource.Properties.WorkspaceID", } func ListDiagnosticSetting(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -35339,20 +27755,19 @@ func ListDiagnosticSetting(ctx context.Context, d *plugin.QueryData, _ *plugin.H } var getDiagnosticSettingFilters = map[string]string{ - "event_hub_authorization_rule_id": "description.DiagnosticSettingsResource.Properties.EventHubAuthorizationRuleID", - "event_hub_name": "description.DiagnosticSettingsResource.Properties.EventHubName", - "id": "description.DiagnosticSettingsResource.ID", - "og_account_id": "metadata.SourceID", - "log_analytics_destination_type": "description.DiagnosticSettingsResource.Properties.LogAnalyticsDestinationType", - "logs": "description.DiagnosticSettingsResource.Properties.Logs", - "metrics": "description.DiagnosticSettingsResource.Properties.Metrics", + "event_hub_authorization_rule_id": "Description.DiagnosticSettingsResource.Properties.EventHubAuthorizationRuleID", + "event_hub_name": "Description.DiagnosticSettingsResource.Properties.EventHubName", + "id": "Description.DiagnosticSettingsResource.ID", + "log_analytics_destination_type": "Description.DiagnosticSettingsResource.Properties.LogAnalyticsDestinationType", + "logs": "Description.DiagnosticSettingsResource.Properties.Logs", + "metrics": "Description.DiagnosticSettingsResource.Properties.Metrics", "name": "description.DiagnosticSettingsResource.name", "resource_group": "description.ResourceGroup", - "service_bus_rule_id": "description.DiagnosticSettingsResource.Properties.ServiceBusRuleID", - "storage_account_id": "description.DiagnosticSettingsResource.Properties.StorageAccountID", - "title": "description.DiagnosticSettingsResource.Name", - "type": "description.DiagnosticSettingsResource.Type", - "workspace_id": "description.DiagnosticSettingsResource.Properties.WorkspaceID", + "service_bus_rule_id": "Description.DiagnosticSettingsResource.Properties.ServiceBusRuleID", + "storage_account_id": "Description.DiagnosticSettingsResource.Properties.StorageAccountID", + "title": "Description.DiagnosticSettingsResource.Name", + "type": "Description.DiagnosticSettingsResource.Type", + "workspace_id": "Description.DiagnosticSettingsResource.Properties.WorkspaceID", } func GetDiagnosticSetting(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -35413,72 +27828,14 @@ func GetDiagnosticSetting(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy // ========================== START: AutoscaleSetting ============================= type AutoscaleSetting struct { - Description azure.AutoscaleSettingDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *AutoscaleSetting) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.AutoscaleSettingDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.AutoscaleSettingDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type AutoscaleSettingHit struct { @@ -35549,17 +27906,16 @@ func (p AutoscaleSettingPaginator) NextPage(ctx context.Context) ([]AutoscaleSet } var listAutoscaleSettingFilters = map[string]string{ - "enabled": "description.AutoscaleSettingsResource.Properties.Enabled", - "id": "description.AutoscaleSettingsResource.ID", - "og_account_id": "metadata.SourceID", - "name": "description.AutoscaleSettingsResource.Name", - "notifications": "description.AutoscaleSettingsResource.Properties.Notifications", - "profiles": "description.AutoscaleSettingsResource.Properties.Profiles", - "resource_group": "description.ResourceGroup", - "target_resource_location": "description.AutoscaleSettingsResource.Properties.TargetResourceLocation", - "target_resource_uri": "description.AutoscaleSettingsResource.Properties.TargetResourceURI", - "title": "description.AutoscaleSettingsResource.Name", - "type": "description.AutoscaleSettingsResource.Type", + "enabled": "Description.AutoscaleSettingsResource.Properties.Enabled", + "id": "Description.AutoscaleSettingsResource.ID", + "name": "Description.AutoscaleSettingsResource.Name", + "notifications": "Description.AutoscaleSettingsResource.Properties.Notifications", + "profiles": "Description.AutoscaleSettingsResource.Properties.Profiles", + "resource_group": "Description.ResourceGroup", + "target_resource_location": "Description.AutoscaleSettingsResource.Properties.TargetResourceLocation", + "target_resource_uri": "Description.AutoscaleSettingsResource.Properties.TargetResourceURI", + "title": "Description.AutoscaleSettingsResource.Name", + "type": "Description.AutoscaleSettingsResource.Type", } func ListAutoscaleSetting(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -35623,17 +27979,16 @@ func ListAutoscaleSetting(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy } var getAutoscaleSettingFilters = map[string]string{ - "enabled": "description.AutoscaleSettingsResource.Properties.Enabled", - "id": "description.AutoscaleSettingsResource.ID", - "og_account_id": "metadata.SourceID", + "enabled": "Description.AutoscaleSettingsResource.Properties.Enabled", + "id": "Description.AutoscaleSettingsResource.ID", "name": "description.AutoscaleSettingsResource.name", - "notifications": "description.AutoscaleSettingsResource.Properties.Notifications", - "profiles": "description.AutoscaleSettingsResource.Properties.Profiles", + "notifications": "Description.AutoscaleSettingsResource.Properties.Notifications", + "profiles": "Description.AutoscaleSettingsResource.Properties.Profiles", "resource_group": "description.ResourceGroup", - "target_resource_location": "description.AutoscaleSettingsResource.Properties.TargetResourceLocation", - "target_resource_uri": "description.AutoscaleSettingsResource.Properties.TargetResourceURI", - "title": "description.AutoscaleSettingsResource.Name", - "type": "description.AutoscaleSettingsResource.Type", + "target_resource_location": "Description.AutoscaleSettingsResource.Properties.TargetResourceLocation", + "target_resource_uri": "Description.AutoscaleSettingsResource.Properties.TargetResourceURI", + "title": "Description.AutoscaleSettingsResource.Name", + "type": "Description.AutoscaleSettingsResource.Type", } func GetAutoscaleSetting(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -35694,72 +28049,14 @@ func GetAutoscaleSetting(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd // ========================== START: EventGridDomain ============================= type EventGridDomain struct { - Description azure.EventGridDomainDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *EventGridDomain) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.EventGridDomainDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.EventGridDomainDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type EventGridDomainHit struct { @@ -35830,32 +28127,31 @@ func (p EventGridDomainPaginator) NextPage(ctx context.Context) ([]EventGridDoma } var listEventGridDomainFilters = map[string]string{ - "auto_create_topic_with_first_subscription": "description.Domain.Properties.AutoCreateTopicWithFirstSubscription", - "auto_delete_topic_with_last_subscription": "description.Domain.Properties.AutoDeleteTopicWithLastSubscription", - "created_by": "description.Domain.SystemData.CreatedBy", - "created_by_type": "description.Domain.SystemData.CreatedByType", - "diagnostic_settings": "description.DiagnosticSettingsResources", - "disable_local_auth": "description.Domain.Properties.DisableLocalAuth", - "endpoint": "description.Domain.Properties.Endpoint", - "id": "description.Domain.ID", - "identity_type": "description.Domain.Identity.Type", - "inbound_ip_rules": "description.Domain.Properties.InboundIPRules", - "input_schema": "description.Domain.Properties.InputSchema", - "input_schema_mapping": "description.Domain.Properties.InputSchemaMapping", - "og_account_id": "metadata.SourceID", - "last_modified_by": "description.Domain.SystemData.LastModifiedBy", - "last_modified_by_type": "description.Domain.SystemData.LastModifiedByType", - "location": "description.Domain.Location", - "name": "description.Domain.Name", - "principal_id": "description.Domain.Identity.PrincipalID", - "provisioning_state": "description.Domain.Properties.ProvisioningState", - "public_network_access": "description.Domain.Properties.PublicNetworkAccess", - "resource_group": "description.ResourceGroup", - "sku_name": "description.Domain.Name", - "tags": "description.Domain.Tags", - "title": "description.Domain.Name", - "type": "description.Domain.Type", - "user_assigned_identities": "description.Domain.Identity.UserAssignedIdentities", + "auto_create_topic_with_first_subscription": "Description.Domain.Properties.AutoCreateTopicWithFirstSubscription", + "auto_delete_topic_with_last_subscription": "Description.Domain.Properties.AutoDeleteTopicWithLastSubscription", + "created_by": "Description.Domain.SystemData.CreatedBy", + "created_by_type": "Description.Domain.SystemData.CreatedByType", + "diagnostic_settings": "Description.DiagnosticSettingsResources", + "disable_local_auth": "Description.Domain.Properties.DisableLocalAuth", + "endpoint": "Description.Domain.Properties.Endpoint", + "id": "Description.Domain.ID", + "identity_type": "Description.Domain.Identity.Type", + "inbound_ip_rules": "Description.Domain.Properties.InboundIPRules", + "input_schema": "Description.Domain.Properties.InputSchema", + "input_schema_mapping": "Description.Domain.Properties.InputSchemaMapping", + "last_modified_by": "Description.Domain.SystemData.LastModifiedBy", + "last_modified_by_type": "Description.Domain.SystemData.LastModifiedByType", + "location": "Description.Domain.Location", + "name": "Description.Domain.Name", + "principal_id": "Description.Domain.Identity.PrincipalID", + "provisioning_state": "Description.Domain.Properties.ProvisioningState", + "public_network_access": "Description.Domain.Properties.PublicNetworkAccess", + "resource_group": "Description.ResourceGroup", + "sku_name": "Description.Domain.Name", + "tags": "Description.Domain.Tags", + "title": "Description.Domain.Name", + "type": "Description.Domain.Type", + "user_assigned_identities": "Description.Domain.Identity.UserAssignedIdentities", } func ListEventGridDomain(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -35919,32 +28215,31 @@ func ListEventGridDomain(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd } var getEventGridDomainFilters = map[string]string{ - "auto_create_topic_with_first_subscription": "description.Domain.Properties.AutoCreateTopicWithFirstSubscription", - "auto_delete_topic_with_last_subscription": "description.Domain.Properties.AutoDeleteTopicWithLastSubscription", - "created_by": "description.Domain.SystemData.CreatedBy", - "created_by_type": "description.Domain.SystemData.CreatedByType", - "diagnostic_settings": "description.DiagnosticSettingsResources", - "disable_local_auth": "description.Domain.Properties.DisableLocalAuth", - "endpoint": "description.Domain.Properties.Endpoint", - "id": "description.Domain.ID", - "identity_type": "description.Domain.Identity.Type", - "inbound_ip_rules": "description.Domain.Properties.InboundIPRules", - "input_schema": "description.Domain.Properties.InputSchema", - "input_schema_mapping": "description.Domain.Properties.InputSchemaMapping", - "og_account_id": "metadata.SourceID", - "last_modified_by": "description.Domain.SystemData.LastModifiedBy", - "last_modified_by_type": "description.Domain.SystemData.LastModifiedByType", - "location": "description.Domain.Location", + "auto_create_topic_with_first_subscription": "Description.Domain.Properties.AutoCreateTopicWithFirstSubscription", + "auto_delete_topic_with_last_subscription": "Description.Domain.Properties.AutoDeleteTopicWithLastSubscription", + "created_by": "Description.Domain.SystemData.CreatedBy", + "created_by_type": "Description.Domain.SystemData.CreatedByType", + "diagnostic_settings": "Description.DiagnosticSettingsResources", + "disable_local_auth": "Description.Domain.Properties.DisableLocalAuth", + "endpoint": "Description.Domain.Properties.Endpoint", + "id": "Description.Domain.ID", + "identity_type": "Description.Domain.Identity.Type", + "inbound_ip_rules": "Description.Domain.Properties.InboundIPRules", + "input_schema": "Description.Domain.Properties.InputSchema", + "input_schema_mapping": "Description.Domain.Properties.InputSchemaMapping", + "last_modified_by": "Description.Domain.SystemData.LastModifiedBy", + "last_modified_by_type": "Description.Domain.SystemData.LastModifiedByType", + "location": "Description.Domain.Location", "name": "description.Domain.name", - "principal_id": "description.Domain.Identity.PrincipalID", - "provisioning_state": "description.Domain.Properties.ProvisioningState", - "public_network_access": "description.Domain.Properties.PublicNetworkAccess", + "principal_id": "Description.Domain.Identity.PrincipalID", + "provisioning_state": "Description.Domain.Properties.ProvisioningState", + "public_network_access": "Description.Domain.Properties.PublicNetworkAccess", "resource_group": "description.ResourceGroup", - "sku_name": "description.Domain.Name", - "tags": "description.Domain.Tags", - "title": "description.Domain.Name", - "type": "description.Domain.Type", - "user_assigned_identities": "description.Domain.Identity.UserAssignedIdentities", + "sku_name": "Description.Domain.Name", + "tags": "Description.Domain.Tags", + "title": "Description.Domain.Name", + "type": "Description.Domain.Type", + "user_assigned_identities": "Description.Domain.Identity.UserAssignedIdentities", } func GetEventGridDomain(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -36005,72 +28300,14 @@ func GetEventGridDomain(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr // ========================== START: EventGridTopic ============================= type EventGridTopic struct { - Description azure.EventGridTopicDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *EventGridTopic) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.EventGridTopicDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.EventGridTopicDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type EventGridTopicHit struct { @@ -36141,30 +28378,29 @@ func (p EventGridTopicPaginator) NextPage(ctx context.Context) ([]EventGridTopic } var listEventGridTopicFilters = map[string]string{ - "created_by": "description.Topic.SystemData.CreatedBy", - "created_by_type": "description.Topic.SystemData.CreatedByType", - "diagnostic_settings": "description.DiagnosticSettingsResources", - "disable_local_auth": "description.Topic.Properties.DisableLocalAuth", - "endpoint": "description.Topic.Properties.Endpoint", - "extended_location": "description.Topic.Location", - "id": "description.Topic.ID", - "identity": "description.Topic.Identity", - "inbound_ip_rules": "description.Topic.Properties.InboundIPRules", - "input_schema": "description.Topic.Properties.InputSchema", - "input_schema_mapping": "description.Topic.Properties.InputSchemaMapping", - "og_account_id": "metadata.SourceID", - "kind": "description.Topic.Type", - "last_modified_by": "description.Topic.SystemData.LastModifiedBy", - "last_modified_by_type": "description.Topic.SystemData.LastModifiedByType", - "location": "description.Topic.Location", - "name": "description.Topic.Name", - "provisioning_state": "description.Topic.Properties.ProvisioningState", - "public_network_access": "description.Topic.Properties.PublicNetworkAccess", - "resource_group": "description.ResourceGroup", - "sku_name": "description.Topic.Name", - "tags": "description.Topic.Tags", - "title": "description.Topic.Name", - "type": "description.Topic.Type", + "created_by": "Description.Topic.SystemData.CreatedBy", + "created_by_type": "Description.Topic.SystemData.CreatedByType", + "diagnostic_settings": "Description.DiagnosticSettingsResources", + "disable_local_auth": "Description.Topic.Properties.DisableLocalAuth", + "endpoint": "Description.Topic.Properties.Endpoint", + "extended_location": "Description.Topic.Location", + "id": "Description.Topic.ID", + "identity": "Description.Topic.Identity", + "inbound_ip_rules": "Description.Topic.Properties.InboundIPRules", + "input_schema": "Description.Topic.Properties.InputSchema", + "input_schema_mapping": "Description.Topic.Properties.InputSchemaMapping", + "kind": "Description.Topic.Type", + "last_modified_by": "Description.Topic.SystemData.LastModifiedBy", + "last_modified_by_type": "Description.Topic.SystemData.LastModifiedByType", + "location": "Description.Topic.Location", + "name": "Description.Topic.Name", + "provisioning_state": "Description.Topic.Properties.ProvisioningState", + "public_network_access": "Description.Topic.Properties.PublicNetworkAccess", + "resource_group": "Description.ResourceGroup", + "sku_name": "Description.Topic.Name", + "tags": "Description.Topic.Tags", + "title": "Description.Topic.Name", + "type": "Description.Topic.Type", } func ListEventGridTopic(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -36228,30 +28464,29 @@ func ListEventGridTopic(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr } var getEventGridTopicFilters = map[string]string{ - "created_by": "description.Topic.SystemData.CreatedBy", - "created_by_type": "description.Topic.SystemData.CreatedByType", - "diagnostic_settings": "description.DiagnosticSettingsResources", - "disable_local_auth": "description.Topic.Properties.DisableLocalAuth", - "endpoint": "description.Topic.Properties.Endpoint", - "extended_location": "description.Topic.Location", - "id": "description.Topic.ID", - "identity": "description.Topic.Identity", - "inbound_ip_rules": "description.Topic.Properties.InboundIPRules", - "input_schema": "description.Topic.Properties.InputSchema", - "input_schema_mapping": "description.Topic.Properties.InputSchemaMapping", - "og_account_id": "metadata.SourceID", - "kind": "description.Topic.Type", - "last_modified_by": "description.Topic.SystemData.LastModifiedBy", - "last_modified_by_type": "description.Topic.SystemData.LastModifiedByType", - "location": "description.Topic.Location", + "created_by": "Description.Topic.SystemData.CreatedBy", + "created_by_type": "Description.Topic.SystemData.CreatedByType", + "diagnostic_settings": "Description.DiagnosticSettingsResources", + "disable_local_auth": "Description.Topic.Properties.DisableLocalAuth", + "endpoint": "Description.Topic.Properties.Endpoint", + "extended_location": "Description.Topic.Location", + "id": "Description.Topic.ID", + "identity": "Description.Topic.Identity", + "inbound_ip_rules": "Description.Topic.Properties.InboundIPRules", + "input_schema": "Description.Topic.Properties.InputSchema", + "input_schema_mapping": "Description.Topic.Properties.InputSchemaMapping", + "kind": "Description.Topic.Type", + "last_modified_by": "Description.Topic.SystemData.LastModifiedBy", + "last_modified_by_type": "Description.Topic.SystemData.LastModifiedByType", + "location": "Description.Topic.Location", "name": "description.Topic.name", - "provisioning_state": "description.Topic.Properties.ProvisioningState", - "public_network_access": "description.Topic.Properties.PublicNetworkAccess", + "provisioning_state": "Description.Topic.Properties.ProvisioningState", + "public_network_access": "Description.Topic.Properties.PublicNetworkAccess", "resource_group": "description.ResourceGroup", - "sku_name": "description.Topic.Name", - "tags": "description.Topic.Tags", - "title": "description.Topic.Name", - "type": "description.Topic.Type", + "sku_name": "Description.Topic.Name", + "tags": "Description.Topic.Tags", + "title": "Description.Topic.Name", + "type": "Description.Topic.Type", } func GetEventGridTopic(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -36312,72 +28547,14 @@ func GetEventGridTopic(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra // ========================== START: EventhubNamespace ============================= type EventhubNamespace struct { - Description azure.EventhubNamespaceDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *EventhubNamespace) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.EventhubNamespaceDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.EventhubNamespaceDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type EventhubNamespaceHit struct { @@ -36448,29 +28625,28 @@ func (p EventhubNamespacePaginator) NextPage(ctx context.Context) ([]EventhubNam } var listEventhubNamespaceFilters = map[string]string{ - "cluster_arm_id": "description.EHNamespace.Properties.ClusterArmID", - "diagnostic_settings": "description.DiagnosticSettingsResources", - "encryption": "description.EHNamespace.Properties.Encryption", - "id": "description.EHNamespace.ID", - "identity": "description.EHNamespace.Properties.Encryption", - "is_auto_inflate_enabled": "description.EHNamespace.Properties.IsAutoInflateEnabled", - "kafka_enabled": "description.EHNamespace.Properties.KafkaEnabled", - "og_account_id": "metadata.SourceID", - "maximum_throughput_units": "description.EHNamespace.Properties.MaximumThroughputUnits", - "metric_id": "description.EHNamespace.Properties.MetricID", - "name": "description.EHNamespace.Name", - "network_rule_set": "description.NetworkRuleSet", - "private_endpoint_connections": "description.EHNamespace.Properties.PrivateEndpointConnections", - "provisioning_state": "description.EHNamespace.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "service_bus_endpoint": "description.EHNamespace.Properties.ServiceBusEndpoint", - "sku_capacity": "description.EHNamespace.SKU.Capacity", - "sku_name": "description.EHNamespace.SKU.Name", - "sku_tier": "description.EHNamespace.SKU.Tier", - "tags": "description.EHNamespace.Tags", - "title": "description.EHNamespace.Name", - "type": "description.EHNamespace.Type", - "zone_redundant": "description.EHNamespace.Properties.ZoneRedundant", + "cluster_arm_id": "Description.EHNamespace.Properties.ClusterArmID", + "diagnostic_settings": "Description.DiagnosticSettingsResources", + "encryption": "Description.EHNamespace.Properties.Encryption", + "id": "Description.EHNamespace.ID", + "identity": "Description.EHNamespace.Properties.Encryption", + "is_auto_inflate_enabled": "Description.EHNamespace.Properties.IsAutoInflateEnabled", + "kafka_enabled": "Description.EHNamespace.Properties.KafkaEnabled", + "maximum_throughput_units": "Description.EHNamespace.Properties.MaximumThroughputUnits", + "metric_id": "Description.EHNamespace.Properties.MetricID", + "name": "Description.EHNamespace.Name", + "network_rule_set": "Description.NetworkRuleSet", + "private_endpoint_connections": "Description.EHNamespace.Properties.PrivateEndpointConnections", + "provisioning_state": "Description.EHNamespace.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "service_bus_endpoint": "Description.EHNamespace.Properties.ServiceBusEndpoint", + "sku_capacity": "Description.EHNamespace.SKU.Capacity", + "sku_name": "Description.EHNamespace.SKU.Name", + "sku_tier": "Description.EHNamespace.SKU.Tier", + "tags": "Description.EHNamespace.Tags", + "title": "Description.EHNamespace.Name", + "type": "Description.EHNamespace.Type", + "zone_redundant": "Description.EHNamespace.Properties.ZoneRedundant", } func ListEventhubNamespace(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -36534,29 +28710,28 @@ func ListEventhubNamespace(ctx context.Context, d *plugin.QueryData, _ *plugin.H } var getEventhubNamespaceFilters = map[string]string{ - "cluster_arm_id": "description.EHNamespace.Properties.ClusterArmID", - "diagnostic_settings": "description.DiagnosticSettingsResources", - "encryption": "description.EHNamespace.Properties.Encryption", - "id": "description.EHNamespace.ID", - "identity": "description.EHNamespace.Properties.Encryption", - "is_auto_inflate_enabled": "description.EHNamespace.Properties.IsAutoInflateEnabled", - "kafka_enabled": "description.EHNamespace.Properties.KafkaEnabled", - "og_account_id": "metadata.SourceID", - "maximum_throughput_units": "description.EHNamespace.Properties.MaximumThroughputUnits", - "metric_id": "description.EHNamespace.Properties.MetricID", + "cluster_arm_id": "Description.EHNamespace.Properties.ClusterArmID", + "diagnostic_settings": "Description.DiagnosticSettingsResources", + "encryption": "Description.EHNamespace.Properties.Encryption", + "id": "Description.EHNamespace.ID", + "identity": "Description.EHNamespace.Properties.Encryption", + "is_auto_inflate_enabled": "Description.EHNamespace.Properties.IsAutoInflateEnabled", + "kafka_enabled": "Description.EHNamespace.Properties.KafkaEnabled", + "maximum_throughput_units": "Description.EHNamespace.Properties.MaximumThroughputUnits", + "metric_id": "Description.EHNamespace.Properties.MetricID", "name": "description.EHNamespace.name", - "network_rule_set": "description.NetworkRuleSet", - "private_endpoint_connections": "description.EHNamespace.Properties.PrivateEndpointConnections", - "provisioning_state": "description.EHNamespace.Properties.ProvisioningState", + "network_rule_set": "Description.NetworkRuleSet", + "private_endpoint_connections": "Description.EHNamespace.Properties.PrivateEndpointConnections", + "provisioning_state": "Description.EHNamespace.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", - "service_bus_endpoint": "description.EHNamespace.Properties.ServiceBusEndpoint", - "sku_capacity": "description.EHNamespace.SKU.Capacity", - "sku_name": "description.EHNamespace.SKU.Name", - "sku_tier": "description.EHNamespace.SKU.Tier", - "tags": "description.EHNamespace.Tags", - "title": "description.EHNamespace.Name", - "type": "description.EHNamespace.Type", - "zone_redundant": "description.EHNamespace.Properties.ZoneRedundant", + "service_bus_endpoint": "Description.EHNamespace.Properties.ServiceBusEndpoint", + "sku_capacity": "Description.EHNamespace.SKU.Capacity", + "sku_name": "Description.EHNamespace.SKU.Name", + "sku_tier": "Description.EHNamespace.SKU.Tier", + "tags": "Description.EHNamespace.Tags", + "title": "Description.EHNamespace.Name", + "type": "Description.EHNamespace.Type", + "zone_redundant": "Description.EHNamespace.Properties.ZoneRedundant", } func GetEventhubNamespace(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -36617,72 +28792,14 @@ func GetEventhubNamespace(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy // ========================== START: EventhubNamespaceEventhub ============================= type EventhubNamespaceEventhub struct { - Description azure.EventhubNamespaceEventhubDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *EventhubNamespaceEventhub) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.EventhubNamespaceEventhubDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.EventhubNamespaceEventhubDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type EventhubNamespaceEventhubHit struct { @@ -36753,11 +28870,10 @@ func (p EventhubNamespaceEventhubPaginator) NextPage(ctx context.Context) ([]Eve } var listEventhubNamespaceEventhubFilters = map[string]string{ - "id": "description.EventHub.ID", - "og_account_id": "metadata.SourceID", - "name": "description.EHNamespace.Name", - "tags": "description.EHNamespace.Tags", - "title": "description.EHNamespace.Identity.Type", + "id": "Description.EventHub.ID", + "name": "Description.EHNamespace.Name", + "tags": "Description.EHNamespace.Tags", + "title": "Description.EHNamespace.Identity.Type", } func ListEventhubNamespaceEventhub(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -36821,11 +28937,10 @@ func ListEventhubNamespaceEventhub(ctx context.Context, d *plugin.QueryData, _ * } var getEventhubNamespaceEventhubFilters = map[string]string{ - "id": "description.EventHub.ID", - "og_account_id": "metadata.SourceID", - "name": "description.EHNamespace.Name", - "tags": "description.EHNamespace.Tags", - "title": "description.EHNamespace.Identity.Type", + "id": "Description.EventHub.ID", + "name": "Description.EHNamespace.Name", + "tags": "Description.EHNamespace.Tags", + "title": "Description.EHNamespace.Identity.Type", } func GetEventhubNamespaceEventhub(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -36886,72 +29001,14 @@ func GetEventhubNamespaceEventhub(ctx context.Context, d *plugin.QueryData, _ *p // ========================== START: Frontdoor ============================= type Frontdoor struct { - Description azure.FrontdoorDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *Frontdoor) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.FrontdoorDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.FrontdoorDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type FrontdoorHit struct { @@ -37022,26 +29079,25 @@ func (p FrontdoorPaginator) NextPage(ctx context.Context) ([]Frontdoor, error) { } var listFrontdoorFilters = map[string]string{ - "backend_pools": "description.FrontDoor.Properties.BackendPools", - "backend_pools_settings": "description.FrontDoor.Properties.BackendPoolsSettings", - "diagnostic_settings": "description.DiagnosticSettingsResources", - "enabled_state": "description.FrontDoor.Properties.EnabledState", - "friendly_name": "description.FrontDoor.Properties.FriendlyName", - "front_door_id": "description.FrontDoor.Properties.FrontdoorID", - "frontend_endpoints": "description.FrontDoor.Properties.FrontendEndpoints", - "health_probe_settings": "description.FrontDoor.Properties.HealthProbeSettings", - "id": "description.FrontDoor.ID", - "og_account_id": "metadata.SourceID", - "load_balancing_settings": "description.FrontDoor.Properties.LoadBalancingSettings", - "name": "description.FrontDoor.Name", - "provisioning_state": "description.FrontDoor.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "resource_state": "description.FrontDoor.Properties.ResourceState", - "routing_rules": "description.FrontDoor.Properties.RoutingRules", - "rules_engines": "description.FrontDoor.Properties.RulesEngines", - "tags": "description.FrontDoor.Tags", - "title": "description.FrontDoor.Name", - "type": "description.FrontDoor.Type", + "backend_pools": "Description.FrontDoor.Properties.BackendPools", + "backend_pools_settings": "Description.FrontDoor.Properties.BackendPoolsSettings", + "diagnostic_settings": "Description.DiagnosticSettingsResources", + "enabled_state": "Description.FrontDoor.Properties.EnabledState", + "friendly_name": "Description.FrontDoor.Properties.FriendlyName", + "front_door_id": "Description.FrontDoor.Properties.FrontdoorID", + "frontend_endpoints": "Description.FrontDoor.Properties.FrontendEndpoints", + "health_probe_settings": "Description.FrontDoor.Properties.HealthProbeSettings", + "id": "Description.FrontDoor.ID", + "load_balancing_settings": "Description.FrontDoor.Properties.LoadBalancingSettings", + "name": "Description.FrontDoor.Name", + "provisioning_state": "Description.FrontDoor.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "resource_state": "Description.FrontDoor.Properties.ResourceState", + "routing_rules": "Description.FrontDoor.Properties.RoutingRules", + "rules_engines": "Description.FrontDoor.Properties.RulesEngines", + "tags": "Description.FrontDoor.Tags", + "title": "Description.FrontDoor.Name", + "type": "Description.FrontDoor.Type", } func ListFrontdoor(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -37105,26 +29161,25 @@ func ListFrontdoor(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDa } var getFrontdoorFilters = map[string]string{ - "backend_pools": "description.FrontDoor.Properties.BackendPools", - "backend_pools_settings": "description.FrontDoor.Properties.BackendPoolsSettings", - "diagnostic_settings": "description.DiagnosticSettingsResources", - "enabled_state": "description.FrontDoor.Properties.EnabledState", - "friendly_name": "description.FrontDoor.Properties.FriendlyName", - "front_door_id": "description.FrontDoor.Properties.FrontdoorID", - "frontend_endpoints": "description.FrontDoor.Properties.FrontendEndpoints", - "health_probe_settings": "description.FrontDoor.Properties.HealthProbeSettings", - "id": "description.FrontDoor.ID", - "og_account_id": "metadata.SourceID", - "load_balancing_settings": "description.FrontDoor.Properties.LoadBalancingSettings", + "backend_pools": "Description.FrontDoor.Properties.BackendPools", + "backend_pools_settings": "Description.FrontDoor.Properties.BackendPoolsSettings", + "diagnostic_settings": "Description.DiagnosticSettingsResources", + "enabled_state": "Description.FrontDoor.Properties.EnabledState", + "friendly_name": "Description.FrontDoor.Properties.FriendlyName", + "front_door_id": "Description.FrontDoor.Properties.FrontdoorID", + "frontend_endpoints": "Description.FrontDoor.Properties.FrontendEndpoints", + "health_probe_settings": "Description.FrontDoor.Properties.HealthProbeSettings", + "id": "Description.FrontDoor.ID", + "load_balancing_settings": "Description.FrontDoor.Properties.LoadBalancingSettings", "name": "description.FrontDoor.name", - "provisioning_state": "description.FrontDoor.Properties.ProvisioningState", + "provisioning_state": "Description.FrontDoor.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", - "resource_state": "description.FrontDoor.Properties.ResourceState", - "routing_rules": "description.FrontDoor.Properties.RoutingRules", - "rules_engines": "description.FrontDoor.Properties.RulesEngines", - "tags": "description.FrontDoor.Tags", - "title": "description.FrontDoor.Name", - "type": "description.FrontDoor.Type", + "resource_state": "Description.FrontDoor.Properties.ResourceState", + "routing_rules": "Description.FrontDoor.Properties.RoutingRules", + "rules_engines": "Description.FrontDoor.Properties.RulesEngines", + "tags": "Description.FrontDoor.Tags", + "title": "Description.FrontDoor.Name", + "type": "Description.FrontDoor.Type", } func GetFrontdoor(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -37185,72 +29240,14 @@ func GetFrontdoor(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDat // ========================== START: HdinsightCluster ============================= type HdinsightCluster struct { - Description azure.HdinsightClusterDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *HdinsightCluster) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.HdinsightClusterDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.HdinsightClusterDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type HdinsightClusterHit struct { @@ -37321,38 +29318,37 @@ func (p HdinsightClusterPaginator) NextPage(ctx context.Context) ([]HdinsightClu } var listHdinsightClusterFilters = map[string]string{ - "cluster_definition": "description.Cluster.Properties.ClusterDefinition", - "cluster_hdp_version": "description.Cluster.Properties.ClusterHdpVersion", - "cluster_id": "description.Cluster.Properties.ClusterID", - "cluster_state": "description.Cluster.Properties.ClusterState", - "cluster_version": "description.Cluster.Properties.ClusterVersion", - "compute_isolation_properties": "description.Cluster.Properties.ComputeIsolationProperties", - "compute_profile": "description.Cluster.Properties.ComputeProfile", - "connectivity_endpoints": "description.Cluster.Properties.ConnectivityEndpoints", - "created_date": "description.Cluster.Properties.CreatedDate", - "diagnostic_settings": "description.DiagnosticSettingsResources", - "disk_encryption_properties": "description.Cluster.Properties.DiskEncryptionProperties", - "encryption_in_transit_properties": "description.Cluster.Properties.EncryptionInTransitProperties", - "errors": "description.Cluster.Properties.Errors", - "etag": "description.Cluster.Etag", - "excluded_services_config": "description.Cluster.Properties.ExcludedServicesConfig", - "id": "description.Cluster.ID", - "identity": "description.Cluster.Identity", - "kafka_rest_properties": "description.Cluster.Properties.KafkaRestProperties", - "og_account_id": "metadata.SourceID", - "min_supported_tls_version": "description.Cluster.Properties.MinSupportedTLSVersion", - "name": "description.Cluster.Name", - "network_properties": "description.Cluster.Properties.NetworkProperties", - "os_type": "description.Cluster.Properties.OSType", - "provisioning_state": "description.Cluster.Properties.ProvisioningState", - "quota_info": "description.Cluster.Properties.QuotaInfo", - "resource_group": "description.ResourceGroup", - "security_profile": "description.Cluster.Properties.SecurityProfile", - "storage_profile": "description.Cluster.Properties.StorageProfile", - "tags": "description.Cluster.Tags", - "tier": "description.Cluster.Properties.Tier", - "title": "description.Cluster.Name", - "type": "description.Cluster.Type", + "cluster_definition": "Description.Cluster.Properties.ClusterDefinition", + "cluster_hdp_version": "Description.Cluster.Properties.ClusterHdpVersion", + "cluster_id": "Description.Cluster.Properties.ClusterID", + "cluster_state": "Description.Cluster.Properties.ClusterState", + "cluster_version": "Description.Cluster.Properties.ClusterVersion", + "compute_isolation_properties": "Description.Cluster.Properties.ComputeIsolationProperties", + "compute_profile": "Description.Cluster.Properties.ComputeProfile", + "connectivity_endpoints": "Description.Cluster.Properties.ConnectivityEndpoints", + "created_date": "Description.Cluster.Properties.CreatedDate", + "diagnostic_settings": "Description.DiagnosticSettingsResources", + "disk_encryption_properties": "Description.Cluster.Properties.DiskEncryptionProperties", + "encryption_in_transit_properties": "Description.Cluster.Properties.EncryptionInTransitProperties", + "errors": "Description.Cluster.Properties.Errors", + "etag": "Description.Cluster.Etag", + "excluded_services_config": "Description.Cluster.Properties.ExcludedServicesConfig", + "id": "Description.Cluster.ID", + "identity": "Description.Cluster.Identity", + "kafka_rest_properties": "Description.Cluster.Properties.KafkaRestProperties", + "min_supported_tls_version": "Description.Cluster.Properties.MinSupportedTLSVersion", + "name": "Description.Cluster.Name", + "network_properties": "Description.Cluster.Properties.NetworkProperties", + "os_type": "Description.Cluster.Properties.OSType", + "provisioning_state": "Description.Cluster.Properties.ProvisioningState", + "quota_info": "Description.Cluster.Properties.QuotaInfo", + "resource_group": "Description.ResourceGroup", + "security_profile": "Description.Cluster.Properties.SecurityProfile", + "storage_profile": "Description.Cluster.Properties.StorageProfile", + "tags": "Description.Cluster.Tags", + "tier": "Description.Cluster.Properties.Tier", + "title": "Description.Cluster.Name", + "type": "Description.Cluster.Type", } func ListHdinsightCluster(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -37416,38 +29412,37 @@ func ListHdinsightCluster(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy } var getHdinsightClusterFilters = map[string]string{ - "cluster_definition": "description.Cluster.Properties.ClusterDefinition", - "cluster_hdp_version": "description.Cluster.Properties.ClusterHdpVersion", - "cluster_id": "description.Cluster.Properties.ClusterID", - "cluster_state": "description.Cluster.Properties.ClusterState", - "cluster_version": "description.Cluster.Properties.ClusterVersion", - "compute_isolation_properties": "description.Cluster.Properties.ComputeIsolationProperties", - "compute_profile": "description.Cluster.Properties.ComputeProfile", - "connectivity_endpoints": "description.Cluster.Properties.ConnectivityEndpoints", - "created_date": "description.Cluster.Properties.CreatedDate", - "diagnostic_settings": "description.DiagnosticSettingsResources", - "disk_encryption_properties": "description.Cluster.Properties.DiskEncryptionProperties", - "encryption_in_transit_properties": "description.Cluster.Properties.EncryptionInTransitProperties", - "errors": "description.Cluster.Properties.Errors", - "etag": "description.Cluster.Etag", - "excluded_services_config": "description.Cluster.Properties.ExcludedServicesConfig", - "id": "description.Cluster.ID", - "identity": "description.Cluster.Identity", - "kafka_rest_properties": "description.Cluster.Properties.KafkaRestProperties", - "og_account_id": "metadata.SourceID", - "min_supported_tls_version": "description.Cluster.Properties.MinSupportedTLSVersion", + "cluster_definition": "Description.Cluster.Properties.ClusterDefinition", + "cluster_hdp_version": "Description.Cluster.Properties.ClusterHdpVersion", + "cluster_id": "Description.Cluster.Properties.ClusterID", + "cluster_state": "Description.Cluster.Properties.ClusterState", + "cluster_version": "Description.Cluster.Properties.ClusterVersion", + "compute_isolation_properties": "Description.Cluster.Properties.ComputeIsolationProperties", + "compute_profile": "Description.Cluster.Properties.ComputeProfile", + "connectivity_endpoints": "Description.Cluster.Properties.ConnectivityEndpoints", + "created_date": "Description.Cluster.Properties.CreatedDate", + "diagnostic_settings": "Description.DiagnosticSettingsResources", + "disk_encryption_properties": "Description.Cluster.Properties.DiskEncryptionProperties", + "encryption_in_transit_properties": "Description.Cluster.Properties.EncryptionInTransitProperties", + "errors": "Description.Cluster.Properties.Errors", + "etag": "Description.Cluster.Etag", + "excluded_services_config": "Description.Cluster.Properties.ExcludedServicesConfig", + "id": "Description.Cluster.ID", + "identity": "Description.Cluster.Identity", + "kafka_rest_properties": "Description.Cluster.Properties.KafkaRestProperties", + "min_supported_tls_version": "Description.Cluster.Properties.MinSupportedTLSVersion", "name": "description.Cluster.name", - "network_properties": "description.Cluster.Properties.NetworkProperties", - "os_type": "description.Cluster.Properties.OSType", - "provisioning_state": "description.Cluster.Properties.ProvisioningState", - "quota_info": "description.Cluster.Properties.QuotaInfo", + "network_properties": "Description.Cluster.Properties.NetworkProperties", + "os_type": "Description.Cluster.Properties.OSType", + "provisioning_state": "Description.Cluster.Properties.ProvisioningState", + "quota_info": "Description.Cluster.Properties.QuotaInfo", "resource_group": "description.ResourceGroup", - "security_profile": "description.Cluster.Properties.SecurityProfile", - "storage_profile": "description.Cluster.Properties.StorageProfile", - "tags": "description.Cluster.Tags", - "tier": "description.Cluster.Properties.Tier", - "title": "description.Cluster.Name", - "type": "description.Cluster.Type", + "security_profile": "Description.Cluster.Properties.SecurityProfile", + "storage_profile": "Description.Cluster.Properties.StorageProfile", + "tags": "Description.Cluster.Tags", + "tier": "Description.Cluster.Properties.Tier", + "title": "Description.Cluster.Name", + "type": "Description.Cluster.Type", } func GetHdinsightCluster(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -37508,72 +29503,14 @@ func GetHdinsightCluster(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd // ========================== START: HybridComputeMachine ============================= type HybridComputeMachine struct { - Description azure.HybridComputeMachineDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *HybridComputeMachine) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.HybridComputeMachineDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.HybridComputeMachineDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type HybridComputeMachineHit struct { @@ -37644,33 +29581,32 @@ func (p HybridComputeMachinePaginator) NextPage(ctx context.Context) ([]HybridCo } var listHybridComputeMachineFilters = map[string]string{ - "ad_fqdn": "description.Machine.Properties.AdFqdn", - "agent_version": "description.Machine.Properties.AgentVersion", - "client_public_key": "description.Machine.Properties.ClientPublicKey", - "display_name": "description.Machine.Properties.DisplayName", - "dns_fqdn": "description.Machine.Properties.DNSFqdn", - "domain_name": "description.Machine.Properties.DomainName", - "error_details": "description.Machine.Properties.ErrorDetails", - "extensions": "description.MachineExtensions", - "id": "description.Machine.ID", - "identity": "description.Machine.Identity", - "og_account_id": "metadata.SourceID", - "location_data": "description.Machine.Properties.LocationData", - "machine_fqdn": "description.Machine.Properties.MachineFqdn", - "machine_properties_extensions": "description.Machine.Properties.Extensions", - "name": "description.Machine.Name", - "os_name": "description.Machine.Properties.OSName", - "os_profile": "description.Machine.Properties.OSProfile", - "os_sku": "description.Machine.Properties.OSSKU", - "os_version": "description.Machine.Properties.OSVersion", - "provisioning_state": "description.Machine.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "status": "description.Machine.Properties.Status", - "tags": "description.Machine.Tags", - "title": "description.Machine.Name", - "type": "description.Machine.Type", - "vm_id": "description.Machine.Properties.VMID", - "vm_uuid": "description.Machine.Properties.VMUUID", + "ad_fqdn": "Description.Machine.Properties.AdFqdn", + "agent_version": "Description.Machine.Properties.AgentVersion", + "client_public_key": "Description.Machine.Properties.ClientPublicKey", + "display_name": "Description.Machine.Properties.DisplayName", + "dns_fqdn": "Description.Machine.Properties.DNSFqdn", + "domain_name": "Description.Machine.Properties.DomainName", + "error_details": "Description.Machine.Properties.ErrorDetails", + "extensions": "Description.MachineExtensions", + "id": "Description.Machine.ID", + "identity": "Description.Machine.Identity", + "location_data": "Description.Machine.Properties.LocationData", + "machine_fqdn": "Description.Machine.Properties.MachineFqdn", + "machine_properties_extensions": "Description.Machine.Properties.Extensions", + "name": "Description.Machine.Name", + "os_name": "Description.Machine.Properties.OSName", + "os_profile": "Description.Machine.Properties.OSProfile", + "os_sku": "Description.Machine.Properties.OSSKU", + "os_version": "Description.Machine.Properties.OSVersion", + "provisioning_state": "Description.Machine.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "status": "Description.Machine.Properties.Status", + "tags": "Description.Machine.Tags", + "title": "Description.Machine.Name", + "type": "Description.Machine.Type", + "vm_id": "Description.Machine.Properties.VMID", + "vm_uuid": "Description.Machine.Properties.VMUUID", } func ListHybridComputeMachine(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -37734,33 +29670,32 @@ func ListHybridComputeMachine(ctx context.Context, d *plugin.QueryData, _ *plugi } var getHybridComputeMachineFilters = map[string]string{ - "ad_fqdn": "description.Machine.Properties.AdFqdn", - "agent_version": "description.Machine.Properties.AgentVersion", - "client_public_key": "description.Machine.Properties.ClientPublicKey", - "display_name": "description.Machine.Properties.DisplayName", - "dns_fqdn": "description.Machine.Properties.DNSFqdn", - "domain_name": "description.Machine.Properties.DomainName", - "error_details": "description.Machine.Properties.ErrorDetails", - "extensions": "description.MachineExtensions", - "id": "description.Machine.ID", - "identity": "description.Machine.Identity", - "og_account_id": "metadata.SourceID", - "location_data": "description.Machine.Properties.LocationData", - "machine_fqdn": "description.Machine.Properties.MachineFqdn", - "machine_properties_extensions": "description.Machine.Properties.Extensions", + "ad_fqdn": "Description.Machine.Properties.AdFqdn", + "agent_version": "Description.Machine.Properties.AgentVersion", + "client_public_key": "Description.Machine.Properties.ClientPublicKey", + "display_name": "Description.Machine.Properties.DisplayName", + "dns_fqdn": "Description.Machine.Properties.DNSFqdn", + "domain_name": "Description.Machine.Properties.DomainName", + "error_details": "Description.Machine.Properties.ErrorDetails", + "extensions": "Description.MachineExtensions", + "id": "Description.Machine.ID", + "identity": "Description.Machine.Identity", + "location_data": "Description.Machine.Properties.LocationData", + "machine_fqdn": "Description.Machine.Properties.MachineFqdn", + "machine_properties_extensions": "Description.Machine.Properties.Extensions", "name": "description.Machine.name", - "os_name": "description.Machine.Properties.OSName", - "os_profile": "description.Machine.Properties.OSProfile", - "os_sku": "description.Machine.Properties.OSSKU", - "os_version": "description.Machine.Properties.OSVersion", - "provisioning_state": "description.Machine.Properties.ProvisioningState", + "os_name": "Description.Machine.Properties.OSName", + "os_profile": "Description.Machine.Properties.OSProfile", + "os_sku": "Description.Machine.Properties.OSSKU", + "os_version": "Description.Machine.Properties.OSVersion", + "provisioning_state": "Description.Machine.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", - "status": "description.Machine.Properties.Status", - "tags": "description.Machine.Tags", - "title": "description.Machine.Name", - "type": "description.Machine.Type", - "vm_id": "description.Machine.Properties.VMID", - "vm_uuid": "description.Machine.Properties.VMUUID", + "status": "Description.Machine.Properties.Status", + "tags": "Description.Machine.Tags", + "title": "Description.Machine.Name", + "type": "Description.Machine.Type", + "vm_id": "Description.Machine.Properties.VMID", + "vm_uuid": "Description.Machine.Properties.VMUUID", } func GetHybridComputeMachine(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -37821,72 +29756,14 @@ func GetHybridComputeMachine(ctx context.Context, d *plugin.QueryData, _ *plugin // ========================== START: IOTHub ============================= type IOTHub struct { - Description azure.IOTHubDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *IOTHub) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.IOTHubDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.IOTHubDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type IOTHubHit struct { @@ -37957,35 +29834,34 @@ func (p IOTHubPaginator) NextPage(ctx context.Context) ([]IOTHub, error) { } var listIOTHubFilters = map[string]string{ - "authorization_policies": "description.IotHubDescription.Properties.AuthorizationPolicies", - "cloud_to_device": "description.IotHubDescription.Properties.CloudToDevice", - "comments": "description.IotHubDescription.Properties.Comments", - "diagnostic_settings": "description.DiagnosticSettingsResources", - "enable_file_upload_notifications": "description.IotHubDescription.Properties.EnableFileUploadNotifications", - "etag": "description.IotHubDescription.Etag", - "event_hub_endpoints": "description.IotHubDescription.Properties.EventHubEndpoints", - "features": "description.IotHubDescription.Properties.Features", - "host_name": "description.IotHubDescription.Properties.HostName", - "id": "description.IotHubDescription.ID", - "ip_filter_rules": "description.IotHubDescription.Properties.IPFilterRules", - "og_account_id": "metadata.SourceID", - "locations": "description.IotHubDescription.Properties.Locations", - "messaging_endpoints": "description.IotHubDescription.Properties.MessagingEndpoints", - "min_tls_version": "description.IotHubDescription.Properties.MinTLSVersion", - "name": "description.IotHubDescription.Name", - "private_endpoint_connections": "description.IotHubDescription.Properties.PrivateEndpointConnections", - "provisioning_state": "description.IotHubDescription.Properties.ProvisioningState", - "public_network_access": "description.IotHubDescription.Properties.PublicNetworkAccess", - "resource_group": "description.ResourceGroup", - "routing": "description.IotHubDescription.Properties.Routing", - "sku_capacity": "description.IotHubDescription.SKU.Capacity", - "sku_name": "description.IotHubDescription.SKU.Name", - "sku_tier": "description.IotHubDescription.SKU.Tier", - "state": "description.IotHubDescription.Properties.State", - "storage_endpoints": "description.IotHubDescription.Properties.StorageEndpoints", - "tags": "description.IotHubDescription.Tags", - "title": "description.IotHubDescription.Name", - "type": "description.IotHubDescription.Type", + "authorization_policies": "Description.IotHubDescription.Properties.AuthorizationPolicies", + "cloud_to_device": "Description.IotHubDescription.Properties.CloudToDevice", + "comments": "Description.IotHubDescription.Properties.Comments", + "diagnostic_settings": "Description.DiagnosticSettingsResources", + "enable_file_upload_notifications": "Description.IotHubDescription.Properties.EnableFileUploadNotifications", + "etag": "Description.IotHubDescription.Etag", + "event_hub_endpoints": "Description.IotHubDescription.Properties.EventHubEndpoints", + "features": "Description.IotHubDescription.Properties.Features", + "host_name": "Description.IotHubDescription.Properties.HostName", + "id": "Description.IotHubDescription.ID", + "ip_filter_rules": "Description.IotHubDescription.Properties.IPFilterRules", + "locations": "Description.IotHubDescription.Properties.Locations", + "messaging_endpoints": "Description.IotHubDescription.Properties.MessagingEndpoints", + "min_tls_version": "Description.IotHubDescription.Properties.MinTLSVersion", + "name": "Description.IotHubDescription.Name", + "private_endpoint_connections": "Description.IotHubDescription.Properties.PrivateEndpointConnections", + "provisioning_state": "Description.IotHubDescription.Properties.ProvisioningState", + "public_network_access": "Description.IotHubDescription.Properties.PublicNetworkAccess", + "resource_group": "Description.ResourceGroup", + "routing": "Description.IotHubDescription.Properties.Routing", + "sku_capacity": "Description.IotHubDescription.SKU.Capacity", + "sku_name": "Description.IotHubDescription.SKU.Name", + "sku_tier": "Description.IotHubDescription.SKU.Tier", + "state": "Description.IotHubDescription.Properties.State", + "storage_endpoints": "Description.IotHubDescription.Properties.StorageEndpoints", + "tags": "Description.IotHubDescription.Tags", + "title": "Description.IotHubDescription.Name", + "type": "Description.IotHubDescription.Type", } func ListIOTHub(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -38049,35 +29925,34 @@ func ListIOTHub(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) } var getIOTHubFilters = map[string]string{ - "authorization_policies": "description.IotHubDescription.Properties.AuthorizationPolicies", - "cloud_to_device": "description.IotHubDescription.Properties.CloudToDevice", - "comments": "description.IotHubDescription.Properties.Comments", - "diagnostic_settings": "description.DiagnosticSettingsResources", - "enable_file_upload_notifications": "description.IotHubDescription.Properties.EnableFileUploadNotifications", - "etag": "description.IotHubDescription.Etag", - "event_hub_endpoints": "description.IotHubDescription.Properties.EventHubEndpoints", - "features": "description.IotHubDescription.Properties.Features", - "host_name": "description.IotHubDescription.Properties.HostName", - "id": "description.IotHubDescription.ID", - "ip_filter_rules": "description.IotHubDescription.Properties.IPFilterRules", - "og_account_id": "metadata.SourceID", - "locations": "description.IotHubDescription.Properties.Locations", - "messaging_endpoints": "description.IotHubDescription.Properties.MessagingEndpoints", - "min_tls_version": "description.IotHubDescription.Properties.MinTLSVersion", + "authorization_policies": "Description.IotHubDescription.Properties.AuthorizationPolicies", + "cloud_to_device": "Description.IotHubDescription.Properties.CloudToDevice", + "comments": "Description.IotHubDescription.Properties.Comments", + "diagnostic_settings": "Description.DiagnosticSettingsResources", + "enable_file_upload_notifications": "Description.IotHubDescription.Properties.EnableFileUploadNotifications", + "etag": "Description.IotHubDescription.Etag", + "event_hub_endpoints": "Description.IotHubDescription.Properties.EventHubEndpoints", + "features": "Description.IotHubDescription.Properties.Features", + "host_name": "Description.IotHubDescription.Properties.HostName", + "id": "Description.IotHubDescription.ID", + "ip_filter_rules": "Description.IotHubDescription.Properties.IPFilterRules", + "locations": "Description.IotHubDescription.Properties.Locations", + "messaging_endpoints": "Description.IotHubDescription.Properties.MessagingEndpoints", + "min_tls_version": "Description.IotHubDescription.Properties.MinTLSVersion", "name": "description.IotHubDescription.name", - "private_endpoint_connections": "description.IotHubDescription.Properties.PrivateEndpointConnections", - "provisioning_state": "description.IotHubDescription.Properties.ProvisioningState", - "public_network_access": "description.IotHubDescription.Properties.PublicNetworkAccess", + "private_endpoint_connections": "Description.IotHubDescription.Properties.PrivateEndpointConnections", + "provisioning_state": "Description.IotHubDescription.Properties.ProvisioningState", + "public_network_access": "Description.IotHubDescription.Properties.PublicNetworkAccess", "resource_group": "description.ResourceGroup", - "routing": "description.IotHubDescription.Properties.Routing", - "sku_capacity": "description.IotHubDescription.SKU.Capacity", - "sku_name": "description.IotHubDescription.SKU.Name", - "sku_tier": "description.IotHubDescription.SKU.Tier", - "state": "description.IotHubDescription.Properties.State", - "storage_endpoints": "description.IotHubDescription.Properties.StorageEndpoints", - "tags": "description.IotHubDescription.Tags", - "title": "description.IotHubDescription.Name", - "type": "description.IotHubDescription.Type", + "routing": "Description.IotHubDescription.Properties.Routing", + "sku_capacity": "Description.IotHubDescription.SKU.Capacity", + "sku_name": "Description.IotHubDescription.SKU.Name", + "sku_tier": "Description.IotHubDescription.SKU.Tier", + "state": "Description.IotHubDescription.Properties.State", + "storage_endpoints": "Description.IotHubDescription.Properties.StorageEndpoints", + "tags": "Description.IotHubDescription.Tags", + "title": "Description.IotHubDescription.Name", + "type": "Description.IotHubDescription.Type", } func GetIOTHub(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -38138,72 +30013,14 @@ func GetIOTHub(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) // ========================== START: IOTHubDps ============================= type IOTHubDps struct { - Description azure.IOTHubDpsDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *IOTHubDps) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.IOTHubDpsDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.IOTHubDpsDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type IOTHubDpsHit struct { @@ -38274,26 +30091,25 @@ func (p IOTHubDpsPaginator) NextPage(ctx context.Context) ([]IOTHubDps, error) { } var listIOTHubDpsFilters = map[string]string{ - "allocation_policy": "description.IotHubDps.Properties.AllocationPolicy", - "authorization_policies": "description.IotHubDps.Properties.AuthorizationPolicies", - "device_provisioning_host_name": "description.IotHubDps.Properties.DeviceProvisioningHostName", - "diagnostic_settings": "description.DiagnosticSettingsResources", - "etag": "description.IotHubDps.Etag", - "id": "description.IotHubDps.ID", - "id_scope": "description.IotHubDps.Properties.IDScope", - "iot_hubs": "description.IotHubDps.Properties.IotHubs", - "og_account_id": "metadata.SourceID", - "name": "description.IotHubDps.Name", - "provisioning_state": "description.IotHubDps.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "service_operations_host_name": "description.IotHubDps.Properties.ServiceOperationsHostName", - "sku_capacity": "description.IotHubDps.SKU.Capacity", - "sku_name": "description.IotHubDps.SKU.Name", - "sku_tier": "description.IotHubDps.SKU.Tier", - "state": "description.IotHubDps.Properties.State", - "tags": "description.IotHubDps.Tags", - "title": "description.IotHubDps.Name", - "type": "description.IotHubDps.Type", + "allocation_policy": "Description.IotHubDps.Properties.AllocationPolicy", + "authorization_policies": "Description.IotHubDps.Properties.AuthorizationPolicies", + "device_provisioning_host_name": "Description.IotHubDps.Properties.DeviceProvisioningHostName", + "diagnostic_settings": "Description.DiagnosticSettingsResources", + "etag": "Description.IotHubDps.Etag", + "id": "Description.IotHubDps.ID", + "id_scope": "Description.IotHubDps.Properties.IDScope", + "iot_hubs": "Description.IotHubDps.Properties.IotHubs", + "name": "Description.IotHubDps.Name", + "provisioning_state": "Description.IotHubDps.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "service_operations_host_name": "Description.IotHubDps.Properties.ServiceOperationsHostName", + "sku_capacity": "Description.IotHubDps.SKU.Capacity", + "sku_name": "Description.IotHubDps.SKU.Name", + "sku_tier": "Description.IotHubDps.SKU.Tier", + "state": "Description.IotHubDps.Properties.State", + "tags": "Description.IotHubDps.Tags", + "title": "Description.IotHubDps.Name", + "type": "Description.IotHubDps.Type", } func ListIOTHubDps(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -38357,26 +30173,25 @@ func ListIOTHubDps(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDa } var getIOTHubDpsFilters = map[string]string{ - "allocation_policy": "description.IotHubDps.Properties.AllocationPolicy", - "authorization_policies": "description.IotHubDps.Properties.AuthorizationPolicies", - "device_provisioning_host_name": "description.IotHubDps.Properties.DeviceProvisioningHostName", - "diagnostic_settings": "description.DiagnosticSettingsResources", - "etag": "description.IotHubDps.Etag", - "id": "description.IotHubDps.ID", - "id_scope": "description.IotHubDps.Properties.IDScope", - "iot_hubs": "description.IotHubDps.Properties.IotHubs", - "og_account_id": "metadata.SourceID", + "allocation_policy": "Description.IotHubDps.Properties.AllocationPolicy", + "authorization_policies": "Description.IotHubDps.Properties.AuthorizationPolicies", + "device_provisioning_host_name": "Description.IotHubDps.Properties.DeviceProvisioningHostName", + "diagnostic_settings": "Description.DiagnosticSettingsResources", + "etag": "Description.IotHubDps.Etag", + "id": "Description.IotHubDps.ID", + "id_scope": "Description.IotHubDps.Properties.IDScope", + "iot_hubs": "Description.IotHubDps.Properties.IotHubs", "name": "description.IotHubDps.name", - "provisioning_state": "description.IotHubDps.Properties.ProvisioningState", + "provisioning_state": "Description.IotHubDps.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", - "service_operations_host_name": "description.IotHubDps.Properties.ServiceOperationsHostName", - "sku_capacity": "description.IotHubDps.SKU.Capacity", - "sku_name": "description.IotHubDps.SKU.Name", - "sku_tier": "description.IotHubDps.SKU.Tier", - "state": "description.IotHubDps.Properties.State", - "tags": "description.IotHubDps.Tags", - "title": "description.IotHubDps.Name", - "type": "description.IotHubDps.Type", + "service_operations_host_name": "Description.IotHubDps.Properties.ServiceOperationsHostName", + "sku_capacity": "Description.IotHubDps.SKU.Capacity", + "sku_name": "Description.IotHubDps.SKU.Name", + "sku_tier": "Description.IotHubDps.SKU.Tier", + "state": "Description.IotHubDps.Properties.State", + "tags": "Description.IotHubDps.Tags", + "title": "Description.IotHubDps.Name", + "type": "Description.IotHubDps.Type", } func GetIOTHubDps(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -38437,72 +30252,14 @@ func GetIOTHubDps(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDat // ========================== START: KeyVault ============================= type KeyVault struct { - Description azure.KeyVaultDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *KeyVault) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.KeyVaultDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.KeyVaultDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type KeyVaultHit struct { @@ -38573,27 +30330,26 @@ func (p KeyVaultPaginator) NextPage(ctx context.Context) ([]KeyVault, error) { } var listKeyVaultFilters = map[string]string{ - "create_mode": "description.Vault.Properties.CreateMode", - "diagnostic_settings": "description.DiagnosticSettingsResources", - "enable_rbac_authorization": "description.Vault.Properties.EnableRbacAuthorization", - "enabled_for_deployment": "description.Vault.Properties.EnabledForDeployment", - "enabled_for_disk_encryption": "description.Vault.Properties.EnabledForDiskEncryption", - "enabled_for_template_deployment": "description.Vault.Properties.EnabledForTemplateDeployment", - "id": "description.Vault.ID", - "og_account_id": "metadata.SourceID", - "name": "description.Vault.Name", - "network_acls": "description.Vault.Properties.NetworkACLs", - "purge_protection_enabled": "description.Vault.Properties.EnablePurgeProtection", - "resource_group": "description.ResourceGroup", - "sku_family": "description.Vault.Properties.SKU.Family", - "sku_name": "description.Vault.Properties.SKU.Name", - "soft_delete_enabled": "description.Vault.Properties.EnableSoftDelete", - "soft_delete_retention_in_days": "description.Vault.Properties.SoftDeleteRetentionInDays", - "tags": "description.Vault.Tags", - "tenant_id": "description.Vault.Properties.TenantID", - "title": "description.Vault.Name", - "type": "description.Vault.Type", - "vault_uri": "description.Vault.Properties.VaultURI", + "create_mode": "Description.Vault.Properties.CreateMode", + "diagnostic_settings": "Description.DiagnosticSettingsResources", + "enable_rbac_authorization": "Description.Vault.Properties.EnableRbacAuthorization", + "enabled_for_deployment": "Description.Vault.Properties.EnabledForDeployment", + "enabled_for_disk_encryption": "Description.Vault.Properties.EnabledForDiskEncryption", + "enabled_for_template_deployment": "Description.Vault.Properties.EnabledForTemplateDeployment", + "id": "Description.Vault.ID", + "name": "Description.Vault.Name", + "network_acls": "Description.Vault.Properties.NetworkACLs", + "purge_protection_enabled": "Description.Vault.Properties.EnablePurgeProtection", + "resource_group": "Description.ResourceGroup", + "sku_family": "Description.Vault.Properties.SKU.Family", + "sku_name": "Description.Vault.Properties.SKU.Name", + "soft_delete_enabled": "Description.Vault.Properties.EnableSoftDelete", + "soft_delete_retention_in_days": "Description.Vault.Properties.SoftDeleteRetentionInDays", + "tags": "Description.Vault.Tags", + "tenant_id": "Description.Vault.Properties.TenantID", + "title": "Description.Vault.Name", + "type": "Description.Vault.Type", + "vault_uri": "Description.Vault.Properties.VaultURI", } func ListKeyVault(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -38657,27 +30413,26 @@ func ListKeyVault(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDat } var getKeyVaultFilters = map[string]string{ - "create_mode": "description.Vault.Properties.CreateMode", - "diagnostic_settings": "description.DiagnosticSettingsResources", - "enable_rbac_authorization": "description.Vault.Properties.EnableRbacAuthorization", - "enabled_for_deployment": "description.Vault.Properties.EnabledForDeployment", - "enabled_for_disk_encryption": "description.Vault.Properties.EnabledForDiskEncryption", - "enabled_for_template_deployment": "description.Vault.Properties.EnabledForTemplateDeployment", - "id": "description.Vault.ID", - "og_account_id": "metadata.SourceID", + "create_mode": "Description.Vault.Properties.CreateMode", + "diagnostic_settings": "Description.DiagnosticSettingsResources", + "enable_rbac_authorization": "Description.Vault.Properties.EnableRbacAuthorization", + "enabled_for_deployment": "Description.Vault.Properties.EnabledForDeployment", + "enabled_for_disk_encryption": "Description.Vault.Properties.EnabledForDiskEncryption", + "enabled_for_template_deployment": "Description.Vault.Properties.EnabledForTemplateDeployment", + "id": "Description.Vault.ID", "name": "description.Resource.name", - "network_acls": "description.Vault.Properties.NetworkACLs", - "purge_protection_enabled": "description.Vault.Properties.EnablePurgeProtection", + "network_acls": "Description.Vault.Properties.NetworkACLs", + "purge_protection_enabled": "Description.Vault.Properties.EnablePurgeProtection", "resource_group": "description.ResourceGroup", - "sku_family": "description.Vault.Properties.SKU.Family", - "sku_name": "description.Vault.Properties.SKU.Name", - "soft_delete_enabled": "description.Vault.Properties.EnableSoftDelete", - "soft_delete_retention_in_days": "description.Vault.Properties.SoftDeleteRetentionInDays", - "tags": "description.Vault.Tags", - "tenant_id": "description.Vault.Properties.TenantID", - "title": "description.Vault.Name", - "type": "description.Vault.Type", - "vault_uri": "description.Vault.Properties.VaultURI", + "sku_family": "Description.Vault.Properties.SKU.Family", + "sku_name": "Description.Vault.Properties.SKU.Name", + "soft_delete_enabled": "Description.Vault.Properties.EnableSoftDelete", + "soft_delete_retention_in_days": "Description.Vault.Properties.SoftDeleteRetentionInDays", + "tags": "Description.Vault.Tags", + "tenant_id": "Description.Vault.Properties.TenantID", + "title": "Description.Vault.Name", + "type": "Description.Vault.Type", + "vault_uri": "Description.Vault.Properties.VaultURI", } func GetKeyVault(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -38738,72 +30493,14 @@ func GetKeyVault(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData // ========================== START: KeyVaultCertificate ============================= type KeyVaultCertificate struct { - Description azure.KeyVaultCertificateDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *KeyVaultCertificate) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.KeyVaultCertificateDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.KeyVaultCertificateDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type KeyVaultCertificateHit struct { @@ -38874,16 +30571,15 @@ func (p KeyVaultCertificatePaginator) NextPage(ctx context.Context) ([]KeyVaultC } var listKeyVaultCertificateFilters = map[string]string{ - "attributes": "description.Policy.Attributes", - "id": "description.Policy.ID", - "issuer_parameters": "description.Policy.IssuerParameters", - "og_account_id": "metadata.SourceID", - "key_properties": "description.Policy.KeyProperties", - "lifetime_actions": "description.Policy.LifetimeActions", - "resource_group": "description.ResourceGroup", - "secret_properties": "description.Policy.SecretProperties", - "tags": "description.Policy.Tags", - "vault_name": "description.Vault.Name", + "attributes": "Description.Policy.Attributes", + "id": "Description.Policy.ID", + "issuer_parameters": "Description.Policy.IssuerParameters", + "key_properties": "Description.Policy.KeyProperties", + "lifetime_actions": "Description.Policy.LifetimeActions", + "resource_group": "Description.ResourceGroup", + "secret_properties": "Description.Policy.SecretProperties", + "tags": "Description.Policy.Tags", + "vault_name": "Description.Vault.Name", } func ListKeyVaultCertificate(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -38947,17 +30643,16 @@ func ListKeyVaultCertificate(ctx context.Context, d *plugin.QueryData, _ *plugin } var getKeyVaultCertificateFilters = map[string]string{ - "attributes": "description.Policy.Attributes", - "id": "description.Policy.ID", - "issuer_parameters": "description.Policy.IssuerParameters", - "og_account_id": "metadata.SourceID", - "key_properties": "description.Policy.KeyProperties", - "lifetime_actions": "description.Policy.LifetimeActions", + "attributes": "Description.Policy.Attributes", + "id": "Description.Policy.ID", + "issuer_parameters": "Description.Policy.IssuerParameters", + "key_properties": "Description.Policy.KeyProperties", + "lifetime_actions": "Description.Policy.LifetimeActions", "name": "description.Resource.name", "resource_group": "description.ResourceGroup", - "secret_properties": "description.Policy.SecretProperties", - "tags": "description.Policy.Tags", - "vault_name": "description.Vault.Name", + "secret_properties": "Description.Policy.SecretProperties", + "tags": "Description.Policy.Tags", + "vault_name": "Description.Vault.Name", } func GetKeyVaultCertificate(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -39018,72 +30713,14 @@ func GetKeyVaultCertificate(ctx context.Context, d *plugin.QueryData, _ *plugin. // ========================== START: KeyVaultDeletedVault ============================= type KeyVaultDeletedVault struct { - Description azure.KeyVaultDeletedVaultDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *KeyVaultDeletedVault) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.KeyVaultDeletedVaultDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.KeyVaultDeletedVaultDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type KeyVaultDeletedVaultHit struct { @@ -39154,13 +30791,12 @@ func (p KeyVaultDeletedVaultPaginator) NextPage(ctx context.Context) ([]KeyVault } var listKeyVaultDeletedVaultFilters = map[string]string{ - "id": "description.Vault.ID", - "og_account_id": "metadata.SourceID", - "name": "description.Vault.Name", - "tags": "description.Vault.Properties.Tags", - "title": "description.Vault.Name", - "type": "description.Vault.Type", - "vault_id": "description.Vault.Properties.VaultID", + "id": "Description.Vault.ID", + "name": "Description.Vault.Name", + "tags": "Description.Vault.Properties.Tags", + "title": "Description.Vault.Name", + "type": "Description.Vault.Type", + "vault_id": "Description.Vault.Properties.VaultID", } func ListKeyVaultDeletedVault(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -39224,14 +30860,13 @@ func ListKeyVaultDeletedVault(ctx context.Context, d *plugin.QueryData, _ *plugi } var getKeyVaultDeletedVaultFilters = map[string]string{ - "id": "description.Vault.ID", - "og_account_id": "metadata.SourceID", - "name": "description.Vault.name", - "region": "description.Vault.Properties.Location", - "tags": "description.Vault.Properties.Tags", - "title": "description.Vault.Name", - "type": "description.Vault.Type", - "vault_id": "description.Vault.Properties.VaultID", + "id": "Description.Vault.ID", + "name": "description.Vault.name", + "region": "description.Vault.Properties.Location", + "tags": "Description.Vault.Properties.Tags", + "title": "Description.Vault.Name", + "type": "Description.Vault.Type", + "vault_id": "Description.Vault.Properties.VaultID", } func GetKeyVaultDeletedVault(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -39292,72 +30927,14 @@ func GetKeyVaultDeletedVault(ctx context.Context, d *plugin.QueryData, _ *plugin // ========================== START: KeyVaultManagedHardwareSecurityModule ============================= type KeyVaultManagedHardwareSecurityModule struct { - Description azure.KeyVaultManagedHardwareSecurityModuleDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *KeyVaultManagedHardwareSecurityModule) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.KeyVaultManagedHardwareSecurityModuleDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.KeyVaultManagedHardwareSecurityModuleDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type KeyVaultManagedHardwareSecurityModuleHit struct { @@ -39428,24 +31005,23 @@ func (p KeyVaultManagedHardwareSecurityModulePaginator) NextPage(ctx context.Con } var listKeyVaultManagedHardwareSecurityModuleFilters = map[string]string{ - "create_mode": "description.ManagedHsm.Properties.CreateMode", - "diagnostic_settings": "description.DiagnosticSettingsResources", - "enable_purge_protection": "description.ManagedHsm.Properties.EnablePurgeProtection", - "enable_soft_delete": "description.ManagedHsm.Properties.EnableSoftDelete", - "hsm_uri": "description.ManagedHsm.Properties.HsmURI", - "id": "description.ManagedHsm.ID", - "og_account_id": "metadata.SourceID", - "name": "description.ManagedHsm.Name", - "provisioning_state": "description.ManagedHsm.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "sku_family": "description.ManagedHsm.SKU.Family", - "sku_name": "description.ManagedHsm.SKU.Name", - "soft_delete_retention_in_days": "description.ManagedHsm.Properties.SoftDeleteRetentionInDays", - "status_message": "description.ManagedHsm.Properties.StatusMessage", - "tags": "description.ManagedHsm.Tags", - "tenant_id": "description.ManagedHsm.Properties.TenantID", - "title": "description.ManagedHsm.Name", - "type": "description.ManagedHsm.Type", + "create_mode": "Description.ManagedHsm.Properties.CreateMode", + "diagnostic_settings": "Description.DiagnosticSettingsResources", + "enable_purge_protection": "Description.ManagedHsm.Properties.EnablePurgeProtection", + "enable_soft_delete": "Description.ManagedHsm.Properties.EnableSoftDelete", + "hsm_uri": "Description.ManagedHsm.Properties.HsmURI", + "id": "Description.ManagedHsm.ID", + "name": "Description.ManagedHsm.Name", + "provisioning_state": "Description.ManagedHsm.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "sku_family": "Description.ManagedHsm.SKU.Family", + "sku_name": "Description.ManagedHsm.SKU.Name", + "soft_delete_retention_in_days": "Description.ManagedHsm.Properties.SoftDeleteRetentionInDays", + "status_message": "Description.ManagedHsm.Properties.StatusMessage", + "tags": "Description.ManagedHsm.Tags", + "tenant_id": "Description.ManagedHsm.Properties.TenantID", + "title": "Description.ManagedHsm.Name", + "type": "Description.ManagedHsm.Type", } func ListKeyVaultManagedHardwareSecurityModule(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -39509,24 +31085,23 @@ func ListKeyVaultManagedHardwareSecurityModule(ctx context.Context, d *plugin.Qu } var getKeyVaultManagedHardwareSecurityModuleFilters = map[string]string{ - "create_mode": "description.ManagedHsm.Properties.CreateMode", - "diagnostic_settings": "description.DiagnosticSettingsResources", - "enable_purge_protection": "description.ManagedHsm.Properties.EnablePurgeProtection", - "enable_soft_delete": "description.ManagedHsm.Properties.EnableSoftDelete", - "hsm_uri": "description.ManagedHsm.Properties.HsmURI", - "id": "description.ManagedHsm.ID", - "og_account_id": "metadata.SourceID", + "create_mode": "Description.ManagedHsm.Properties.CreateMode", + "diagnostic_settings": "Description.DiagnosticSettingsResources", + "enable_purge_protection": "Description.ManagedHsm.Properties.EnablePurgeProtection", + "enable_soft_delete": "Description.ManagedHsm.Properties.EnableSoftDelete", + "hsm_uri": "Description.ManagedHsm.Properties.HsmURI", + "id": "Description.ManagedHsm.ID", "name": "description.ManagedHsm.name", - "provisioning_state": "description.ManagedHsm.Properties.ProvisioningState", + "provisioning_state": "Description.ManagedHsm.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", - "sku_family": "description.ManagedHsm.SKU.Family", - "sku_name": "description.ManagedHsm.SKU.Name", - "soft_delete_retention_in_days": "description.ManagedHsm.Properties.SoftDeleteRetentionInDays", - "status_message": "description.ManagedHsm.Properties.StatusMessage", - "tags": "description.ManagedHsm.Tags", - "tenant_id": "description.ManagedHsm.Properties.TenantID", - "title": "description.ManagedHsm.Name", - "type": "description.ManagedHsm.Type", + "sku_family": "Description.ManagedHsm.SKU.Family", + "sku_name": "Description.ManagedHsm.SKU.Name", + "soft_delete_retention_in_days": "Description.ManagedHsm.Properties.SoftDeleteRetentionInDays", + "status_message": "Description.ManagedHsm.Properties.StatusMessage", + "tags": "Description.ManagedHsm.Tags", + "tenant_id": "Description.ManagedHsm.Properties.TenantID", + "title": "Description.ManagedHsm.Name", + "type": "Description.ManagedHsm.Type", } func GetKeyVaultManagedHardwareSecurityModule(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -39587,72 +31162,14 @@ func GetKeyVaultManagedHardwareSecurityModule(ctx context.Context, d *plugin.Que // ========================== START: KeyVaultSecret ============================= type KeyVaultSecret struct { - Description azure.KeyVaultSecretDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *KeyVaultSecret) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.KeyVaultSecretDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.KeyVaultSecretDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type KeyVaultSecretHit struct { @@ -39723,17 +31240,16 @@ func (p KeyVaultSecretPaginator) NextPage(ctx context.Context) ([]KeyVaultSecret } var listKeyVaultSecretFilters = map[string]string{ - "akas": "description.TurboData.Akas", - "content_type": "description.SecretItem.Properties.ContentType", - "enabled": "description.SecretItem.Properties.Attributes.Enabled", - "id": "description.SecretItem.ID", - "og_account_id": "metadata.SourceID", - "kid": "description.SecretBundle.Kid", - "name": "description.SecretItem.Name", - "recoverable_days": "description.Vault.Properties.SoftDeleteRetentionInDays", - "resource_group": "description.TurboData.ResourceGroup", - "tags": "description.SecretItem.Tags", - "value": "description.SecretItem.Properties.Value", + "akas": "Description.TurboData.Akas", + "content_type": "Description.SecretItem.Properties.ContentType", + "enabled": "Description.SecretItem.Properties.Attributes.Enabled", + "id": "Description.SecretItem.ID", + "kid": "Description.SecretBundle.Kid", + "name": "Description.SecretItem.Name", + "recoverable_days": "Description.Vault.Properties.SoftDeleteRetentionInDays", + "resource_group": "Description.TurboData.ResourceGroup", + "tags": "Description.SecretItem.Tags", + "value": "Description.SecretItem.Properties.Value", } func ListKeyVaultSecret(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -39797,17 +31313,16 @@ func ListKeyVaultSecret(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr } var getKeyVaultSecretFilters = map[string]string{ - "akas": "description.TurboData.Akas", - "content_type": "description.SecretItem.Properties.ContentType", - "enabled": "description.SecretItem.Properties.Attributes.Enabled", - "id": "description.SecretItem.ID", - "og_account_id": "metadata.SourceID", - "kid": "description.SecretBundle.Kid", + "akas": "Description.TurboData.Akas", + "content_type": "Description.SecretItem.Properties.ContentType", + "enabled": "Description.SecretItem.Properties.Attributes.Enabled", + "id": "Description.SecretItem.ID", + "kid": "Description.SecretBundle.Kid", "name": "description.SecretItem.name", - "recoverable_days": "description.Vault.Properties.SoftDeleteRetentionInDays", + "recoverable_days": "Description.Vault.Properties.SoftDeleteRetentionInDays", "resource_group": "description.ResourceGroup", - "tags": "description.SecretItem.Tags", - "value": "description.SecretItem.Properties.Value", + "tags": "Description.SecretItem.Tags", + "value": "Description.SecretItem.Properties.Value", } func GetKeyVaultSecret(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -39868,72 +31383,14 @@ func GetKeyVaultSecret(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra // ========================== START: KustoCluster ============================= type KustoCluster struct { - Description azure.KustoClusterDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *KustoCluster) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.KustoClusterDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.KustoClusterDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type KustoClusterHit struct { @@ -40004,34 +31461,33 @@ func (p KustoClusterPaginator) NextPage(ctx context.Context) ([]KustoCluster, er } var listKustoClusterFilters = map[string]string{ - "data_ingestion_uri": "description.Cluster.Properties.DataIngestionURI", - "enable_disk_encryption": "description.Cluster.Properties.EnableDiskEncryption", - "enable_double_encryption": "description.Cluster.Properties.EnableDoubleEncryption", - "enable_purge": "description.Cluster.Properties.EnablePurge", - "enable_streaming_ingest": "description.Cluster.Properties.EnableStreamingIngest", - "engine_type": "description.Cluster.Properties.EngineType", - "etag": "description.Cluster.Etag", - "id": "description.Cluster.ID", - "identity": "description.Cluster.Identity", - "og_account_id": "metadata.SourceID", - "key_vault_properties": "description.Cluster.Properties.KeyVaultProperties", - "language_extensions": "description.Cluster.Properties.LanguageExtensions", - "location": "description.Cluster.Location", - "name": "description.Cluster.Name", - "optimized_autoscale": "description.Cluster.Properties.OptimizedAutoscale", - "provisioning_state": "description.Cluster.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "sku_capacity": "description.Cluster.SKU.Capacity", - "sku_name": "description.Cluster.SKU.Name", - "sku_tier": "description.Cluster.SKU.Tier", - "state": "description.Cluster.Properties.State", - "state_reason": "description.Cluster.Properties.StateReason", - "tags": "description.Cluster.Tags", - "title": "description.Cluster.Name", - "trusted_external_tenants": "description.Cluster.Properties.TrustedExternalTenants", - "type": "description.Cluster.Type", - "uri": "description.Cluster.Properties.URI", - "virtual_network_configuration": "description.Cluster.Properties.VirtualNetworkConfiguration", + "data_ingestion_uri": "Description.Cluster.Properties.DataIngestionURI", + "enable_disk_encryption": "Description.Cluster.Properties.EnableDiskEncryption", + "enable_double_encryption": "Description.Cluster.Properties.EnableDoubleEncryption", + "enable_purge": "Description.Cluster.Properties.EnablePurge", + "enable_streaming_ingest": "Description.Cluster.Properties.EnableStreamingIngest", + "engine_type": "Description.Cluster.Properties.EngineType", + "etag": "Description.Cluster.Etag", + "id": "Description.Cluster.ID", + "identity": "Description.Cluster.Identity", + "key_vault_properties": "Description.Cluster.Properties.KeyVaultProperties", + "language_extensions": "Description.Cluster.Properties.LanguageExtensions", + "location": "Description.Cluster.Location", + "name": "Description.Cluster.Name", + "optimized_autoscale": "Description.Cluster.Properties.OptimizedAutoscale", + "provisioning_state": "Description.Cluster.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "sku_capacity": "Description.Cluster.SKU.Capacity", + "sku_name": "Description.Cluster.SKU.Name", + "sku_tier": "Description.Cluster.SKU.Tier", + "state": "Description.Cluster.Properties.State", + "state_reason": "Description.Cluster.Properties.StateReason", + "tags": "Description.Cluster.Tags", + "title": "Description.Cluster.Name", + "trusted_external_tenants": "Description.Cluster.Properties.TrustedExternalTenants", + "type": "Description.Cluster.Type", + "uri": "Description.Cluster.Properties.URI", + "virtual_network_configuration": "Description.Cluster.Properties.VirtualNetworkConfiguration", } func ListKustoCluster(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -40095,34 +31551,33 @@ func ListKustoCluster(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat } var getKustoClusterFilters = map[string]string{ - "data_ingestion_uri": "description.Cluster.Properties.DataIngestionURI", - "enable_disk_encryption": "description.Cluster.Properties.EnableDiskEncryption", - "enable_double_encryption": "description.Cluster.Properties.EnableDoubleEncryption", - "enable_purge": "description.Cluster.Properties.EnablePurge", - "enable_streaming_ingest": "description.Cluster.Properties.EnableStreamingIngest", - "engine_type": "description.Cluster.Properties.EngineType", - "etag": "description.Cluster.Etag", - "id": "description.Cluster.ID", - "identity": "description.Cluster.Identity", - "og_account_id": "metadata.SourceID", - "key_vault_properties": "description.Cluster.Properties.KeyVaultProperties", - "language_extensions": "description.Cluster.Properties.LanguageExtensions", - "location": "description.Cluster.Location", + "data_ingestion_uri": "Description.Cluster.Properties.DataIngestionURI", + "enable_disk_encryption": "Description.Cluster.Properties.EnableDiskEncryption", + "enable_double_encryption": "Description.Cluster.Properties.EnableDoubleEncryption", + "enable_purge": "Description.Cluster.Properties.EnablePurge", + "enable_streaming_ingest": "Description.Cluster.Properties.EnableStreamingIngest", + "engine_type": "Description.Cluster.Properties.EngineType", + "etag": "Description.Cluster.Etag", + "id": "Description.Cluster.ID", + "identity": "Description.Cluster.Identity", + "key_vault_properties": "Description.Cluster.Properties.KeyVaultProperties", + "language_extensions": "Description.Cluster.Properties.LanguageExtensions", + "location": "Description.Cluster.Location", "name": "description.Cluster.name", - "optimized_autoscale": "description.Cluster.Properties.OptimizedAutoscale", - "provisioning_state": "description.Cluster.Properties.ProvisioningState", + "optimized_autoscale": "Description.Cluster.Properties.OptimizedAutoscale", + "provisioning_state": "Description.Cluster.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", - "sku_capacity": "description.Cluster.SKU.Capacity", - "sku_name": "description.Cluster.SKU.Name", - "sku_tier": "description.Cluster.SKU.Tier", - "state": "description.Cluster.Properties.State", - "state_reason": "description.Cluster.Properties.StateReason", - "tags": "description.Cluster.Tags", - "title": "description.Cluster.Name", - "trusted_external_tenants": "description.Cluster.Properties.TrustedExternalTenants", - "type": "description.Cluster.Type", - "uri": "description.Cluster.Properties.URI", - "virtual_network_configuration": "description.Cluster.Properties.VirtualNetworkConfiguration", + "sku_capacity": "Description.Cluster.SKU.Capacity", + "sku_name": "Description.Cluster.SKU.Name", + "sku_tier": "Description.Cluster.SKU.Tier", + "state": "Description.Cluster.Properties.State", + "state_reason": "Description.Cluster.Properties.StateReason", + "tags": "Description.Cluster.Tags", + "title": "Description.Cluster.Name", + "trusted_external_tenants": "Description.Cluster.Properties.TrustedExternalTenants", + "type": "Description.Cluster.Type", + "uri": "Description.Cluster.Properties.URI", + "virtual_network_configuration": "Description.Cluster.Properties.VirtualNetworkConfiguration", } func GetKustoCluster(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -40183,72 +31638,14 @@ func GetKustoCluster(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate // ========================== START: LogAlert ============================= type LogAlert struct { - Description azure.LogAlertDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *LogAlert) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.LogAlertDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.LogAlertDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type LogAlertHit struct { @@ -40319,19 +31716,18 @@ func (p LogAlertPaginator) NextPage(ctx context.Context) ([]LogAlert, error) { } var listLogAlertFilters = map[string]string{ - "actions": "description.ActivityLogAlertResource.Properties.Actions", - "condition": "description.ActivityLogAlertResource.Properties.Condition", - "description": "description.ActivityLogAlertResource.Properties.Description", - "enabled": "description.ActivityLogAlertResource.Properties.Enabled", - "id": "description.ActivityLogAlertResource.ID", - "og_account_id": "metadata.SourceID", - "location": "description.ActivityLogAlertResource.Location", - "name": "description.ActivityLogAlertResource.Name", - "resource_group": "description.ResourceGroup", - "scopes": "description.ActivityLogAlertResource.Properties.Scopes", - "tags": "description.ActivityLogAlertResource.Tags", - "title": "description.ActivityLogAlertResource.Name", - "type": "description.ActivityLogAlertResource.Type", + "actions": "Description.ActivityLogAlertResource.Properties.Actions", + "condition": "Description.ActivityLogAlertResource.Properties.Condition", + "description": "Description.ActivityLogAlertResource.Properties.Description", + "enabled": "Description.ActivityLogAlertResource.Properties.Enabled", + "id": "Description.ActivityLogAlertResource.ID", + "location": "Description.ActivityLogAlertResource.Location", + "name": "Description.ActivityLogAlertResource.Name", + "resource_group": "Description.ResourceGroup", + "scopes": "Description.ActivityLogAlertResource.Properties.Scopes", + "tags": "Description.ActivityLogAlertResource.Tags", + "title": "Description.ActivityLogAlertResource.Name", + "type": "Description.ActivityLogAlertResource.Type", } func ListLogAlert(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -40395,19 +31791,18 @@ func ListLogAlert(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDat } var getLogAlertFilters = map[string]string{ - "actions": "description.ActivityLogAlertResource.Properties.Actions", - "condition": "description.ActivityLogAlertResource.Properties.Condition", - "description": "description.ActivityLogAlertResource.Properties.Description", - "enabled": "description.ActivityLogAlertResource.Properties.Enabled", - "id": "description.ActivityLogAlertResource.ID", - "og_account_id": "metadata.SourceID", - "location": "description.ActivityLogAlertResource.Location", + "actions": "Description.ActivityLogAlertResource.Properties.Actions", + "condition": "Description.ActivityLogAlertResource.Properties.Condition", + "description": "Description.ActivityLogAlertResource.Properties.Description", + "enabled": "Description.ActivityLogAlertResource.Properties.Enabled", + "id": "Description.ActivityLogAlertResource.ID", + "location": "Description.ActivityLogAlertResource.Location", "name": "description.ActivityLogAlertResource.name", "resource_group": "description.ResourceGroup", - "scopes": "description.ActivityLogAlertResource.Properties.Scopes", - "tags": "description.ActivityLogAlertResource.Tags", - "title": "description.ActivityLogAlertResource.Name", - "type": "description.ActivityLogAlertResource.Type", + "scopes": "Description.ActivityLogAlertResource.Properties.Scopes", + "tags": "Description.ActivityLogAlertResource.Tags", + "title": "Description.ActivityLogAlertResource.Name", + "type": "Description.ActivityLogAlertResource.Type", } func GetLogAlert(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -40468,72 +31863,14 @@ func GetLogAlert(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData // ========================== START: LogProfile ============================= type LogProfile struct { - Description azure.LogProfileDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *LogProfile) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.LogProfileDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.LogProfileDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type LogProfileHit struct { @@ -40604,19 +31941,18 @@ func (p LogProfilePaginator) NextPage(ctx context.Context) ([]LogProfile, error) } var listLogProfileFilters = map[string]string{ - "categories": "description.LogProfileResource.Properties.Categories", - "id": "description.LogProfileResource.ID", - "og_account_id": "metadata.SourceID", - "location": "description.LogProfileResource.Location", - "log_event_location": "description.LogProfileResource.Properties.Locations", - "name": "description.LogProfileResource.Name", - "resource_group": "description.ResourceGroup", - "retention_policy": "description.LogProfileResource.Properties.RetentionPolicy", - "service_bus_rule_id": "description.LogProfileResource.Properties.ServiceBusRuleID", - "storage_account_id": "description.LogProfileResource.Properties.StorageAccountID", - "tags": "description.LogProfileResource.Tags", - "title": "description.LogProfileResource.Name", - "type": "description.LogProfileResource.Type", + "categories": "Description.LogProfileResource.Properties.Categories", + "id": "Description.LogProfileResource.ID", + "location": "Description.LogProfileResource.Location", + "log_event_location": "Description.LogProfileResource.Properties.Locations", + "name": "Description.LogProfileResource.Name", + "resource_group": "Description.ResourceGroup", + "retention_policy": "Description.LogProfileResource.Properties.RetentionPolicy", + "service_bus_rule_id": "Description.LogProfileResource.Properties.ServiceBusRuleID", + "storage_account_id": "Description.LogProfileResource.Properties.StorageAccountID", + "tags": "Description.LogProfileResource.Tags", + "title": "Description.LogProfileResource.Name", + "type": "Description.LogProfileResource.Type", } func ListLogProfile(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -40680,19 +32016,18 @@ func ListLogProfile(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD } var getLogProfileFilters = map[string]string{ - "categories": "description.LogProfileResource.Properties.Categories", - "id": "description.LogProfileResource.ID", - "og_account_id": "metadata.SourceID", - "location": "description.LogProfileResource.Location", - "log_event_location": "description.LogProfileResource.Properties.Locations", + "categories": "Description.LogProfileResource.Properties.Categories", + "id": "Description.LogProfileResource.ID", + "location": "Description.LogProfileResource.Location", + "log_event_location": "Description.LogProfileResource.Properties.Locations", "name": "description.LogProfileResource.name", "resource_group": "description.ResourceGroup", - "retention_policy": "description.LogProfileResource.Properties.RetentionPolicy", - "service_bus_rule_id": "description.LogProfileResource.Properties.ServiceBusRuleID", - "storage_account_id": "description.LogProfileResource.Properties.StorageAccountID", - "tags": "description.LogProfileResource.Tags", - "title": "description.LogProfileResource.Name", - "type": "description.LogProfileResource.Type", + "retention_policy": "Description.LogProfileResource.Properties.RetentionPolicy", + "service_bus_rule_id": "Description.LogProfileResource.Properties.ServiceBusRuleID", + "storage_account_id": "Description.LogProfileResource.Properties.StorageAccountID", + "tags": "Description.LogProfileResource.Tags", + "title": "Description.LogProfileResource.Name", + "type": "Description.LogProfileResource.Type", } func GetLogProfile(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -40753,72 +32088,14 @@ func GetLogProfile(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDa // ========================== START: LogicAppWorkflow ============================= type LogicAppWorkflow struct { - Description azure.LogicAppWorkflowDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *LogicAppWorkflow) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.LogicAppWorkflowDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.LogicAppWorkflowDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type LogicAppWorkflowHit struct { @@ -40889,26 +32166,25 @@ func (p LogicAppWorkflowPaginator) NextPage(ctx context.Context) ([]LogicAppWork } var listLogicAppWorkflowFilters = map[string]string{ - "access_control": "description.Workflow.Properties.AccessControl", - "access_endpoint": "description.Workflow.Properties.AccessEndpoint", - "definition": "description.Workflow.Properties.Definition", - "diagnostic_settings": "description.DiagnosticSettingsResources", - "endpoints_configuration": "description.Workflow.Properties.EndpointsConfiguration", - "id": "description.Workflow.ID", - "integration_account": "description.Workflow.Properties.IntegrationAccount", - "integration_service_environment": "description.Workflow.Properties.IntegrationServiceEnvironment", - "og_account_id": "metadata.SourceID", - "name": "description.Workflow.Name", - "parameters": "description.Workflow.Properties.Parameters", - "provisioning_state": "description.Workflow.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "sku_name": "description.Workflow.Properties.SKU.Name", - "sku_plan": "description.Workflow.Properties.SKU.Plan", - "state": "description.Workflow.Properties.State", - "tags": "description.Workflow.Tags", - "title": "description.Workflow.Name", - "type": "description.Workflow.Type", - "version": "description.Workflow.Properties.Version", + "access_control": "Description.Workflow.Properties.AccessControl", + "access_endpoint": "Description.Workflow.Properties.AccessEndpoint", + "definition": "Description.Workflow.Properties.Definition", + "diagnostic_settings": "Description.DiagnosticSettingsResources", + "endpoints_configuration": "Description.Workflow.Properties.EndpointsConfiguration", + "id": "Description.Workflow.ID", + "integration_account": "Description.Workflow.Properties.IntegrationAccount", + "integration_service_environment": "Description.Workflow.Properties.IntegrationServiceEnvironment", + "name": "Description.Workflow.Name", + "parameters": "Description.Workflow.Properties.Parameters", + "provisioning_state": "Description.Workflow.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "sku_name": "Description.Workflow.Properties.SKU.Name", + "sku_plan": "Description.Workflow.Properties.SKU.Plan", + "state": "Description.Workflow.Properties.State", + "tags": "Description.Workflow.Tags", + "title": "Description.Workflow.Name", + "type": "Description.Workflow.Type", + "version": "Description.Workflow.Properties.Version", } func ListLogicAppWorkflow(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -40972,26 +32248,25 @@ func ListLogicAppWorkflow(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy } var getLogicAppWorkflowFilters = map[string]string{ - "access_control": "description.Workflow.Properties.AccessControl", - "access_endpoint": "description.Workflow.Properties.AccessEndpoint", - "definition": "description.Workflow.Properties.Definition", - "diagnostic_settings": "description.DiagnosticSettingsResources", - "endpoints_configuration": "description.Workflow.Properties.EndpointsConfiguration", - "id": "description.Workflow.ID", - "integration_account": "description.Workflow.Properties.IntegrationAccount", - "integration_service_environment": "description.Workflow.Properties.IntegrationServiceEnvironment", - "og_account_id": "metadata.SourceID", + "access_control": "Description.Workflow.Properties.AccessControl", + "access_endpoint": "Description.Workflow.Properties.AccessEndpoint", + "definition": "Description.Workflow.Properties.Definition", + "diagnostic_settings": "Description.DiagnosticSettingsResources", + "endpoints_configuration": "Description.Workflow.Properties.EndpointsConfiguration", + "id": "Description.Workflow.ID", + "integration_account": "Description.Workflow.Properties.IntegrationAccount", + "integration_service_environment": "Description.Workflow.Properties.IntegrationServiceEnvironment", "name": "description.Workflow.name", - "parameters": "description.Workflow.Properties.Parameters", - "provisioning_state": "description.Workflow.Properties.ProvisioningState", + "parameters": "Description.Workflow.Properties.Parameters", + "provisioning_state": "Description.Workflow.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", - "sku_name": "description.Workflow.Properties.SKU.Name", - "sku_plan": "description.Workflow.Properties.SKU.Plan", - "state": "description.Workflow.Properties.State", - "tags": "description.Workflow.Tags", - "title": "description.Workflow.Name", - "type": "description.Workflow.Type", - "version": "description.Workflow.Properties.Version", + "sku_name": "Description.Workflow.Properties.SKU.Name", + "sku_plan": "Description.Workflow.Properties.SKU.Plan", + "state": "Description.Workflow.Properties.State", + "tags": "Description.Workflow.Tags", + "title": "Description.Workflow.Name", + "type": "Description.Workflow.Type", + "version": "Description.Workflow.Properties.Version", } func GetLogicAppWorkflow(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -41052,72 +32327,14 @@ func GetLogicAppWorkflow(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd // ========================== START: LogicIntegrationAccounts ============================= type LogicIntegrationAccounts struct { - Description azure.LogicIntegrationAccountsDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *LogicIntegrationAccounts) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.LogicIntegrationAccountsDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.LogicIntegrationAccountsDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type LogicIntegrationAccountsHit struct { @@ -41188,11 +32405,10 @@ func (p LogicIntegrationAccountsPaginator) NextPage(ctx context.Context) ([]Logi } var listLogicIntegrationAccountsFilters = map[string]string{ - "id": "description.IntegrationAccounts.ID", - "og_account_id": "metadata.SourceID", - "name": "description.Account.Properties.IntegrationServiceEnvironment.Name", - "tags": "description.Account.Properties.IntegrationServiceEnvironment.Name", - "title": "description.Account.Properties.IntegrationServiceEnvironment.Name", + "id": "Description.IntegrationAccounts.ID", + "name": "Description.Account.Properties.IntegrationServiceEnvironment.Name", + "tags": "Description.Account.Properties.IntegrationServiceEnvironment.Name", + "title": "Description.Account.Properties.IntegrationServiceEnvironment.Name", } func ListLogicIntegrationAccounts(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -41256,11 +32472,10 @@ func ListLogicIntegrationAccounts(ctx context.Context, d *plugin.QueryData, _ *p } var getLogicIntegrationAccountsFilters = map[string]string{ - "id": "description.IntegrationAccounts.ID", - "og_account_id": "metadata.SourceID", - "name": "description.Account.Properties.IntegrationServiceEnvironment.Name", - "tags": "description.Account.Properties.IntegrationServiceEnvironment.Name", - "title": "description.Account.Properties.IntegrationServiceEnvironment.Name", + "id": "Description.IntegrationAccounts.ID", + "name": "Description.Account.Properties.IntegrationServiceEnvironment.Name", + "tags": "Description.Account.Properties.IntegrationServiceEnvironment.Name", + "title": "Description.Account.Properties.IntegrationServiceEnvironment.Name", } func GetLogicIntegrationAccounts(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -41321,72 +32536,14 @@ func GetLogicIntegrationAccounts(ctx context.Context, d *plugin.QueryData, _ *pl // ========================== START: MachineLearningWorkspace ============================= type MachineLearningWorkspace struct { - Description azure.MachineLearningWorkspaceDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *MachineLearningWorkspace) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.MachineLearningWorkspaceDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.MachineLearningWorkspaceDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type MachineLearningWorkspaceHit struct { @@ -41457,30 +32614,29 @@ func (p MachineLearningWorkspacePaginator) NextPage(ctx context.Context) ([]Mach } var listMachineLearningWorkspaceFilters = map[string]string{ - "application_insights": "description.Workspace.Properties.ApplicationInsights", - "container_registry": "description.Workspace.Properties.ContainerRegistry", - "description": "description.Workspace.Properties.Description", - "diagnostic_settings": "description.DiagnosticSettingsResources", - "discovery_url": "description.Workspace.Properties.DiscoveryURL", - "encryption": "description.Workspace.Properties.Encryption", - "friendly_name": "description.Workspace.Properties.FriendlyName", - "hbi_workspace": "description.Workspace.Properties.HbiWorkspace", - "id": "description.Workspace.ID", - "identity": "description.Workspace.Identity", - "og_account_id": "metadata.SourceID", - "key_vault": "description.Workspace.Properties.KeyVault", - "location": "description.Workspace.Location", - "name": "description.Workspace.Name", - "provisioning_state": "description.Workspace.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "service_provisioned_resource_group": "description.Workspace.Properties.ServiceProvisionedResourceGroup", - "sku_name": "description.Workspace.SKU.Name", - "sku_tier": "description.Workspace.SKU.Tier", - "storage_account": "description.Workspace.Properties.StorageAccount", - "tags": "description.Workspace.Tags", - "title": "description.Workspace.Name", - "type": "description.Workspace.Type", - "workspace_id": "description.Workspace.Properties.WorkspaceID", + "application_insights": "Description.Workspace.Properties.ApplicationInsights", + "container_registry": "Description.Workspace.Properties.ContainerRegistry", + "description": "Description.Workspace.Properties.Description", + "diagnostic_settings": "Description.DiagnosticSettingsResources", + "discovery_url": "Description.Workspace.Properties.DiscoveryURL", + "encryption": "Description.Workspace.Properties.Encryption", + "friendly_name": "Description.Workspace.Properties.FriendlyName", + "hbi_workspace": "Description.Workspace.Properties.HbiWorkspace", + "id": "Description.Workspace.ID", + "identity": "Description.Workspace.Identity", + "key_vault": "Description.Workspace.Properties.KeyVault", + "location": "Description.Workspace.Location", + "name": "Description.Workspace.Name", + "provisioning_state": "Description.Workspace.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "service_provisioned_resource_group": "Description.Workspace.Properties.ServiceProvisionedResourceGroup", + "sku_name": "Description.Workspace.SKU.Name", + "sku_tier": "Description.Workspace.SKU.Tier", + "storage_account": "Description.Workspace.Properties.StorageAccount", + "tags": "Description.Workspace.Tags", + "title": "Description.Workspace.Name", + "type": "Description.Workspace.Type", + "workspace_id": "Description.Workspace.Properties.WorkspaceID", } func ListMachineLearningWorkspace(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -41544,30 +32700,29 @@ func ListMachineLearningWorkspace(ctx context.Context, d *plugin.QueryData, _ *p } var getMachineLearningWorkspaceFilters = map[string]string{ - "application_insights": "description.Workspace.Properties.ApplicationInsights", - "container_registry": "description.Workspace.Properties.ContainerRegistry", - "description": "description.Workspace.Properties.Description", - "diagnostic_settings": "description.DiagnosticSettingsResources", - "discovery_url": "description.Workspace.Properties.DiscoveryURL", - "encryption": "description.Workspace.Properties.Encryption", - "friendly_name": "description.Workspace.Properties.FriendlyName", - "hbi_workspace": "description.Workspace.Properties.HbiWorkspace", - "id": "description.Workspace.ID", - "identity": "description.Workspace.Identity", - "og_account_id": "metadata.SourceID", - "key_vault": "description.Workspace.Properties.KeyVault", - "location": "description.Workspace.Location", + "application_insights": "Description.Workspace.Properties.ApplicationInsights", + "container_registry": "Description.Workspace.Properties.ContainerRegistry", + "description": "Description.Workspace.Properties.Description", + "diagnostic_settings": "Description.DiagnosticSettingsResources", + "discovery_url": "Description.Workspace.Properties.DiscoveryURL", + "encryption": "Description.Workspace.Properties.Encryption", + "friendly_name": "Description.Workspace.Properties.FriendlyName", + "hbi_workspace": "Description.Workspace.Properties.HbiWorkspace", + "id": "Description.Workspace.ID", + "identity": "Description.Workspace.Identity", + "key_vault": "Description.Workspace.Properties.KeyVault", + "location": "Description.Workspace.Location", "name": "description.Workspace.name", - "provisioning_state": "description.Workspace.Properties.ProvisioningState", + "provisioning_state": "Description.Workspace.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", - "service_provisioned_resource_group": "description.Workspace.Properties.ServiceProvisionedResourceGroup", - "sku_name": "description.Workspace.SKU.Name", - "sku_tier": "description.Workspace.SKU.Tier", - "storage_account": "description.Workspace.Properties.StorageAccount", - "tags": "description.Workspace.Tags", - "title": "description.Workspace.Name", - "type": "description.Workspace.Type", - "workspace_id": "description.Workspace.Properties.WorkspaceID", + "service_provisioned_resource_group": "Description.Workspace.Properties.ServiceProvisionedResourceGroup", + "sku_name": "Description.Workspace.SKU.Name", + "sku_tier": "Description.Workspace.SKU.Tier", + "storage_account": "Description.Workspace.Properties.StorageAccount", + "tags": "Description.Workspace.Tags", + "title": "Description.Workspace.Name", + "type": "Description.Workspace.Type", + "workspace_id": "Description.Workspace.Properties.WorkspaceID", } func GetMachineLearningWorkspace(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -41628,72 +32783,14 @@ func GetMachineLearningWorkspace(ctx context.Context, d *plugin.QueryData, _ *pl // ========================== START: MariadbServer ============================= type MariadbServer struct { - Description azure.MariadbServerDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *MariadbServer) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.MariadbServerDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.MariadbServerDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type MariadbServerHit struct { @@ -41764,32 +32861,31 @@ func (p MariadbServerPaginator) NextPage(ctx context.Context) ([]MariadbServer, } var listMariadbServerFilters = map[string]string{ - "administrator_login": "description.Server.Properties.AdministratorLogin", - "auto_grow_enabled": "description.Server.Properties.StorageProfile.StorageAutogrow", - "backup_retention_days": "description.Server.Properties.StorageProfile.BackupRetentionDays", - "fully_qualified_domain_name": "description.Server.Properties.FullyQualifiedDomainName", - "geo_redundant_backup_enabled": "description.Server.Properties.StorageProfile.GeoRedundantBackup", - "id": "description.Server.ID", - "og_account_id": "metadata.SourceID", - "master_service_id": "description.Server.Properties.MasterServerID", - "name": "description.Server.Name", - "private_endpoint_connections": "description.Server.Properties.PrivateEndpointConnections", - "public_network_access": "description.Server.Properties.PublicNetworkAccess", - "replica_capacity": "description.Server.Properties.ReplicaCapacity", - "replication_role": "description.Server.Properties.ReplicationRole", - "resource_group": "description.ResourceGroup", - "sku_capacity": "description.Server.SKU.Capacity", - "sku_family": "description.Server.SKU.Family", - "sku_name": "description.Server.SKU.Name", - "sku_size": "description.Server.SKU.Size", - "sku_tier": "description.Server.SKU.Tier", - "ssl_enforcement": "description.Server.Properties.SSLEnforcement", - "storage_mb": "description.Server.Properties.StorageProfile.StorageMB", - "tags": "description.Server.Tags", - "title": "description.Server.Name", - "type": "description.Server.Type", - "user_visible_state": "description.Server.Properties.UserVisibleState", - "version": "description.Server.Properties.Version", + "administrator_login": "Description.Server.Properties.AdministratorLogin", + "auto_grow_enabled": "Description.Server.Properties.StorageProfile.StorageAutogrow", + "backup_retention_days": "Description.Server.Properties.StorageProfile.BackupRetentionDays", + "fully_qualified_domain_name": "Description.Server.Properties.FullyQualifiedDomainName", + "geo_redundant_backup_enabled": "Description.Server.Properties.StorageProfile.GeoRedundantBackup", + "id": "Description.Server.ID", + "master_service_id": "Description.Server.Properties.MasterServerID", + "name": "Description.Server.Name", + "private_endpoint_connections": "Description.Server.Properties.PrivateEndpointConnections", + "public_network_access": "Description.Server.Properties.PublicNetworkAccess", + "replica_capacity": "Description.Server.Properties.ReplicaCapacity", + "replication_role": "Description.Server.Properties.ReplicationRole", + "resource_group": "Description.ResourceGroup", + "sku_capacity": "Description.Server.SKU.Capacity", + "sku_family": "Description.Server.SKU.Family", + "sku_name": "Description.Server.SKU.Name", + "sku_size": "Description.Server.SKU.Size", + "sku_tier": "Description.Server.SKU.Tier", + "ssl_enforcement": "Description.Server.Properties.SSLEnforcement", + "storage_mb": "Description.Server.Properties.StorageProfile.StorageMB", + "tags": "Description.Server.Tags", + "title": "Description.Server.Name", + "type": "Description.Server.Type", + "user_visible_state": "Description.Server.Properties.UserVisibleState", + "version": "Description.Server.Properties.Version", } func ListMariadbServer(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -41853,32 +32949,31 @@ func ListMariadbServer(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra } var getMariadbServerFilters = map[string]string{ - "administrator_login": "description.Server.Properties.AdministratorLogin", - "auto_grow_enabled": "description.Server.Properties.StorageProfile.StorageAutogrow", - "backup_retention_days": "description.Server.Properties.StorageProfile.BackupRetentionDays", - "fully_qualified_domain_name": "description.Server.Properties.FullyQualifiedDomainName", - "geo_redundant_backup_enabled": "description.Server.Properties.StorageProfile.GeoRedundantBackup", - "id": "description.Server.ID", - "og_account_id": "metadata.SourceID", - "master_service_id": "description.Server.Properties.MasterServerID", + "administrator_login": "Description.Server.Properties.AdministratorLogin", + "auto_grow_enabled": "Description.Server.Properties.StorageProfile.StorageAutogrow", + "backup_retention_days": "Description.Server.Properties.StorageProfile.BackupRetentionDays", + "fully_qualified_domain_name": "Description.Server.Properties.FullyQualifiedDomainName", + "geo_redundant_backup_enabled": "Description.Server.Properties.StorageProfile.GeoRedundantBackup", + "id": "Description.Server.ID", + "master_service_id": "Description.Server.Properties.MasterServerID", "name": "description.Server.name", - "private_endpoint_connections": "description.Server.Properties.PrivateEndpointConnections", - "public_network_access": "description.Server.Properties.PublicNetworkAccess", - "replica_capacity": "description.Server.Properties.ReplicaCapacity", - "replication_role": "description.Server.Properties.ReplicationRole", + "private_endpoint_connections": "Description.Server.Properties.PrivateEndpointConnections", + "public_network_access": "Description.Server.Properties.PublicNetworkAccess", + "replica_capacity": "Description.Server.Properties.ReplicaCapacity", + "replication_role": "Description.Server.Properties.ReplicationRole", "resource_group": "description.ResourceGroup", - "sku_capacity": "description.Server.SKU.Capacity", - "sku_family": "description.Server.SKU.Family", - "sku_name": "description.Server.SKU.Name", - "sku_size": "description.Server.SKU.Size", - "sku_tier": "description.Server.SKU.Tier", - "ssl_enforcement": "description.Server.Properties.SSLEnforcement", - "storage_mb": "description.Server.Properties.StorageProfile.StorageMB", - "tags": "description.Server.Tags", - "title": "description.Server.Name", - "type": "description.Server.Type", - "user_visible_state": "description.Server.Properties.UserVisibleState", - "version": "description.Server.Properties.Version", + "sku_capacity": "Description.Server.SKU.Capacity", + "sku_family": "Description.Server.SKU.Family", + "sku_name": "Description.Server.SKU.Name", + "sku_size": "Description.Server.SKU.Size", + "sku_tier": "Description.Server.SKU.Tier", + "ssl_enforcement": "Description.Server.Properties.SSLEnforcement", + "storage_mb": "Description.Server.Properties.StorageProfile.StorageMB", + "tags": "Description.Server.Tags", + "title": "Description.Server.Name", + "type": "Description.Server.Type", + "user_visible_state": "Description.Server.Properties.UserVisibleState", + "version": "Description.Server.Properties.Version", } func GetMariadbServer(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -41939,72 +33034,14 @@ func GetMariadbServer(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat // ========================== START: MariadbDatabase ============================= type MariadbDatabase struct { - Description azure.MariadbDatabaseDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *MariadbDatabase) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.MariadbDatabaseDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.MariadbDatabaseDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type MariadbDatabaseHit struct { @@ -42075,11 +33112,10 @@ func (p MariadbDatabasePaginator) NextPage(ctx context.Context) ([]MariadbDataba } var listMariadbDatabaseFilters = map[string]string{ - "id": "description.Databases.ID", - "og_account_id": "metadata.SourceID", - "name": "description.Database.Name", - "tags": "description.Database.Name", - "title": "description.Database.Name", + "id": "Description.Databases.ID", + "name": "Description.Database.Name", + "tags": "Description.Database.Name", + "title": "Description.Database.Name", } func ListMariadbDatabase(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -42143,11 +33179,10 @@ func ListMariadbDatabase(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd } var getMariadbDatabaseFilters = map[string]string{ - "id": "description.Databases.ID", - "og_account_id": "metadata.SourceID", - "name": "description.Database.Name", - "tags": "description.Database.Name", - "title": "description.Database.Name", + "id": "Description.Databases.ID", + "name": "Description.Database.Name", + "tags": "Description.Database.Name", + "title": "Description.Database.Name", } func GetMariadbDatabase(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -42208,72 +33243,14 @@ func GetMariadbDatabase(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr // ========================== START: MysqlServer ============================= type MysqlServer struct { - Description azure.MysqlServerDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *MysqlServer) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.MysqlServerDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.MysqlServerDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type MysqlServerHit struct { @@ -42344,40 +33321,39 @@ func (p MysqlServerPaginator) NextPage(ctx context.Context) ([]MysqlServer, erro } var listMysqlServerFilters = map[string]string{ - "administrator_login": "description.Server.Properties.AdministratorLogin", - "backup_retention_days": "description.Server.Properties.StorageProfile.BackupRetentionDays", - "byok_enforcement": "description.Server.Properties.ByokEnforcement", - "fully_qualified_domain_name": "description.Server.Properties.FullyQualifiedDomainName", - "geo_redundant_backup": "description.Server.Properties.StorageProfile.GeoRedundantBackup", - "id": "description.Server.ID", - "infrastructure_encryption": "description.Server.Properties.InfrastructureEncryption", - "og_account_id": "metadata.SourceID", - "location": "description.Server.Location", - "master_server_id": "description.Server.Properties.MasterServerID", - "minimal_tls_version": "description.Server.Properties.MinimalTLSVersion", - "name": "description.Server.Name", - "public_network_access": "description.Server.Properties.PublicNetworkAccess", - "replica_capacity": "description.Server.Properties.ReplicaCapacity", - "replication_role": "description.Server.Properties.ReplicationRole", - "resource_group": "description.ResourceGroup", - "server_configurations": "description.Configurations", - "server_keys": "description.ServerKeys", - "server_security_alert_policy": "description.SecurityAlertPolicies", - "sku_capacity": "description.Server.SKU.Capacity", - "sku_family": "description.Server.SKU.Family", - "sku_name": "description.Server.SKU.Name", - "sku_size": "description.Server.SKU.Size", - "sku_tier": "description.Server.SKU.Tier", - "ssl_enforcement": "description.Server.Properties.SSLEnforcement", - "state": "description.Server.Properties.UserVisibleState", - "storage_auto_grow": "description.Server.Properties.StorageProfile.StorageAutogrow", - "storage_mb": "description.Server.Properties.StorageProfile.StorageMB", - "tags": "description.Server.Tags", - "title": "description.Server.Name", - "type": "description.Server.Type", - "user_visible_state": "description.Server.Properties.UserVisibleState", - "version": "description.Server.Properties.Version", - "vnet_rules": "description.VnetRules", + "administrator_login": "Description.Server.Properties.AdministratorLogin", + "backup_retention_days": "Description.Server.Properties.StorageProfile.BackupRetentionDays", + "byok_enforcement": "Description.Server.Properties.ByokEnforcement", + "fully_qualified_domain_name": "Description.Server.Properties.FullyQualifiedDomainName", + "geo_redundant_backup": "Description.Server.Properties.StorageProfile.GeoRedundantBackup", + "id": "Description.Server.ID", + "infrastructure_encryption": "Description.Server.Properties.InfrastructureEncryption", + "location": "Description.Server.Location", + "master_server_id": "Description.Server.Properties.MasterServerID", + "minimal_tls_version": "Description.Server.Properties.MinimalTLSVersion", + "name": "Description.Server.Name", + "public_network_access": "Description.Server.Properties.PublicNetworkAccess", + "replica_capacity": "Description.Server.Properties.ReplicaCapacity", + "replication_role": "Description.Server.Properties.ReplicationRole", + "resource_group": "Description.ResourceGroup", + "server_configurations": "Description.Configurations", + "server_keys": "Description.ServerKeys", + "server_security_alert_policy": "Description.SecurityAlertPolicies", + "sku_capacity": "Description.Server.SKU.Capacity", + "sku_family": "Description.Server.SKU.Family", + "sku_name": "Description.Server.SKU.Name", + "sku_size": "Description.Server.SKU.Size", + "sku_tier": "Description.Server.SKU.Tier", + "ssl_enforcement": "Description.Server.Properties.SSLEnforcement", + "state": "Description.Server.Properties.UserVisibleState", + "storage_auto_grow": "Description.Server.Properties.StorageProfile.StorageAutogrow", + "storage_mb": "Description.Server.Properties.StorageProfile.StorageMB", + "tags": "Description.Server.Tags", + "title": "Description.Server.Name", + "type": "Description.Server.Type", + "user_visible_state": "Description.Server.Properties.UserVisibleState", + "version": "Description.Server.Properties.Version", + "vnet_rules": "Description.VnetRules", } func ListMysqlServer(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -42441,40 +33417,39 @@ func ListMysqlServer(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate } var getMysqlServerFilters = map[string]string{ - "administrator_login": "description.Server.Properties.AdministratorLogin", - "backup_retention_days": "description.Server.Properties.StorageProfile.BackupRetentionDays", - "byok_enforcement": "description.Server.Properties.ByokEnforcement", - "fully_qualified_domain_name": "description.Server.Properties.FullyQualifiedDomainName", - "geo_redundant_backup": "description.Server.Properties.StorageProfile.GeoRedundantBackup", - "id": "description.Server.ID", - "infrastructure_encryption": "description.Server.Properties.InfrastructureEncryption", - "og_account_id": "metadata.SourceID", - "location": "description.Server.Location", - "master_server_id": "description.Server.Properties.MasterServerID", - "minimal_tls_version": "description.Server.Properties.MinimalTLSVersion", + "administrator_login": "Description.Server.Properties.AdministratorLogin", + "backup_retention_days": "Description.Server.Properties.StorageProfile.BackupRetentionDays", + "byok_enforcement": "Description.Server.Properties.ByokEnforcement", + "fully_qualified_domain_name": "Description.Server.Properties.FullyQualifiedDomainName", + "geo_redundant_backup": "Description.Server.Properties.StorageProfile.GeoRedundantBackup", + "id": "Description.Server.ID", + "infrastructure_encryption": "Description.Server.Properties.InfrastructureEncryption", + "location": "Description.Server.Location", + "master_server_id": "Description.Server.Properties.MasterServerID", + "minimal_tls_version": "Description.Server.Properties.MinimalTLSVersion", "name": "description.Server.name", - "public_network_access": "description.Server.Properties.PublicNetworkAccess", - "replica_capacity": "description.Server.Properties.ReplicaCapacity", - "replication_role": "description.Server.Properties.ReplicationRole", + "public_network_access": "Description.Server.Properties.PublicNetworkAccess", + "replica_capacity": "Description.Server.Properties.ReplicaCapacity", + "replication_role": "Description.Server.Properties.ReplicationRole", "resource_group": "description.ResourceGroup", - "server_configurations": "description.Configurations", - "server_keys": "description.ServerKeys", - "server_security_alert_policy": "description.SecurityAlertPolicies", - "sku_capacity": "description.Server.SKU.Capacity", - "sku_family": "description.Server.SKU.Family", - "sku_name": "description.Server.SKU.Name", - "sku_size": "description.Server.SKU.Size", - "sku_tier": "description.Server.SKU.Tier", - "ssl_enforcement": "description.Server.Properties.SSLEnforcement", - "state": "description.Server.Properties.UserVisibleState", - "storage_auto_grow": "description.Server.Properties.StorageProfile.StorageAutogrow", - "storage_mb": "description.Server.Properties.StorageProfile.StorageMB", - "tags": "description.Server.Tags", - "title": "description.Server.Name", - "type": "description.Server.Type", - "user_visible_state": "description.Server.Properties.UserVisibleState", - "version": "description.Server.Properties.Version", - "vnet_rules": "description.VnetRules", + "server_configurations": "Description.Configurations", + "server_keys": "Description.ServerKeys", + "server_security_alert_policy": "Description.SecurityAlertPolicies", + "sku_capacity": "Description.Server.SKU.Capacity", + "sku_family": "Description.Server.SKU.Family", + "sku_name": "Description.Server.SKU.Name", + "sku_size": "Description.Server.SKU.Size", + "sku_tier": "Description.Server.SKU.Tier", + "ssl_enforcement": "Description.Server.Properties.SSLEnforcement", + "state": "Description.Server.Properties.UserVisibleState", + "storage_auto_grow": "Description.Server.Properties.StorageProfile.StorageAutogrow", + "storage_mb": "Description.Server.Properties.StorageProfile.StorageMB", + "tags": "Description.Server.Tags", + "title": "Description.Server.Name", + "type": "Description.Server.Type", + "user_visible_state": "Description.Server.Properties.UserVisibleState", + "version": "Description.Server.Properties.Version", + "vnet_rules": "Description.VnetRules", } func GetMysqlServer(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -42535,72 +33510,14 @@ func GetMysqlServer(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD // ========================== START: MysqlFlexibleserver ============================= type MysqlFlexibleserver struct { - Description azure.MysqlFlexibleserverDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *MysqlFlexibleserver) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.MysqlFlexibleserverDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.MysqlFlexibleserverDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type MysqlFlexibleserverHit struct { @@ -42671,11 +33588,10 @@ func (p MysqlFlexibleserverPaginator) NextPage(ctx context.Context) ([]MysqlFlex } var listMysqlFlexibleserverFilters = map[string]string{ - "id": "description.Server.ID", - "og_account_id": "metadata.SourceID", - "name": "description.Server.Name", - "tags": "description.Server.Tags", - "title": "description.Server.Name", + "id": "Description.Server.ID", + "name": "Description.Server.Name", + "tags": "Description.Server.Tags", + "title": "Description.Server.Name", } func ListMysqlFlexibleserver(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -42739,11 +33655,10 @@ func ListMysqlFlexibleserver(ctx context.Context, d *plugin.QueryData, _ *plugin } var getMysqlFlexibleserverFilters = map[string]string{ - "id": "description.Server.ID", - "og_account_id": "metadata.SourceID", - "name": "description.Server.Name", - "tags": "description.Server.Tags", - "title": "description.Server.Name", + "id": "Description.Server.ID", + "name": "Description.Server.Name", + "tags": "Description.Server.Tags", + "title": "Description.Server.Name", } func GetMysqlFlexibleserver(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -42804,72 +33719,14 @@ func GetMysqlFlexibleserver(ctx context.Context, d *plugin.QueryData, _ *plugin. // ========================== START: NetworkSecurityGroup ============================= type NetworkSecurityGroup struct { - Description azure.NetworkSecurityGroupDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *NetworkSecurityGroup) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.NetworkSecurityGroupDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.NetworkSecurityGroupDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type NetworkSecurityGroupHit struct { @@ -42940,22 +33797,21 @@ func (p NetworkSecurityGroupPaginator) NextPage(ctx context.Context) ([]NetworkS } var listNetworkSecurityGroupFilters = map[string]string{ - "default_security_rules": "description.SecurityGroup.Properties.DefaultSecurityRules", - "diagnostic_settings": "description.DiagnosticSettingsResources", - "etag": "description.SecurityGroup.Etag", - "flow_logs": "description.SecurityGroup.Properties.FlowLogs", - "id": "description.SecurityGroup.ID", - "og_account_id": "metadata.SourceID", - "name": "description.SecurityGroup.Name", - "network_interfaces": "description.SecurityGroup.Properties.NetworkInterfaces", - "provisioning_state": "description.SecurityGroup.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "resource_guid": "description.SecurityGroup.Properties.ResourceGUID", - "security_rules": "description.SecurityGroup.Properties.SecurityRules", - "subnets": "description.SecurityGroup.Properties.Subnets", - "tags": "description.SecurityGroup.Tags", - "title": "description.SecurityGroup.Name", - "type": "description.SecurityGroup.Type", + "default_security_rules": "Description.SecurityGroup.Properties.DefaultSecurityRules", + "diagnostic_settings": "Description.DiagnosticSettingsResources", + "etag": "Description.SecurityGroup.Etag", + "flow_logs": "Description.SecurityGroup.Properties.FlowLogs", + "id": "Description.SecurityGroup.ID", + "name": "Description.SecurityGroup.Name", + "network_interfaces": "Description.SecurityGroup.Properties.NetworkInterfaces", + "provisioning_state": "Description.SecurityGroup.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "resource_guid": "Description.SecurityGroup.Properties.ResourceGUID", + "security_rules": "Description.SecurityGroup.Properties.SecurityRules", + "subnets": "Description.SecurityGroup.Properties.Subnets", + "tags": "Description.SecurityGroup.Tags", + "title": "Description.SecurityGroup.Name", + "type": "Description.SecurityGroup.Type", } func ListNetworkSecurityGroup(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -43019,22 +33875,21 @@ func ListNetworkSecurityGroup(ctx context.Context, d *plugin.QueryData, _ *plugi } var getNetworkSecurityGroupFilters = map[string]string{ - "default_security_rules": "description.SecurityGroup.Properties.DefaultSecurityRules", - "diagnostic_settings": "description.DiagnosticSettingsResources", - "etag": "description.SecurityGroup.Etag", - "flow_logs": "description.SecurityGroup.Properties.FlowLogs", - "id": "description.SecurityGroup.ID", - "og_account_id": "metadata.SourceID", + "default_security_rules": "Description.SecurityGroup.Properties.DefaultSecurityRules", + "diagnostic_settings": "Description.DiagnosticSettingsResources", + "etag": "Description.SecurityGroup.Etag", + "flow_logs": "Description.SecurityGroup.Properties.FlowLogs", + "id": "Description.SecurityGroup.ID", "name": "description.SecurityGroup.name", - "network_interfaces": "description.SecurityGroup.Properties.NetworkInterfaces", - "provisioning_state": "description.SecurityGroup.Properties.ProvisioningState", + "network_interfaces": "Description.SecurityGroup.Properties.NetworkInterfaces", + "provisioning_state": "Description.SecurityGroup.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", - "resource_guid": "description.SecurityGroup.Properties.ResourceGUID", - "security_rules": "description.SecurityGroup.Properties.SecurityRules", - "subnets": "description.SecurityGroup.Properties.Subnets", - "tags": "description.SecurityGroup.Tags", - "title": "description.SecurityGroup.Name", - "type": "description.SecurityGroup.Type", + "resource_guid": "Description.SecurityGroup.Properties.ResourceGUID", + "security_rules": "Description.SecurityGroup.Properties.SecurityRules", + "subnets": "Description.SecurityGroup.Properties.Subnets", + "tags": "Description.SecurityGroup.Tags", + "title": "Description.SecurityGroup.Name", + "type": "Description.SecurityGroup.Type", } func GetNetworkSecurityGroup(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -43095,72 +33950,14 @@ func GetNetworkSecurityGroup(ctx context.Context, d *plugin.QueryData, _ *plugin // ========================== START: NetworkWatcher ============================= type NetworkWatcher struct { - Description azure.NetworkWatcherDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *NetworkWatcher) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.NetworkWatcherDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.NetworkWatcherDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type NetworkWatcherHit struct { @@ -43231,15 +34028,14 @@ func (p NetworkWatcherPaginator) NextPage(ctx context.Context) ([]NetworkWatcher } var listNetworkWatcherFilters = map[string]string{ - "etag": "description.Watcher.Etag", - "id": "description.Watcher.ID", - "og_account_id": "metadata.SourceID", - "name": "description.Watcher.Name", - "provisioning_state": "description.Watcher.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "tags": "description.Watcher.Tags", - "title": "description.Watcher.Name", - "type": "description.Watcher.Type", + "etag": "Description.Watcher.Etag", + "id": "Description.Watcher.ID", + "name": "Description.Watcher.Name", + "provisioning_state": "Description.Watcher.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "tags": "Description.Watcher.Tags", + "title": "Description.Watcher.Name", + "type": "Description.Watcher.Type", } func ListNetworkWatcher(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -43303,15 +34099,14 @@ func ListNetworkWatcher(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr } var getNetworkWatcherFilters = map[string]string{ - "etag": "description.Watcher.Etag", - "id": "description.Watcher.ID", - "og_account_id": "metadata.SourceID", + "etag": "Description.Watcher.Etag", + "id": "Description.Watcher.ID", "name": "description.Watcher.name", - "provisioning_state": "description.Watcher.Properties.ProvisioningState", + "provisioning_state": "Description.Watcher.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", - "tags": "description.Watcher.Tags", - "title": "description.Watcher.Name", - "type": "description.Watcher.Type", + "tags": "Description.Watcher.Tags", + "title": "Description.Watcher.Name", + "type": "Description.Watcher.Type", } func GetNetworkWatcher(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -43372,72 +34167,14 @@ func GetNetworkWatcher(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra // ========================== START: SearchService ============================= type SearchService struct { - Description azure.SearchServiceDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *SearchService) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.SearchServiceDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.SearchServiceDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type SearchServiceHit struct { @@ -43508,25 +34245,24 @@ func (p SearchServicePaginator) NextPage(ctx context.Context) ([]SearchService, } var listSearchServiceFilters = map[string]string{ - "diagnostic_settings": "description.DiagnosticSettingsResources", - "hosting_mode": "description.Service.Properties.HostingMode", - "id": "description.Service.ID", - "identity": "description.Service.Identity", - "og_account_id": "metadata.SourceID", - "name": "description.Service.Name", - "network_rule_set": "description.Service.Properties.NetworkRuleSet", - "partition_count": "description.Service.Properties.PartitionCount", - "private_endpoint_connections": "description.Service.Properties.PrivateEndpointConnections", - "provisioning_state": "description.Service.Properties.ProvisioningState", - "public_network_access": "description.Service.Properties.PublicNetworkAccess", - "replica_count": "description.Service.Properties.ReplicaCount", - "shared_private_link_resources": "description.Service.Properties.SharedPrivateLinkResources", - "sku_name": "description.Service.SKU.Name", - "status": "description.Service.Properties.Status", - "status_details": "description.Service.Properties.StatusDetails", - "tags": "description.Service.Tags", - "title": "description.Service.Name", - "type": "description.Service.Type", + "diagnostic_settings": "Description.DiagnosticSettingsResources", + "hosting_mode": "Description.Service.Properties.HostingMode", + "id": "Description.Service.ID", + "identity": "Description.Service.Identity", + "name": "Description.Service.Name", + "network_rule_set": "Description.Service.Properties.NetworkRuleSet", + "partition_count": "Description.Service.Properties.PartitionCount", + "private_endpoint_connections": "Description.Service.Properties.PrivateEndpointConnections", + "provisioning_state": "Description.Service.Properties.ProvisioningState", + "public_network_access": "Description.Service.Properties.PublicNetworkAccess", + "replica_count": "Description.Service.Properties.ReplicaCount", + "shared_private_link_resources": "Description.Service.Properties.SharedPrivateLinkResources", + "sku_name": "Description.Service.SKU.Name", + "status": "Description.Service.Properties.Status", + "status_details": "Description.Service.Properties.StatusDetails", + "tags": "Description.Service.Tags", + "title": "Description.Service.Name", + "type": "Description.Service.Type", } func ListSearchService(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -43590,26 +34326,25 @@ func ListSearchService(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra } var getSearchServiceFilters = map[string]string{ - "diagnostic_settings": "description.DiagnosticSettingsResources", - "hosting_mode": "description.Service.Properties.HostingMode", - "id": "description.Service.ID", - "identity": "description.Service.Identity", - "og_account_id": "metadata.SourceID", + "diagnostic_settings": "Description.DiagnosticSettingsResources", + "hosting_mode": "Description.Service.Properties.HostingMode", + "id": "Description.Service.ID", + "identity": "Description.Service.Identity", "name": "description.Service.name", - "network_rule_set": "description.Service.Properties.NetworkRuleSet", - "partition_count": "description.Service.Properties.PartitionCount", - "private_endpoint_connections": "description.Service.Properties.PrivateEndpointConnections", - "provisioning_state": "description.Service.Properties.ProvisioningState", - "public_network_access": "description.Service.Properties.PublicNetworkAccess", - "replica_count": "description.Service.Properties.ReplicaCount", + "network_rule_set": "Description.Service.Properties.NetworkRuleSet", + "partition_count": "Description.Service.Properties.PartitionCount", + "private_endpoint_connections": "Description.Service.Properties.PrivateEndpointConnections", + "provisioning_state": "Description.Service.Properties.ProvisioningState", + "public_network_access": "Description.Service.Properties.PublicNetworkAccess", + "replica_count": "Description.Service.Properties.ReplicaCount", "resource_group": "description.ResourceGroup", - "shared_private_link_resources": "description.Service.Properties.SharedPrivateLinkResources", - "sku_name": "description.Service.SKU.Name", - "status": "description.Service.Properties.Status", - "status_details": "description.Service.Properties.StatusDetails", - "tags": "description.Service.Tags", - "title": "description.Service.Name", - "type": "description.Service.Type", + "shared_private_link_resources": "Description.Service.Properties.SharedPrivateLinkResources", + "sku_name": "Description.Service.SKU.Name", + "status": "Description.Service.Properties.Status", + "status_details": "Description.Service.Properties.StatusDetails", + "tags": "Description.Service.Tags", + "title": "Description.Service.Name", + "type": "Description.Service.Type", } func GetSearchService(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -43670,72 +34405,14 @@ func GetSearchService(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat // ========================== START: ServiceFabricCluster ============================= type ServiceFabricCluster struct { - Description azure.ServiceFabricClusterDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *ServiceFabricCluster) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.ServiceFabricClusterDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.ServiceFabricClusterDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type ServiceFabricClusterHit struct { @@ -43806,37 +34483,36 @@ func (p ServiceFabricClusterPaginator) NextPage(ctx context.Context) ([]ServiceF } var listServiceFabricClusterFilters = map[string]string{ - "add_on_features": "description.Cluster.Properties.AddOnFeatures", - "available_cluster_versions": "description.Cluster.Properties.AvailableClusterVersions", - "azure_active_directory": "description.Cluster.Properties.AzureActiveDirectory", - "certificate": "description.Cluster.Properties.Certificate", - "certificate_common_names": "description.Cluster.Properties.CertificateCommonNames", - "client_certificate_common_names": "description.Cluster.Properties.ClientCertificateCommonNames", - "client_certificate_thumbprints": "description.Cluster.Properties.ClientCertificateThumbprints", - "cluster_code_version": "description.Cluster.Properties.ClusterCodeVersion", - "cluster_endpoint": "description.Cluster.Properties.ClusterEndpoint", - "cluster_id": "description.Cluster.Properties.ClusterID", - "cluster_state": "description.Cluster.Properties.ClusterState", - "diagnostics_storage_account_config": "description.Cluster.Properties.DiagnosticsStorageAccountConfig", - "etag": "description.Cluster.Etag", - "event_store_service_enabled": "description.Cluster.Properties.EventStoreServiceEnabled", - "fabric_settings": "description.Cluster.Properties.FabricSettings", - "id": "description.Cluster.ID", - "og_account_id": "metadata.SourceID", - "management_endpoint": "description.Cluster.Properties.ManagementEndpoint", - "name": "description.Cluster.Name", - "node_types": "description.Cluster.Properties.NodeTypes", - "provisioning_state": "description.Cluster.Properties.ProvisioningState", - "reliability_level": "description.Cluster.Properties.ReliabilityLevel", - "resource_group": "description.ResourceGroup", - "reverse_proxy_certificate": "description.Cluster.Properties.ReverseProxyCertificate", - "reverse_proxy_certificate_common_names": "description.Cluster.Properties.ReverseProxyCertificateCommonNames", - "tags": "description.Cluster.Tags", - "title": "description.Cluster.Name", - "type": "description.Cluster.Type", - "upgrade_description": "description.Cluster.Properties.UpgradeDescription", - "upgrade_mode": "description.Cluster.Properties.UpgradeMode", - "vm_image": "description.Cluster.Properties.VMImage", + "add_on_features": "Description.Cluster.Properties.AddOnFeatures", + "available_cluster_versions": "Description.Cluster.Properties.AvailableClusterVersions", + "azure_active_directory": "Description.Cluster.Properties.AzureActiveDirectory", + "certificate": "Description.Cluster.Properties.Certificate", + "certificate_common_names": "Description.Cluster.Properties.CertificateCommonNames", + "client_certificate_common_names": "Description.Cluster.Properties.ClientCertificateCommonNames", + "client_certificate_thumbprints": "Description.Cluster.Properties.ClientCertificateThumbprints", + "cluster_code_version": "Description.Cluster.Properties.ClusterCodeVersion", + "cluster_endpoint": "Description.Cluster.Properties.ClusterEndpoint", + "cluster_id": "Description.Cluster.Properties.ClusterID", + "cluster_state": "Description.Cluster.Properties.ClusterState", + "diagnostics_storage_account_config": "Description.Cluster.Properties.DiagnosticsStorageAccountConfig", + "etag": "Description.Cluster.Etag", + "event_store_service_enabled": "Description.Cluster.Properties.EventStoreServiceEnabled", + "fabric_settings": "Description.Cluster.Properties.FabricSettings", + "id": "Description.Cluster.ID", + "management_endpoint": "Description.Cluster.Properties.ManagementEndpoint", + "name": "Description.Cluster.Name", + "node_types": "Description.Cluster.Properties.NodeTypes", + "provisioning_state": "Description.Cluster.Properties.ProvisioningState", + "reliability_level": "Description.Cluster.Properties.ReliabilityLevel", + "resource_group": "Description.ResourceGroup", + "reverse_proxy_certificate": "Description.Cluster.Properties.ReverseProxyCertificate", + "reverse_proxy_certificate_common_names": "Description.Cluster.Properties.ReverseProxyCertificateCommonNames", + "tags": "Description.Cluster.Tags", + "title": "Description.Cluster.Name", + "type": "Description.Cluster.Type", + "upgrade_description": "Description.Cluster.Properties.UpgradeDescription", + "upgrade_mode": "Description.Cluster.Properties.UpgradeMode", + "vm_image": "Description.Cluster.Properties.VMImage", } func ListServiceFabricCluster(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -43900,37 +34576,36 @@ func ListServiceFabricCluster(ctx context.Context, d *plugin.QueryData, _ *plugi } var getServiceFabricClusterFilters = map[string]string{ - "add_on_features": "description.Cluster.Properties.AddOnFeatures", - "available_cluster_versions": "description.Cluster.Properties.AvailableClusterVersions", - "azure_active_directory": "description.Cluster.Properties.AzureActiveDirectory", - "certificate": "description.Cluster.Properties.Certificate", - "certificate_common_names": "description.Cluster.Properties.CertificateCommonNames", - "client_certificate_common_names": "description.Cluster.Properties.ClientCertificateCommonNames", - "client_certificate_thumbprints": "description.Cluster.Properties.ClientCertificateThumbprints", - "cluster_code_version": "description.Cluster.Properties.ClusterCodeVersion", - "cluster_endpoint": "description.Cluster.Properties.ClusterEndpoint", - "cluster_id": "description.Cluster.Properties.ClusterID", - "cluster_state": "description.Cluster.Properties.ClusterState", - "diagnostics_storage_account_config": "description.Cluster.Properties.DiagnosticsStorageAccountConfig", - "etag": "description.Cluster.Etag", - "event_store_service_enabled": "description.Cluster.Properties.EventStoreServiceEnabled", - "fabric_settings": "description.Cluster.Properties.FabricSettings", - "id": "description.Cluster.ID", - "og_account_id": "metadata.SourceID", - "management_endpoint": "description.Cluster.Properties.ManagementEndpoint", + "add_on_features": "Description.Cluster.Properties.AddOnFeatures", + "available_cluster_versions": "Description.Cluster.Properties.AvailableClusterVersions", + "azure_active_directory": "Description.Cluster.Properties.AzureActiveDirectory", + "certificate": "Description.Cluster.Properties.Certificate", + "certificate_common_names": "Description.Cluster.Properties.CertificateCommonNames", + "client_certificate_common_names": "Description.Cluster.Properties.ClientCertificateCommonNames", + "client_certificate_thumbprints": "Description.Cluster.Properties.ClientCertificateThumbprints", + "cluster_code_version": "Description.Cluster.Properties.ClusterCodeVersion", + "cluster_endpoint": "Description.Cluster.Properties.ClusterEndpoint", + "cluster_id": "Description.Cluster.Properties.ClusterID", + "cluster_state": "Description.Cluster.Properties.ClusterState", + "diagnostics_storage_account_config": "Description.Cluster.Properties.DiagnosticsStorageAccountConfig", + "etag": "Description.Cluster.Etag", + "event_store_service_enabled": "Description.Cluster.Properties.EventStoreServiceEnabled", + "fabric_settings": "Description.Cluster.Properties.FabricSettings", + "id": "Description.Cluster.ID", + "management_endpoint": "Description.Cluster.Properties.ManagementEndpoint", "name": "description.Cluster.name", - "node_types": "description.Cluster.Properties.NodeTypes", - "provisioning_state": "description.Cluster.Properties.ProvisioningState", - "reliability_level": "description.Cluster.Properties.ReliabilityLevel", + "node_types": "Description.Cluster.Properties.NodeTypes", + "provisioning_state": "Description.Cluster.Properties.ProvisioningState", + "reliability_level": "Description.Cluster.Properties.ReliabilityLevel", "resource_group": "description.ResourceGroup", - "reverse_proxy_certificate": "description.Cluster.Properties.ReverseProxyCertificate", - "reverse_proxy_certificate_common_names": "description.Cluster.Properties.ReverseProxyCertificateCommonNames", - "tags": "description.Cluster.Tags", - "title": "description.Cluster.Name", - "type": "description.Cluster.Type", - "upgrade_description": "description.Cluster.Properties.UpgradeDescription", - "upgrade_mode": "description.Cluster.Properties.UpgradeMode", - "vm_image": "description.Cluster.Properties.VMImage", + "reverse_proxy_certificate": "Description.Cluster.Properties.ReverseProxyCertificate", + "reverse_proxy_certificate_common_names": "Description.Cluster.Properties.ReverseProxyCertificateCommonNames", + "tags": "Description.Cluster.Tags", + "title": "Description.Cluster.Name", + "type": "Description.Cluster.Type", + "upgrade_description": "Description.Cluster.Properties.UpgradeDescription", + "upgrade_mode": "Description.Cluster.Properties.UpgradeMode", + "vm_image": "Description.Cluster.Properties.VMImage", } func GetServiceFabricCluster(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -43991,72 +34666,14 @@ func GetServiceFabricCluster(ctx context.Context, d *plugin.QueryData, _ *plugin // ========================== START: ServicebusNamespace ============================= type ServicebusNamespace struct { - Description azure.ServicebusNamespaceDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *ServicebusNamespace) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.ServicebusNamespaceDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.ServicebusNamespaceDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type ServicebusNamespaceHit struct { @@ -44127,27 +34744,26 @@ func (p ServicebusNamespacePaginator) NextPage(ctx context.Context) ([]Servicebu } var listServicebusNamespaceFilters = map[string]string{ - "authorization_rules": "description.AuthorizationRules", - "diagnostic_settings": "description.DiagnosticSettingsResources", - "disable_local_auth": "description.SBNamespace.Properties.DisableLocalAuth", - "encryption": "description.SBNamespace.Properties.Encryption", - "id": "description.SBNamespace.ID", - "og_account_id": "metadata.SourceID", - "metric_id": "description.SBNamespace.Properties.MetricID", - "name": "description.SBNamespace.Name", - "network_rule_set": "description.NetworkRuleSet", - "private_endpoint_connections": "description.SBNamespace.Properties.PrivateEndpointConnections", - "provisioning_state": "description.SBNamespace.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "servicebus_endpoint": "description.SBNamespace.Properties.ServiceBusEndpoint", - "sku_capacity": "description.SBNamespace.SKU.Capacity", - "sku_name": "description.SBNamespace.SKU.Name", - "sku_tier": "description.SBNamespace.SKU.Tier", - "status": "description.SBNamespace.Properties.Status", - "tags": "description.SBNamespace.Tags", - "title": "description.SBNamespace.Name", - "type": "description.SBNamespace.Type", - "zone_redundant": "description.SBNamespace.Properties.ZoneRedundant", + "authorization_rules": "Description.AuthorizationRules", + "diagnostic_settings": "Description.DiagnosticSettingsResources", + "disable_local_auth": "Description.SBNamespace.Properties.DisableLocalAuth", + "encryption": "Description.SBNamespace.Properties.Encryption", + "id": "Description.SBNamespace.ID", + "metric_id": "Description.SBNamespace.Properties.MetricID", + "name": "Description.SBNamespace.Name", + "network_rule_set": "Description.NetworkRuleSet", + "private_endpoint_connections": "Description.SBNamespace.Properties.PrivateEndpointConnections", + "provisioning_state": "Description.SBNamespace.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "servicebus_endpoint": "Description.SBNamespace.Properties.ServiceBusEndpoint", + "sku_capacity": "Description.SBNamespace.SKU.Capacity", + "sku_name": "Description.SBNamespace.SKU.Name", + "sku_tier": "Description.SBNamespace.SKU.Tier", + "status": "Description.SBNamespace.Properties.Status", + "tags": "Description.SBNamespace.Tags", + "title": "Description.SBNamespace.Name", + "type": "Description.SBNamespace.Type", + "zone_redundant": "Description.SBNamespace.Properties.ZoneRedundant", } func ListServicebusNamespace(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -44211,27 +34827,26 @@ func ListServicebusNamespace(ctx context.Context, d *plugin.QueryData, _ *plugin } var getServicebusNamespaceFilters = map[string]string{ - "authorization_rules": "description.AuthorizationRules", - "diagnostic_settings": "description.DiagnosticSettingsResources", - "disable_local_auth": "description.SBNamespace.Properties.DisableLocalAuth", - "encryption": "description.SBNamespace.Properties.Encryption", - "id": "description.SBNamespace.ID", - "og_account_id": "metadata.SourceID", - "metric_id": "description.SBNamespace.Properties.MetricID", + "authorization_rules": "Description.AuthorizationRules", + "diagnostic_settings": "Description.DiagnosticSettingsResources", + "disable_local_auth": "Description.SBNamespace.Properties.DisableLocalAuth", + "encryption": "Description.SBNamespace.Properties.Encryption", + "id": "Description.SBNamespace.ID", + "metric_id": "Description.SBNamespace.Properties.MetricID", "name": "description.SBNamespace.name", - "network_rule_set": "description.NetworkRuleSet", - "private_endpoint_connections": "description.SBNamespace.Properties.PrivateEndpointConnections", - "provisioning_state": "description.SBNamespace.Properties.ProvisioningState", + "network_rule_set": "Description.NetworkRuleSet", + "private_endpoint_connections": "Description.SBNamespace.Properties.PrivateEndpointConnections", + "provisioning_state": "Description.SBNamespace.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", - "servicebus_endpoint": "description.SBNamespace.Properties.ServiceBusEndpoint", - "sku_capacity": "description.SBNamespace.SKU.Capacity", - "sku_name": "description.SBNamespace.SKU.Name", - "sku_tier": "description.SBNamespace.SKU.Tier", - "status": "description.SBNamespace.Properties.Status", - "tags": "description.SBNamespace.Tags", - "title": "description.SBNamespace.Name", - "type": "description.SBNamespace.Type", - "zone_redundant": "description.SBNamespace.Properties.ZoneRedundant", + "servicebus_endpoint": "Description.SBNamespace.Properties.ServiceBusEndpoint", + "sku_capacity": "Description.SBNamespace.SKU.Capacity", + "sku_name": "Description.SBNamespace.SKU.Name", + "sku_tier": "Description.SBNamespace.SKU.Tier", + "status": "Description.SBNamespace.Properties.Status", + "tags": "Description.SBNamespace.Tags", + "title": "Description.SBNamespace.Name", + "type": "Description.SBNamespace.Type", + "zone_redundant": "Description.SBNamespace.Properties.ZoneRedundant", } func GetServicebusNamespace(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -44292,72 +34907,14 @@ func GetServicebusNamespace(ctx context.Context, d *plugin.QueryData, _ *plugin. // ========================== START: SignalrService ============================= type SignalrService struct { - Description azure.SignalrServiceDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *SignalrService) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.SignalrServiceDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.SignalrServiceDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type SignalrServiceHit struct { @@ -44428,27 +34985,26 @@ func (p SignalrServicePaginator) NextPage(ctx context.Context) ([]SignalrService } var listSignalrServiceFilters = map[string]string{ - "cors": "description.ResourceInfo.Properties.Cors", - "diagnostic_settings": "description.DiagnosticSettingsResources", - "external_ip": "description.ResourceInfo.Properties.ExternalIP", - "features": "description.ResourceInfo.Properties.Features", - "host_name": "description.ResourceInfo.Properties.HostName", - "host_name_prefix": "description.ResourceInfo.Properties.HostNamePrefix", - "id": "description.ResourceInfo.ID", - "og_account_id": "metadata.SourceID", - "kind": "description.ResourceInfo.Kind", - "name": "description.ResourceInfo.Name", - "network_acls": "description.ResourceInfo.Properties.NetworkACLs", - "provisioning_state": "description.ResourceInfo.Properties.ProvisioningState", - "public_port": "description.ResourceInfo.Properties.PublicPort", - "resource_group": "description.ResourceGroup", - "server_port": "description.ResourceInfo.Properties.ServerPort", - "sku": "description.ResourceInfo.SKU", - "tags": "description.ResourceInfo.Tags", - "title": "description.ResourceInfo.Name", - "type": "description.ResourceInfo.Type", - "upstream": "description.ResourceInfo.Properties.Upstream", - "version": "description.ResourceInfo.Properties.Version", + "cors": "Description.ResourceInfo.Properties.Cors", + "diagnostic_settings": "Description.DiagnosticSettingsResources", + "external_ip": "Description.ResourceInfo.Properties.ExternalIP", + "features": "Description.ResourceInfo.Properties.Features", + "host_name": "Description.ResourceInfo.Properties.HostName", + "host_name_prefix": "Description.ResourceInfo.Properties.HostNamePrefix", + "id": "Description.ResourceInfo.ID", + "kind": "Description.ResourceInfo.Kind", + "name": "Description.ResourceInfo.Name", + "network_acls": "Description.ResourceInfo.Properties.NetworkACLs", + "provisioning_state": "Description.ResourceInfo.Properties.ProvisioningState", + "public_port": "Description.ResourceInfo.Properties.PublicPort", + "resource_group": "Description.ResourceGroup", + "server_port": "Description.ResourceInfo.Properties.ServerPort", + "sku": "Description.ResourceInfo.SKU", + "tags": "Description.ResourceInfo.Tags", + "title": "Description.ResourceInfo.Name", + "type": "Description.ResourceInfo.Type", + "upstream": "Description.ResourceInfo.Properties.Upstream", + "version": "Description.ResourceInfo.Properties.Version", } func ListSignalrService(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -44512,27 +35068,26 @@ func ListSignalrService(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr } var getSignalrServiceFilters = map[string]string{ - "cors": "description.ResourceInfo.Properties.Cors", - "diagnostic_settings": "description.DiagnosticSettingsResources", - "external_ip": "description.ResourceInfo.Properties.ExternalIP", - "features": "description.ResourceInfo.Properties.Features", - "host_name": "description.ResourceInfo.Properties.HostName", - "host_name_prefix": "description.ResourceInfo.Properties.HostNamePrefix", - "id": "description.ResourceInfo.ID", - "og_account_id": "metadata.SourceID", - "kind": "description.ResourceInfo.Kind", + "cors": "Description.ResourceInfo.Properties.Cors", + "diagnostic_settings": "Description.DiagnosticSettingsResources", + "external_ip": "Description.ResourceInfo.Properties.ExternalIP", + "features": "Description.ResourceInfo.Properties.Features", + "host_name": "Description.ResourceInfo.Properties.HostName", + "host_name_prefix": "Description.ResourceInfo.Properties.HostNamePrefix", + "id": "Description.ResourceInfo.ID", + "kind": "Description.ResourceInfo.Kind", "name": "description.ResourceType.name", - "network_acls": "description.ResourceInfo.Properties.NetworkACLs", - "provisioning_state": "description.ResourceInfo.Properties.ProvisioningState", - "public_port": "description.ResourceInfo.Properties.PublicPort", + "network_acls": "Description.ResourceInfo.Properties.NetworkACLs", + "provisioning_state": "Description.ResourceInfo.Properties.ProvisioningState", + "public_port": "Description.ResourceInfo.Properties.PublicPort", "resource_group": "description.ResourceGroup", - "server_port": "description.ResourceInfo.Properties.ServerPort", - "sku": "description.ResourceInfo.SKU", - "tags": "description.ResourceInfo.Tags", - "title": "description.ResourceInfo.Name", - "type": "description.ResourceInfo.Type", - "upstream": "description.ResourceInfo.Properties.Upstream", - "version": "description.ResourceInfo.Properties.Version", + "server_port": "Description.ResourceInfo.Properties.ServerPort", + "sku": "Description.ResourceInfo.SKU", + "tags": "Description.ResourceInfo.Tags", + "title": "Description.ResourceInfo.Name", + "type": "Description.ResourceInfo.Type", + "upstream": "Description.ResourceInfo.Properties.Upstream", + "version": "Description.ResourceInfo.Properties.Version", } func GetSignalrService(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -44593,72 +35148,14 @@ func GetSignalrService(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra // ========================== START: SpringCloudService ============================= type SpringCloudService struct { - Description azure.SpringCloudServiceDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *SpringCloudService) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.SpringCloudServiceDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.SpringCloudServiceDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type SpringCloudServiceHit struct { @@ -44729,16 +35226,15 @@ func (p SpringCloudServicePaginator) NextPage(ctx context.Context) ([]SpringClou } var listSpringCloudServiceFilters = map[string]string{ - "diagnostic_settings": "description.DiagnosticSettingsResource", - "id": "description.App.ID", - "og_account_id": "metadata.SourceID", - "name": "description.App.Name", - "provisioning_state": "description.App.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "tags": "description.App.Tags", - "title": "description.App.Name", - "type": "description.App.Properties.AppType", - "version": "description.App.Properties.SpringBootVersion", + "diagnostic_settings": "Description.DiagnosticSettingsResource", + "id": "Description.App.ID", + "name": "Description.App.Name", + "provisioning_state": "Description.App.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "tags": "Description.App.Tags", + "title": "Description.App.Name", + "type": "Description.App.Properties.AppType", + "version": "Description.App.Properties.SpringBootVersion", } func ListSpringCloudService(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -44802,16 +35298,15 @@ func ListSpringCloudService(ctx context.Context, d *plugin.QueryData, _ *plugin. } var getSpringCloudServiceFilters = map[string]string{ - "diagnostic_settings": "description.DiagnosticSettingsResource", - "id": "description.App.ID", - "og_account_id": "metadata.SourceID", + "diagnostic_settings": "Description.DiagnosticSettingsResource", + "id": "Description.App.ID", "name": "description.ServiceResource.name", - "provisioning_state": "description.App.Properties.ProvisioningState", + "provisioning_state": "Description.App.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", - "tags": "description.App.Tags", - "title": "description.App.Name", - "type": "description.App.Properties.AppType", - "version": "description.App.Properties.SpringBootVersion", + "tags": "Description.App.Tags", + "title": "Description.App.Name", + "type": "Description.App.Properties.AppType", + "version": "Description.App.Properties.SpringBootVersion", } func GetSpringCloudService(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -44872,72 +35367,14 @@ func GetSpringCloudService(ctx context.Context, d *plugin.QueryData, _ *plugin.H // ========================== START: StreamAnalyticsJob ============================= type StreamAnalyticsJob struct { - Description azure.StreamAnalyticsJobDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *StreamAnalyticsJob) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.StreamAnalyticsJobDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.StreamAnalyticsJobDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type StreamAnalyticsJobHit struct { @@ -45008,30 +35445,29 @@ func (p StreamAnalyticsJobPaginator) NextPage(ctx context.Context) ([]StreamAnal } var listStreamAnalyticsJobFilters = map[string]string{ - "compatibility_level": "description.StreamingJob.Properties.CompatibilityLevel", - "data_locale": "description.StreamingJob.Properties.DataLocale", - "diagnostic_settings": "description.DiagnosticSettingsResources", - "etag": "description.StreamingJob.Properties.Etag", - "events_late_arrival_max_delay_in_seconds": "description.StreamingJob.Properties.EventsLateArrivalMaxDelayInSeconds", - "events_out_of_order_max_delay_in_seconds": "description.StreamingJob.Properties.EventsOutOfOrderMaxDelayInSeconds", - "events_out_of_order_policy": "description.StreamingJob.Properties.EventsOutOfOrderPolicy", - "functions": "description.StreamingJob.Properties.Functions", - "id": "description.StreamingJob.ID", - "inputs": "description.StreamingJob.Properties.Inputs", - "job_id": "description.StreamingJob.Properties.JobID", - "job_state": "description.StreamingJob.Properties.JobState", - "og_account_id": "metadata.SourceID", - "name": "description.StreamingJob.Name", - "output_error_policy": "description.StreamingJob.Properties.OutputErrorPolicy", - "output_start_mode": "description.StreamingJob.Properties.OutputStartMode", - "outputs": "description.StreamingJob.Properties.Outputs", - "provisioning_state": "description.StreamingJob.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "sku_name": "description.StreamingJob.Properties.SKU.Name", - "tags": "description.StreamingJob.Tags", - "title": "description.StreamingJob.Name", - "transformation": "description.StreamingJob.Properties.Transformation", - "type": "description.StreamingJob.Type", + "compatibility_level": "Description.StreamingJob.Properties.CompatibilityLevel", + "data_locale": "Description.StreamingJob.Properties.DataLocale", + "diagnostic_settings": "Description.DiagnosticSettingsResources", + "etag": "Description.StreamingJob.Properties.Etag", + "events_late_arrival_max_delay_in_seconds": "Description.StreamingJob.Properties.EventsLateArrivalMaxDelayInSeconds", + "events_out_of_order_max_delay_in_seconds": "Description.StreamingJob.Properties.EventsOutOfOrderMaxDelayInSeconds", + "events_out_of_order_policy": "Description.StreamingJob.Properties.EventsOutOfOrderPolicy", + "functions": "Description.StreamingJob.Properties.Functions", + "id": "Description.StreamingJob.ID", + "inputs": "Description.StreamingJob.Properties.Inputs", + "job_id": "Description.StreamingJob.Properties.JobID", + "job_state": "Description.StreamingJob.Properties.JobState", + "name": "Description.StreamingJob.Name", + "output_error_policy": "Description.StreamingJob.Properties.OutputErrorPolicy", + "output_start_mode": "Description.StreamingJob.Properties.OutputStartMode", + "outputs": "Description.StreamingJob.Properties.Outputs", + "provisioning_state": "Description.StreamingJob.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "sku_name": "Description.StreamingJob.Properties.SKU.Name", + "tags": "Description.StreamingJob.Tags", + "title": "Description.StreamingJob.Name", + "transformation": "Description.StreamingJob.Properties.Transformation", + "type": "Description.StreamingJob.Type", } func ListStreamAnalyticsJob(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -45095,30 +35531,29 @@ func ListStreamAnalyticsJob(ctx context.Context, d *plugin.QueryData, _ *plugin. } var getStreamAnalyticsJobFilters = map[string]string{ - "compatibility_level": "description.StreamingJob.Properties.CompatibilityLevel", - "data_locale": "description.StreamingJob.Properties.DataLocale", - "diagnostic_settings": "description.DiagnosticSettingsResources", - "etag": "description.StreamingJob.Properties.Etag", - "events_late_arrival_max_delay_in_seconds": "description.StreamingJob.Properties.EventsLateArrivalMaxDelayInSeconds", - "events_out_of_order_max_delay_in_seconds": "description.StreamingJob.Properties.EventsOutOfOrderMaxDelayInSeconds", - "events_out_of_order_policy": "description.StreamingJob.Properties.EventsOutOfOrderPolicy", - "functions": "description.StreamingJob.Properties.Functions", - "id": "description.StreamingJob.ID", - "inputs": "description.StreamingJob.Properties.Inputs", - "job_id": "description.StreamingJob.Properties.JobID", - "job_state": "description.StreamingJob.Properties.JobState", - "og_account_id": "metadata.SourceID", + "compatibility_level": "Description.StreamingJob.Properties.CompatibilityLevel", + "data_locale": "Description.StreamingJob.Properties.DataLocale", + "diagnostic_settings": "Description.DiagnosticSettingsResources", + "etag": "Description.StreamingJob.Properties.Etag", + "events_late_arrival_max_delay_in_seconds": "Description.StreamingJob.Properties.EventsLateArrivalMaxDelayInSeconds", + "events_out_of_order_max_delay_in_seconds": "Description.StreamingJob.Properties.EventsOutOfOrderMaxDelayInSeconds", + "events_out_of_order_policy": "Description.StreamingJob.Properties.EventsOutOfOrderPolicy", + "functions": "Description.StreamingJob.Properties.Functions", + "id": "Description.StreamingJob.ID", + "inputs": "Description.StreamingJob.Properties.Inputs", + "job_id": "Description.StreamingJob.Properties.JobID", + "job_state": "Description.StreamingJob.Properties.JobState", "name": "description.StreamingJob.name", - "output_error_policy": "description.StreamingJob.Properties.OutputErrorPolicy", - "output_start_mode": "description.StreamingJob.Properties.OutputStartMode", - "outputs": "description.StreamingJob.Properties.Outputs", - "provisioning_state": "description.StreamingJob.Properties.ProvisioningState", + "output_error_policy": "Description.StreamingJob.Properties.OutputErrorPolicy", + "output_start_mode": "Description.StreamingJob.Properties.OutputStartMode", + "outputs": "Description.StreamingJob.Properties.Outputs", + "provisioning_state": "Description.StreamingJob.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", - "sku_name": "description.StreamingJob.Properties.SKU.Name", - "tags": "description.StreamingJob.Tags", - "title": "description.StreamingJob.Name", - "transformation": "description.StreamingJob.Properties.Transformation", - "type": "description.StreamingJob.Type", + "sku_name": "Description.StreamingJob.Properties.SKU.Name", + "tags": "Description.StreamingJob.Tags", + "title": "Description.StreamingJob.Name", + "transformation": "Description.StreamingJob.Properties.Transformation", + "type": "Description.StreamingJob.Type", } func GetStreamAnalyticsJob(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -45179,72 +35614,14 @@ func GetStreamAnalyticsJob(ctx context.Context, d *plugin.QueryData, _ *plugin.H // ========================== START: StreamAnalyticsCluster ============================= type StreamAnalyticsCluster struct { - Description azure.StreamAnalyticsClusterDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *StreamAnalyticsCluster) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.StreamAnalyticsClusterDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.StreamAnalyticsClusterDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type StreamAnalyticsClusterHit struct { @@ -45315,11 +35692,10 @@ func (p StreamAnalyticsClusterPaginator) NextPage(ctx context.Context) ([]Stream } var listStreamAnalyticsClusterFilters = map[string]string{ - "id": "description.Cluster.ID", - "og_account_id": "metadata.SourceID", - "name": "description.StreamingJob.SKU.Name", - "tags": "description.StreamingJob.Tags", - "title": "description.StreamingJob.SKU.Name", + "id": "Description.Cluster.ID", + "name": "Description.StreamingJob.SKU.Name", + "tags": "Description.StreamingJob.Tags", + "title": "Description.StreamingJob.SKU.Name", } func ListStreamAnalyticsCluster(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -45383,11 +35759,10 @@ func ListStreamAnalyticsCluster(ctx context.Context, d *plugin.QueryData, _ *plu } var getStreamAnalyticsClusterFilters = map[string]string{ - "id": "description.Cluster.ID", - "og_account_id": "metadata.SourceID", - "name": "description.StreamingJob.SKU.Name", - "tags": "description.StreamingJob.Tags", - "title": "description.StreamingJob.SKU.Name", + "id": "Description.Cluster.ID", + "name": "Description.StreamingJob.SKU.Name", + "tags": "Description.StreamingJob.Tags", + "title": "Description.StreamingJob.SKU.Name", } func GetStreamAnalyticsCluster(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -45448,72 +35823,14 @@ func GetStreamAnalyticsCluster(ctx context.Context, d *plugin.QueryData, _ *plug // ========================== START: VirtualMachineImagesImageTemplates ============================= type VirtualMachineImagesImageTemplates struct { - Description azure.VirtualMachineImagesImageTemplatesDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *VirtualMachineImagesImageTemplates) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.VirtualMachineImagesImageTemplatesDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.VirtualMachineImagesImageTemplatesDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type VirtualMachineImagesImageTemplatesHit struct { @@ -45584,11 +35901,10 @@ func (p VirtualMachineImagesImageTemplatesPaginator) NextPage(ctx context.Contex } var listVirtualMachineImagesImageTemplatesFilters = map[string]string{ - "id": "description.ImageTemplates.ID", - "og_account_id": "metadata.SourceID", - "name": "description.ImageTemplate.Name", - "tags": "description.ImageTemplate.Tags", - "title": "description.ImageTemplate.Name", + "id": "Description.ImageTemplates.ID", + "name": "Description.ImageTemplate.Name", + "tags": "Description.ImageTemplate.Tags", + "title": "Description.ImageTemplate.Name", } func ListVirtualMachineImagesImageTemplates(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -45652,11 +35968,10 @@ func ListVirtualMachineImagesImageTemplates(ctx context.Context, d *plugin.Query } var getVirtualMachineImagesImageTemplatesFilters = map[string]string{ - "id": "description.ImageTemplates.ID", - "og_account_id": "metadata.SourceID", - "name": "description.ImageTemplate.Name", - "tags": "description.ImageTemplate.Tags", - "title": "description.ImageTemplate.Name", + "id": "Description.ImageTemplates.ID", + "name": "Description.ImageTemplate.Name", + "tags": "Description.ImageTemplate.Tags", + "title": "Description.ImageTemplate.Name", } func GetVirtualMachineImagesImageTemplates(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -45717,72 +36032,14 @@ func GetVirtualMachineImagesImageTemplates(ctx context.Context, d *plugin.QueryD // ========================== START: OperationalInsightsWorkspaces ============================= type OperationalInsightsWorkspaces struct { - Description azure.OperationalInsightsWorkspacesDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *OperationalInsightsWorkspaces) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.OperationalInsightsWorkspacesDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.OperationalInsightsWorkspacesDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type OperationalInsightsWorkspacesHit struct { @@ -45853,28 +36110,27 @@ func (p OperationalInsightsWorkspacesPaginator) NextPage(ctx context.Context) ([ } var listOperationalInsightsWorkspacesFilters = map[string]string{ - "cluster_resource_id": "description.Workspace.Properties.Features.ClusterResourceID", + "cluster_resource_id": "Description.Workspace.Properties.Features.ClusterResourceID", "customer_id": "WDescription.Workspace.Properties.CustomerID", - "disable_local_auth": "description.Workspace..Properties.Features.DisableLocalAuth", + "disable_local_auth": "Description.Workspace..Properties.Features.DisableLocalAuth", "enable_data_export": "WDescription.Workspace.Properties.Features.EnableDataExport", "enable_log_access_using_only_resource_permissions": "WDescription.Workspace.Properties.Features.EnableLogAccessUsingOnlyResourcePermissions", - "force_cmk_for_query": "description.Workspace.Properties.ForceCmkForQuery", - "id": "description.Workspaces.ID", - "immediate_purge_data_on_30_days": "description.Workspace.Properties.Features.ImmediatePurgeDataOn30Days", - "og_account_id": "metadata.SourceID", - "location": "description.Workspace.Location", - "name": "description.Workspace.Name", - "private_link_scoped_resources": "description.Workspace.Properties.PrivateLinkScopedResources", - "provisioning_state": "description.Workspace.Properties.ProvisioningState", - "public_network_access_for_ingestion": "description.Workspace.Properties.PublicNetworkAccessForIngestion", - "public_network_access_for_query": "description.Workspace.Properties.PublicNetworkAccessForQuery", - "resource_group": "description.ResourceGroup", - "retention_in_days": "description.Workspace.Properties.RetentionInDays", - "sku": "description.Workspace.Properties.SKU", - "tags": "description.Workspace.Tags", - "title": "description.Workspace.Name", - "type": "description.Workspace.Type", - "workspace_capping": "description.Workspace.Properties.WorkspaceCapping", + "force_cmk_for_query": "Description.Workspace.Properties.ForceCmkForQuery", + "id": "Description.Workspaces.ID", + "immediate_purge_data_on_30_days": "Description.Workspace.Properties.Features.ImmediatePurgeDataOn30Days", + "location": "Description.Workspace.Location", + "name": "Description.Workspace.Name", + "private_link_scoped_resources": "Description.Workspace.Properties.PrivateLinkScopedResources", + "provisioning_state": "Description.Workspace.Properties.ProvisioningState", + "public_network_access_for_ingestion": "Description.Workspace.Properties.PublicNetworkAccessForIngestion", + "public_network_access_for_query": "Description.Workspace.Properties.PublicNetworkAccessForQuery", + "resource_group": "Description.ResourceGroup", + "retention_in_days": "Description.Workspace.Properties.RetentionInDays", + "sku": "Description.Workspace.Properties.SKU", + "tags": "Description.Workspace.Tags", + "title": "Description.Workspace.Name", + "type": "Description.Workspace.Type", + "workspace_capping": "Description.Workspace.Properties.WorkspaceCapping", } func ListOperationalInsightsWorkspaces(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -45938,28 +36194,27 @@ func ListOperationalInsightsWorkspaces(ctx context.Context, d *plugin.QueryData, } var getOperationalInsightsWorkspacesFilters = map[string]string{ - "cluster_resource_id": "description.Workspace.Properties.Features.ClusterResourceID", + "cluster_resource_id": "Description.Workspace.Properties.Features.ClusterResourceID", "customer_id": "WDescription.Workspace.Properties.CustomerID", - "disable_local_auth": "description.Workspace..Properties.Features.DisableLocalAuth", + "disable_local_auth": "Description.Workspace..Properties.Features.DisableLocalAuth", "enable_data_export": "WDescription.Workspace.Properties.Features.EnableDataExport", "enable_log_access_using_only_resource_permissions": "WDescription.Workspace.Properties.Features.EnableLogAccessUsingOnlyResourcePermissions", - "force_cmk_for_query": "description.Workspace.Properties.ForceCmkForQuery", - "id": "description.Workspaces.ID", - "immediate_purge_data_on_30_days": "description.Workspace.Properties.Features.ImmediatePurgeDataOn30Days", - "og_account_id": "metadata.SourceID", - "location": "description.Workspace.Location", - "name": "description.Workspace.Name", - "private_link_scoped_resources": "description.Workspace.Properties.PrivateLinkScopedResources", - "provisioning_state": "description.Workspace.Properties.ProvisioningState", - "public_network_access_for_ingestion": "description.Workspace.Properties.PublicNetworkAccessForIngestion", - "public_network_access_for_query": "description.Workspace.Properties.PublicNetworkAccessForQuery", - "resource_group": "description.ResourceGroup", - "retention_in_days": "description.Workspace.Properties.RetentionInDays", - "sku": "description.Workspace.Properties.SKU", - "tags": "description.Workspace.Tags", - "title": "description.Workspace.Name", - "type": "description.Workspace.Type", - "workspace_capping": "description.Workspace.Properties.WorkspaceCapping", + "force_cmk_for_query": "Description.Workspace.Properties.ForceCmkForQuery", + "id": "Description.Workspaces.ID", + "immediate_purge_data_on_30_days": "Description.Workspace.Properties.Features.ImmediatePurgeDataOn30Days", + "location": "Description.Workspace.Location", + "name": "Description.Workspace.Name", + "private_link_scoped_resources": "Description.Workspace.Properties.PrivateLinkScopedResources", + "provisioning_state": "Description.Workspace.Properties.ProvisioningState", + "public_network_access_for_ingestion": "Description.Workspace.Properties.PublicNetworkAccessForIngestion", + "public_network_access_for_query": "Description.Workspace.Properties.PublicNetworkAccessForQuery", + "resource_group": "Description.ResourceGroup", + "retention_in_days": "Description.Workspace.Properties.RetentionInDays", + "sku": "Description.Workspace.Properties.SKU", + "tags": "Description.Workspace.Tags", + "title": "Description.Workspace.Name", + "type": "Description.Workspace.Type", + "workspace_capping": "Description.Workspace.Properties.WorkspaceCapping", } func GetOperationalInsightsWorkspaces(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -46020,72 +36275,14 @@ func GetOperationalInsightsWorkspaces(ctx context.Context, d *plugin.QueryData, // ========================== START: TimeSeriesInsightsEnvironments ============================= type TimeSeriesInsightsEnvironments struct { - Description azure.TimeSeriesInsightsEnvironmentsDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *TimeSeriesInsightsEnvironments) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.TimeSeriesInsightsEnvironmentsDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.TimeSeriesInsightsEnvironmentsDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type TimeSeriesInsightsEnvironmentsHit struct { @@ -46156,11 +36353,10 @@ func (p TimeSeriesInsightsEnvironmentsPaginator) NextPage(ctx context.Context) ( } var listTimeSeriesInsightsEnvironmentsFilters = map[string]string{ - "id": "description.Environments.ID", - "og_account_id": "metadata.SourceID", - "name": "description.Environment.Name", - "tags": "description.Environment.Tags", - "title": "description.Environment.Name", + "id": "Description.Environments.ID", + "name": "Description.Environment.Name", + "tags": "Description.Environment.Tags", + "title": "Description.Environment.Name", } func ListTimeSeriesInsightsEnvironments(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -46224,11 +36420,10 @@ func ListTimeSeriesInsightsEnvironments(ctx context.Context, d *plugin.QueryData } var getTimeSeriesInsightsEnvironmentsFilters = map[string]string{ - "id": "description.Environments.ID", - "og_account_id": "metadata.SourceID", - "name": "description.Environment.Name", - "tags": "description.Environment.Tags", - "title": "description.Environment.Name", + "id": "Description.Environments.ID", + "name": "Description.Environment.Name", + "tags": "Description.Environment.Tags", + "title": "Description.Environment.Name", } func GetTimeSeriesInsightsEnvironments(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -46289,72 +36484,14 @@ func GetTimeSeriesInsightsEnvironments(ctx context.Context, d *plugin.QueryData, // ========================== START: SynapseWorkspace ============================= type SynapseWorkspace struct { - Description azure.SynapseWorkspaceDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *SynapseWorkspace) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.SynapseWorkspaceDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.SynapseWorkspaceDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type SynapseWorkspaceHit struct { @@ -46425,31 +36562,30 @@ func (p SynapseWorkspacePaginator) NextPage(ctx context.Context) ([]SynapseWorks } var listSynapseWorkspaceFilters = map[string]string{ - "adla_resource_id": "description.Workspace.Properties.AdlaResourceID", - "connectivity_endpoints": "description.Workspace.Properties.ConnectivityEndpoints", - "default_data_lake_storage": "description.Workspace.Properties.DefaultDataLakeStorage", - "diagnostic_settings": "description.DiagnosticSettingsResources", - "extra_properties": "description.Workspace.Properties.ExtraProperties", - "id": "description.Workspace.ID", - "identity": "description.Workspace.Identity", - "og_account_id": "metadata.SourceID", - "managed_resource_group_name": "description.Workspace.Properties.ManagedResourceGroupName", - "managed_virtual_network": "description.Workspace.Properties.ManagedVirtualNetwork", - "managed_virtual_network_settings": "description.Workspace.Properties.ManagedVirtualNetworkSettings", - "name": "description.Workspace.Name", - "provisioning_state": "description.Workspace.Properties.ProvisioningState", - "public_network_access": "description.Workspace.Properties.PublicNetworkAccess", - "purview_configuration": "description.Workspace.Properties.PurviewConfiguration", - "resource_group": "description.ResourceGroup", - "sql_administrator_login": "description.Workspace.Properties.SQLAdministratorLogin", - "sql_administrator_login_password": "description.Workspace.Properties.SQLAdministratorLoginPassword", - "tags": "description.Workspace.Tags", - "title": "description.Workspace.Name", - "type": "description.Workspace.Type", - "virtual_network_profile": "description.Workspace.Properties.VirtualNetworkProfile", - "workspace_managed_sql_server_vulnerability_assessments": "description.ServerVulnerabilityAssessments", - "workspace_repository_configuration": "description.Workspace.Properties.WorkspaceRepositoryConfiguration", - "workspace_uid": "description.Workspace.Properties.WorkspaceUID", + "adla_resource_id": "Description.Workspace.Properties.AdlaResourceID", + "connectivity_endpoints": "Description.Workspace.Properties.ConnectivityEndpoints", + "default_data_lake_storage": "Description.Workspace.Properties.DefaultDataLakeStorage", + "diagnostic_settings": "Description.DiagnosticSettingsResources", + "extra_properties": "Description.Workspace.Properties.ExtraProperties", + "id": "Description.Workspace.ID", + "identity": "Description.Workspace.Identity", + "managed_resource_group_name": "Description.Workspace.Properties.ManagedResourceGroupName", + "managed_virtual_network": "Description.Workspace.Properties.ManagedVirtualNetwork", + "managed_virtual_network_settings": "Description.Workspace.Properties.ManagedVirtualNetworkSettings", + "name": "Description.Workspace.Name", + "provisioning_state": "Description.Workspace.Properties.ProvisioningState", + "public_network_access": "Description.Workspace.Properties.PublicNetworkAccess", + "purview_configuration": "Description.Workspace.Properties.PurviewConfiguration", + "resource_group": "Description.ResourceGroup", + "sql_administrator_login": "Description.Workspace.Properties.SQLAdministratorLogin", + "sql_administrator_login_password": "Description.Workspace.Properties.SQLAdministratorLoginPassword", + "tags": "Description.Workspace.Tags", + "title": "Description.Workspace.Name", + "type": "Description.Workspace.Type", + "virtual_network_profile": "Description.Workspace.Properties.VirtualNetworkProfile", + "workspace_managed_sql_server_vulnerability_assessments": "Description.ServerVulnerabilityAssessments", + "workspace_repository_configuration": "Description.Workspace.Properties.WorkspaceRepositoryConfiguration", + "workspace_uid": "Description.Workspace.Properties.WorkspaceUID", } func ListSynapseWorkspace(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -46513,31 +36649,30 @@ func ListSynapseWorkspace(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy } var getSynapseWorkspaceFilters = map[string]string{ - "adla_resource_id": "description.Workspace.Properties.AdlaResourceID", - "connectivity_endpoints": "description.Workspace.Properties.ConnectivityEndpoints", - "default_data_lake_storage": "description.Workspace.Properties.DefaultDataLakeStorage", - "diagnostic_settings": "description.DiagnosticSettingsResources", - "extra_properties": "description.Workspace.Properties.ExtraProperties", - "id": "description.Workspace.ID", - "identity": "description.Workspace.Identity", - "og_account_id": "metadata.SourceID", - "managed_resource_group_name": "description.Workspace.Properties.ManagedResourceGroupName", - "managed_virtual_network": "description.Workspace.Properties.ManagedVirtualNetwork", - "managed_virtual_network_settings": "description.Workspace.Properties.ManagedVirtualNetworkSettings", + "adla_resource_id": "Description.Workspace.Properties.AdlaResourceID", + "connectivity_endpoints": "Description.Workspace.Properties.ConnectivityEndpoints", + "default_data_lake_storage": "Description.Workspace.Properties.DefaultDataLakeStorage", + "diagnostic_settings": "Description.DiagnosticSettingsResources", + "extra_properties": "Description.Workspace.Properties.ExtraProperties", + "id": "Description.Workspace.ID", + "identity": "Description.Workspace.Identity", + "managed_resource_group_name": "Description.Workspace.Properties.ManagedResourceGroupName", + "managed_virtual_network": "Description.Workspace.Properties.ManagedVirtualNetwork", + "managed_virtual_network_settings": "Description.Workspace.Properties.ManagedVirtualNetworkSettings", "name": "description.Workspace.name", - "provisioning_state": "description.Workspace.Properties.ProvisioningState", - "public_network_access": "description.Workspace.Properties.PublicNetworkAccess", - "purview_configuration": "description.Workspace.Properties.PurviewConfiguration", + "provisioning_state": "Description.Workspace.Properties.ProvisioningState", + "public_network_access": "Description.Workspace.Properties.PublicNetworkAccess", + "purview_configuration": "Description.Workspace.Properties.PurviewConfiguration", "resource_group": "description.ResourceGroup", - "sql_administrator_login": "description.Workspace.Properties.SQLAdministratorLogin", - "sql_administrator_login_password": "description.Workspace.Properties.SQLAdministratorLoginPassword", - "tags": "description.Workspace.Tags", - "title": "description.Workspace.Name", - "type": "description.Workspace.Type", - "virtual_network_profile": "description.Workspace.Properties.VirtualNetworkProfile", - "workspace_managed_sql_server_vulnerability_assessments": "description.ServerVulnerabilityAssessments", - "workspace_repository_configuration": "description.Workspace.Properties.WorkspaceRepositoryConfiguration", - "workspace_uid": "description.Workspace.Properties.WorkspaceUID", + "sql_administrator_login": "Description.Workspace.Properties.SQLAdministratorLogin", + "sql_administrator_login_password": "Description.Workspace.Properties.SQLAdministratorLoginPassword", + "tags": "Description.Workspace.Tags", + "title": "Description.Workspace.Name", + "type": "Description.Workspace.Type", + "virtual_network_profile": "Description.Workspace.Properties.VirtualNetworkProfile", + "workspace_managed_sql_server_vulnerability_assessments": "Description.ServerVulnerabilityAssessments", + "workspace_repository_configuration": "Description.Workspace.Properties.WorkspaceRepositoryConfiguration", + "workspace_uid": "Description.Workspace.Properties.WorkspaceUID", } func GetSynapseWorkspace(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -46598,72 +36733,14 @@ func GetSynapseWorkspace(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd // ========================== START: SynapseWorkspaceBigdatapools ============================= type SynapseWorkspaceBigdatapools struct { - Description azure.SynapseWorkspaceBigdatapoolsDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *SynapseWorkspaceBigdatapools) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.SynapseWorkspaceBigdatapoolsDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.SynapseWorkspaceBigdatapoolsDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type SynapseWorkspaceBigdatapoolsHit struct { @@ -46734,11 +36811,10 @@ func (p SynapseWorkspaceBigdatapoolsPaginator) NextPage(ctx context.Context) ([] } var listSynapseWorkspaceBigdatapoolsFilters = map[string]string{ - "id": "description.BigDataPool.ID", - "og_account_id": "metadata.SourceID", - "name": "description.BigDataPool.Name", - "tags": "description.BigDataPool.Tags", - "title": "description.BigDataPool.Name", + "id": "Description.BigDataPool.ID", + "name": "Description.BigDataPool.Name", + "tags": "Description.BigDataPool.Tags", + "title": "Description.BigDataPool.Name", } func ListSynapseWorkspaceBigdatapools(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -46802,11 +36878,10 @@ func ListSynapseWorkspaceBigdatapools(ctx context.Context, d *plugin.QueryData, } var getSynapseWorkspaceBigdatapoolsFilters = map[string]string{ - "id": "description.BigDataPool.ID", - "og_account_id": "metadata.SourceID", - "name": "description.BigDataPool.Name", - "tags": "description.BigDataPool.Tags", - "title": "description.BigDataPool.Name", + "id": "Description.BigDataPool.ID", + "name": "Description.BigDataPool.Name", + "tags": "Description.BigDataPool.Tags", + "title": "Description.BigDataPool.Name", } func GetSynapseWorkspaceBigdatapools(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -46867,72 +36942,14 @@ func GetSynapseWorkspaceBigdatapools(ctx context.Context, d *plugin.QueryData, _ // ========================== START: SynapseWorkspaceSqlpools ============================= type SynapseWorkspaceSqlpools struct { - Description azure.SynapseWorkspaceSqlpoolsDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *SynapseWorkspaceSqlpools) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.SynapseWorkspaceSqlpoolsDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.SynapseWorkspaceSqlpoolsDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type SynapseWorkspaceSqlpoolsHit struct { @@ -47003,11 +37020,10 @@ func (p SynapseWorkspaceSqlpoolsPaginator) NextPage(ctx context.Context) ([]Syna } var listSynapseWorkspaceSqlpoolsFilters = map[string]string{ - "id": "description.SqlPool.ID", - "og_account_id": "metadata.SourceID", - "name": "description.SqlPool.Name", - "tags": "description.SqlPool.Tags", - "title": "description.SqlPool.Name", + "id": "Description.SqlPool.ID", + "name": "Description.SqlPool.Name", + "tags": "Description.SqlPool.Tags", + "title": "Description.SqlPool.Name", } func ListSynapseWorkspaceSqlpools(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -47071,11 +37087,10 @@ func ListSynapseWorkspaceSqlpools(ctx context.Context, d *plugin.QueryData, _ *p } var getSynapseWorkspaceSqlpoolsFilters = map[string]string{ - "id": "description.SqlPool.ID", - "og_account_id": "metadata.SourceID", - "name": "description.SqlPool.Name", - "tags": "description.SqlPool.Tags", - "title": "description.SqlPool.Name", + "id": "Description.SqlPool.ID", + "name": "Description.SqlPool.Name", + "tags": "Description.SqlPool.Tags", + "title": "Description.SqlPool.Name", } func GetSynapseWorkspaceSqlpools(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -47136,72 +37151,14 @@ func GetSynapseWorkspaceSqlpools(ctx context.Context, d *plugin.QueryData, _ *pl // ========================== START: Location ============================= type Location struct { - Description azure.LocationDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *Location) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.LocationDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.LocationDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type LocationHit struct { @@ -47272,13 +37229,12 @@ func (p LocationPaginator) NextPage(ctx context.Context) ([]Location, error) { } var listLocationFilters = map[string]string{ - "display_name": "description.Location.DisplayName", - "id": "description.Location.ID", - "og_account_id": "metadata.SourceID", - "latitude": "description.Location.Latitude", - "longitude": "description.Location.Longitude", - "name": "description.Location.Name", - "title": "description.Location.Name", + "display_name": "Description.Location.DisplayName", + "id": "Description.Location.ID", + "latitude": "Description.Location.Latitude", + "longitude": "Description.Location.Longitude", + "name": "Description.Location.Name", + "title": "Description.Location.Name", } func ListLocation(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -47342,14 +37298,13 @@ func ListLocation(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDat } var getLocationFilters = map[string]string{ - "display_name": "description.Location.DisplayName", - "id": "description.Location.ID", - "og_account_id": "metadata.SourceID", - "latitude": "description.Location.Latitude", - "longitude": "description.Location.Longitude", + "display_name": "Description.Location.DisplayName", + "id": "Description.Location.ID", + "latitude": "Description.Location.Latitude", + "longitude": "Description.Location.Longitude", "name": "description.Location.name", "resource_group": "description.ResourceGroup", - "title": "description.Location.Name", + "title": "Description.Location.Name", } func GetLocation(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -47410,72 +37365,14 @@ func GetLocation(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData // ========================== START: AnalysisServiceServer ============================= type AnalysisServiceServer struct { - Description azure.AnalysisServiceServerDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *AnalysisServiceServer) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.AnalysisServiceServerDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.AnalysisServiceServerDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type AnalysisServiceServerHit struct { @@ -47546,11 +37443,10 @@ func (p AnalysisServiceServerPaginator) NextPage(ctx context.Context) ([]Analysi } var listAnalysisServiceServerFilters = map[string]string{ - "id": "description.Servers.ID", - "og_account_id": "metadata.SourceID", - "name": "description.Server.Properties.ServerFullName", - "tags": "description.Server.Tags", - "title": "description.Server.Properties.ServerFullName", + "id": "Description.Servers.ID", + "name": "Description.Server.Properties.ServerFullName", + "tags": "Description.Server.Tags", + "title": "Description.Server.Properties.ServerFullName", } func ListAnalysisServiceServer(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -47614,12 +37510,11 @@ func ListAnalysisServiceServer(ctx context.Context, d *plugin.QueryData, _ *plug } var getAnalysisServiceServerFilters = map[string]string{ - "id": "description.Servers.ID", - "og_account_id": "metadata.SourceID", + "id": "Description.Servers.ID", "name": "description.Server.name", "resource_group": "description.ResourceGroup", - "tags": "description.Server.Tags", - "title": "description.Server.Properties.ServerFullName", + "tags": "Description.Server.Tags", + "title": "Description.Server.Properties.ServerFullName", } func GetAnalysisServiceServer(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -47680,72 +37575,14 @@ func GetAnalysisServiceServer(ctx context.Context, d *plugin.QueryData, _ *plugi // ========================== START: PostgresqlServer ============================= type PostgresqlServer struct { - Description azure.PostgresqlServerDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *PostgresqlServer) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.PostgresqlServerDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.PostgresqlServerDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type PostgresqlServerHit struct { @@ -47816,40 +37653,39 @@ func (p PostgresqlServerPaginator) NextPage(ctx context.Context) ([]PostgresqlSe } var listPostgresqlServerFilters = map[string]string{ - "administrator_login": "description.Server.Properties.AdministratorLogin", - "backup_retention_days": "description.Server.Properties.StorageProfile.BackupRetentionDays", - "byok_enforcement": "description.Server.Properties.ByokEnforcement", - "firewall_rules": "description.FirewallRules", - "fully_qualified_domain_name": "description.Server.Properties.FullyQualifiedDomainName", - "geo_redundant_backup": "description.Server.Properties.StorageProfile.GeoRedundantBackup", - "id": "description.Server.ID", - "infrastructure_encryption": "description.Server.Properties.InfrastructureEncryption", - "og_account_id": "metadata.SourceID", - "location": "description.Server.Location", - "master_server_id": "description.Server.Properties.MasterServerID", - "minimal_tls_version": "description.Server.Properties.MinimalTLSVersion", - "name": "description.Server.Name", - "public_network_access": "description.Server.Properties.PublicNetworkAccess", - "replica_capacity": "description.Server.Properties.ReplicaCapacity", - "replication_role": "description.Server.Properties.ReplicationRole", - "resource_group": "description.ResourceGroup", - "server_administrators": "description.ServerAdministratorResources", - "server_configurations": "description.Configurations", - "server_keys": "description.ServerKeys", - "server_security_alert_policy": "description.ServerSecurityAlertPolicies", - "sku_capacity": "description.Server.SKU.Capacity", - "sku_family": "description.Server.SKU.Family", - "sku_name": "description.Server.SKU.Name", - "sku_size": "description.Server.SKU.Size", - "sku_tier": "description.Server.SKU.Tier", - "ssl_enforcement": "description.Server.Properties.SSLEnforcement", - "storage_auto_grow": "description.Server.Properties.StorageProfile.StorageAutogrow", - "storage_mb": "description.Server.Properties.StorageProfile.StorageMB", - "tags": "description.Server.Tags", - "title": "description.Server.Name", - "type": "description.Server.Type", - "user_visible_state": "description.Server.Properties.UserVisibleState", - "version": "description.Server.Properties.Version", + "administrator_login": "Description.Server.Properties.AdministratorLogin", + "backup_retention_days": "Description.Server.Properties.StorageProfile.BackupRetentionDays", + "byok_enforcement": "Description.Server.Properties.ByokEnforcement", + "firewall_rules": "Description.FirewallRules", + "fully_qualified_domain_name": "Description.Server.Properties.FullyQualifiedDomainName", + "geo_redundant_backup": "Description.Server.Properties.StorageProfile.GeoRedundantBackup", + "id": "Description.Server.ID", + "infrastructure_encryption": "Description.Server.Properties.InfrastructureEncryption", + "location": "Description.Server.Location", + "master_server_id": "Description.Server.Properties.MasterServerID", + "minimal_tls_version": "Description.Server.Properties.MinimalTLSVersion", + "name": "Description.Server.Name", + "public_network_access": "Description.Server.Properties.PublicNetworkAccess", + "replica_capacity": "Description.Server.Properties.ReplicaCapacity", + "replication_role": "Description.Server.Properties.ReplicationRole", + "resource_group": "Description.ResourceGroup", + "server_administrators": "Description.ServerAdministratorResources", + "server_configurations": "Description.Configurations", + "server_keys": "Description.ServerKeys", + "server_security_alert_policy": "Description.ServerSecurityAlertPolicies", + "sku_capacity": "Description.Server.SKU.Capacity", + "sku_family": "Description.Server.SKU.Family", + "sku_name": "Description.Server.SKU.Name", + "sku_size": "Description.Server.SKU.Size", + "sku_tier": "Description.Server.SKU.Tier", + "ssl_enforcement": "Description.Server.Properties.SSLEnforcement", + "storage_auto_grow": "Description.Server.Properties.StorageProfile.StorageAutogrow", + "storage_mb": "Description.Server.Properties.StorageProfile.StorageMB", + "tags": "Description.Server.Tags", + "title": "Description.Server.Name", + "type": "Description.Server.Type", + "user_visible_state": "Description.Server.Properties.UserVisibleState", + "version": "Description.Server.Properties.Version", } func ListPostgresqlServer(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -47913,40 +37749,39 @@ func ListPostgresqlServer(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy } var getPostgresqlServerFilters = map[string]string{ - "administrator_login": "description.Server.Properties.AdministratorLogin", - "backup_retention_days": "description.Server.Properties.StorageProfile.BackupRetentionDays", - "byok_enforcement": "description.Server.Properties.ByokEnforcement", - "firewall_rules": "description.FirewallRules", - "fully_qualified_domain_name": "description.Server.Properties.FullyQualifiedDomainName", - "geo_redundant_backup": "description.Server.Properties.StorageProfile.GeoRedundantBackup", - "id": "description.Server.ID", - "infrastructure_encryption": "description.Server.Properties.InfrastructureEncryption", - "og_account_id": "metadata.SourceID", - "location": "description.Server.Location", - "master_server_id": "description.Server.Properties.MasterServerID", - "minimal_tls_version": "description.Server.Properties.MinimalTLSVersion", + "administrator_login": "Description.Server.Properties.AdministratorLogin", + "backup_retention_days": "Description.Server.Properties.StorageProfile.BackupRetentionDays", + "byok_enforcement": "Description.Server.Properties.ByokEnforcement", + "firewall_rules": "Description.FirewallRules", + "fully_qualified_domain_name": "Description.Server.Properties.FullyQualifiedDomainName", + "geo_redundant_backup": "Description.Server.Properties.StorageProfile.GeoRedundantBackup", + "id": "Description.Server.ID", + "infrastructure_encryption": "Description.Server.Properties.InfrastructureEncryption", + "location": "Description.Server.Location", + "master_server_id": "Description.Server.Properties.MasterServerID", + "minimal_tls_version": "Description.Server.Properties.MinimalTLSVersion", "name": "description.Server.name", - "public_network_access": "description.Server.Properties.PublicNetworkAccess", - "replica_capacity": "description.Server.Properties.ReplicaCapacity", - "replication_role": "description.Server.Properties.ReplicationRole", + "public_network_access": "Description.Server.Properties.PublicNetworkAccess", + "replica_capacity": "Description.Server.Properties.ReplicaCapacity", + "replication_role": "Description.Server.Properties.ReplicationRole", "resource_group": "description.ResourceGroup", - "server_administrators": "description.ServerAdministratorResources", - "server_configurations": "description.Configurations", - "server_keys": "description.ServerKeys", - "server_security_alert_policy": "description.ServerSecurityAlertPolicies", - "sku_capacity": "description.Server.SKU.Capacity", - "sku_family": "description.Server.SKU.Family", - "sku_name": "description.Server.SKU.Name", - "sku_size": "description.Server.SKU.Size", - "sku_tier": "description.Server.SKU.Tier", - "ssl_enforcement": "description.Server.Properties.SSLEnforcement", - "storage_auto_grow": "description.Server.Properties.StorageProfile.StorageAutogrow", - "storage_mb": "description.Server.Properties.StorageProfile.StorageMB", - "tags": "description.Server.Tags", - "title": "description.Server.Name", - "type": "description.Server.Type", - "user_visible_state": "description.Server.Properties.UserVisibleState", - "version": "description.Server.Properties.Version", + "server_administrators": "Description.ServerAdministratorResources", + "server_configurations": "Description.Configurations", + "server_keys": "Description.ServerKeys", + "server_security_alert_policy": "Description.ServerSecurityAlertPolicies", + "sku_capacity": "Description.Server.SKU.Capacity", + "sku_family": "Description.Server.SKU.Family", + "sku_name": "Description.Server.SKU.Name", + "sku_size": "Description.Server.SKU.Size", + "sku_tier": "Description.Server.SKU.Tier", + "ssl_enforcement": "Description.Server.Properties.SSLEnforcement", + "storage_auto_grow": "Description.Server.Properties.StorageProfile.StorageAutogrow", + "storage_mb": "Description.Server.Properties.StorageProfile.StorageMB", + "tags": "Description.Server.Tags", + "title": "Description.Server.Name", + "type": "Description.Server.Type", + "user_visible_state": "Description.Server.Properties.UserVisibleState", + "version": "Description.Server.Properties.Version", } func GetPostgresqlServer(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -48007,72 +37842,14 @@ func GetPostgresqlServer(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd // ========================== START: PostgresqlFlexibleServer ============================= type PostgresqlFlexibleServer struct { - Description azure.PostgresqlFlexibleServerDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *PostgresqlFlexibleServer) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.PostgresqlFlexibleServerDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.PostgresqlFlexibleServerDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type PostgresqlFlexibleServerHit struct { @@ -48143,16 +37920,15 @@ func (p PostgresqlFlexibleServerPaginator) NextPage(ctx context.Context) ([]Post } var listPostgresqlFlexibleServerFilters = map[string]string{ - "flexible_server_configurations": "description.Server.ServerConfigurations", - "id": "description.Server.ID", - "og_account_id": "metadata.SourceID", - "location": "description.Server.Location", - "name": "description.Server.Name", - "server_properties": "description.Server.ServerProperties", - "sku": "description.Server.SKU", - "tags": "description.Server.Tags", - "title": "description.Server.Name", - "type": "description.Server.Type", + "flexible_server_configurations": "Description.Server.ServerConfigurations", + "id": "Description.Server.ID", + "location": "Description.Server.Location", + "name": "Description.Server.Name", + "server_properties": "Description.Server.ServerProperties", + "sku": "Description.Server.SKU", + "tags": "Description.Server.Tags", + "title": "Description.Server.Name", + "type": "Description.Server.Type", } func ListPostgresqlFlexibleServer(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -48216,16 +37992,15 @@ func ListPostgresqlFlexibleServer(ctx context.Context, d *plugin.QueryData, _ *p } var getPostgresqlFlexibleServerFilters = map[string]string{ - "flexible_server_configurations": "description.Server.ServerConfigurations", - "id": "description.Server.ID", - "og_account_id": "metadata.SourceID", - "location": "description.Server.Location", - "name": "description.Server.Name", - "server_properties": "description.Server.ServerProperties", - "sku": "description.Server.SKU", - "tags": "description.Server.Tags", - "title": "description.Server.Name", - "type": "description.Server.Type", + "flexible_server_configurations": "Description.Server.ServerConfigurations", + "id": "Description.Server.ID", + "location": "Description.Server.Location", + "name": "Description.Server.Name", + "server_properties": "Description.Server.ServerProperties", + "sku": "Description.Server.SKU", + "tags": "Description.Server.Tags", + "title": "Description.Server.Name", + "type": "Description.Server.Type", } func GetPostgresqlFlexibleServer(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -48286,72 +38061,14 @@ func GetPostgresqlFlexibleServer(ctx context.Context, d *plugin.QueryData, _ *pl // ========================== START: StorageSync ============================= type StorageSync struct { - Description azure.StorageSyncDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *StorageSync) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.StorageSyncDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.StorageSyncDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type StorageSyncHit struct { @@ -48422,19 +38139,18 @@ func (p StorageSyncPaginator) NextPage(ctx context.Context) ([]StorageSync, erro } var listStorageSyncFilters = map[string]string{ - "id": "description.Service.ID", - "incoming_traffic_policy": "description.Service.Properties.IncomingTrafficPolicy", - "og_account_id": "metadata.SourceID", - "last_operation_name": "description.Service.Properties.LastOperationName", - "last_workflow_id": "description.Service.Properties.LastWorkflowID", - "name": "description.Service.Name", - "provisioning_state": "description.Service.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "storage_sync_service_status": "description.Service.Properties.StorageSyncServiceStatus", - "storage_sync_service_uid": "description.Service.Properties.StorageSyncServiceUID", - "tags": "description.Service.Tags", - "title": "description.Service.Name", - "type": "description.Service.Type", + "id": "Description.Service.ID", + "incoming_traffic_policy": "Description.Service.Properties.IncomingTrafficPolicy", + "last_operation_name": "Description.Service.Properties.LastOperationName", + "last_workflow_id": "Description.Service.Properties.LastWorkflowID", + "name": "Description.Service.Name", + "provisioning_state": "Description.Service.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "storage_sync_service_status": "Description.Service.Properties.StorageSyncServiceStatus", + "storage_sync_service_uid": "Description.Service.Properties.StorageSyncServiceUID", + "tags": "Description.Service.Tags", + "title": "Description.Service.Name", + "type": "Description.Service.Type", } func ListStorageSync(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -48498,19 +38214,18 @@ func ListStorageSync(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate } var getStorageSyncFilters = map[string]string{ - "id": "description.Service.ID", - "incoming_traffic_policy": "description.Service.Properties.IncomingTrafficPolicy", - "og_account_id": "metadata.SourceID", - "last_operation_name": "description.Service.Properties.LastOperationName", - "last_workflow_id": "description.Service.Properties.LastWorkflowID", + "id": "Description.Service.ID", + "incoming_traffic_policy": "Description.Service.Properties.IncomingTrafficPolicy", + "last_operation_name": "Description.Service.Properties.LastOperationName", + "last_workflow_id": "Description.Service.Properties.LastWorkflowID", "name": "description.Service.name", - "provisioning_state": "description.Service.Properties.ProvisioningState", + "provisioning_state": "Description.Service.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", - "storage_sync_service_status": "description.Service.Properties.StorageSyncServiceStatus", - "storage_sync_service_uid": "description.Service.Properties.StorageSyncServiceUID", - "tags": "description.Service.Tags", - "title": "description.Service.Name", - "type": "description.Service.Type", + "storage_sync_service_status": "Description.Service.Properties.StorageSyncServiceStatus", + "storage_sync_service_uid": "Description.Service.Properties.StorageSyncServiceUID", + "tags": "Description.Service.Tags", + "title": "Description.Service.Name", + "type": "Description.Service.Type", } func GetStorageSync(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -48571,72 +38286,14 @@ func GetStorageSync(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD // ========================== START: MssqlManagedInstance ============================= type MssqlManagedInstance struct { - Description azure.MssqlManagedInstanceDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *MssqlManagedInstance) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.MssqlManagedInstanceDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.MssqlManagedInstanceDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type MssqlManagedInstanceHit struct { @@ -48707,37 +38364,36 @@ func (p MssqlManagedInstancePaginator) NextPage(ctx context.Context) ([]MssqlMan } var listMssqlManagedInstanceFilters = map[string]string{ - "administrator_login": "description.ManagedInstance.Properties.AdministratorLogin", - "administrator_login_password": "description.ManagedInstance.Properties.AdministratorLoginPassword", - "collation": "description.ManagedInstance.Properties.Collation", - "dns_zone": "description.ManagedInstance.Properties.DNSZone", - "dns_zone_partner": "description.ManagedInstance.Properties.DNSZonePartner", - "encryption_protectors": "description.ManagedInstanceEncryptionProtectors", - "fully_qualified_domain_name": "description.ManagedInstance.Properties.FullyQualifiedDomainName", - "id": "description.ManagedInstance.ID", - "identity": "description.ManagedInstance.Identity", - "instance_pool_id": "description.ManagedInstance.Properties.InstancePoolID", - "og_account_id": "metadata.SourceID", - "license_type": "description.ManagedInstance.Properties.LicenseType", - "maintenance_configuration_id": "description.ManagedInstance.Properties.MaintenanceConfigurationID", - "managed_instance_create_mode": "description.ManagedInstance.Properties.ManagedInstanceCreateMode", - "minimal_tls_version": "description.ManagedInstance.Properties.MinimalTLSVersion", - "name": "description.ManagedInstance.Name", - "proxy_override": "description.ManagedInstance.Properties.ProxyOverride", - "public_data_endpoint_enabled": "description.ManagedInstance.Properties.PublicDataEndpointEnabled", - "resource_group": "description.ResourceGroup", - "security_alert_policies": "description.ManagedDatabaseSecurityAlertPolicies", - "sku": "description.ManagedInstance.SKU", - "source_managed_instance_id": "description.ManagedInstance.Properties.SourceManagedInstanceID", - "state": "description.ManagedInstance.Properties.State", - "storage_size_in_gb": "description.ManagedInstance.Properties.StorageSizeInGB", - "subnet_id": "description.ManagedInstance.Properties.SubnetID", - "tags": "description.ManagedInstance.Tags", - "timezone_id": "description.ManagedInstance.Properties.TimezoneID", - "title": "description.ManagedInstance.Name", - "type": "description.ManagedInstance.Type", - "v_cores": "description.ManagedInstance.Properties.VCores", - "vulnerability_assessments": "description.ManagedInstanceVulnerabilityAssessments", + "administrator_login": "Description.ManagedInstance.Properties.AdministratorLogin", + "administrator_login_password": "Description.ManagedInstance.Properties.AdministratorLoginPassword", + "collation": "Description.ManagedInstance.Properties.Collation", + "dns_zone": "Description.ManagedInstance.Properties.DNSZone", + "dns_zone_partner": "Description.ManagedInstance.Properties.DNSZonePartner", + "encryption_protectors": "Description.ManagedInstanceEncryptionProtectors", + "fully_qualified_domain_name": "Description.ManagedInstance.Properties.FullyQualifiedDomainName", + "id": "Description.ManagedInstance.ID", + "identity": "Description.ManagedInstance.Identity", + "instance_pool_id": "Description.ManagedInstance.Properties.InstancePoolID", + "license_type": "Description.ManagedInstance.Properties.LicenseType", + "maintenance_configuration_id": "Description.ManagedInstance.Properties.MaintenanceConfigurationID", + "managed_instance_create_mode": "Description.ManagedInstance.Properties.ManagedInstanceCreateMode", + "minimal_tls_version": "Description.ManagedInstance.Properties.MinimalTLSVersion", + "name": "Description.ManagedInstance.Name", + "proxy_override": "Description.ManagedInstance.Properties.ProxyOverride", + "public_data_endpoint_enabled": "Description.ManagedInstance.Properties.PublicDataEndpointEnabled", + "resource_group": "Description.ResourceGroup", + "security_alert_policies": "Description.ManagedDatabaseSecurityAlertPolicies", + "sku": "Description.ManagedInstance.SKU", + "source_managed_instance_id": "Description.ManagedInstance.Properties.SourceManagedInstanceID", + "state": "Description.ManagedInstance.Properties.State", + "storage_size_in_gb": "Description.ManagedInstance.Properties.StorageSizeInGB", + "subnet_id": "Description.ManagedInstance.Properties.SubnetID", + "tags": "Description.ManagedInstance.Tags", + "timezone_id": "Description.ManagedInstance.Properties.TimezoneID", + "title": "Description.ManagedInstance.Name", + "type": "Description.ManagedInstance.Type", + "v_cores": "Description.ManagedInstance.Properties.VCores", + "vulnerability_assessments": "Description.ManagedInstanceVulnerabilityAssessments", } func ListMssqlManagedInstance(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -48801,37 +38457,36 @@ func ListMssqlManagedInstance(ctx context.Context, d *plugin.QueryData, _ *plugi } var getMssqlManagedInstanceFilters = map[string]string{ - "administrator_login": "description.ManagedInstance.Properties.AdministratorLogin", - "administrator_login_password": "description.ManagedInstance.Properties.AdministratorLoginPassword", - "collation": "description.ManagedInstance.Properties.Collation", - "dns_zone": "description.ManagedInstance.Properties.DNSZone", - "dns_zone_partner": "description.ManagedInstance.Properties.DNSZonePartner", - "encryption_protectors": "description.ManagedInstanceEncryptionProtectors", - "fully_qualified_domain_name": "description.ManagedInstance.Properties.FullyQualifiedDomainName", - "id": "description.ManagedInstance.ID", - "identity": "description.ManagedInstance.Identity", - "instance_pool_id": "description.ManagedInstance.Properties.InstancePoolID", - "og_account_id": "metadata.SourceID", - "license_type": "description.ManagedInstance.Properties.LicenseType", - "maintenance_configuration_id": "description.ManagedInstance.Properties.MaintenanceConfigurationID", - "managed_instance_create_mode": "description.ManagedInstance.Properties.ManagedInstanceCreateMode", - "minimal_tls_version": "description.ManagedInstance.Properties.MinimalTLSVersion", + "administrator_login": "Description.ManagedInstance.Properties.AdministratorLogin", + "administrator_login_password": "Description.ManagedInstance.Properties.AdministratorLoginPassword", + "collation": "Description.ManagedInstance.Properties.Collation", + "dns_zone": "Description.ManagedInstance.Properties.DNSZone", + "dns_zone_partner": "Description.ManagedInstance.Properties.DNSZonePartner", + "encryption_protectors": "Description.ManagedInstanceEncryptionProtectors", + "fully_qualified_domain_name": "Description.ManagedInstance.Properties.FullyQualifiedDomainName", + "id": "Description.ManagedInstance.ID", + "identity": "Description.ManagedInstance.Identity", + "instance_pool_id": "Description.ManagedInstance.Properties.InstancePoolID", + "license_type": "Description.ManagedInstance.Properties.LicenseType", + "maintenance_configuration_id": "Description.ManagedInstance.Properties.MaintenanceConfigurationID", + "managed_instance_create_mode": "Description.ManagedInstance.Properties.ManagedInstanceCreateMode", + "minimal_tls_version": "Description.ManagedInstance.Properties.MinimalTLSVersion", "name": "description.ManagedInstance.name", - "proxy_override": "description.ManagedInstance.Properties.ProxyOverride", - "public_data_endpoint_enabled": "description.ManagedInstance.Properties.PublicDataEndpointEnabled", + "proxy_override": "Description.ManagedInstance.Properties.ProxyOverride", + "public_data_endpoint_enabled": "Description.ManagedInstance.Properties.PublicDataEndpointEnabled", "resource_group": "description.ResourceGroup", - "security_alert_policies": "description.ManagedDatabaseSecurityAlertPolicies", - "sku": "description.ManagedInstance.SKU", - "source_managed_instance_id": "description.ManagedInstance.Properties.SourceManagedInstanceID", - "state": "description.ManagedInstance.Properties.State", - "storage_size_in_gb": "description.ManagedInstance.Properties.StorageSizeInGB", - "subnet_id": "description.ManagedInstance.Properties.SubnetID", - "tags": "description.ManagedInstance.Tags", - "timezone_id": "description.ManagedInstance.Properties.TimezoneID", - "title": "description.ManagedInstance.Name", - "type": "description.ManagedInstance.Type", - "v_cores": "description.ManagedInstance.Properties.VCores", - "vulnerability_assessments": "description.ManagedInstanceVulnerabilityAssessments", + "security_alert_policies": "Description.ManagedDatabaseSecurityAlertPolicies", + "sku": "Description.ManagedInstance.SKU", + "source_managed_instance_id": "Description.ManagedInstance.Properties.SourceManagedInstanceID", + "state": "Description.ManagedInstance.Properties.State", + "storage_size_in_gb": "Description.ManagedInstance.Properties.StorageSizeInGB", + "subnet_id": "Description.ManagedInstance.Properties.SubnetID", + "tags": "Description.ManagedInstance.Tags", + "timezone_id": "Description.ManagedInstance.Properties.TimezoneID", + "title": "Description.ManagedInstance.Name", + "type": "Description.ManagedInstance.Type", + "v_cores": "Description.ManagedInstance.Properties.VCores", + "vulnerability_assessments": "Description.ManagedInstanceVulnerabilityAssessments", } func GetMssqlManagedInstance(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -48892,72 +38547,14 @@ func GetMssqlManagedInstance(ctx context.Context, d *plugin.QueryData, _ *plugin // ========================== START: MssqlManagedInstanceDatabases ============================= type MssqlManagedInstanceDatabases struct { - Description azure.MssqlManagedInstanceDatabasesDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *MssqlManagedInstanceDatabases) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.MssqlManagedInstanceDatabasesDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.MssqlManagedInstanceDatabasesDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type MssqlManagedInstanceDatabasesHit struct { @@ -49028,11 +38625,10 @@ func (p MssqlManagedInstanceDatabasesPaginator) NextPage(ctx context.Context) ([ } var listMssqlManagedInstanceDatabasesFilters = map[string]string{ - "id": "description.ManagedInstance.ID", - "og_account_id": "metadata.SourceID", - "name": "description.ManagedInstance.SKU.Name", - "tags": "description.ManagedInstance.Tags", - "title": "description.ManagedInstance.SKU.Name", + "id": "Description.ManagedInstance.ID", + "name": "Description.ManagedInstance.SKU.Name", + "tags": "Description.ManagedInstance.Tags", + "title": "Description.ManagedInstance.SKU.Name", } func ListMssqlManagedInstanceDatabases(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -49096,11 +38692,10 @@ func ListMssqlManagedInstanceDatabases(ctx context.Context, d *plugin.QueryData, } var getMssqlManagedInstanceDatabasesFilters = map[string]string{ - "id": "description.ManagedInstance.ID", - "og_account_id": "metadata.SourceID", - "name": "description.ManagedInstance.SKU.Name", - "tags": "description.ManagedInstance.Tags", - "title": "description.ManagedInstance.SKU.Name", + "id": "Description.ManagedInstance.ID", + "name": "Description.ManagedInstance.SKU.Name", + "tags": "Description.ManagedInstance.Tags", + "title": "Description.ManagedInstance.SKU.Name", } func GetMssqlManagedInstanceDatabases(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -49161,72 +38756,14 @@ func GetMssqlManagedInstanceDatabases(ctx context.Context, d *plugin.QueryData, // ========================== START: SqlDatabase ============================= type SqlDatabase struct { - Description azure.SqlDatabaseDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *SqlDatabase) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.SqlDatabaseDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.SqlDatabaseDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type SqlDatabaseHit struct { @@ -49297,42 +38834,41 @@ func (p SqlDatabasePaginator) NextPage(ctx context.Context) ([]SqlDatabase, erro } var listSqlDatabaseFilters = map[string]string{ - "audit_policy": "description.AuditPolicies", - "collation": "description.Database.Properties.Collation", - "create_mode": "description.Database.Properties.CreateMode", - "current_service_objective_id": "description.Database.Properties.CurrentServiceObjectiveName", - "database_id": "description.Database.Properties.DatabaseID", - "default_secondary_location": "description.Database.Properties.DefaultSecondaryLocation", - "edition": "description.Database.Properties.RequestedServiceObjectiveName", - "elastic_pool_name": "description.Database.Properties.ElasticPoolID", - "failover_group_id": "description.Database.Properties.FailoverGroupID", - "id": "description.Database.ID", - "og_account_id": "metadata.SourceID", - "kind": "description.Database.Kind", - "location": "description.Database.Location", - "max_size_bytes": "description.Database.Properties.MaxSizeBytes", - "name": "description.Database.Name", - "read_scale": "description.Database.Properties.ReadScale", - "recovery_services_recovery_point_resource_id": "description.Database.Properties.RecoveryServicesRecoveryPointID", - "requested_service_objective_id": "description.Database.Properties.RequestedServiceObjectiveName", - "requested_service_objective_name": "description.Database.Properties.RequestedServiceObjectiveName", - "resource_group": "description.ResourceGroup", - "retention_policy_id": "description.LongTermRetentionPolicy.ID", - "retention_policy_name": "description.LongTermRetentionPolicy.Name", - "retention_policy_property": "description.LongTermRetentionPolicy.Properties", - "retention_policy_type": "description.LongTermRetentionPolicy.Type", - "sample_name": "description.Database.Properties.SampleName", - "service_level_objective": "description.Database.Properties.RequestedServiceObjectiveName", - "service_tier_advisors": "description.Advisors", - "source_database_id": "description.Database.Properties.SourceDatabaseID", - "status": "description.Database.Properties.Status", - "tags": "description.Database.Tags", - "title": "description.Database.Name", - "transparent_data_encryption": "description.TransparentDataEncryption", - "type": "description.Database.Type", - "vulnerability_assessment_scan_records": "description.VulnerabilityAssessmentScanRecords", - "vulnerability_assessments": "description.DatabaseVulnerabilityAssessments", - "zone_redundant": "description.Database.Properties.ZoneRedundant", + "audit_policy": "Description.AuditPolicies", + "collation": "Description.Database.Properties.Collation", + "create_mode": "Description.Database.Properties.CreateMode", + "current_service_objective_id": "Description.Database.Properties.CurrentServiceObjectiveName", + "database_id": "Description.Database.Properties.DatabaseID", + "default_secondary_location": "Description.Database.Properties.DefaultSecondaryLocation", + "edition": "Description.Database.Properties.RequestedServiceObjectiveName", + "elastic_pool_name": "Description.Database.Properties.ElasticPoolID", + "failover_group_id": "Description.Database.Properties.FailoverGroupID", + "id": "Description.Database.ID", + "kind": "Description.Database.Kind", + "location": "Description.Database.Location", + "max_size_bytes": "Description.Database.Properties.MaxSizeBytes", + "name": "Description.Database.Name", + "read_scale": "Description.Database.Properties.ReadScale", + "recovery_services_recovery_point_resource_id": "Description.Database.Properties.RecoveryServicesRecoveryPointID", + "requested_service_objective_id": "Description.Database.Properties.RequestedServiceObjectiveName", + "requested_service_objective_name": "Description.Database.Properties.RequestedServiceObjectiveName", + "resource_group": "Description.ResourceGroup", + "retention_policy_id": "Description.LongTermRetentionPolicy.ID", + "retention_policy_name": "Description.LongTermRetentionPolicy.Name", + "retention_policy_property": "Description.LongTermRetentionPolicy.Properties", + "retention_policy_type": "Description.LongTermRetentionPolicy.Type", + "sample_name": "Description.Database.Properties.SampleName", + "service_level_objective": "Description.Database.Properties.RequestedServiceObjectiveName", + "service_tier_advisors": "Description.Advisors", + "source_database_id": "Description.Database.Properties.SourceDatabaseID", + "status": "Description.Database.Properties.Status", + "tags": "Description.Database.Tags", + "title": "Description.Database.Name", + "transparent_data_encryption": "Description.TransparentDataEncryption", + "type": "Description.Database.Type", + "vulnerability_assessment_scan_records": "Description.VulnerabilityAssessmentScanRecords", + "vulnerability_assessments": "Description.DatabaseVulnerabilityAssessments", + "zone_redundant": "Description.Database.Properties.ZoneRedundant", } func ListSqlDatabase(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -49396,42 +38932,41 @@ func ListSqlDatabase(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate } var getSqlDatabaseFilters = map[string]string{ - "audit_policy": "description.AuditPolicies", - "collation": "description.Database.Properties.Collation", - "create_mode": "description.Database.Properties.CreateMode", - "current_service_objective_id": "description.Database.Properties.CurrentServiceObjectiveName", - "database_id": "description.Database.Properties.DatabaseID", - "default_secondary_location": "description.Database.Properties.DefaultSecondaryLocation", - "edition": "description.Database.Properties.RequestedServiceObjectiveName", - "elastic_pool_name": "description.Database.Properties.ElasticPoolID", - "failover_group_id": "description.Database.Properties.FailoverGroupID", - "id": "description.Database.ID", - "og_account_id": "metadata.SourceID", - "kind": "description.Database.Kind", - "location": "description.Database.Location", - "max_size_bytes": "description.Database.Properties.MaxSizeBytes", + "audit_policy": "Description.AuditPolicies", + "collation": "Description.Database.Properties.Collation", + "create_mode": "Description.Database.Properties.CreateMode", + "current_service_objective_id": "Description.Database.Properties.CurrentServiceObjectiveName", + "database_id": "Description.Database.Properties.DatabaseID", + "default_secondary_location": "Description.Database.Properties.DefaultSecondaryLocation", + "edition": "Description.Database.Properties.RequestedServiceObjectiveName", + "elastic_pool_name": "Description.Database.Properties.ElasticPoolID", + "failover_group_id": "Description.Database.Properties.FailoverGroupID", + "id": "Description.Database.ID", + "kind": "Description.Database.Kind", + "location": "Description.Database.Location", + "max_size_bytes": "Description.Database.Properties.MaxSizeBytes", "name": "description.Database.name", - "read_scale": "description.Database.Properties.ReadScale", - "recovery_services_recovery_point_resource_id": "description.Database.Properties.RecoveryServicesRecoveryPointID", - "requested_service_objective_id": "description.Database.Properties.RequestedServiceObjectiveName", - "requested_service_objective_name": "description.Database.Properties.RequestedServiceObjectiveName", + "read_scale": "Description.Database.Properties.ReadScale", + "recovery_services_recovery_point_resource_id": "Description.Database.Properties.RecoveryServicesRecoveryPointID", + "requested_service_objective_id": "Description.Database.Properties.RequestedServiceObjectiveName", + "requested_service_objective_name": "Description.Database.Properties.RequestedServiceObjectiveName", "resource_group": "description.ResourceGroup", - "retention_policy_id": "description.LongTermRetentionPolicy.ID", - "retention_policy_name": "description.LongTermRetentionPolicy.Name", - "retention_policy_property": "description.LongTermRetentionPolicy.Properties", - "retention_policy_type": "description.LongTermRetentionPolicy.Type", - "sample_name": "description.Database.Properties.SampleName", - "service_level_objective": "description.Database.Properties.RequestedServiceObjectiveName", - "service_tier_advisors": "description.Advisors", - "source_database_id": "description.Database.Properties.SourceDatabaseID", - "status": "description.Database.Properties.Status", - "tags": "description.Database.Tags", - "title": "description.Database.Name", - "transparent_data_encryption": "description.TransparentDataEncryption", - "type": "description.Database.Type", - "vulnerability_assessment_scan_records": "description.VulnerabilityAssessmentScanRecords", - "vulnerability_assessments": "description.DatabaseVulnerabilityAssessments", - "zone_redundant": "description.Database.Properties.ZoneRedundant", + "retention_policy_id": "Description.LongTermRetentionPolicy.ID", + "retention_policy_name": "Description.LongTermRetentionPolicy.Name", + "retention_policy_property": "Description.LongTermRetentionPolicy.Properties", + "retention_policy_type": "Description.LongTermRetentionPolicy.Type", + "sample_name": "Description.Database.Properties.SampleName", + "service_level_objective": "Description.Database.Properties.RequestedServiceObjectiveName", + "service_tier_advisors": "Description.Advisors", + "source_database_id": "Description.Database.Properties.SourceDatabaseID", + "status": "Description.Database.Properties.Status", + "tags": "Description.Database.Tags", + "title": "Description.Database.Name", + "transparent_data_encryption": "Description.TransparentDataEncryption", + "type": "Description.Database.Type", + "vulnerability_assessment_scan_records": "Description.VulnerabilityAssessmentScanRecords", + "vulnerability_assessments": "Description.DatabaseVulnerabilityAssessments", + "zone_redundant": "Description.Database.Properties.ZoneRedundant", } func GetSqlDatabase(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -49492,72 +39027,14 @@ func GetSqlDatabase(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD // ========================== START: SqlInstancePool ============================= type SqlInstancePool struct { - Description azure.SqlInstancePoolDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *SqlInstancePool) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.SqlInstancePoolDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.SqlInstancePoolDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type SqlInstancePoolHit struct { @@ -49628,10 +39105,10 @@ func (p SqlInstancePoolPaginator) NextPage(ctx context.Context) ([]SqlInstancePo } var listSqlInstancePoolFilters = map[string]string{ - "id": "description.InstancePool.ID", - "name": "description.InstancePool.Name", - "tags": "description.InstancePool.Tags", - "title": "description.InstancePool.Name", + "id": "Description.InstancePool.ID", + "name": "Description.InstancePool.Name", + "tags": "Description.InstancePool.Tags", + "title": "Description.InstancePool.Name", } func ListSqlInstancePool(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -49695,10 +39172,10 @@ func ListSqlInstancePool(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd } var getSqlInstancePoolFilters = map[string]string{ - "id": "description.InstancePool.ID", - "name": "description.InstancePool.Name", - "tags": "description.InstancePool.Tags", - "title": "description.InstancePool.Name", + "id": "Description.InstancePool.ID", + "name": "Description.InstancePool.Name", + "tags": "Description.InstancePool.Tags", + "title": "Description.InstancePool.Name", } func GetSqlInstancePool(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -49759,72 +39236,14 @@ func GetSqlInstancePool(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr // ========================== START: SqlServer ============================= type SqlServer struct { - Description azure.SqlServerDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *SqlServer) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.SqlServerDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.SqlServerDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type SqlServerHit struct { @@ -49895,33 +39314,32 @@ func (p SqlServerPaginator) NextPage(ctx context.Context) ([]SqlServer, error) { } var listSqlServerFilters = map[string]string{ - "administrator_login": "description.Server.Properties.AdministratorLogin", - "administrator_login_password": "description.Server.Properties.AdministratorLoginPassword", - "automatic_tuning": "description.AutomaticTuning", - "encryption_protector": "description.EncryptionProtectors", - "failover_groups": "description.FailoverGroups", - "firewall_rules": "description.FirewallRules", - "fully_qualified_domain_name": "description.Server.Properties.FullyQualifiedDomainName", - "id": "description.Server.ID", - "og_account_id": "metadata.SourceID", - "kind": "description.Server.Kind", - "location": "description.Server.Location", - "minimal_tls_version": "description.Server.Properties.MinimalTLSVersion", - "name": "description.Server.Name", - "private_endpoint_connections": "description.PrivateEndpointConnections", - "public_network_access": "description.Server.Properties.PublicNetworkAccess", - "resource_group": "description.ResourceGroup", - "server_audit_policy": "description.ServerBlobAuditingPolicies", - "server_azure_ad_administrator": "description.ServerAzureADAdministrators", - "server_security_alert_policy": "description.ServerSecurityAlertPolicies", - "server_vulnerability_assessment": "description.ServerVulnerabilityAssessments", - "state": "description.Server.Properties.State", - "tags": "description.Server.Tags", - "tags_src": "description.Server.Tags", - "title": "description.Server.Name", - "type": "description.Server.Type", - "version": "description.Server.Properties.Version", - "virtual_network_rules": "description.VirtualNetworkRules", + "administrator_login": "Description.Server.Properties.AdministratorLogin", + "administrator_login_password": "Description.Server.Properties.AdministratorLoginPassword", + "automatic_tuning": "Description.AutomaticTuning", + "encryption_protector": "Description.EncryptionProtectors", + "failover_groups": "Description.FailoverGroups", + "firewall_rules": "Description.FirewallRules", + "fully_qualified_domain_name": "Description.Server.Properties.FullyQualifiedDomainName", + "id": "Description.Server.ID", + "kind": "Description.Server.Kind", + "location": "Description.Server.Location", + "minimal_tls_version": "Description.Server.Properties.MinimalTLSVersion", + "name": "Description.Server.Name", + "private_endpoint_connections": "Description.PrivateEndpointConnections", + "public_network_access": "Description.Server.Properties.PublicNetworkAccess", + "resource_group": "Description.ResourceGroup", + "server_audit_policy": "Description.ServerBlobAuditingPolicies", + "server_azure_ad_administrator": "Description.ServerAzureADAdministrators", + "server_security_alert_policy": "Description.ServerSecurityAlertPolicies", + "server_vulnerability_assessment": "Description.ServerVulnerabilityAssessments", + "state": "Description.Server.Properties.State", + "tags": "Description.Server.Tags", + "tags_src": "Description.Server.Tags", + "title": "Description.Server.Name", + "type": "Description.Server.Type", + "version": "Description.Server.Properties.Version", + "virtual_network_rules": "Description.VirtualNetworkRules", } func ListSqlServer(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -49985,33 +39403,32 @@ func ListSqlServer(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDa } var getSqlServerFilters = map[string]string{ - "administrator_login": "description.Server.Properties.AdministratorLogin", - "administrator_login_password": "description.Server.Properties.AdministratorLoginPassword", - "automatic_tuning": "description.AutomaticTuning", - "encryption_protector": "description.EncryptionProtectors", - "failover_groups": "description.FailoverGroups", - "firewall_rules": "description.FirewallRules", - "fully_qualified_domain_name": "description.Server.Properties.FullyQualifiedDomainName", - "id": "description.Server.ID", - "og_account_id": "metadata.SourceID", - "kind": "description.Server.Kind", - "location": "description.Server.Location", - "minimal_tls_version": "description.Server.Properties.MinimalTLSVersion", + "administrator_login": "Description.Server.Properties.AdministratorLogin", + "administrator_login_password": "Description.Server.Properties.AdministratorLoginPassword", + "automatic_tuning": "Description.AutomaticTuning", + "encryption_protector": "Description.EncryptionProtectors", + "failover_groups": "Description.FailoverGroups", + "firewall_rules": "Description.FirewallRules", + "fully_qualified_domain_name": "Description.Server.Properties.FullyQualifiedDomainName", + "id": "Description.Server.ID", + "kind": "Description.Server.Kind", + "location": "Description.Server.Location", + "minimal_tls_version": "Description.Server.Properties.MinimalTLSVersion", "name": "description.Server.name", - "private_endpoint_connections": "description.PrivateEndpointConnections", - "public_network_access": "description.Server.Properties.PublicNetworkAccess", + "private_endpoint_connections": "Description.PrivateEndpointConnections", + "public_network_access": "Description.Server.Properties.PublicNetworkAccess", "resource_group": "description.ResourceGroup", - "server_audit_policy": "description.ServerBlobAuditingPolicies", - "server_azure_ad_administrator": "description.ServerAzureADAdministrators", - "server_security_alert_policy": "description.ServerSecurityAlertPolicies", - "server_vulnerability_assessment": "description.ServerVulnerabilityAssessments", - "state": "description.Server.Properties.State", - "tags": "description.Server.Tags", - "tags_src": "description.Server.Tags", - "title": "description.Server.Name", - "type": "description.Server.Type", - "version": "description.Server.Properties.Version", - "virtual_network_rules": "description.VirtualNetworkRules", + "server_audit_policy": "Description.ServerBlobAuditingPolicies", + "server_azure_ad_administrator": "Description.ServerAzureADAdministrators", + "server_security_alert_policy": "Description.ServerSecurityAlertPolicies", + "server_vulnerability_assessment": "Description.ServerVulnerabilityAssessments", + "state": "Description.Server.Properties.State", + "tags": "Description.Server.Tags", + "tags_src": "Description.Server.Tags", + "title": "Description.Server.Name", + "type": "Description.Server.Type", + "version": "Description.Server.Properties.Version", + "virtual_network_rules": "Description.VirtualNetworkRules", } func GetSqlServer(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -50072,72 +39489,14 @@ func GetSqlServer(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDat // ========================== START: SqlServerJobAgent ============================= type SqlServerJobAgent struct { - Description azure.SqlServerJobAgentDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *SqlServerJobAgent) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.SqlServerJobAgentDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.SqlServerJobAgentDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type SqlServerJobAgentHit struct { @@ -50208,11 +39567,10 @@ func (p SqlServerJobAgentPaginator) NextPage(ctx context.Context) ([]SqlServerJo } var listSqlServerJobAgentFilters = map[string]string{ - "id": "description.JobAgent.ID", - "og_account_id": "metadata.SourceID", - "name": "description.JobAgent.Name", - "tags": "description.JobAgent.Tags", - "title": "description.JobAgent.Name", + "id": "Description.JobAgent.ID", + "name": "Description.JobAgent.Name", + "tags": "Description.JobAgent.Tags", + "title": "Description.JobAgent.Name", } func ListSqlServerJobAgent(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -50276,11 +39634,10 @@ func ListSqlServerJobAgent(ctx context.Context, d *plugin.QueryData, _ *plugin.H } var getSqlServerJobAgentFilters = map[string]string{ - "id": "description.JobAgent.ID", - "og_account_id": "metadata.SourceID", - "name": "description.JobAgent.Name", - "tags": "description.JobAgent.Tags", - "title": "description.JobAgent.Name", + "id": "Description.JobAgent.ID", + "name": "Description.JobAgent.Name", + "tags": "Description.JobAgent.Tags", + "title": "Description.JobAgent.Name", } func GetSqlServerJobAgent(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -50341,72 +39698,14 @@ func GetSqlServerJobAgent(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy // ========================== START: SqlVirtualClusters ============================= type SqlVirtualClusters struct { - Description azure.SqlVirtualClustersDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *SqlVirtualClusters) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.SqlVirtualClustersDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.SqlVirtualClustersDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type SqlVirtualClustersHit struct { @@ -50477,11 +39776,10 @@ func (p SqlVirtualClustersPaginator) NextPage(ctx context.Context) ([]SqlVirtual } var listSqlVirtualClustersFilters = map[string]string{ - "id": "description.VirtualClusters.ID", - "og_account_id": "metadata.SourceID", - "name": "description.VirtualClusters.Name", - "tags": "description.VirtualClusters.Tags", - "title": "description.VirtualClusters.Name", + "id": "Description.VirtualClusters.ID", + "name": "Description.VirtualClusters.Name", + "tags": "Description.VirtualClusters.Tags", + "title": "Description.VirtualClusters.Name", } func ListSqlVirtualClusters(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -50545,11 +39843,10 @@ func ListSqlVirtualClusters(ctx context.Context, d *plugin.QueryData, _ *plugin. } var getSqlVirtualClustersFilters = map[string]string{ - "id": "description.VirtualClusters.ID", - "og_account_id": "metadata.SourceID", - "name": "description.VirtualClusters.Name", - "tags": "description.VirtualClusters.Tags", - "title": "description.VirtualClusters.Name", + "id": "Description.VirtualClusters.ID", + "name": "Description.VirtualClusters.Name", + "tags": "Description.VirtualClusters.Tags", + "title": "Description.VirtualClusters.Name", } func GetSqlVirtualClusters(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -50610,72 +39907,14 @@ func GetSqlVirtualClusters(ctx context.Context, d *plugin.QueryData, _ *plugin.H // ========================== START: SqlServerElasticPool ============================= type SqlServerElasticPool struct { - Description azure.SqlServerElasticPoolDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *SqlServerElasticPool) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.SqlServerElasticPoolDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.SqlServerElasticPoolDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type SqlServerElasticPoolHit struct { @@ -50746,23 +39985,22 @@ func (p SqlServerElasticPoolPaginator) NextPage(ctx context.Context) ([]SqlServe } var listSqlServerElasticPoolFilters = map[string]string{ - "creation_date": "description.Pool.Properties.CreationDate", - "database_dtu_max": "description.Pool.Properties.PerDatabaseSettings.MaxCapacity", - "database_dtu_min": "description.Pool.Properties.PerDatabaseSettings.MinCapacity", - "dtu": "description.TotalDTU", - "edition": "description.Pool.SKU.Tier", - "id": "description.Pool.ID", - "og_account_id": "metadata.SourceID", - "kind": "description.Pool.Kind", - "name": "description.Pool.Name", - "resource_group": "description.ResourceGroup", - "server_name": "description.ServerName", - "state": "description.Pool.Properties.State", - "storage_mb": "description.Pool.Properties.MaxSizeBytes", - "tags": "description.Pool.Tags", - "title": "description.Pool.Name", - "type": "description.Pool.Type", - "zone_redundant": "description.Pool.Properties.ZoneRedundant", + "creation_date": "Description.Pool.Properties.CreationDate", + "database_dtu_max": "Description.Pool.Properties.PerDatabaseSettings.MaxCapacity", + "database_dtu_min": "Description.Pool.Properties.PerDatabaseSettings.MinCapacity", + "dtu": "Description.TotalDTU", + "edition": "Description.Pool.SKU.Tier", + "id": "Description.Pool.ID", + "kind": "Description.Pool.Kind", + "name": "Description.Pool.Name", + "resource_group": "Description.ResourceGroup", + "server_name": "Description.ServerName", + "state": "Description.Pool.Properties.State", + "storage_mb": "Description.Pool.Properties.MaxSizeBytes", + "tags": "Description.Pool.Tags", + "title": "Description.Pool.Name", + "type": "Description.Pool.Type", + "zone_redundant": "Description.Pool.Properties.ZoneRedundant", } func ListSqlServerElasticPool(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -50826,23 +40064,22 @@ func ListSqlServerElasticPool(ctx context.Context, d *plugin.QueryData, _ *plugi } var getSqlServerElasticPoolFilters = map[string]string{ - "creation_date": "description.Pool.Properties.CreationDate", - "database_dtu_max": "description.Pool.Properties.PerDatabaseSettings.MaxCapacity", - "database_dtu_min": "description.Pool.Properties.PerDatabaseSettings.MinCapacity", - "dtu": "description.TotalDTU", - "edition": "description.Pool.SKU.Tier", - "id": "description.Pool.ID", - "og_account_id": "metadata.SourceID", - "kind": "description.Pool.Kind", + "creation_date": "Description.Pool.Properties.CreationDate", + "database_dtu_max": "Description.Pool.Properties.PerDatabaseSettings.MaxCapacity", + "database_dtu_min": "Description.Pool.Properties.PerDatabaseSettings.MinCapacity", + "dtu": "Description.TotalDTU", + "edition": "Description.Pool.SKU.Tier", + "id": "Description.Pool.ID", + "kind": "Description.Pool.Kind", "name": "description.Pool.Name", "resource_group": "description.ResourceGroup", "server_name": "description.ServerName", - "state": "description.Pool.Properties.State", - "storage_mb": "description.Pool.Properties.MaxSizeBytes", - "tags": "description.Pool.Tags", - "title": "description.Pool.Name", - "type": "description.Pool.Type", - "zone_redundant": "description.Pool.Properties.ZoneRedundant", + "state": "Description.Pool.Properties.State", + "storage_mb": "Description.Pool.Properties.MaxSizeBytes", + "tags": "Description.Pool.Tags", + "title": "Description.Pool.Name", + "type": "Description.Pool.Type", + "zone_redundant": "Description.Pool.Properties.ZoneRedundant", } func GetSqlServerElasticPool(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -50903,72 +40140,14 @@ func GetSqlServerElasticPool(ctx context.Context, d *plugin.QueryData, _ *plugin // ========================== START: SqlServerVirtualMachine ============================= type SqlServerVirtualMachine struct { - Description azure.SqlServerVirtualMachineDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *SqlServerVirtualMachine) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.SqlServerVirtualMachineDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.SqlServerVirtualMachineDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type SqlServerVirtualMachineHit struct { @@ -51039,27 +40218,26 @@ func (p SqlServerVirtualMachinePaginator) NextPage(ctx context.Context) ([]SqlSe } var listSqlServerVirtualMachineFilters = map[string]string{ - "auto_backup_settings": "description.VirtualMachine.Properties.AutoBackupSettings", - "auto_patching_settings": "description.VirtualMachine.Properties.AutoPatchingSettings", - "id": "description.VirtualMachine.ID", - "identity": "description.VirtualMachine.Identity", - "og_account_id": "metadata.SourceID", - "key_vault_credential_settings": "description.VirtualMachine.Properties.KeyVaultCredentialSettings", - "name": "description.VirtualMachine.Name", - "provisioning_state": "description.VirtualMachine.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "server_configurations_management_settings": "description.VirtualMachine.Properties.ServerConfigurationsManagementSettings", - "sql_image_offer": "description.VirtualMachine.Properties.SQLImageOffer", - "sql_image_sku": "description.VirtualMachine.Properties.SQLImageSKU", - "sql_management": "description.VirtualMachine.Properties.SQLManagement", - "sql_server_license_type": "description.VirtualMachine.Properties.SQLServerLicenseType", - "sql_virtual_machine_group_resource_id": "description.VirtualMachine.Properties.SQLVirtualMachineGroupResourceID", - "storage_configuration_settings": "description.VirtualMachine.Properties.StorageConfigurationSettings", - "tags": "description.VirtualMachine.Tags", - "title": "description.VirtualMachine.Name", - "type": "description.VirtualMachine.Type", - "virtual_machine_resource_id": "description.VirtualMachine.Properties.VirtualMachineResourceID", - "wsfc_domain_credentials": "description.VirtualMachine.Properties.WsfcDomainCredentials", + "auto_backup_settings": "Description.VirtualMachine.Properties.AutoBackupSettings", + "auto_patching_settings": "Description.VirtualMachine.Properties.AutoPatchingSettings", + "id": "Description.VirtualMachine.ID", + "identity": "Description.VirtualMachine.Identity", + "key_vault_credential_settings": "Description.VirtualMachine.Properties.KeyVaultCredentialSettings", + "name": "Description.VirtualMachine.Name", + "provisioning_state": "Description.VirtualMachine.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "server_configurations_management_settings": "Description.VirtualMachine.Properties.ServerConfigurationsManagementSettings", + "sql_image_offer": "Description.VirtualMachine.Properties.SQLImageOffer", + "sql_image_sku": "Description.VirtualMachine.Properties.SQLImageSKU", + "sql_management": "Description.VirtualMachine.Properties.SQLManagement", + "sql_server_license_type": "Description.VirtualMachine.Properties.SQLServerLicenseType", + "sql_virtual_machine_group_resource_id": "Description.VirtualMachine.Properties.SQLVirtualMachineGroupResourceID", + "storage_configuration_settings": "Description.VirtualMachine.Properties.StorageConfigurationSettings", + "tags": "Description.VirtualMachine.Tags", + "title": "Description.VirtualMachine.Name", + "type": "Description.VirtualMachine.Type", + "virtual_machine_resource_id": "Description.VirtualMachine.Properties.VirtualMachineResourceID", + "wsfc_domain_credentials": "Description.VirtualMachine.Properties.WsfcDomainCredentials", } func ListSqlServerVirtualMachine(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -51123,27 +40301,26 @@ func ListSqlServerVirtualMachine(ctx context.Context, d *plugin.QueryData, _ *pl } var getSqlServerVirtualMachineFilters = map[string]string{ - "auto_backup_settings": "description.VirtualMachine.Properties.AutoBackupSettings", - "auto_patching_settings": "description.VirtualMachine.Properties.AutoPatchingSettings", - "id": "description.VirtualMachine.ID", - "identity": "description.VirtualMachine.Identity", - "og_account_id": "metadata.SourceID", - "key_vault_credential_settings": "description.VirtualMachine.Properties.KeyVaultCredentialSettings", + "auto_backup_settings": "Description.VirtualMachine.Properties.AutoBackupSettings", + "auto_patching_settings": "Description.VirtualMachine.Properties.AutoPatchingSettings", + "id": "Description.VirtualMachine.ID", + "identity": "Description.VirtualMachine.Identity", + "key_vault_credential_settings": "Description.VirtualMachine.Properties.KeyVaultCredentialSettings", "name": "description.VirtualMachine.Name", - "provisioning_state": "description.VirtualMachine.Properties.ProvisioningState", + "provisioning_state": "Description.VirtualMachine.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", - "server_configurations_management_settings": "description.VirtualMachine.Properties.ServerConfigurationsManagementSettings", - "sql_image_offer": "description.VirtualMachine.Properties.SQLImageOffer", - "sql_image_sku": "description.VirtualMachine.Properties.SQLImageSKU", - "sql_management": "description.VirtualMachine.Properties.SQLManagement", - "sql_server_license_type": "description.VirtualMachine.Properties.SQLServerLicenseType", - "sql_virtual_machine_group_resource_id": "description.VirtualMachine.Properties.SQLVirtualMachineGroupResourceID", - "storage_configuration_settings": "description.VirtualMachine.Properties.StorageConfigurationSettings", - "tags": "description.VirtualMachine.Tags", - "title": "description.VirtualMachine.Name", - "type": "description.VirtualMachine.Type", - "virtual_machine_resource_id": "description.VirtualMachine.Properties.VirtualMachineResourceID", - "wsfc_domain_credentials": "description.VirtualMachine.Properties.WsfcDomainCredentials", + "server_configurations_management_settings": "Description.VirtualMachine.Properties.ServerConfigurationsManagementSettings", + "sql_image_offer": "Description.VirtualMachine.Properties.SQLImageOffer", + "sql_image_sku": "Description.VirtualMachine.Properties.SQLImageSKU", + "sql_management": "Description.VirtualMachine.Properties.SQLManagement", + "sql_server_license_type": "Description.VirtualMachine.Properties.SQLServerLicenseType", + "sql_virtual_machine_group_resource_id": "Description.VirtualMachine.Properties.SQLVirtualMachineGroupResourceID", + "storage_configuration_settings": "Description.VirtualMachine.Properties.StorageConfigurationSettings", + "tags": "Description.VirtualMachine.Tags", + "title": "Description.VirtualMachine.Name", + "type": "Description.VirtualMachine.Type", + "virtual_machine_resource_id": "Description.VirtualMachine.Properties.VirtualMachineResourceID", + "wsfc_domain_credentials": "Description.VirtualMachine.Properties.WsfcDomainCredentials", } func GetSqlServerVirtualMachine(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -51204,72 +40381,14 @@ func GetSqlServerVirtualMachine(ctx context.Context, d *plugin.QueryData, _ *plu // ========================== START: SqlServerVirtualMachineGroup ============================= type SqlServerVirtualMachineGroup struct { - Description azure.SqlServerVirtualMachineGroupDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *SqlServerVirtualMachineGroup) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.SqlServerVirtualMachineGroupDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.SqlServerVirtualMachineGroupDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type SqlServerVirtualMachineGroupHit struct { @@ -51340,11 +40459,10 @@ func (p SqlServerVirtualMachineGroupPaginator) NextPage(ctx context.Context) ([] } var listSqlServerVirtualMachineGroupFilters = map[string]string{ - "id": "description.Group.ID", - "og_account_id": "metadata.SourceID", - "name": "description.Group.Name", - "tags": "description.Group.Tags", - "title": "description.Group.Name", + "id": "Description.Group.ID", + "name": "Description.Group.Name", + "tags": "Description.Group.Tags", + "title": "Description.Group.Name", } func ListSqlServerVirtualMachineGroup(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -51408,11 +40526,10 @@ func ListSqlServerVirtualMachineGroup(ctx context.Context, d *plugin.QueryData, } var getSqlServerVirtualMachineGroupFilters = map[string]string{ - "id": "description.Group.ID", - "og_account_id": "metadata.SourceID", - "name": "description.Group.Name", - "tags": "description.Group.Tags", - "title": "description.Group.Name", + "id": "Description.Group.ID", + "name": "Description.Group.Name", + "tags": "Description.Group.Tags", + "title": "Description.Group.Name", } func GetSqlServerVirtualMachineGroup(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -51473,72 +40590,14 @@ func GetSqlServerVirtualMachineGroup(ctx context.Context, d *plugin.QueryData, _ // ========================== START: SqlServerFlexibleServer ============================= type SqlServerFlexibleServer struct { - Description azure.SqlServerFlexibleServerDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *SqlServerFlexibleServer) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.SqlServerFlexibleServerDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.SqlServerFlexibleServerDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type SqlServerFlexibleServerHit struct { @@ -51609,38 +40668,37 @@ func (p SqlServerFlexibleServerPaginator) NextPage(ctx context.Context) ([]SqlSe } var listSqlServerFlexibleServerFilters = map[string]string{ - "administrator_login": "description.FlexibleServer.Properties.AdministratorLogin", - "availability_zone": "description.FlexibleServer.Properties.AvailabilityZone", - "backup_retention_days": "description.FlexibleServer.Properties.Backup.BackupRetentionDays", - "create_mode": "description.FlexibleServer.Properties.CreateMode", - "flexible_server_configurations": "description.FlexibleServer.Location", - "fully_qualified_domain_name": "description.FlexibleServer.Properties.FullyQualifiedDomainName", - "geo_redundant_backup": "description.FlexibleServer.Properties.Backup.GeoRedundantBackup", - "high_availability": "description.FlexibleServer.Properties.HighAvailability", - "id": "description.FlexibleServer.ID", - "og_account_id": "metadata.SourceID", - "location": "description.FlexibleServer.Location", - "maintenance_window": "description.FlexibleServer.Properties.MaintenanceWindow", - "name": "description.FlexibleServer.Name", - "network": "description.FlexibleServer.Properties.Network", - "public_network_access": "description.FlexibleServer.Properties.Network.PublicNetworkAccess", - "replica_capacity": "description.FlexibleServer.Properties.ReplicaCapacity", - "replication_role": "description.FlexibleServer.Properties.ReplicationRole", - "resource_group": "description.ResourceGroup", - "restore_point_in_time": "description.FlexibleServer.Properties.RestorePointInTime", - "sku_name": "description.FlexibleServer.SKU.Name", - "sku_tier": "description.FlexibleServer.SKU.Tier", - "source_server_resource_id": "description.FlexibleServer.Properties.SourceServerResourceID", - "state": "description.FlexibleServer.Properties.State", - "storage_auto_grow": "description.FlexibleServer.Properties.Storage.AutoGrow", - "storage_iops": "description.FlexibleServer.Properties.Storage.Iops", - "storage_size_gb": "description.FlexibleServer.Properties.Storage.StorageSizeGB", - "storage_sku": "description.FlexibleServer.Properties.Storage.StorageSKU", - "system_data": "description.FlexibleServer.SystemData", - "tags": "description.FlexibleServer.Tags", - "title": "description.FlexibleServer.Name", - "type": "description.FlexibleServer.Type", - "version": "description.FlexibleServer.Properties.Version", + "administrator_login": "Description.FlexibleServer.Properties.AdministratorLogin", + "availability_zone": "Description.FlexibleServer.Properties.AvailabilityZone", + "backup_retention_days": "Description.FlexibleServer.Properties.Backup.BackupRetentionDays", + "create_mode": "Description.FlexibleServer.Properties.CreateMode", + "flexible_server_configurations": "Description.FlexibleServer.Location", + "fully_qualified_domain_name": "Description.FlexibleServer.Properties.FullyQualifiedDomainName", + "geo_redundant_backup": "Description.FlexibleServer.Properties.Backup.GeoRedundantBackup", + "high_availability": "Description.FlexibleServer.Properties.HighAvailability", + "id": "Description.FlexibleServer.ID", + "location": "Description.FlexibleServer.Location", + "maintenance_window": "Description.FlexibleServer.Properties.MaintenanceWindow", + "name": "Description.FlexibleServer.Name", + "network": "Description.FlexibleServer.Properties.Network", + "public_network_access": "Description.FlexibleServer.Properties.Network.PublicNetworkAccess", + "replica_capacity": "Description.FlexibleServer.Properties.ReplicaCapacity", + "replication_role": "Description.FlexibleServer.Properties.ReplicationRole", + "resource_group": "Description.ResourceGroup", + "restore_point_in_time": "Description.FlexibleServer.Properties.RestorePointInTime", + "sku_name": "Description.FlexibleServer.SKU.Name", + "sku_tier": "Description.FlexibleServer.SKU.Tier", + "source_server_resource_id": "Description.FlexibleServer.Properties.SourceServerResourceID", + "state": "Description.FlexibleServer.Properties.State", + "storage_auto_grow": "Description.FlexibleServer.Properties.Storage.AutoGrow", + "storage_iops": "Description.FlexibleServer.Properties.Storage.Iops", + "storage_size_gb": "Description.FlexibleServer.Properties.Storage.StorageSizeGB", + "storage_sku": "Description.FlexibleServer.Properties.Storage.StorageSKU", + "system_data": "Description.FlexibleServer.SystemData", + "tags": "Description.FlexibleServer.Tags", + "title": "Description.FlexibleServer.Name", + "type": "Description.FlexibleServer.Type", + "version": "Description.FlexibleServer.Properties.Version", } func ListSqlServerFlexibleServer(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -51704,38 +40762,37 @@ func ListSqlServerFlexibleServer(ctx context.Context, d *plugin.QueryData, _ *pl } var getSqlServerFlexibleServerFilters = map[string]string{ - "administrator_login": "description.FlexibleServer.Properties.AdministratorLogin", - "availability_zone": "description.FlexibleServer.Properties.AvailabilityZone", - "backup_retention_days": "description.FlexibleServer.Properties.Backup.BackupRetentionDays", - "create_mode": "description.FlexibleServer.Properties.CreateMode", - "flexible_server_configurations": "description.FlexibleServer.Location", - "fully_qualified_domain_name": "description.FlexibleServer.Properties.FullyQualifiedDomainName", - "geo_redundant_backup": "description.FlexibleServer.Properties.Backup.GeoRedundantBackup", - "high_availability": "description.FlexibleServer.Properties.HighAvailability", - "id": "description.FlexibleServer.ID", - "og_account_id": "metadata.SourceID", - "location": "description.FlexibleServer.Location", - "maintenance_window": "description.FlexibleServer.Properties.MaintenanceWindow", + "administrator_login": "Description.FlexibleServer.Properties.AdministratorLogin", + "availability_zone": "Description.FlexibleServer.Properties.AvailabilityZone", + "backup_retention_days": "Description.FlexibleServer.Properties.Backup.BackupRetentionDays", + "create_mode": "Description.FlexibleServer.Properties.CreateMode", + "flexible_server_configurations": "Description.FlexibleServer.Location", + "fully_qualified_domain_name": "Description.FlexibleServer.Properties.FullyQualifiedDomainName", + "geo_redundant_backup": "Description.FlexibleServer.Properties.Backup.GeoRedundantBackup", + "high_availability": "Description.FlexibleServer.Properties.HighAvailability", + "id": "Description.FlexibleServer.ID", + "location": "Description.FlexibleServer.Location", + "maintenance_window": "Description.FlexibleServer.Properties.MaintenanceWindow", "name": "description.FlexibleServer.Name", - "network": "description.FlexibleServer.Properties.Network", - "public_network_access": "description.FlexibleServer.Properties.Network.PublicNetworkAccess", - "replica_capacity": "description.FlexibleServer.Properties.ReplicaCapacity", - "replication_role": "description.FlexibleServer.Properties.ReplicationRole", + "network": "Description.FlexibleServer.Properties.Network", + "public_network_access": "Description.FlexibleServer.Properties.Network.PublicNetworkAccess", + "replica_capacity": "Description.FlexibleServer.Properties.ReplicaCapacity", + "replication_role": "Description.FlexibleServer.Properties.ReplicationRole", "resource_group": "description.ResourceGroup", - "restore_point_in_time": "description.FlexibleServer.Properties.RestorePointInTime", - "sku_name": "description.FlexibleServer.SKU.Name", - "sku_tier": "description.FlexibleServer.SKU.Tier", - "source_server_resource_id": "description.FlexibleServer.Properties.SourceServerResourceID", - "state": "description.FlexibleServer.Properties.State", - "storage_auto_grow": "description.FlexibleServer.Properties.Storage.AutoGrow", - "storage_iops": "description.FlexibleServer.Properties.Storage.Iops", - "storage_size_gb": "description.FlexibleServer.Properties.Storage.StorageSizeGB", - "storage_sku": "description.FlexibleServer.Properties.Storage.StorageSKU", - "system_data": "description.FlexibleServer.SystemData", - "tags": "description.FlexibleServer.Tags", - "title": "description.FlexibleServer.Name", - "type": "description.FlexibleServer.Type", - "version": "description.FlexibleServer.Properties.Version", + "restore_point_in_time": "Description.FlexibleServer.Properties.RestorePointInTime", + "sku_name": "Description.FlexibleServer.SKU.Name", + "sku_tier": "Description.FlexibleServer.SKU.Tier", + "source_server_resource_id": "Description.FlexibleServer.Properties.SourceServerResourceID", + "state": "Description.FlexibleServer.Properties.State", + "storage_auto_grow": "Description.FlexibleServer.Properties.Storage.AutoGrow", + "storage_iops": "Description.FlexibleServer.Properties.Storage.Iops", + "storage_size_gb": "Description.FlexibleServer.Properties.Storage.StorageSizeGB", + "storage_sku": "Description.FlexibleServer.Properties.Storage.StorageSKU", + "system_data": "Description.FlexibleServer.SystemData", + "tags": "Description.FlexibleServer.Tags", + "title": "Description.FlexibleServer.Name", + "type": "Description.FlexibleServer.Type", + "version": "Description.FlexibleServer.Properties.Version", } func GetSqlServerFlexibleServer(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -51796,72 +40853,14 @@ func GetSqlServerFlexibleServer(ctx context.Context, d *plugin.QueryData, _ *plu // ========================== START: StorageAccount ============================= type StorageAccount struct { - Description azure.StorageAccountDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *StorageAccount) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.StorageAccountDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.StorageAccountDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type StorageAccountHit struct { @@ -51932,70 +40931,69 @@ func (p StorageAccountPaginator) NextPage(ctx context.Context) ([]StorageAccount } var listStorageAccountFilters = map[string]string{ - "access_keys": "description.AccessKeys", - "access_tier": "description.Account.Properties.AccessTier", - "allow_blob_public_access": "description.Account.Properties.AllowBlobPublicAccess", - "blob_change_feed_enabled": "description.BlobServiceProperties.BlobServiceProperties.ChangeFeed.Enabled", - "blob_container_soft_delete_enabled": "description.BlobServiceProperties.BlobServiceProperties.ContainerDeleteRetentionPolicy.Enabled", - "blob_container_soft_delete_retention_days": "description.BlobServiceProperties.BlobServiceProperties.ContainerDeleteRetentionPolicy.Days", - "blob_restore_policy_days": "description.BlobServiceProperties.BlobServiceProperties.RestorePolicy.Days", - "blob_restore_policy_enabled": "description.BlobServiceProperties.BlobServiceProperties.RestorePolicy.Enabled", - "blob_service_logging": "description.Logging", - "blob_soft_delete_enabled": "description.BlobServiceProperties.BlobServiceProperties.ContainerDeleteRetentionPolicy.Enabled", - "blob_soft_delete_retention_days": "description.BlobServiceProperties.BlobServiceProperties.ContainerDeleteRetentionPolicy.Days", - "blob_versioning_enabled": "description.BlobServiceProperties.BlobServiceProperties.IsVersioningEnabled", - "enable_https_traffic_only": "description.Account.Properties.EnableHTTPSTrafficOnly", - "encryption_key_source": "description.Account.Properties.Encryption.KeySource", - "encryption_key_vault_properties_key_current_version_id": "description.Account.Properties.Encryption.KeyVaultProperties.CurrentVersionedKeyIdentifier", - "encryption_key_vault_properties_key_name": "description.Account.Properties.Encryption.KeyVaultProperties.KeyName", - "encryption_key_vault_properties_key_vault_uri": "description.Account.Properties.Encryption.KeyVaultProperties.KeyVaultURI", - "encryption_key_vault_properties_key_version": "description.Account.Properties.Encryption.KeyVaultProperties.KeyVersion", - "encryption_services": "description.Account.Properties.Encryption.Services", - "failover_in_progress": "description.Account.Properties.FailoverInProgress", - "file_soft_delete_enabled": "description.FileServiceProperties.FileServiceProperties.ShareDeleteRetentionPolicy.Enabled", - "file_soft_delete_retention_days": "description.FileServiceProperties.FileServiceProperties.ShareDeleteRetentionPolicy.Days", - "id": "description.Account.ID", - "is_hns_enabled": "description.Account.Properties.IsHnsEnabled", - "og_account_id": "metadata.SourceID", - "kind": "description.Account.Kind", - "minimum_tls_version": "description.Account.Properties.MinimumTLSVersion", - "name": "description.Account.Name", - "network_ip_rules": "description.Account.Properties.NetworkRuleSet.IPRules", - "network_rule_bypass": "description.Account.Properties.NetworkRuleSet.Bypass", - "network_rule_default_action": "description.Account.Properties.NetworkRuleSet.DefaultAction", - "primary_blob_endpoint": "description.Account.Properties.PrimaryEndpoints.Blob", - "primary_dfs_endpoint": "description.Account.Properties.PrimaryEndpoints.Dfs", - "primary_file_endpoint": "description.Account.Properties.PrimaryEndpoints.File", - "primary_location": "description.Account.Properties.PrimaryLocation", - "primary_queue_endpoint": "description.Account.Properties.PrimaryEndpoints.Queue", - "primary_table_endpoint": "description.Account.Properties.PrimaryEndpoints.Table", - "primary_web_endpoint": "description.Account.Properties.PrimaryEndpoints.Web", - "private_endpoint_connections": "description.Account.Properties.PrivateEndpointConnections", - "provisioning_state": "description.Account.Properties.ProvisioningState", - "public_network_access": "description.Account.Properties.PublicNetworkAccess", - "queue_logging_delete": "description.StorageServiceProperties.Logging.Delete", - "queue_logging_read": "description.StorageServiceProperties.Logging.Read", - "queue_logging_retention_days": "description.Logging.RetentionPolicy.Days", - "queue_logging_retention_enabled": "description.Logging.RetentionPolicy.Enabled", - "queue_logging_version": "description.StorageServiceProperties.Logging.Version", - "queue_logging_write": "description.StorageServiceProperties.Logging.Write", - "require_infrastructure_encryption": "description.Account.Properties.Encryption.RequireInfrastructureEncryption", - "sas_policy": "description.Account.Properties.SasPolicy", - "secondary_location": "description.Account.Properties.SecondaryLocation", - "sku_name": "description.Account.SKU.Name", - "sku_tier": "description.Account.SKU.Tier", - "status_of_primary": "description.Account.Properties.StatusOfPrimary", - "status_of_secondary": "description.Account.Properties.StatusOfSecondary", - "table_logging_delete": "description.StorageServiceProperties.Logging.Delete", - "table_logging_read": "description.StorageServiceProperties.Logging.Read", - "table_logging_retention_policy": "description.StorageServiceProperties.Logging.RetentionPolicy", - "table_logging_version": "description.StorageServiceProperties.Logging.Version", - "table_logging_write": "description.StorageServiceProperties.Logging.Write", - "table_properties": "description.TableProperties", - "tags": "description.Account.Tags", - "title": "description.Account.Name", - "type": "description.Account.Type", - "virtual_network_rules": "description.Account.Properties.NetworkRuleSet.VirtualNetworkRules", + "access_keys": "Description.AccessKeys", + "access_tier": "Description.Account.Properties.AccessTier", + "allow_blob_public_access": "Description.Account.Properties.AllowBlobPublicAccess", + "blob_change_feed_enabled": "Description.BlobServiceProperties.BlobServiceProperties.ChangeFeed.Enabled", + "blob_container_soft_delete_enabled": "Description.BlobServiceProperties.BlobServiceProperties.ContainerDeleteRetentionPolicy.Enabled", + "blob_container_soft_delete_retention_days": "Description.BlobServiceProperties.BlobServiceProperties.ContainerDeleteRetentionPolicy.Days", + "blob_restore_policy_days": "Description.BlobServiceProperties.BlobServiceProperties.RestorePolicy.Days", + "blob_restore_policy_enabled": "Description.BlobServiceProperties.BlobServiceProperties.RestorePolicy.Enabled", + "blob_service_logging": "Description.Logging", + "blob_soft_delete_enabled": "Description.BlobServiceProperties.BlobServiceProperties.ContainerDeleteRetentionPolicy.Enabled", + "blob_soft_delete_retention_days": "Description.BlobServiceProperties.BlobServiceProperties.ContainerDeleteRetentionPolicy.Days", + "blob_versioning_enabled": "Description.BlobServiceProperties.BlobServiceProperties.IsVersioningEnabled", + "enable_https_traffic_only": "Description.Account.Properties.EnableHTTPSTrafficOnly", + "encryption_key_source": "Description.Account.Properties.Encryption.KeySource", + "encryption_key_vault_properties_key_current_version_id": "Description.Account.Properties.Encryption.KeyVaultProperties.CurrentVersionedKeyIdentifier", + "encryption_key_vault_properties_key_name": "Description.Account.Properties.Encryption.KeyVaultProperties.KeyName", + "encryption_key_vault_properties_key_vault_uri": "Description.Account.Properties.Encryption.KeyVaultProperties.KeyVaultURI", + "encryption_key_vault_properties_key_version": "Description.Account.Properties.Encryption.KeyVaultProperties.KeyVersion", + "encryption_services": "Description.Account.Properties.Encryption.Services", + "failover_in_progress": "Description.Account.Properties.FailoverInProgress", + "file_soft_delete_enabled": "Description.FileServiceProperties.FileServiceProperties.ShareDeleteRetentionPolicy.Enabled", + "file_soft_delete_retention_days": "Description.FileServiceProperties.FileServiceProperties.ShareDeleteRetentionPolicy.Days", + "id": "Description.Account.ID", + "is_hns_enabled": "Description.Account.Properties.IsHnsEnabled", + "kind": "Description.Account.Kind", + "minimum_tls_version": "Description.Account.Properties.MinimumTLSVersion", + "name": "Description.Account.Name", + "network_ip_rules": "Description.Account.Properties.NetworkRuleSet.IPRules", + "network_rule_bypass": "Description.Account.Properties.NetworkRuleSet.Bypass", + "network_rule_default_action": "Description.Account.Properties.NetworkRuleSet.DefaultAction", + "primary_blob_endpoint": "Description.Account.Properties.PrimaryEndpoints.Blob", + "primary_dfs_endpoint": "Description.Account.Properties.PrimaryEndpoints.Dfs", + "primary_file_endpoint": "Description.Account.Properties.PrimaryEndpoints.File", + "primary_location": "Description.Account.Properties.PrimaryLocation", + "primary_queue_endpoint": "Description.Account.Properties.PrimaryEndpoints.Queue", + "primary_table_endpoint": "Description.Account.Properties.PrimaryEndpoints.Table", + "primary_web_endpoint": "Description.Account.Properties.PrimaryEndpoints.Web", + "private_endpoint_connections": "Description.Account.Properties.PrivateEndpointConnections", + "provisioning_state": "Description.Account.Properties.ProvisioningState", + "public_network_access": "Description.Account.Properties.PublicNetworkAccess", + "queue_logging_delete": "Description.StorageServiceProperties.Logging.Delete", + "queue_logging_read": "Description.StorageServiceProperties.Logging.Read", + "queue_logging_retention_days": "Description.Logging.RetentionPolicy.Days", + "queue_logging_retention_enabled": "Description.Logging.RetentionPolicy.Enabled", + "queue_logging_version": "Description.StorageServiceProperties.Logging.Version", + "queue_logging_write": "Description.StorageServiceProperties.Logging.Write", + "require_infrastructure_encryption": "Description.Account.Properties.Encryption.RequireInfrastructureEncryption", + "sas_policy": "Description.Account.Properties.SasPolicy", + "secondary_location": "Description.Account.Properties.SecondaryLocation", + "sku_name": "Description.Account.SKU.Name", + "sku_tier": "Description.Account.SKU.Tier", + "status_of_primary": "Description.Account.Properties.StatusOfPrimary", + "status_of_secondary": "Description.Account.Properties.StatusOfSecondary", + "table_logging_delete": "Description.StorageServiceProperties.Logging.Delete", + "table_logging_read": "Description.StorageServiceProperties.Logging.Read", + "table_logging_retention_policy": "Description.StorageServiceProperties.Logging.RetentionPolicy", + "table_logging_version": "Description.StorageServiceProperties.Logging.Version", + "table_logging_write": "Description.StorageServiceProperties.Logging.Write", + "table_properties": "Description.TableProperties", + "tags": "Description.Account.Tags", + "title": "Description.Account.Name", + "type": "Description.Account.Type", + "virtual_network_rules": "Description.Account.Properties.NetworkRuleSet.VirtualNetworkRules", } func ListStorageAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -52059,71 +41057,70 @@ func ListStorageAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr } var getStorageAccountFilters = map[string]string{ - "access_keys": "description.AccessKeys", - "access_tier": "description.Account.Properties.AccessTier", - "allow_blob_public_access": "description.Account.Properties.AllowBlobPublicAccess", - "blob_change_feed_enabled": "description.BlobServiceProperties.BlobServiceProperties.ChangeFeed.Enabled", - "blob_container_soft_delete_enabled": "description.BlobServiceProperties.BlobServiceProperties.ContainerDeleteRetentionPolicy.Enabled", - "blob_container_soft_delete_retention_days": "description.BlobServiceProperties.BlobServiceProperties.ContainerDeleteRetentionPolicy.Days", - "blob_restore_policy_days": "description.BlobServiceProperties.BlobServiceProperties.RestorePolicy.Days", - "blob_restore_policy_enabled": "description.BlobServiceProperties.BlobServiceProperties.RestorePolicy.Enabled", - "blob_service_logging": "description.Logging", - "blob_soft_delete_enabled": "description.BlobServiceProperties.BlobServiceProperties.ContainerDeleteRetentionPolicy.Enabled", - "blob_soft_delete_retention_days": "description.BlobServiceProperties.BlobServiceProperties.ContainerDeleteRetentionPolicy.Days", - "blob_versioning_enabled": "description.BlobServiceProperties.BlobServiceProperties.IsVersioningEnabled", - "enable_https_traffic_only": "description.Account.Properties.EnableHTTPSTrafficOnly", - "encryption_key_source": "description.Account.Properties.Encryption.KeySource", - "encryption_key_vault_properties_key_current_version_id": "description.Account.Properties.Encryption.KeyVaultProperties.CurrentVersionedKeyIdentifier", - "encryption_key_vault_properties_key_name": "description.Account.Properties.Encryption.KeyVaultProperties.KeyName", - "encryption_key_vault_properties_key_vault_uri": "description.Account.Properties.Encryption.KeyVaultProperties.KeyVaultURI", - "encryption_key_vault_properties_key_version": "description.Account.Properties.Encryption.KeyVaultProperties.KeyVersion", - "encryption_services": "description.Account.Properties.Encryption.Services", - "failover_in_progress": "description.Account.Properties.FailoverInProgress", - "file_soft_delete_enabled": "description.FileServiceProperties.FileServiceProperties.ShareDeleteRetentionPolicy.Enabled", - "file_soft_delete_retention_days": "description.FileServiceProperties.FileServiceProperties.ShareDeleteRetentionPolicy.Days", - "id": "description.Account.ID", - "is_hns_enabled": "description.Account.Properties.IsHnsEnabled", - "og_account_id": "metadata.SourceID", - "kind": "description.Account.Kind", - "minimum_tls_version": "description.Account.Properties.MinimumTLSVersion", + "access_keys": "Description.AccessKeys", + "access_tier": "Description.Account.Properties.AccessTier", + "allow_blob_public_access": "Description.Account.Properties.AllowBlobPublicAccess", + "blob_change_feed_enabled": "Description.BlobServiceProperties.BlobServiceProperties.ChangeFeed.Enabled", + "blob_container_soft_delete_enabled": "Description.BlobServiceProperties.BlobServiceProperties.ContainerDeleteRetentionPolicy.Enabled", + "blob_container_soft_delete_retention_days": "Description.BlobServiceProperties.BlobServiceProperties.ContainerDeleteRetentionPolicy.Days", + "blob_restore_policy_days": "Description.BlobServiceProperties.BlobServiceProperties.RestorePolicy.Days", + "blob_restore_policy_enabled": "Description.BlobServiceProperties.BlobServiceProperties.RestorePolicy.Enabled", + "blob_service_logging": "Description.Logging", + "blob_soft_delete_enabled": "Description.BlobServiceProperties.BlobServiceProperties.ContainerDeleteRetentionPolicy.Enabled", + "blob_soft_delete_retention_days": "Description.BlobServiceProperties.BlobServiceProperties.ContainerDeleteRetentionPolicy.Days", + "blob_versioning_enabled": "Description.BlobServiceProperties.BlobServiceProperties.IsVersioningEnabled", + "enable_https_traffic_only": "Description.Account.Properties.EnableHTTPSTrafficOnly", + "encryption_key_source": "Description.Account.Properties.Encryption.KeySource", + "encryption_key_vault_properties_key_current_version_id": "Description.Account.Properties.Encryption.KeyVaultProperties.CurrentVersionedKeyIdentifier", + "encryption_key_vault_properties_key_name": "Description.Account.Properties.Encryption.KeyVaultProperties.KeyName", + "encryption_key_vault_properties_key_vault_uri": "Description.Account.Properties.Encryption.KeyVaultProperties.KeyVaultURI", + "encryption_key_vault_properties_key_version": "Description.Account.Properties.Encryption.KeyVaultProperties.KeyVersion", + "encryption_services": "Description.Account.Properties.Encryption.Services", + "failover_in_progress": "Description.Account.Properties.FailoverInProgress", + "file_soft_delete_enabled": "Description.FileServiceProperties.FileServiceProperties.ShareDeleteRetentionPolicy.Enabled", + "file_soft_delete_retention_days": "Description.FileServiceProperties.FileServiceProperties.ShareDeleteRetentionPolicy.Days", + "id": "Description.Account.ID", + "is_hns_enabled": "Description.Account.Properties.IsHnsEnabled", + "kind": "Description.Account.Kind", + "minimum_tls_version": "Description.Account.Properties.MinimumTLSVersion", "name": "description.Account.name", - "network_ip_rules": "description.Account.Properties.NetworkRuleSet.IPRules", - "network_rule_bypass": "description.Account.Properties.NetworkRuleSet.Bypass", - "network_rule_default_action": "description.Account.Properties.NetworkRuleSet.DefaultAction", - "primary_blob_endpoint": "description.Account.Properties.PrimaryEndpoints.Blob", - "primary_dfs_endpoint": "description.Account.Properties.PrimaryEndpoints.Dfs", - "primary_file_endpoint": "description.Account.Properties.PrimaryEndpoints.File", - "primary_location": "description.Account.Properties.PrimaryLocation", - "primary_queue_endpoint": "description.Account.Properties.PrimaryEndpoints.Queue", - "primary_table_endpoint": "description.Account.Properties.PrimaryEndpoints.Table", - "primary_web_endpoint": "description.Account.Properties.PrimaryEndpoints.Web", - "private_endpoint_connections": "description.Account.Properties.PrivateEndpointConnections", - "provisioning_state": "description.Account.Properties.ProvisioningState", - "public_network_access": "description.Account.Properties.PublicNetworkAccess", - "queue_logging_delete": "description.StorageServiceProperties.Logging.Delete", - "queue_logging_read": "description.StorageServiceProperties.Logging.Read", - "queue_logging_retention_days": "description.Logging.RetentionPolicy.Days", - "queue_logging_retention_enabled": "description.Logging.RetentionPolicy.Enabled", - "queue_logging_version": "description.StorageServiceProperties.Logging.Version", - "queue_logging_write": "description.StorageServiceProperties.Logging.Write", - "require_infrastructure_encryption": "description.Account.Properties.Encryption.RequireInfrastructureEncryption", + "network_ip_rules": "Description.Account.Properties.NetworkRuleSet.IPRules", + "network_rule_bypass": "Description.Account.Properties.NetworkRuleSet.Bypass", + "network_rule_default_action": "Description.Account.Properties.NetworkRuleSet.DefaultAction", + "primary_blob_endpoint": "Description.Account.Properties.PrimaryEndpoints.Blob", + "primary_dfs_endpoint": "Description.Account.Properties.PrimaryEndpoints.Dfs", + "primary_file_endpoint": "Description.Account.Properties.PrimaryEndpoints.File", + "primary_location": "Description.Account.Properties.PrimaryLocation", + "primary_queue_endpoint": "Description.Account.Properties.PrimaryEndpoints.Queue", + "primary_table_endpoint": "Description.Account.Properties.PrimaryEndpoints.Table", + "primary_web_endpoint": "Description.Account.Properties.PrimaryEndpoints.Web", + "private_endpoint_connections": "Description.Account.Properties.PrivateEndpointConnections", + "provisioning_state": "Description.Account.Properties.ProvisioningState", + "public_network_access": "Description.Account.Properties.PublicNetworkAccess", + "queue_logging_delete": "Description.StorageServiceProperties.Logging.Delete", + "queue_logging_read": "Description.StorageServiceProperties.Logging.Read", + "queue_logging_retention_days": "Description.Logging.RetentionPolicy.Days", + "queue_logging_retention_enabled": "Description.Logging.RetentionPolicy.Enabled", + "queue_logging_version": "Description.StorageServiceProperties.Logging.Version", + "queue_logging_write": "Description.StorageServiceProperties.Logging.Write", + "require_infrastructure_encryption": "Description.Account.Properties.Encryption.RequireInfrastructureEncryption", "resource_group": "description.ResourceGroup", - "sas_policy": "description.Account.Properties.SasPolicy", - "secondary_location": "description.Account.Properties.SecondaryLocation", - "sku_name": "description.Account.SKU.Name", - "sku_tier": "description.Account.SKU.Tier", - "status_of_primary": "description.Account.Properties.StatusOfPrimary", - "status_of_secondary": "description.Account.Properties.StatusOfSecondary", - "table_logging_delete": "description.StorageServiceProperties.Logging.Delete", - "table_logging_read": "description.StorageServiceProperties.Logging.Read", - "table_logging_retention_policy": "description.StorageServiceProperties.Logging.RetentionPolicy", - "table_logging_version": "description.StorageServiceProperties.Logging.Version", - "table_logging_write": "description.StorageServiceProperties.Logging.Write", - "table_properties": "description.TableProperties", - "tags": "description.Account.Tags", - "title": "description.Account.Name", - "type": "description.Account.Type", - "virtual_network_rules": "description.Account.Properties.NetworkRuleSet.VirtualNetworkRules", + "sas_policy": "Description.Account.Properties.SasPolicy", + "secondary_location": "Description.Account.Properties.SecondaryLocation", + "sku_name": "Description.Account.SKU.Name", + "sku_tier": "Description.Account.SKU.Tier", + "status_of_primary": "Description.Account.Properties.StatusOfPrimary", + "status_of_secondary": "Description.Account.Properties.StatusOfSecondary", + "table_logging_delete": "Description.StorageServiceProperties.Logging.Delete", + "table_logging_read": "Description.StorageServiceProperties.Logging.Read", + "table_logging_retention_policy": "Description.StorageServiceProperties.Logging.RetentionPolicy", + "table_logging_version": "Description.StorageServiceProperties.Logging.Version", + "table_logging_write": "Description.StorageServiceProperties.Logging.Write", + "table_properties": "Description.TableProperties", + "tags": "Description.Account.Tags", + "title": "Description.Account.Name", + "type": "Description.Account.Type", + "virtual_network_rules": "Description.Account.Properties.NetworkRuleSet.VirtualNetworkRules", } func GetStorageAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -52184,72 +41181,14 @@ func GetStorageAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra // ========================== START: RecoveryServicesVault ============================= type RecoveryServicesVault struct { - Description azure.RecoveryServicesVaultDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *RecoveryServicesVault) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.RecoveryServicesVaultDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.RecoveryServicesVaultDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type RecoveryServicesVaultHit struct { @@ -52320,22 +41259,21 @@ func (p RecoveryServicesVaultPaginator) NextPage(ctx context.Context) ([]Recover } var listRecoveryServicesVaultFilters = map[string]string{ - "diagnostic_settings": "description.DiagnosticSettingsResource", - "etag": "description.Vault.Etag", - "id": "description.Vault.ID", - "identity": "description.Vault.Identity", - "og_account_id": "metadata.SourceID", - "name": "description.Vault.Name", - "private_endpoint_connections": "description.Vault.Properties.PrivateEndpointConnections", - "private_endpoint_state_for_backup": "description.Vault.Properties.PrivateEndpointStateForBackup", - "private_endpoint_state_for_site_recovery": "description.Vault.Properties.PrivateEndpointStateForSiteRecovery", - "provisioning_state": "description.Vault.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "sku_name": "description.Vault.SKU.Name", - "tags": "description.Vault.Tags", - "title": "description.Vault.Name", - "type": "description.Vault.Type", - "upgrade_details": "description.Vault.Properties.UpgradeDetails", + "diagnostic_settings": "Description.DiagnosticSettingsResource", + "etag": "Description.Vault.Etag", + "id": "Description.Vault.ID", + "identity": "Description.Vault.Identity", + "name": "Description.Vault.Name", + "private_endpoint_connections": "Description.Vault.Properties.PrivateEndpointConnections", + "private_endpoint_state_for_backup": "Description.Vault.Properties.PrivateEndpointStateForBackup", + "private_endpoint_state_for_site_recovery": "Description.Vault.Properties.PrivateEndpointStateForSiteRecovery", + "provisioning_state": "Description.Vault.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "sku_name": "Description.Vault.SKU.Name", + "tags": "Description.Vault.Tags", + "title": "Description.Vault.Name", + "type": "Description.Vault.Type", + "upgrade_details": "Description.Vault.Properties.UpgradeDetails", } func ListRecoveryServicesVault(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -52399,22 +41337,21 @@ func ListRecoveryServicesVault(ctx context.Context, d *plugin.QueryData, _ *plug } var getRecoveryServicesVaultFilters = map[string]string{ - "diagnostic_settings": "description.DiagnosticSettingsResource", - "etag": "description.Vault.Etag", - "id": "description.Vault.ID", - "identity": "description.Vault.Identity", - "og_account_id": "metadata.SourceID", + "diagnostic_settings": "Description.DiagnosticSettingsResource", + "etag": "Description.Vault.Etag", + "id": "Description.Vault.ID", + "identity": "Description.Vault.Identity", "name": "description.Vault.Name", - "private_endpoint_connections": "description.Vault.Properties.PrivateEndpointConnections", - "private_endpoint_state_for_backup": "description.Vault.Properties.PrivateEndpointStateForBackup", - "private_endpoint_state_for_site_recovery": "description.Vault.Properties.PrivateEndpointStateForSiteRecovery", - "provisioning_state": "description.Vault.Properties.ProvisioningState", + "private_endpoint_connections": "Description.Vault.Properties.PrivateEndpointConnections", + "private_endpoint_state_for_backup": "Description.Vault.Properties.PrivateEndpointStateForBackup", + "private_endpoint_state_for_site_recovery": "Description.Vault.Properties.PrivateEndpointStateForSiteRecovery", + "provisioning_state": "Description.Vault.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", - "sku_name": "description.Vault.SKU.Name", - "tags": "description.Vault.Tags", - "title": "description.Vault.Name", - "type": "description.Vault.Type", - "upgrade_details": "description.Vault.Properties.UpgradeDetails", + "sku_name": "Description.Vault.SKU.Name", + "tags": "Description.Vault.Tags", + "title": "Description.Vault.Name", + "type": "Description.Vault.Type", + "upgrade_details": "Description.Vault.Properties.UpgradeDetails", } func GetRecoveryServicesVault(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -52475,72 +41412,14 @@ func GetRecoveryServicesVault(ctx context.Context, d *plugin.QueryData, _ *plugi // ========================== START: RecoveryServicesBackupJob ============================= type RecoveryServicesBackupJob struct { - Description azure.RecoveryServicesBackupJobDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *RecoveryServicesBackupJob) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.RecoveryServicesBackupJobDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.RecoveryServicesBackupJobDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type RecoveryServicesBackupJobHit struct { @@ -52611,16 +41490,15 @@ func (p RecoveryServicesBackupJobPaginator) NextPage(ctx context.Context) ([]Rec } var listRecoveryServicesBackupJobFilters = map[string]string{ - "etag": "description.Job.ETag", - "id": "description.Job.ID", - "og_account_id": "metadata.SourceID", - "name": "description.Job.Name", - "properties": "description.Properties", - "resource_group": "description.ResourceGroup", - "tags": "description.Job.Tags", - "title": "description.Job.Name", - "type": "description.Job.Type", - "vault_name": "description.VaultName", + "etag": "Description.Job.ETag", + "id": "Description.Job.ID", + "name": "Description.Job.Name", + "properties": "Description.Properties", + "resource_group": "Description.ResourceGroup", + "tags": "Description.Job.Tags", + "title": "Description.Job.Name", + "type": "Description.Job.Type", + "vault_name": "Description.VaultName", } func ListRecoveryServicesBackupJob(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -52684,16 +41562,15 @@ func ListRecoveryServicesBackupJob(ctx context.Context, d *plugin.QueryData, _ * } var getRecoveryServicesBackupJobFilters = map[string]string{ - "etag": "description.Job.ETag", - "id": "description.Job.ID", - "og_account_id": "metadata.SourceID", + "etag": "Description.Job.ETag", + "id": "Description.Job.ID", "name": "description.Vault.Name", - "properties": "description.Properties", + "properties": "Description.Properties", "resource_group": "description.ResourceGroup", - "tags": "description.Job.Tags", - "title": "description.Job.Name", - "type": "description.Job.Type", - "vault_name": "description.VaultName", + "tags": "Description.Job.Tags", + "title": "Description.Job.Name", + "type": "Description.Job.Type", + "vault_name": "Description.VaultName", } func GetRecoveryServicesBackupJob(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -52754,72 +41631,14 @@ func GetRecoveryServicesBackupJob(ctx context.Context, d *plugin.QueryData, _ *p // ========================== START: RecoveryServicesBackupPolicy ============================= type RecoveryServicesBackupPolicy struct { - Description azure.RecoveryServicesBackupPolicyDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *RecoveryServicesBackupPolicy) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.RecoveryServicesBackupPolicyDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.RecoveryServicesBackupPolicyDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type RecoveryServicesBackupPolicyHit struct { @@ -52890,13 +41709,12 @@ func (p RecoveryServicesBackupPolicyPaginator) NextPage(ctx context.Context) ([] } var listRecoveryServicesBackupPolicyFilters = map[string]string{ - "id": "description.Policy.ID", - "og_account_id": "metadata.SourceID", - "name": "description.Policy.Name", - "properties": "description.Properties", - "resource_group": "description.ResourceGroup", - "title": "description.Policy.Name", - "vault_name": "description.VaultName", + "id": "Description.Policy.ID", + "name": "Description.Policy.Name", + "properties": "Description.Properties", + "resource_group": "Description.ResourceGroup", + "title": "Description.Policy.Name", + "vault_name": "Description.VaultName", } func ListRecoveryServicesBackupPolicy(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -52960,13 +41778,12 @@ func ListRecoveryServicesBackupPolicy(ctx context.Context, d *plugin.QueryData, } var getRecoveryServicesBackupPolicyFilters = map[string]string{ - "id": "description.Policy.ID", - "og_account_id": "metadata.SourceID", + "id": "Description.Policy.ID", "name": "description.Policy.Name", - "properties": "description.Properties", + "properties": "Description.Properties", "resource_group": "description.ResourceGroup", - "title": "description.Policy.Name", - "vault_name": "description.VaultName", + "title": "Description.Policy.Name", + "vault_name": "Description.VaultName", } func GetRecoveryServicesBackupPolicy(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -53027,72 +41844,14 @@ func GetRecoveryServicesBackupPolicy(ctx context.Context, d *plugin.QueryData, _ // ========================== START: RecoveryServicesBackupItem ============================= type RecoveryServicesBackupItem struct { - Description azure.RecoveryServicesBackupItemDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *RecoveryServicesBackupItem) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.RecoveryServicesBackupItemDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.RecoveryServicesBackupItemDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type RecoveryServicesBackupItemHit struct { @@ -53163,13 +41922,12 @@ func (p RecoveryServicesBackupItemPaginator) NextPage(ctx context.Context) ([]Re } var listRecoveryServicesBackupItemFilters = map[string]string{ - "id": "description.Item.ID", - "og_account_id": "metadata.SourceID", - "name": "description.Item.Name", - "properties": "description.Properties", - "resource_group": "description.ResourceGroup", - "title": "description.Item.Name", - "vault_name": "description.VaultName", + "id": "Description.Item.ID", + "name": "Description.Item.Name", + "properties": "Description.Properties", + "resource_group": "Description.ResourceGroup", + "title": "Description.Item.Name", + "vault_name": "Description.VaultName", } func ListRecoveryServicesBackupItem(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -53233,13 +41991,12 @@ func ListRecoveryServicesBackupItem(ctx context.Context, d *plugin.QueryData, _ } var getRecoveryServicesBackupItemFilters = map[string]string{ - "id": "description.Item.ID", - "og_account_id": "metadata.SourceID", + "id": "Description.Item.ID", "name": "description.Item.Name", - "properties": "description.Properties", + "properties": "Description.Properties", "resource_group": "description.ResourceGroup", - "title": "description.Item.Name", - "vault_name": "description.VaultName", + "title": "Description.Item.Name", + "vault_name": "Description.VaultName", } func GetRecoveryServicesBackupItem(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -53300,72 +42057,14 @@ func GetRecoveryServicesBackupItem(ctx context.Context, d *plugin.QueryData, _ * // ========================== START: HybridKubernetesConnectedCluster ============================= type HybridKubernetesConnectedCluster struct { - Description azure.HybridKubernetesConnectedClusterDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *HybridKubernetesConnectedCluster) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.HybridKubernetesConnectedClusterDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.HybridKubernetesConnectedClusterDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type HybridKubernetesConnectedClusterHit struct { @@ -53436,29 +42135,28 @@ func (p HybridKubernetesConnectedClusterPaginator) NextPage(ctx context.Context) } var listHybridKubernetesConnectedClusterFilters = map[string]string{ - "agent_public_key_certificate": "description.ConnectedCluster.Properties.AgentPublicKeyCertificate", - "agent_version": "description.ConnectedCluster.Properties.AgentVersion", - "connectivity_status": "description.ConnectedCluster.Properties.ConnectivityStatus", - "created_by": "description.ConnectedCluster.SystemData.CreatedBy", - "created_by_type": "description.ConnectedCluster.SystemData.CreatedByType", - "distribution": "description.ConnectedCluster.Properties.Distribution", - "extensions": "description.ConnectedClusterExtensions", - "identity": "description.ConnectedCluster.Identity", - "infrastructure": "description.ConnectedCluster.Properties.Infrastructure", - "og_account_id": "metadata.SourceID", - "kubernetes_version": "description.ConnectedCluster.Properties.KubernetesVersion", - "last_modified_by": "description.ConnectedCluster.SystemData.LastModifiedBy", - "last_modified_by_type": "description.ConnectedCluster.SystemData.LastModifiedByType", - "location": "description.ConnectedCluster.Location", - "name": "description.ConnectedCluster.Name", - "offering": "description.ConnectedCluster.Properties.Offering", - "provisioning_state": "description.ConnectedCluster.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "tags": "description.ConnectedCluster.Tags", - "title": "description.ConnectedCluster.Name", - "total_core_count": "description.ConnectedCluster.Properties.TotalCoreCount", - "total_node_count": "description.ConnectedCluster.Properties.TotalNodeCount", - "type": "description.ConnectedCluster.Type", + "agent_public_key_certificate": "Description.ConnectedCluster.Properties.AgentPublicKeyCertificate", + "agent_version": "Description.ConnectedCluster.Properties.AgentVersion", + "connectivity_status": "Description.ConnectedCluster.Properties.ConnectivityStatus", + "created_by": "Description.ConnectedCluster.SystemData.CreatedBy", + "created_by_type": "Description.ConnectedCluster.SystemData.CreatedByType", + "distribution": "Description.ConnectedCluster.Properties.Distribution", + "extensions": "Description.ConnectedClusterExtensions", + "identity": "Description.ConnectedCluster.Identity", + "infrastructure": "Description.ConnectedCluster.Properties.Infrastructure", + "kubernetes_version": "Description.ConnectedCluster.Properties.KubernetesVersion", + "last_modified_by": "Description.ConnectedCluster.SystemData.LastModifiedBy", + "last_modified_by_type": "Description.ConnectedCluster.SystemData.LastModifiedByType", + "location": "Description.ConnectedCluster.Location", + "name": "Description.ConnectedCluster.Name", + "offering": "Description.ConnectedCluster.Properties.Offering", + "provisioning_state": "Description.ConnectedCluster.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "tags": "Description.ConnectedCluster.Tags", + "title": "Description.ConnectedCluster.Name", + "total_core_count": "Description.ConnectedCluster.Properties.TotalCoreCount", + "total_node_count": "Description.ConnectedCluster.Properties.TotalNodeCount", + "type": "Description.ConnectedCluster.Type", } func ListHybridKubernetesConnectedCluster(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -53522,29 +42220,28 @@ func ListHybridKubernetesConnectedCluster(ctx context.Context, d *plugin.QueryDa } var getHybridKubernetesConnectedClusterFilters = map[string]string{ - "agent_public_key_certificate": "description.ConnectedCluster.Properties.AgentPublicKeyCertificate", - "agent_version": "description.ConnectedCluster.Properties.AgentVersion", - "connectivity_status": "description.ConnectedCluster.Properties.ConnectivityStatus", - "created_by": "description.ConnectedCluster.SystemData.CreatedBy", - "created_by_type": "description.ConnectedCluster.SystemData.CreatedByType", - "distribution": "description.ConnectedCluster.Properties.Distribution", - "extensions": "description.ConnectedClusterExtensions", - "identity": "description.ConnectedCluster.Identity", - "infrastructure": "description.ConnectedCluster.Properties.Infrastructure", - "og_account_id": "metadata.SourceID", - "kubernetes_version": "description.ConnectedCluster.Properties.KubernetesVersion", - "last_modified_by": "description.ConnectedCluster.SystemData.LastModifiedBy", - "last_modified_by_type": "description.ConnectedCluster.SystemData.LastModifiedByType", - "location": "description.ConnectedCluster.Location", + "agent_public_key_certificate": "Description.ConnectedCluster.Properties.AgentPublicKeyCertificate", + "agent_version": "Description.ConnectedCluster.Properties.AgentVersion", + "connectivity_status": "Description.ConnectedCluster.Properties.ConnectivityStatus", + "created_by": "Description.ConnectedCluster.SystemData.CreatedBy", + "created_by_type": "Description.ConnectedCluster.SystemData.CreatedByType", + "distribution": "Description.ConnectedCluster.Properties.Distribution", + "extensions": "Description.ConnectedClusterExtensions", + "identity": "Description.ConnectedCluster.Identity", + "infrastructure": "Description.ConnectedCluster.Properties.Infrastructure", + "kubernetes_version": "Description.ConnectedCluster.Properties.KubernetesVersion", + "last_modified_by": "Description.ConnectedCluster.SystemData.LastModifiedBy", + "last_modified_by_type": "Description.ConnectedCluster.SystemData.LastModifiedByType", + "location": "Description.ConnectedCluster.Location", "name": "description.ConnectedCluster.Name", - "offering": "description.ConnectedCluster.Properties.Offering", - "provisioning_state": "description.ConnectedCluster.Properties.ProvisioningState", + "offering": "Description.ConnectedCluster.Properties.Offering", + "provisioning_state": "Description.ConnectedCluster.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", - "tags": "description.ConnectedCluster.Tags", - "title": "description.ConnectedCluster.Name", - "total_core_count": "description.ConnectedCluster.Properties.TotalCoreCount", - "total_node_count": "description.ConnectedCluster.Properties.TotalNodeCount", - "type": "description.ConnectedCluster.Type", + "tags": "Description.ConnectedCluster.Tags", + "title": "Description.ConnectedCluster.Name", + "total_core_count": "Description.ConnectedCluster.Properties.TotalCoreCount", + "total_node_count": "Description.ConnectedCluster.Properties.TotalNodeCount", + "type": "Description.ConnectedCluster.Type", } func GetHybridKubernetesConnectedCluster(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -53605,72 +42302,14 @@ func GetHybridKubernetesConnectedCluster(ctx context.Context, d *plugin.QueryDat // ========================== START: CostManagementCostByResourceType ============================= type CostManagementCostByResourceType struct { - Description azure.CostManagementCostByResourceTypeDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *CostManagementCostByResourceType) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.CostManagementCostByResourceTypeDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.CostManagementCostByResourceTypeDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type CostManagementCostByResourceTypeHit struct { @@ -53741,13 +42380,12 @@ func (p CostManagementCostByResourceTypePaginator) NextPage(ctx context.Context) } var listCostManagementCostByResourceTypeFilters = map[string]string{ - "cost": "description.CostManagementCostByResourceType.Cost", - "id": "ID", - "og_account_id": "metadata.SourceID", - "publisher_type": "description.CostManagementCostByResourceType.PublisherType", - "resource_type": "metadata.ResourceType", - "service_name": "description.CostManagementCostByResourceType.ServiceName", - "usage_date": "description.CostManagementCostByResourceType.UsageDate", + "cost": "Description.CostManagementCostByResourceType.Cost", + "id": "ResourceID", + "publisher_type": "Description.CostManagementCostByResourceType.PublisherType", + "resource_type": "Metadata.ResourceType", + "service_name": "Description.CostManagementCostByResourceType.ServiceName", + "usage_date": "Description.CostManagementCostByResourceType.UsageDate", } func ListCostManagementCostByResourceType(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -53811,13 +42449,12 @@ func ListCostManagementCostByResourceType(ctx context.Context, d *plugin.QueryDa } var getCostManagementCostByResourceTypeFilters = map[string]string{ - "cost": "description.CostManagementCostByResourceType.Cost", - "id": "ID", - "og_account_id": "metadata.SourceID", - "publisher_type": "description.CostManagementCostByResourceType.PublisherType", - "resource_type": "metadata.ResourceType", - "service_name": "description.CostManagementCostByResourceType.ServiceName", - "usage_date": "description.CostManagementCostByResourceType.UsageDate", + "cost": "Description.CostManagementCostByResourceType.Cost", + "id": "ResourceID", + "publisher_type": "Description.CostManagementCostByResourceType.PublisherType", + "resource_type": "Metadata.ResourceType", + "service_name": "Description.CostManagementCostByResourceType.ServiceName", + "usage_date": "Description.CostManagementCostByResourceType.UsageDate", } func GetCostManagementCostByResourceType(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -53878,72 +42515,14 @@ func GetCostManagementCostByResourceType(ctx context.Context, d *plugin.QueryDat // ========================== START: CostManagementCostBySubscription ============================= type CostManagementCostBySubscription struct { - Description azure.CostManagementCostBySubscriptionDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *CostManagementCostBySubscription) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.CostManagementCostBySubscriptionDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.CostManagementCostBySubscriptionDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type CostManagementCostBySubscriptionHit struct { @@ -54014,9 +42593,8 @@ func (p CostManagementCostBySubscriptionPaginator) NextPage(ctx context.Context) } var listCostManagementCostBySubscriptionFilters = map[string]string{ - "id": "ID", - "og_account_id": "metadata.SourceID", - "name": "description.CostManagementCostBySubscription", + "id": "ResourceID", + "name": "Description.CostManagementCostBySubscription", } func ListCostManagementCostBySubscription(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -54080,9 +42658,8 @@ func ListCostManagementCostBySubscription(ctx context.Context, d *plugin.QueryDa } var getCostManagementCostBySubscriptionFilters = map[string]string{ - "id": "ID", - "og_account_id": "metadata.SourceID", - "name": "description.CostManagementCostBySubscription", + "id": "ResourceID", + "name": "Description.CostManagementCostBySubscription", } func GetCostManagementCostBySubscription(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -54143,72 +42720,14 @@ func GetCostManagementCostBySubscription(ctx context.Context, d *plugin.QueryDat // ========================== START: LoadBalancer ============================= type LoadBalancer struct { - Description azure.LoadBalancerDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *LoadBalancer) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.LoadBalancerDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.LoadBalancerDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type LoadBalancerHit struct { @@ -54279,28 +42798,27 @@ func (p LoadBalancerPaginator) NextPage(ctx context.Context) ([]LoadBalancer, er } var listLoadBalancerFilters = map[string]string{ - "backend_address_pools": "description.LoadBalancer.Properties.BackendAddressPools", - "diagnostic_settings": "description.DiagnosticSetting", - "etag": "description.LoadBalancer.Etag", - "extended_location_name": "description.LoadBalancer.ExtendedLocation.Name", - "extended_location_type": "description.LoadBalancer.ExtendedLocation.Type", - "frontend_ip_configurations": "description.LoadBalancer.Properties.FrontendIPConfigurations", - "id": "description.LoadBalancer.ID", - "inbound_nat_pools": "description.LoadBalancer.Properties.InboundNatPools", - "inbound_nat_rules": "description.LoadBalancer.Properties.InboundNatRules", - "og_account_id": "metadata.SourceID", - "load_balancing_rules": "description.LoadBalancer.Properties.LoadBalancingRules", - "name": "description.LoadBalancer.Name", - "outbound_rules": "description.LoadBalancer.Properties.OutboundRules", - "probes": "description.LoadBalancer.Properties.Probes", - "provisioning_state": "description.LoadBalancer.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "resource_guid": "description.LoadBalancer.Properties.ResourceGUID", - "sku_name": "description.LoadBalancer.SKU.Name", - "sku_tier": "description.LoadBalancer.SKU.Tier", - "tags": "description.LoadBalancer.Tags", - "title": "description.LoadBalancer.Name", - "type": "description.LoadBalancer.Type", + "backend_address_pools": "Description.LoadBalancer.Properties.BackendAddressPools", + "diagnostic_settings": "Description.DiagnosticSetting", + "etag": "Description.LoadBalancer.Etag", + "extended_location_name": "Description.LoadBalancer.ExtendedLocation.Name", + "extended_location_type": "Description.LoadBalancer.ExtendedLocation.Type", + "frontend_ip_configurations": "Description.LoadBalancer.Properties.FrontendIPConfigurations", + "id": "Description.LoadBalancer.ID", + "inbound_nat_pools": "Description.LoadBalancer.Properties.InboundNatPools", + "inbound_nat_rules": "Description.LoadBalancer.Properties.InboundNatRules", + "load_balancing_rules": "Description.LoadBalancer.Properties.LoadBalancingRules", + "name": "Description.LoadBalancer.Name", + "outbound_rules": "Description.LoadBalancer.Properties.OutboundRules", + "probes": "Description.LoadBalancer.Properties.Probes", + "provisioning_state": "Description.LoadBalancer.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "resource_guid": "Description.LoadBalancer.Properties.ResourceGUID", + "sku_name": "Description.LoadBalancer.SKU.Name", + "sku_tier": "Description.LoadBalancer.SKU.Tier", + "tags": "Description.LoadBalancer.Tags", + "title": "Description.LoadBalancer.Name", + "type": "Description.LoadBalancer.Type", } func ListLoadBalancer(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -54364,28 +42882,27 @@ func ListLoadBalancer(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat } var getLoadBalancerFilters = map[string]string{ - "backend_address_pools": "description.LoadBalancer.Properties.BackendAddressPools", - "diagnostic_settings": "description.DiagnosticSetting", - "etag": "description.LoadBalancer.Etag", - "extended_location_name": "description.LoadBalancer.ExtendedLocation.Name", - "extended_location_type": "description.LoadBalancer.ExtendedLocation.Type", - "frontend_ip_configurations": "description.LoadBalancer.Properties.FrontendIPConfigurations", - "id": "description.LoadBalancer.ID", - "inbound_nat_pools": "description.LoadBalancer.Properties.InboundNatPools", - "inbound_nat_rules": "description.LoadBalancer.Properties.InboundNatRules", - "og_account_id": "metadata.SourceID", - "load_balancing_rules": "description.LoadBalancer.Properties.LoadBalancingRules", + "backend_address_pools": "Description.LoadBalancer.Properties.BackendAddressPools", + "diagnostic_settings": "Description.DiagnosticSetting", + "etag": "Description.LoadBalancer.Etag", + "extended_location_name": "Description.LoadBalancer.ExtendedLocation.Name", + "extended_location_type": "Description.LoadBalancer.ExtendedLocation.Type", + "frontend_ip_configurations": "Description.LoadBalancer.Properties.FrontendIPConfigurations", + "id": "Description.LoadBalancer.ID", + "inbound_nat_pools": "Description.LoadBalancer.Properties.InboundNatPools", + "inbound_nat_rules": "Description.LoadBalancer.Properties.InboundNatRules", + "load_balancing_rules": "Description.LoadBalancer.Properties.LoadBalancingRules", "name": "description.LoadBalancer.Name", - "outbound_rules": "description.LoadBalancer.Properties.OutboundRules", - "probes": "description.LoadBalancer.Properties.Probes", - "provisioning_state": "description.LoadBalancer.Properties.ProvisioningState", + "outbound_rules": "Description.LoadBalancer.Properties.OutboundRules", + "probes": "Description.LoadBalancer.Properties.Probes", + "provisioning_state": "Description.LoadBalancer.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", - "resource_guid": "description.LoadBalancer.Properties.ResourceGUID", - "sku_name": "description.LoadBalancer.SKU.Name", - "sku_tier": "description.LoadBalancer.SKU.Tier", - "tags": "description.LoadBalancer.Tags", - "title": "description.LoadBalancer.Name", - "type": "description.LoadBalancer.Type", + "resource_guid": "Description.LoadBalancer.Properties.ResourceGUID", + "sku_name": "Description.LoadBalancer.SKU.Name", + "sku_tier": "Description.LoadBalancer.SKU.Tier", + "tags": "Description.LoadBalancer.Tags", + "title": "Description.LoadBalancer.Name", + "type": "Description.LoadBalancer.Type", } func GetLoadBalancer(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -54446,72 +42963,14 @@ func GetLoadBalancer(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate // ========================== START: LoadBalancerBackendAddressPool ============================= type LoadBalancerBackendAddressPool struct { - Description azure.LoadBalancerBackendAddressPoolDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *LoadBalancerBackendAddressPool) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.LoadBalancerBackendAddressPoolDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.LoadBalancerBackendAddressPoolDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type LoadBalancerBackendAddressPoolHit struct { @@ -54582,21 +43041,20 @@ func (p LoadBalancerBackendAddressPoolPaginator) NextPage(ctx context.Context) ( } var listLoadBalancerBackendAddressPoolFilters = map[string]string{ - "backend_ip_configurations": "description.Pool.Properties.BackendIPConfigurations", - "etag": "description.Pool.Etag", - "gateway_load_balancer_tunnel_interface": "description.Pool.Properties.TunnelInterfaces", - "id": "description.Pool.ID", - "og_account_id": "metadata.SourceID", - "load_balancer_backend_addresses": "description.Pool.Properties.LoadBalancerBackendAddresses", - "load_balancer_name": "description.LoadBalancer.Name", - "load_balancing_rules": "description.LoadBalancer.Properties.LoadBalancingRules", - "name": "description.Pool.Name", - "outbound_rule_id": "description.Pool.Properties.OutboundRule.ID", - "outbound_rules": "description.LoadBalancer.Properties.OutboundRules", - "provisioning_state": "description.LoadBalancer.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "title": "description.Pool.Name", - "type": "description.Pool.Type", + "backend_ip_configurations": "Description.Pool.Properties.BackendIPConfigurations", + "etag": "Description.Pool.Etag", + "gateway_load_balancer_tunnel_interface": "Description.Pool.Properties.TunnelInterfaces", + "id": "Description.Pool.ID", + "load_balancer_backend_addresses": "Description.Pool.Properties.LoadBalancerBackendAddresses", + "load_balancer_name": "Description.LoadBalancer.Name", + "load_balancing_rules": "Description.LoadBalancer.Properties.LoadBalancingRules", + "name": "Description.Pool.Name", + "outbound_rule_id": "Description.Pool.Properties.OutboundRule.ID", + "outbound_rules": "Description.LoadBalancer.Properties.OutboundRules", + "provisioning_state": "Description.LoadBalancer.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "title": "Description.Pool.Name", + "type": "Description.Pool.Type", } func ListLoadBalancerBackendAddressPool(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -54660,21 +43118,20 @@ func ListLoadBalancerBackendAddressPool(ctx context.Context, d *plugin.QueryData } var getLoadBalancerBackendAddressPoolFilters = map[string]string{ - "backend_ip_configurations": "description.Pool.Properties.BackendIPConfigurations", - "etag": "description.Pool.Etag", - "gateway_load_balancer_tunnel_interface": "description.Pool.Properties.TunnelInterfaces", - "id": "description.Pool.ID", - "og_account_id": "metadata.SourceID", - "load_balancer_backend_addresses": "description.Pool.Properties.LoadBalancerBackendAddresses", + "backend_ip_configurations": "Description.Pool.Properties.BackendIPConfigurations", + "etag": "Description.Pool.Etag", + "gateway_load_balancer_tunnel_interface": "Description.Pool.Properties.TunnelInterfaces", + "id": "Description.Pool.ID", + "load_balancer_backend_addresses": "Description.Pool.Properties.LoadBalancerBackendAddresses", "load_balancer_name": "description.LoadBalancer.Name", - "load_balancing_rules": "description.LoadBalancer.Properties.LoadBalancingRules", + "load_balancing_rules": "Description.LoadBalancer.Properties.LoadBalancingRules", "name": "description.Pool.Name", - "outbound_rule_id": "description.Pool.Properties.OutboundRule.ID", - "outbound_rules": "description.LoadBalancer.Properties.OutboundRules", - "provisioning_state": "description.LoadBalancer.Properties.ProvisioningState", + "outbound_rule_id": "Description.Pool.Properties.OutboundRule.ID", + "outbound_rules": "Description.LoadBalancer.Properties.OutboundRules", + "provisioning_state": "Description.LoadBalancer.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", - "title": "description.Pool.Name", - "type": "description.Pool.Type", + "title": "Description.Pool.Name", + "type": "Description.Pool.Type", } func GetLoadBalancerBackendAddressPool(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -54735,72 +43192,14 @@ func GetLoadBalancerBackendAddressPool(ctx context.Context, d *plugin.QueryData, // ========================== START: LoadBalancerNatRule ============================= type LoadBalancerNatRule struct { - Description azure.LoadBalancerNatRuleDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *LoadBalancerNatRule) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.LoadBalancerNatRuleDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.LoadBalancerNatRuleDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type LoadBalancerNatRuleHit struct { @@ -54871,23 +43270,22 @@ func (p LoadBalancerNatRulePaginator) NextPage(ctx context.Context) ([]LoadBalan } var listLoadBalancerNatRuleFilters = map[string]string{ - "backend_ip_configuration": "description.Rule.Properties.BackendIPConfiguration", - "backend_port": "description.Rule.Properties.BackendPort", - "enable_floating_ip": "description.Rule.Properties.EnableFloatingIP", - "enable_tcp_reset": "description.Rule.Properties.EnableTCPReset", - "etag": "description.Rule.Etag", - "frontend_ip_configuration": "description.Rule.Properties.FrontendIPConfiguration", - "frontend_port": "description.Rule.Properties.FrontendPort", - "id": "description.Rule.ID", - "idle_timeout_in_minutes": "description.Rule.Properties.IdleTimeoutInMinutes", - "og_account_id": "metadata.SourceID", - "load_balancer_name": "description.LoadBalancerName", - "name": "description.Rule.Name", - "protocol": "description.Rule.Properties.Protocol", - "provisioning_state": "description.Rule.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "title": "description.Rule.Name", - "type": "description.Rule.Type", + "backend_ip_configuration": "Description.Rule.Properties.BackendIPConfiguration", + "backend_port": "Description.Rule.Properties.BackendPort", + "enable_floating_ip": "Description.Rule.Properties.EnableFloatingIP", + "enable_tcp_reset": "Description.Rule.Properties.EnableTCPReset", + "etag": "Description.Rule.Etag", + "frontend_ip_configuration": "Description.Rule.Properties.FrontendIPConfiguration", + "frontend_port": "Description.Rule.Properties.FrontendPort", + "id": "Description.Rule.ID", + "idle_timeout_in_minutes": "Description.Rule.Properties.IdleTimeoutInMinutes", + "load_balancer_name": "Description.LoadBalancerName", + "name": "Description.Rule.Name", + "protocol": "Description.Rule.Properties.Protocol", + "provisioning_state": "Description.Rule.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "title": "Description.Rule.Name", + "type": "Description.Rule.Type", } func ListLoadBalancerNatRule(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -54951,23 +43349,22 @@ func ListLoadBalancerNatRule(ctx context.Context, d *plugin.QueryData, _ *plugin } var getLoadBalancerNatRuleFilters = map[string]string{ - "backend_ip_configuration": "description.Rule.Properties.BackendIPConfiguration", - "backend_port": "description.Rule.Properties.BackendPort", - "enable_floating_ip": "description.Rule.Properties.EnableFloatingIP", - "enable_tcp_reset": "description.Rule.Properties.EnableTCPReset", - "etag": "description.Rule.Etag", - "frontend_ip_configuration": "description.Rule.Properties.FrontendIPConfiguration", - "frontend_port": "description.Rule.Properties.FrontendPort", - "id": "description.Rule.ID", - "idle_timeout_in_minutes": "description.Rule.Properties.IdleTimeoutInMinutes", - "og_account_id": "metadata.SourceID", + "backend_ip_configuration": "Description.Rule.Properties.BackendIPConfiguration", + "backend_port": "Description.Rule.Properties.BackendPort", + "enable_floating_ip": "Description.Rule.Properties.EnableFloatingIP", + "enable_tcp_reset": "Description.Rule.Properties.EnableTCPReset", + "etag": "Description.Rule.Etag", + "frontend_ip_configuration": "Description.Rule.Properties.FrontendIPConfiguration", + "frontend_port": "Description.Rule.Properties.FrontendPort", + "id": "Description.Rule.ID", + "idle_timeout_in_minutes": "Description.Rule.Properties.IdleTimeoutInMinutes", "load_balancer_name": "description.LoadBalancerName", "name": "description.Rule.Name", - "protocol": "description.Rule.Properties.Protocol", - "provisioning_state": "description.Rule.Properties.ProvisioningState", + "protocol": "Description.Rule.Properties.Protocol", + "provisioning_state": "Description.Rule.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", - "title": "description.Rule.Name", - "type": "description.Rule.Type", + "title": "Description.Rule.Name", + "type": "Description.Rule.Type", } func GetLoadBalancerNatRule(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -55028,72 +43425,14 @@ func GetLoadBalancerNatRule(ctx context.Context, d *plugin.QueryData, _ *plugin. // ========================== START: LoadBalancerOutboundRule ============================= type LoadBalancerOutboundRule struct { - Description azure.LoadBalancerOutboundRuleDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *LoadBalancerOutboundRule) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.LoadBalancerOutboundRuleDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.LoadBalancerOutboundRuleDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type LoadBalancerOutboundRuleHit struct { @@ -55164,21 +43503,20 @@ func (p LoadBalancerOutboundRulePaginator) NextPage(ctx context.Context) ([]Load } var listLoadBalancerOutboundRuleFilters = map[string]string{ - "allocated_outbound_ports": "description.Rule.Properties.AllocatedOutboundPorts", - "backend_address_pools": "description.Rule.Properties.BackendAddressPool", - "enable_tcp_reset": "description.Rule.Properties.EnableTCPReset", - "etag": "description.Rule.Etag", - "frontend_ip_configurations": "description.Rule.Properties.FrontendIPConfigurations", - "id": "description.Rule.ID", - "idle_timeout_in_minutes": "description.Rule.Properties.IdleTimeoutInMinutes", - "og_account_id": "metadata.SourceID", - "load_balancer_name": "description.LoadBalancerName", - "name": "description.Rule.Name", - "protocol": "description.Rule.Properties.Protocol", - "provisioning_state": "description.Rule.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "title": "description.Rule.Name", - "type": "description.Rule.Type", + "allocated_outbound_ports": "Description.Rule.Properties.AllocatedOutboundPorts", + "backend_address_pools": "Description.Rule.Properties.BackendAddressPool", + "enable_tcp_reset": "Description.Rule.Properties.EnableTCPReset", + "etag": "Description.Rule.Etag", + "frontend_ip_configurations": "Description.Rule.Properties.FrontendIPConfigurations", + "id": "Description.Rule.ID", + "idle_timeout_in_minutes": "Description.Rule.Properties.IdleTimeoutInMinutes", + "load_balancer_name": "Description.LoadBalancerName", + "name": "Description.Rule.Name", + "protocol": "Description.Rule.Properties.Protocol", + "provisioning_state": "Description.Rule.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "title": "Description.Rule.Name", + "type": "Description.Rule.Type", } func ListLoadBalancerOutboundRule(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -55242,21 +43580,20 @@ func ListLoadBalancerOutboundRule(ctx context.Context, d *plugin.QueryData, _ *p } var getLoadBalancerOutboundRuleFilters = map[string]string{ - "allocated_outbound_ports": "description.Rule.Properties.AllocatedOutboundPorts", - "backend_address_pools": "description.Rule.Properties.BackendAddressPool", - "enable_tcp_reset": "description.Rule.Properties.EnableTCPReset", - "etag": "description.Rule.Etag", - "frontend_ip_configurations": "description.Rule.Properties.FrontendIPConfigurations", - "id": "description.Rule.ID", - "idle_timeout_in_minutes": "description.Rule.Properties.IdleTimeoutInMinutes", - "og_account_id": "metadata.SourceID", + "allocated_outbound_ports": "Description.Rule.Properties.AllocatedOutboundPorts", + "backend_address_pools": "Description.Rule.Properties.BackendAddressPool", + "enable_tcp_reset": "Description.Rule.Properties.EnableTCPReset", + "etag": "Description.Rule.Etag", + "frontend_ip_configurations": "Description.Rule.Properties.FrontendIPConfigurations", + "id": "Description.Rule.ID", + "idle_timeout_in_minutes": "Description.Rule.Properties.IdleTimeoutInMinutes", "load_balancer_name": "description.LoadBalancerName", "name": "description.Rule.Name", - "protocol": "description.Rule.Properties.Protocol", - "provisioning_state": "description.Rule.Properties.ProvisioningState", + "protocol": "Description.Rule.Properties.Protocol", + "provisioning_state": "Description.Rule.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", - "title": "description.Rule.Name", - "type": "description.Rule.Type", + "title": "Description.Rule.Name", + "type": "Description.Rule.Type", } func GetLoadBalancerOutboundRule(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -55317,72 +43654,14 @@ func GetLoadBalancerOutboundRule(ctx context.Context, d *plugin.QueryData, _ *pl // ========================== START: LoadBalancerProbe ============================= type LoadBalancerProbe struct { - Description azure.LoadBalancerProbeDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *LoadBalancerProbe) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.LoadBalancerProbeDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.LoadBalancerProbeDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type LoadBalancerProbeHit struct { @@ -55453,21 +43732,20 @@ func (p LoadBalancerProbePaginator) NextPage(ctx context.Context) ([]LoadBalance } var listLoadBalancerProbeFilters = map[string]string{ - "etag": "description.Probe.Etag", - "id": "description.Probe.ID", - "interval_in_seconds": "description.Probe.Properties.IntervalInSeconds", - "og_account_id": "metadata.SourceID", - "load_balancer_name": "description.LoadBalancerName", - "load_balancing_rules": "description.Probe.Properties.LoadBalancingRules", - "name": "description.Probe.Name", - "number_of_probes": "description.Probe.Properties.NumberOfProbes", - "port": "description.Probe.Properties.Port", - "protocol": "description.Probe.Properties.Protocol", - "provisioning_state": "description.Probe.Properties.ProvisioningState", - "request_path": "description.Probe.Properties.RequestPath", - "resource_group": "description.ResourceGroup", - "title": "description.Probe.Name", - "type": "description.Probe.Type", + "etag": "Description.Probe.Etag", + "id": "Description.Probe.ID", + "interval_in_seconds": "Description.Probe.Properties.IntervalInSeconds", + "load_balancer_name": "Description.LoadBalancerName", + "load_balancing_rules": "Description.Probe.Properties.LoadBalancingRules", + "name": "Description.Probe.Name", + "number_of_probes": "Description.Probe.Properties.NumberOfProbes", + "port": "Description.Probe.Properties.Port", + "protocol": "Description.Probe.Properties.Protocol", + "provisioning_state": "Description.Probe.Properties.ProvisioningState", + "request_path": "Description.Probe.Properties.RequestPath", + "resource_group": "Description.ResourceGroup", + "title": "Description.Probe.Name", + "type": "Description.Probe.Type", } func ListLoadBalancerProbe(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -55531,21 +43809,20 @@ func ListLoadBalancerProbe(ctx context.Context, d *plugin.QueryData, _ *plugin.H } var getLoadBalancerProbeFilters = map[string]string{ - "etag": "description.Probe.Etag", - "id": "description.Probe.ID", - "interval_in_seconds": "description.Probe.Properties.IntervalInSeconds", - "og_account_id": "metadata.SourceID", + "etag": "Description.Probe.Etag", + "id": "Description.Probe.ID", + "interval_in_seconds": "Description.Probe.Properties.IntervalInSeconds", "load_balancer_name": "description.LoadBalancerName", - "load_balancing_rules": "description.Probe.Properties.LoadBalancingRules", + "load_balancing_rules": "Description.Probe.Properties.LoadBalancingRules", "name": "description.Probe.Name", - "number_of_probes": "description.Probe.Properties.NumberOfProbes", - "port": "description.Probe.Properties.Port", - "protocol": "description.Probe.Properties.Protocol", - "provisioning_state": "description.Probe.Properties.ProvisioningState", - "request_path": "description.Probe.Properties.RequestPath", + "number_of_probes": "Description.Probe.Properties.NumberOfProbes", + "port": "Description.Probe.Properties.Port", + "protocol": "Description.Probe.Properties.Protocol", + "provisioning_state": "Description.Probe.Properties.ProvisioningState", + "request_path": "Description.Probe.Properties.RequestPath", "resource_group": "description.ResourceGroup", - "title": "description.Probe.Name", - "type": "description.Probe.Type", + "title": "Description.Probe.Name", + "type": "Description.Probe.Type", } func GetLoadBalancerProbe(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -55606,72 +43883,14 @@ func GetLoadBalancerProbe(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy // ========================== START: LoadBalancerRule ============================= type LoadBalancerRule struct { - Description azure.LoadBalancerRuleDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *LoadBalancerRule) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.LoadBalancerRuleDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.LoadBalancerRuleDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type LoadBalancerRuleHit struct { @@ -55742,27 +43961,26 @@ func (p LoadBalancerRulePaginator) NextPage(ctx context.Context) ([]LoadBalancer } var listLoadBalancerRuleFilters = map[string]string{ - "backend_address_pool_id": "description.Rule.Properties.BackendAddressPool.ID", - "backend_address_pools": "description.Rule.Properties.BackendAddressPools", - "backend_port": "description.Rule.Properties.BackendPort", - "disable_outbound_snat": "description.Rule.Properties.DisableOutboundSnat", - "enable_floating_ip": "description.Rule.Properties.EnableFloatingIP", - "enable_tcp_reset": "description.Rule.Properties.EnableTCPReset", - "etag": "description.Rule.Etag", - "frontend_ip_configuration_id": "description.Rule.Properties.FrontendIPConfiguration.ID", - "frontend_port": "description.Rule.Properties.FrontendPort", - "id": "description.Rule.ID", - "idle_timeout_in_minutes": "description.Rule.Properties.IdleTimeoutInMinutes", - "og_account_id": "metadata.SourceID", - "load_balancer_name": "description.LoadBalancerName", - "load_distribution": "description.Rule.Properties.LoadDistribution", - "name": "description.Rule.Name", - "probe_id": "description.Rule.Properties.Probe.ID", - "protocol": "description.Rule.Properties.Protocol", - "provisioning_state": "description.Rule.Properties.ProvisioningState", - "resource_group": "description.ResourceGroup", - "title": "description.Rule.Name", - "type": "description.Rule.Type", + "backend_address_pool_id": "Description.Rule.Properties.BackendAddressPool.ID", + "backend_address_pools": "Description.Rule.Properties.BackendAddressPools", + "backend_port": "Description.Rule.Properties.BackendPort", + "disable_outbound_snat": "Description.Rule.Properties.DisableOutboundSnat", + "enable_floating_ip": "Description.Rule.Properties.EnableFloatingIP", + "enable_tcp_reset": "Description.Rule.Properties.EnableTCPReset", + "etag": "Description.Rule.Etag", + "frontend_ip_configuration_id": "Description.Rule.Properties.FrontendIPConfiguration.ID", + "frontend_port": "Description.Rule.Properties.FrontendPort", + "id": "Description.Rule.ID", + "idle_timeout_in_minutes": "Description.Rule.Properties.IdleTimeoutInMinutes", + "load_balancer_name": "Description.LoadBalancerName", + "load_distribution": "Description.Rule.Properties.LoadDistribution", + "name": "Description.Rule.Name", + "probe_id": "Description.Rule.Properties.Probe.ID", + "protocol": "Description.Rule.Properties.Protocol", + "provisioning_state": "Description.Rule.Properties.ProvisioningState", + "resource_group": "Description.ResourceGroup", + "title": "Description.Rule.Name", + "type": "Description.Rule.Type", } func ListLoadBalancerRule(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -55826,27 +44044,26 @@ func ListLoadBalancerRule(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy } var getLoadBalancerRuleFilters = map[string]string{ - "backend_address_pool_id": "description.Rule.Properties.BackendAddressPool.ID", - "backend_address_pools": "description.Rule.Properties.BackendAddressPools", - "backend_port": "description.Rule.Properties.BackendPort", - "disable_outbound_snat": "description.Rule.Properties.DisableOutboundSnat", - "enable_floating_ip": "description.Rule.Properties.EnableFloatingIP", - "enable_tcp_reset": "description.Rule.Properties.EnableTCPReset", - "etag": "description.Rule.Etag", - "frontend_ip_configuration_id": "description.Rule.Properties.FrontendIPConfiguration.ID", - "frontend_port": "description.Rule.Properties.FrontendPort", - "id": "description.Rule.ID", - "idle_timeout_in_minutes": "description.Rule.Properties.IdleTimeoutInMinutes", - "og_account_id": "metadata.SourceID", + "backend_address_pool_id": "Description.Rule.Properties.BackendAddressPool.ID", + "backend_address_pools": "Description.Rule.Properties.BackendAddressPools", + "backend_port": "Description.Rule.Properties.BackendPort", + "disable_outbound_snat": "Description.Rule.Properties.DisableOutboundSnat", + "enable_floating_ip": "Description.Rule.Properties.EnableFloatingIP", + "enable_tcp_reset": "Description.Rule.Properties.EnableTCPReset", + "etag": "Description.Rule.Etag", + "frontend_ip_configuration_id": "Description.Rule.Properties.FrontendIPConfiguration.ID", + "frontend_port": "Description.Rule.Properties.FrontendPort", + "id": "Description.Rule.ID", + "idle_timeout_in_minutes": "Description.Rule.Properties.IdleTimeoutInMinutes", "load_balancer_name": "description.LoadBalancerName", - "load_distribution": "description.Rule.Properties.LoadDistribution", + "load_distribution": "Description.Rule.Properties.LoadDistribution", "name": "description.Rule.Name", - "probe_id": "description.Rule.Properties.Probe.ID", - "protocol": "description.Rule.Properties.Protocol", - "provisioning_state": "description.Rule.Properties.ProvisioningState", + "probe_id": "Description.Rule.Properties.Probe.ID", + "protocol": "Description.Rule.Properties.Protocol", + "provisioning_state": "Description.Rule.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", - "title": "description.Rule.Name", - "type": "description.Rule.Type", + "title": "Description.Rule.Name", + "type": "Description.Rule.Type", } func GetLoadBalancerRule(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -55907,72 +44124,14 @@ func GetLoadBalancerRule(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd // ========================== START: ManagementGroup ============================= type ManagementGroup struct { - Description azure.ManagementGroupDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *ManagementGroup) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.ManagementGroupDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.ManagementGroupDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type ManagementGroupHit struct { @@ -56043,18 +44202,17 @@ func (p ManagementGroupPaginator) NextPage(ctx context.Context) ([]ManagementGro } var listManagementGroupFilters = map[string]string{ - "children": "description.Group.Properties.Children", - "display_name": "description.Group.Properties.DisplayName", - "id": "description.Group.ID", - "og_account_id": "metadata.SourceID", - "name": "description.Group.Name", - "parent": "description.Group.Properties.Details.Parent", - "tenant_id": "description.Group.Properties.TenantID", - "title": "description.Group.Name", - "type": "description.Group.Type", - "updated_by": "description.Group.Properties.Details.UpdatedBy", - "updated_time": "description.Group.Properties.Details.UpdatedTime.Time", - "version": "description.Group.Properties.Details.Version", + "children": "Description.Group.Properties.Children", + "display_name": "Description.Group.Properties.DisplayName", + "id": "Description.Group.ID", + "name": "Description.Group.Name", + "parent": "Description.Group.Properties.Details.Parent", + "tenant_id": "Description.Group.Properties.TenantID", + "title": "Description.Group.Name", + "type": "Description.Group.Type", + "updated_by": "Description.Group.Properties.Details.UpdatedBy", + "updated_time": "Description.Group.Properties.Details.UpdatedTime.Time", + "version": "Description.Group.Properties.Details.Version", } func ListManagementGroup(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -56118,18 +44276,17 @@ func ListManagementGroup(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd } var getManagementGroupFilters = map[string]string{ - "children": "description.Group.Properties.Children", - "display_name": "description.Group.Properties.DisplayName", - "id": "description.Group.ID", - "og_account_id": "metadata.SourceID", - "name": "description.Group.Name", - "parent": "description.Group.Properties.Details.Parent", - "tenant_id": "description.Group.Properties.TenantID", - "title": "description.Group.Name", - "type": "description.Group.Type", - "updated_by": "description.Group.Properties.Details.UpdatedBy", - "updated_time": "description.Group.Properties.Details.UpdatedTime.Time", - "version": "description.Group.Properties.Details.Version", + "children": "Description.Group.Properties.Children", + "display_name": "Description.Group.Properties.DisplayName", + "id": "Description.Group.ID", + "name": "description.Group.Name", + "parent": "Description.Group.Properties.Details.Parent", + "tenant_id": "Description.Group.Properties.TenantID", + "title": "Description.Group.Name", + "type": "Description.Group.Type", + "updated_by": "Description.Group.Properties.Details.UpdatedBy", + "updated_time": "Description.Group.Properties.Details.UpdatedTime.Time", + "version": "Description.Group.Properties.Details.Version", } func GetManagementGroup(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -56190,72 +44347,14 @@ func GetManagementGroup(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr // ========================== START: ManagementLock ============================= type ManagementLock struct { - Description azure.ManagementLockDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *ManagementLock) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.ManagementLockDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.ManagementLockDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type ManagementLockHit struct { @@ -56326,14 +44425,13 @@ func (p ManagementLockPaginator) NextPage(ctx context.Context) ([]ManagementLock } var listManagementLockFilters = map[string]string{ - "id": "description.Lock.ID", - "og_account_id": "metadata.SourceID", - "lock_level": "description.Lock.Properties.Level", - "name": "description.Lock.Name", - "notes": "description.Lock.Properties.Notes", - "owners": "description.Lock.Properties.Owners", - "title": "description.Lock.Name", - "type": "description.Lock.Type", + "id": "Description.Lock.ID", + "lock_level": "Description.Lock.Properties.Level", + "name": "Description.Lock.Name", + "notes": "Description.Lock.Properties.Notes", + "owners": "Description.Lock.Properties.Owners", + "title": "Description.Lock.Name", + "type": "Description.Lock.Type", } func ListManagementLock(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -56397,15 +44495,14 @@ func ListManagementLock(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr } var getManagementLockFilters = map[string]string{ - "id": "description.Lock.ID", - "og_account_id": "metadata.SourceID", - "lock_level": "description.Lock.Properties.Level", + "id": "Description.Lock.ID", + "lock_level": "Description.Lock.Properties.Level", "name": "description.Lock.Name", - "notes": "description.Lock.Properties.Notes", - "owners": "description.Lock.Properties.Owners", + "notes": "Description.Lock.Properties.Notes", + "owners": "Description.Lock.Properties.Owners", "resource_group": "description.ResourceGroup", - "title": "description.Lock.Name", - "type": "description.Lock.Type", + "title": "Description.Lock.Name", + "type": "Description.Lock.Type", } func GetManagementLock(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -56466,72 +44563,14 @@ func GetManagementLock(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra // ========================== START: ResourceProvider ============================= type ResourceProvider struct { - Description azure.ResourceProviderDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *ResourceProvider) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.ResourceProviderDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.ResourceProviderDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type ResourceProviderHit struct { @@ -56602,12 +44641,11 @@ func (p ResourceProviderPaginator) NextPage(ctx context.Context) ([]ResourceProv } var listResourceProviderFilters = map[string]string{ - "id": "description.Provider.ID", - "og_account_id": "metadata.SourceID", - "namespace": "description.Provider.Namespace", - "registration_state": "description.Provider.RegistrationState", - "resource_types": "description.Provider.ResourceTypes", - "title": "description.Provider.Namespace", + "id": "Description.Provider.ID", + "namespace": "Description.Provider.Namespace", + "registration_state": "Description.Provider.RegistrationState", + "resource_types": "Description.Provider.ResourceTypes", + "title": "Description.Provider.Namespace", } func ListResourceProvider(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -56671,12 +44709,11 @@ func ListResourceProvider(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy } var getResourceProviderFilters = map[string]string{ - "id": "description.Provider.ID", - "og_account_id": "metadata.SourceID", + "id": "Description.Provider.ID", "namespace": "description.Provider.Namespace", - "registration_state": "description.Provider.RegistrationState", - "resource_types": "description.Provider.ResourceTypes", - "title": "description.Provider.Namespace", + "registration_state": "Description.Provider.RegistrationState", + "resource_types": "Description.Provider.ResourceTypes", + "title": "Description.Provider.Namespace", } func GetResourceProvider(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -56737,72 +44774,14 @@ func GetResourceProvider(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd // ========================== START: ResourceGroup ============================= type ResourceGroup struct { - Description azure.ResourceGroupDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *ResourceGroup) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.ResourceGroupDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.ResourceGroupDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type ResourceGroupHit struct { @@ -56873,14 +44852,13 @@ func (p ResourceGroupPaginator) NextPage(ctx context.Context) ([]ResourceGroup, } var listResourceGroupFilters = map[string]string{ - "id": "description.Group.ID", - "og_account_id": "metadata.SourceID", - "managed_by": "description.Group.ManagedBy", - "name": "description.Group.Name", - "provisioning_state": "description.Group.Properties.ProvisioningState", - "tags": "description.Group.Tags", - "title": "description.Group.Name", - "type": "description.Group.Type", + "id": "Description.Group.ID", + "managed_by": "Description.Group.ManagedBy", + "name": "Description.Group.Name", + "provisioning_state": "Description.Group.Properties.ProvisioningState", + "tags": "Description.Group.Tags", + "title": "Description.Group.Name", + "type": "Description.Group.Type", } func ListResourceGroup(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -56944,14 +44922,13 @@ func ListResourceGroup(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra } var getResourceGroupFilters = map[string]string{ - "id": "description.Group.ID", - "og_account_id": "metadata.SourceID", - "managed_by": "description.Group.ManagedBy", + "id": "Description.Group.ID", + "managed_by": "Description.Group.ManagedBy", "name": "description.Group.Name", - "provisioning_state": "description.Group.Properties.ProvisioningState", - "tags": "description.Group.Tags", - "title": "description.Group.Name", - "type": "description.Group.Type", + "provisioning_state": "Description.Group.Properties.ProvisioningState", + "tags": "Description.Group.Tags", + "title": "Description.Group.Name", + "type": "Description.Group.Type", } func GetResourceGroup(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -57012,72 +44989,14 @@ func GetResourceGroup(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat // ========================== START: GenericResource ============================= type GenericResource struct { - Description azure.GenericResourceDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *GenericResource) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.GenericResourceDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.GenericResourceDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type GenericResourceHit struct { @@ -57148,26 +45067,26 @@ func (p GenericResourcePaginator) NextPage(ctx context.Context) ([]GenericResour } var listGenericResourceFilters = map[string]string{ - "changed_time": "description.GenericResource.ChangedTime", - "created_time": "description.GenericResource.CreatedTime", - "extended_location": "description.GenericResource.ExtendedLocation", - "id": "description.GenericResource.ID", - "identity": "description.GenericResource.Identity", - "identity_principal_id": "description.GenericResource.Identity.PrincipalID", - "kind": "description.GenericResource.Kind", - "managed_by": "description.GenericResource.ManagedBy", - "name": "description.GenericResource.Name", - "plan_name": "description.GenericResource.Plan.Name", - "plan_product": "description.GenericResource.Plan.Product", - "plan_promotion_code": "description.GenericResource.Plan.PromotionCode", - "plan_publisher": "description.GenericResource.Plan.Publisher", - "plan_version": "description.GenericResource.Plan.Version", - "properties": "description.GenericResource.Properties", - "provisioning_state": "description.GenericResource.Identity.ProvisioningState", - "sku": "description.GenericResource.SKU", - "tags": "description.GenericResource.Tags", - "title": "description.GenericResource.Name", - "type": "description.GenericResource.Type", + "changed_time": "Description.GenericResource.ChangedTime", + "created_time": "Description.GenericResource.CreatedTime", + "extended_location": "Description.GenericResource.ExtendedLocation", + "id": "Description.GenericResource.ID", + "identity": "Description.GenericResource.Identity", + "identity_principal_id": "Description.GenericResource.Identity.PrincipalID", + "kind": "Description.GenericResource.Kind", + "managed_by": "Description.GenericResource.ManagedBy", + "name": "Description.GenericResource.Name", + "plan_name": "Description.GenericResource.Plan.Name", + "plan_product": "Description.GenericResource.Plan.Product", + "plan_promotion_code": "Description.GenericResource.Plan.PromotionCode", + "plan_publisher": "Description.GenericResource.Plan.Publisher", + "plan_version": "Description.GenericResource.Plan.Version", + "properties": "Description.GenericResource.Properties", + "provisioning_state": "Description.GenericResource.Identity.ProvisioningState", + "sku": "Description.GenericResource.SKU", + "tags": "Description.GenericResource.Tags", + "title": "Description.GenericResource.Name", + "type": "Description.GenericResource.Type", } func ListGenericResource(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -57231,26 +45150,26 @@ func ListGenericResource(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd } var getGenericResourceFilters = map[string]string{ - "changed_time": "description.GenericResource.ChangedTime", - "created_time": "description.GenericResource.CreatedTime", - "extended_location": "description.GenericResource.ExtendedLocation", - "id": "description.GenericResource.ID", - "identity": "description.GenericResource.Identity", - "identity_principal_id": "description.GenericResource.Identity.PrincipalID", - "kind": "description.GenericResource.Kind", - "managed_by": "description.GenericResource.ManagedBy", - "name": "description.GenericResource.Name", - "plan_name": "description.GenericResource.Plan.Name", - "plan_product": "description.GenericResource.Plan.Product", - "plan_promotion_code": "description.GenericResource.Plan.PromotionCode", - "plan_publisher": "description.GenericResource.Plan.Publisher", - "plan_version": "description.GenericResource.Plan.Version", - "properties": "description.GenericResource.Properties", - "provisioning_state": "description.GenericResource.Identity.ProvisioningState", - "sku": "description.GenericResource.SKU", - "tags": "description.GenericResource.Tags", - "title": "description.GenericResource.Name", - "type": "description.GenericResource.Type", + "changed_time": "Description.GenericResource.ChangedTime", + "created_time": "Description.GenericResource.CreatedTime", + "extended_location": "Description.GenericResource.ExtendedLocation", + "id": "Description.GenericResource.ID", + "identity": "Description.GenericResource.Identity", + "identity_principal_id": "Description.GenericResource.Identity.PrincipalID", + "kind": "Description.GenericResource.Kind", + "managed_by": "Description.GenericResource.ManagedBy", + "name": "Description.GenericResource.Name", + "plan_name": "Description.GenericResource.Plan.Name", + "plan_product": "Description.GenericResource.Plan.Product", + "plan_promotion_code": "Description.GenericResource.Plan.PromotionCode", + "plan_publisher": "Description.GenericResource.Plan.Publisher", + "plan_version": "Description.GenericResource.Plan.Version", + "properties": "Description.GenericResource.Properties", + "provisioning_state": "Description.GenericResource.Identity.ProvisioningState", + "sku": "Description.GenericResource.SKU", + "tags": "Description.GenericResource.Tags", + "title": "Description.GenericResource.Name", + "type": "Description.GenericResource.Type", } func GetGenericResource(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -57311,72 +45230,14 @@ func GetGenericResource(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr // ========================== START: BotServiceBot ============================= type BotServiceBot struct { - Description azure.BotServiceBotDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *BotServiceBot) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.BotServiceBotDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.BotServiceBotDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type BotServiceBotHit struct { @@ -57447,10 +45308,10 @@ func (p BotServiceBotPaginator) NextPage(ctx context.Context) ([]BotServiceBot, } var listBotServiceBotFilters = map[string]string{ - "id": "description.Bot.ID", - "name": "description.Bot.Name", - "tags": "description.Bot.Tags", - "title": "description.Bot.Properties.DisplayName", + "id": "Description.Bot.ID", + "name": "Description.Bot.Name", + "tags": "Description.Bot.Tags", + "title": "Description.Bot.Properties.DisplayName", } func ListBotServiceBot(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -57514,10 +45375,10 @@ func ListBotServiceBot(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra } var getBotServiceBotFilters = map[string]string{ - "id": "description.Bot.ID", - "name": "description.Bot.Name", - "tags": "description.Bot.Tags", - "title": "description.Bot.Properties.DisplayName", + "id": "Description.Bot.ID", + "name": "Description.Bot.Name", + "tags": "Description.Bot.Tags", + "title": "Description.Bot.Properties.DisplayName", } func GetBotServiceBot(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -57578,72 +45439,14 @@ func GetBotServiceBot(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat // ========================== START: NetAppAccount ============================= type NetAppAccount struct { - Description azure.NetAppAccountDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *NetAppAccount) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.NetAppAccountDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.NetAppAccountDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type NetAppAccountHit struct { @@ -57714,10 +45517,10 @@ func (p NetAppAccountPaginator) NextPage(ctx context.Context) ([]NetAppAccount, } var listNetAppAccountFilters = map[string]string{ - "id": "description.Account.ID", - "name": "description.Account.Name", - "tags": "description.Account.Tags", - "title": "description.Account.Name", + "id": "Description.Account.ID", + "name": "Description.Account.Name", + "tags": "Description.Account.Tags", + "title": "Description.Account.Name", } func ListNetAppAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -57781,10 +45584,10 @@ func ListNetAppAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra } var getNetAppAccountFilters = map[string]string{ - "id": "description.Account.ID", - "name": "description.Account.Name", - "tags": "description.Account.Tags", - "title": "description.Account.Name", + "id": "Description.Account.ID", + "name": "Description.Account.Name", + "tags": "Description.Account.Tags", + "title": "Description.Account.Name", } func GetNetAppAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -57845,72 +45648,14 @@ func GetNetAppAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat // ========================== START: NetAppCapacityPool ============================= type NetAppCapacityPool struct { - Description azure.NetAppCapacityPoolDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *NetAppCapacityPool) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.NetAppCapacityPoolDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.NetAppCapacityPoolDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type NetAppCapacityPoolHit struct { @@ -57981,10 +45726,10 @@ func (p NetAppCapacityPoolPaginator) NextPage(ctx context.Context) ([]NetAppCapa } var listNetAppCapacityPoolFilters = map[string]string{ - "id": "description.CapacityPool.ID", - "name": "description.CapacityPool.Name", - "tags": "description.CapacityPool.Tags", - "title": "description.CapacityPool.Name", + "id": "Description.CapacityPool.ID", + "name": "Description.CapacityPool.Name", + "tags": "Description.CapacityPool.Tags", + "title": "Description.CapacityPool.Name", } func ListNetAppCapacityPool(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -58048,10 +45793,10 @@ func ListNetAppCapacityPool(ctx context.Context, d *plugin.QueryData, _ *plugin. } var getNetAppCapacityPoolFilters = map[string]string{ - "id": "description.CapacityPool.ID", - "name": "description.CapacityPool.Name", - "tags": "description.CapacityPool.Tags", - "title": "description.CapacityPool.Name", + "id": "Description.CapacityPool.ID", + "name": "Description.CapacityPool.Name", + "tags": "Description.CapacityPool.Tags", + "title": "Description.CapacityPool.Name", } func GetNetAppCapacityPool(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -58112,72 +45857,14 @@ func GetNetAppCapacityPool(ctx context.Context, d *plugin.QueryData, _ *plugin.H // ========================== START: DashboardGrafana ============================= type DashboardGrafana struct { - Description azure.DashboardGrafanaDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *DashboardGrafana) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.DashboardGrafanaDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.DashboardGrafanaDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type DashboardGrafanaHit struct { @@ -58248,9 +45935,9 @@ func (p DashboardGrafanaPaginator) NextPage(ctx context.Context) ([]DashboardGra } var listDashboardGrafanaFilters = map[string]string{ - "id": "description.Grafana.ID", - "name": "description.Grafana.Name", - "title": "description.Grafana.Name", + "id": "Description.Grafana.ID", + "name": "Description.Grafana.Name", + "title": "Description.Grafana.Name", } func ListDashboardGrafana(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -58314,9 +46001,9 @@ func ListDashboardGrafana(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy } var getDashboardGrafanaFilters = map[string]string{ - "id": "description.Grafana.ID", - "name": "description.Grafana.Name", - "title": "description.Grafana.Name", + "id": "Description.Grafana.ID", + "name": "Description.Grafana.Name", + "title": "Description.Grafana.Name", } func GetDashboardGrafana(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -58377,72 +46064,14 @@ func GetDashboardGrafana(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd // ========================== START: DesktopVirtualizationHostPool ============================= type DesktopVirtualizationHostPool struct { - Description azure.DesktopVirtualizationHostPoolDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *DesktopVirtualizationHostPool) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.DesktopVirtualizationHostPoolDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.DesktopVirtualizationHostPoolDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type DesktopVirtualizationHostPoolHit struct { @@ -58513,10 +46142,10 @@ func (p DesktopVirtualizationHostPoolPaginator) NextPage(ctx context.Context) ([ } var listDesktopVirtualizationHostPoolFilters = map[string]string{ - "id": "description.HostPool.ID", - "name": "description.HostPool.Name", - "tags": "description.HostPool.Tags", - "title": "description.HostPool.Name", + "id": "Description.HostPool.ID", + "name": "Description.HostPool.Name", + "tags": "Description.HostPool.Tags", + "title": "Description.HostPool.Name", } func ListDesktopVirtualizationHostPool(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -58580,10 +46209,10 @@ func ListDesktopVirtualizationHostPool(ctx context.Context, d *plugin.QueryData, } var getDesktopVirtualizationHostPoolFilters = map[string]string{ - "id": "description.HostPool.ID", - "name": "description.HostPool.Name", - "tags": "description.HostPool.Tags", - "title": "description.HostPool.Name", + "id": "Description.HostPool.ID", + "name": "Description.HostPool.Name", + "tags": "Description.HostPool.Tags", + "title": "Description.HostPool.Name", } func GetDesktopVirtualizationHostPool(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -58644,72 +46273,14 @@ func GetDesktopVirtualizationHostPool(ctx context.Context, d *plugin.QueryData, // ========================== START: DesktopVirtualizationWorkspace ============================= type DesktopVirtualizationWorkspace struct { - Description azure.DesktopVirtualizationWorkspaceDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *DesktopVirtualizationWorkspace) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.DesktopVirtualizationWorkspaceDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.DesktopVirtualizationWorkspaceDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type DesktopVirtualizationWorkspaceHit struct { @@ -58780,10 +46351,10 @@ func (p DesktopVirtualizationWorkspacePaginator) NextPage(ctx context.Context) ( } var listDesktopVirtualizationWorkspaceFilters = map[string]string{ - "id": "description.Workspace.ID", - "name": "description.Workspace.Name", - "tags": "description.Workspace.Tags", - "title": "description.Workspace.Name", + "id": "Description.Workspace.ID", + "name": "Description.Workspace.Name", + "tags": "Description.Workspace.Tags", + "title": "Description.Workspace.Name", } func ListDesktopVirtualizationWorkspace(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -58847,10 +46418,10 @@ func ListDesktopVirtualizationWorkspace(ctx context.Context, d *plugin.QueryData } var getDesktopVirtualizationWorkspaceFilters = map[string]string{ - "id": "description.Workspace.ID", - "name": "description.Workspace.Name", - "tags": "description.Workspace.Tags", - "title": "description.Workspace.Name", + "id": "Description.Workspace.ID", + "name": "Description.Workspace.Name", + "tags": "Description.Workspace.Tags", + "title": "Description.Workspace.Name", } func GetDesktopVirtualizationWorkspace(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -58911,72 +46482,14 @@ func GetDesktopVirtualizationWorkspace(ctx context.Context, d *plugin.QueryData, // ========================== START: DevTestLabLab ============================= type DevTestLabLab struct { - Description azure.DevTestLabLabDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *DevTestLabLab) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.DevTestLabLabDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.DevTestLabLabDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type DevTestLabLabHit struct { @@ -59047,10 +46560,10 @@ func (p DevTestLabLabPaginator) NextPage(ctx context.Context) ([]DevTestLabLab, } var listDevTestLabLabFilters = map[string]string{ - "id": "description.Lab.ID", - "name": "description.Lab.Properties.VaultName", - "tags": "description.Lab.Properties.LabStorageType", - "title": "description.Lab.Properties.VaultName", + "id": "Description.Lab.ID", + "name": "Description.Lab.Properties.VaultName", + "tags": "Description.Lab.Properties.LabStorageType", + "title": "Description.Lab.Properties.VaultName", } func ListDevTestLabLab(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -59114,10 +46627,10 @@ func ListDevTestLabLab(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra } var getDevTestLabLabFilters = map[string]string{ - "id": "description.Lab.ID", - "name": "description.Lab.Properties.VaultName", - "tags": "description.Lab.Properties.LabStorageType", - "title": "description.Lab.Properties.VaultName", + "id": "Description.Lab.ID", + "name": "Description.Lab.Properties.VaultName", + "tags": "Description.Lab.Properties.LabStorageType", + "title": "Description.Lab.Properties.VaultName", } func GetDevTestLabLab(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -59178,72 +46691,14 @@ func GetDevTestLabLab(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat // ========================== START: PurviewAccount ============================= type PurviewAccount struct { - Description azure.PurviewAccountDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *PurviewAccount) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.PurviewAccountDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.PurviewAccountDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type PurviewAccountHit struct { @@ -59314,10 +46769,10 @@ func (p PurviewAccountPaginator) NextPage(ctx context.Context) ([]PurviewAccount } var listPurviewAccountFilters = map[string]string{ - "id": "description.Account.ID", - "name": "description.Account.Name", - "tags": "description.Account.Tags", - "title": "description.Account.Name", + "id": "Description.Account.ID", + "name": "Description.Account.Name", + "tags": "Description.Account.Tags", + "title": "Description.Account.Name", } func ListPurviewAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -59381,10 +46836,10 @@ func ListPurviewAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr } var getPurviewAccountFilters = map[string]string{ - "id": "description.Account.ID", - "name": "description.Account.Name", - "tags": "description.Account.Tags", - "title": "description.Account.Name", + "id": "Description.Account.ID", + "name": "Description.Account.Name", + "tags": "Description.Account.Tags", + "title": "Description.Account.Name", } func GetPurviewAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -59445,72 +46900,14 @@ func GetPurviewAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra // ========================== START: PowerBIDedicatedCapacity ============================= type PowerBIDedicatedCapacity struct { - Description azure.PowerBIDedicatedCapacityDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *PowerBIDedicatedCapacity) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.PowerBIDedicatedCapacityDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.PowerBIDedicatedCapacityDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type PowerBIDedicatedCapacityHit struct { @@ -59581,10 +46978,10 @@ func (p PowerBIDedicatedCapacityPaginator) NextPage(ctx context.Context) ([]Powe } var listPowerBIDedicatedCapacityFilters = map[string]string{ - "id": "description.Capacity.ID", - "name": "description.Capacity.Name", - "tags": "description.Capacity.Tags", - "title": "description.Capacity.Name", + "id": "Description.Capacity.ID", + "name": "Description.Capacity.Name", + "tags": "Description.Capacity.Tags", + "title": "Description.Capacity.Name", } func ListPowerBIDedicatedCapacity(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -59648,10 +47045,10 @@ func ListPowerBIDedicatedCapacity(ctx context.Context, d *plugin.QueryData, _ *p } var getPowerBIDedicatedCapacityFilters = map[string]string{ - "id": "description.Capacity.ID", - "name": "description.Capacity.Name", - "tags": "description.Capacity.Tags", - "title": "description.Capacity.Name", + "id": "Description.Capacity.ID", + "name": "Description.Capacity.Name", + "tags": "Description.Capacity.Tags", + "title": "Description.Capacity.Name", } func GetPowerBIDedicatedCapacity(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -59712,72 +47109,14 @@ func GetPowerBIDedicatedCapacity(ctx context.Context, d *plugin.QueryData, _ *pl // ========================== START: ApplicationInsightsComponent ============================= type ApplicationInsightsComponent struct { - Description azure.ApplicationInsightsComponentDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *ApplicationInsightsComponent) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.ApplicationInsightsComponentDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.ApplicationInsightsComponentDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type ApplicationInsightsComponentHit struct { @@ -59848,34 +47187,34 @@ func (p ApplicationInsightsComponentPaginator) NextPage(ctx context.Context) ([] } var listApplicationInsightsComponentFilters = map[string]string{ - "app_id": "description.Component.Properties.AppID", - "application_type": "description.Component.Properties.ApplicationType", - "connection_string": "description.Component.Properties.ConnectionString", - "creation_date": "description.Component.Properties.CreationDate", - "disable_ip_masking": "description.Component.Properties.DisableIPMasking", - "disable_local_auth": "description.Component.Properties.DisableLocalAuth", - "etag": "description.Component.Etag", - "flow_type": "description.Component.Properties.FlowType", - "force_customer_storage_for_profiler": "description.Component.Properties.ForceCustomerStorageForProfiler", - "id": "description.Component.ID", - "immediate_purge_data_on_30_days": "description.Component.Properties.ImmediatePurgeDataOn30Days", - "ingestion_mode": "description.Component.Properties.IngestionMode", - "instrumentation_key": "description.Component.Properties.InstrumentationKey", - "kind": "description.Component.Kind", - "name": "description.Component.Name", - "private_link_scoped_resources": "description.Component.Properties.PrivateLinkScopedResources", - "provisioning_state": "description.Component.Properties.ProvisioningState", - "public_network_access_for_ingestion": "description.Component.Properties.PublicNetworkAccessForIngestion", - "public_network_access_for_query": "description.Component.Properties.PublicNetworkAccessForQuery", - "request_source": "description.Component.Properties.RequestSource", - "resource_group": "description.ResourceGroup", - "retention_in_days": "description.Component.Properties.RetentionInDays", - "sampling_percentage": "description.Component.Properties.SamplingPercentage", - "tags": "description.Component.Tags", - "tenant_id": "description.Component.Properties.TenantID", - "title": "description.Component.Name", - "type": "description.Component.Type", - "workspace_resource_id": "description.Component.Properties.WorkspaceResourceID", + "app_id": "Description.Component.Properties.AppID", + "application_type": "Description.Component.Properties.ApplicationType", + "connection_string": "Description.Component.Properties.ConnectionString", + "creation_date": "Description.Component.Properties.CreationDate", + "disable_ip_masking": "Description.Component.Properties.DisableIPMasking", + "disable_local_auth": "Description.Component.Properties.DisableLocalAuth", + "etag": "Description.Component.Etag", + "flow_type": "Description.Component.Properties.FlowType", + "force_customer_storage_for_profiler": "Description.Component.Properties.ForceCustomerStorageForProfiler", + "id": "Description.Component.ID", + "immediate_purge_data_on_30_days": "Description.Component.Properties.ImmediatePurgeDataOn30Days", + "ingestion_mode": "Description.Component.Properties.IngestionMode", + "instrumentation_key": "Description.Component.Properties.InstrumentationKey", + "kind": "Description.Component.Kind", + "name": "Description.Component.Name", + "private_link_scoped_resources": "Description.Component.Properties.PrivateLinkScopedResources", + "provisioning_state": "Description.Component.Properties.ProvisioningState", + "public_network_access_for_ingestion": "Description.Component.Properties.PublicNetworkAccessForIngestion", + "public_network_access_for_query": "Description.Component.Properties.PublicNetworkAccessForQuery", + "request_source": "Description.Component.Properties.RequestSource", + "resource_group": "Description.ResourceGroup", + "retention_in_days": "Description.Component.Properties.RetentionInDays", + "sampling_percentage": "Description.Component.Properties.SamplingPercentage", + "tags": "Description.Component.Tags", + "tenant_id": "Description.Component.Properties.TenantID", + "title": "Description.Component.Name", + "type": "Description.Component.Type", + "workspace_resource_id": "Description.Component.Properties.WorkspaceResourceID", } func ListApplicationInsightsComponent(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -59939,34 +47278,34 @@ func ListApplicationInsightsComponent(ctx context.Context, d *plugin.QueryData, } var getApplicationInsightsComponentFilters = map[string]string{ - "app_id": "description.Component.Properties.AppID", - "application_type": "description.Component.Properties.ApplicationType", - "connection_string": "description.Component.Properties.ConnectionString", - "creation_date": "description.Component.Properties.CreationDate", - "disable_ip_masking": "description.Component.Properties.DisableIPMasking", - "disable_local_auth": "description.Component.Properties.DisableLocalAuth", - "etag": "description.Component.Etag", - "flow_type": "description.Component.Properties.FlowType", - "force_customer_storage_for_profiler": "description.Component.Properties.ForceCustomerStorageForProfiler", - "id": "description.Component.ID", - "immediate_purge_data_on_30_days": "description.Component.Properties.ImmediatePurgeDataOn30Days", - "ingestion_mode": "description.Component.Properties.IngestionMode", - "instrumentation_key": "description.Component.Properties.InstrumentationKey", - "kind": "description.Component.Kind", - "name": "description.Component.Name", - "private_link_scoped_resources": "description.Component.Properties.PrivateLinkScopedResources", - "provisioning_state": "description.Component.Properties.ProvisioningState", - "public_network_access_for_ingestion": "description.Component.Properties.PublicNetworkAccessForIngestion", - "public_network_access_for_query": "description.Component.Properties.PublicNetworkAccessForQuery", - "request_source": "description.Component.Properties.RequestSource", - "resource_group": "description.ResourceGroup", - "retention_in_days": "description.Component.Properties.RetentionInDays", - "sampling_percentage": "description.Component.Properties.SamplingPercentage", - "tags": "description.Component.Tags", - "tenant_id": "description.Component.Properties.TenantID", - "title": "description.Component.Name", - "type": "description.Component.Type", - "workspace_resource_id": "description.Component.Properties.WorkspaceResourceID", + "app_id": "Description.Component.Properties.AppID", + "application_type": "Description.Component.Properties.ApplicationType", + "connection_string": "Description.Component.Properties.ConnectionString", + "creation_date": "Description.Component.Properties.CreationDate", + "disable_ip_masking": "Description.Component.Properties.DisableIPMasking", + "disable_local_auth": "Description.Component.Properties.DisableLocalAuth", + "etag": "Description.Component.Etag", + "flow_type": "Description.Component.Properties.FlowType", + "force_customer_storage_for_profiler": "Description.Component.Properties.ForceCustomerStorageForProfiler", + "id": "Description.Component.ID", + "immediate_purge_data_on_30_days": "Description.Component.Properties.ImmediatePurgeDataOn30Days", + "ingestion_mode": "Description.Component.Properties.IngestionMode", + "instrumentation_key": "Description.Component.Properties.InstrumentationKey", + "kind": "Description.Component.Kind", + "name": "Description.Component.Name", + "private_link_scoped_resources": "Description.Component.Properties.PrivateLinkScopedResources", + "provisioning_state": "Description.Component.Properties.ProvisioningState", + "public_network_access_for_ingestion": "Description.Component.Properties.PublicNetworkAccessForIngestion", + "public_network_access_for_query": "Description.Component.Properties.PublicNetworkAccessForQuery", + "request_source": "Description.Component.Properties.RequestSource", + "resource_group": "Description.ResourceGroup", + "retention_in_days": "Description.Component.Properties.RetentionInDays", + "sampling_percentage": "Description.Component.Properties.SamplingPercentage", + "tags": "Description.Component.Tags", + "tenant_id": "Description.Component.Properties.TenantID", + "title": "Description.Component.Name", + "type": "Description.Component.Type", + "workspace_resource_id": "Description.Component.Properties.WorkspaceResourceID", } func GetApplicationInsightsComponent(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -60027,72 +47366,14 @@ func GetApplicationInsightsComponent(ctx context.Context, d *plugin.QueryData, _ // ========================== START: LighthouseDefinition ============================= type LighthouseDefinition struct { - Description azure.LighthouseDefinitionDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *LighthouseDefinition) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.LighthouseDefinitionDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.LighthouseDefinitionDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type LighthouseDefinitionHit struct { @@ -60163,19 +47444,19 @@ func (p LighthouseDefinitionPaginator) NextPage(ctx context.Context) ([]Lighthou } var listLighthouseDefinitionFilters = map[string]string{ - "authorizations": "description.LighthouseDefinition.Properties.Authorizations", - "description": "description.LighthouseDefinition.Properties.Description", - "eligible_authorizations": "description.LighthouseDefinition.Properties.EligibleAuthorizations", - "id": "description.LighthouseDefinition.ID", - "managed_by_tenant_id": "description.LighthouseDefinition.Properties.ManagedByTenantID", - "managed_by_tenant_name": "description.LighthouseDefinition.Properties.ManagedByTenantName", - "managed_tenant_name": "description.LighthouseDefinition.Properties.ManageeTenantName", - "name": "description.LighthouseDefinition.Name", - "registration_definition_name": "description.LighthouseDefinition.Properties.RegistrationDefinitionName", - "resource_group": "description.ResourceGroup", - "scope": "description.Scope", - "title": "description.LighthouseDefinition.Name", - "type": "description.LighthouseDefinition.Type", + "authorizations": "Description.LighthouseDefinition.Properties.Authorizations", + "description": "Description.LighthouseDefinition.Properties.Description", + "eligible_authorizations": "Description.LighthouseDefinition.Properties.EligibleAuthorizations", + "id": "Description.LighthouseDefinition.ID", + "managed_by_tenant_id": "Description.LighthouseDefinition.Properties.ManagedByTenantID", + "managed_by_tenant_name": "Description.LighthouseDefinition.Properties.ManagedByTenantName", + "managed_tenant_name": "Description.LighthouseDefinition.Properties.ManageeTenantName", + "name": "Description.LighthouseDefinition.Name", + "registration_definition_name": "Description.LighthouseDefinition.Properties.RegistrationDefinitionName", + "resource_group": "Description.ResourceGroup", + "scope": "Description.Scope", + "title": "Description.LighthouseDefinition.Name", + "type": "Description.LighthouseDefinition.Type", } func ListLighthouseDefinition(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -60239,19 +47520,19 @@ func ListLighthouseDefinition(ctx context.Context, d *plugin.QueryData, _ *plugi } var getLighthouseDefinitionFilters = map[string]string{ - "authorizations": "description.LighthouseDefinition.Properties.Authorizations", - "description": "description.LighthouseDefinition.Properties.Description", - "eligible_authorizations": "description.LighthouseDefinition.Properties.EligibleAuthorizations", - "id": "description.LighthouseDefinition.ID", - "managed_by_tenant_id": "description.LighthouseDefinition.Properties.ManagedByTenantID", - "managed_by_tenant_name": "description.LighthouseDefinition.Properties.ManagedByTenantName", - "managed_tenant_name": "description.LighthouseDefinition.Properties.ManageeTenantName", - "name": "description.LighthouseDefinition.Name", - "registration_definition_name": "description.LighthouseDefinition.Properties.RegistrationDefinitionName", - "resource_group": "description.ResourceGroup", - "scope": "description.Scope", - "title": "description.LighthouseDefinition.Name", - "type": "description.LighthouseDefinition.Type", + "authorizations": "Description.LighthouseDefinition.Properties.Authorizations", + "description": "Description.LighthouseDefinition.Properties.Description", + "eligible_authorizations": "Description.LighthouseDefinition.Properties.EligibleAuthorizations", + "id": "Description.LighthouseDefinition.ID", + "managed_by_tenant_id": "Description.LighthouseDefinition.Properties.ManagedByTenantID", + "managed_by_tenant_name": "Description.LighthouseDefinition.Properties.ManagedByTenantName", + "managed_tenant_name": "Description.LighthouseDefinition.Properties.ManageeTenantName", + "name": "Description.LighthouseDefinition.Name", + "registration_definition_name": "Description.LighthouseDefinition.Properties.RegistrationDefinitionName", + "resource_group": "Description.ResourceGroup", + "scope": "Description.Scope", + "title": "Description.LighthouseDefinition.Name", + "type": "Description.LighthouseDefinition.Type", } func GetLighthouseDefinition(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -60312,72 +47593,14 @@ func GetLighthouseDefinition(ctx context.Context, d *plugin.QueryData, _ *plugin // ========================== START: LighthouseAssignment ============================= type LighthouseAssignment struct { - Description azure.LighthouseAssignmentDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *LighthouseAssignment) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.LighthouseAssignmentDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.LighthouseAssignmentDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type LighthouseAssignmentHit struct { @@ -60448,14 +47671,14 @@ func (p LighthouseAssignmentPaginator) NextPage(ctx context.Context) ([]Lighthou } var listLighthouseAssignmentFilters = map[string]string{ - "id": "description.LighthouseAssignment.ID", - "name": "description.LighthouseAssignment.Name", - "provisioning_state": "description.LighthouseAssignment.Properties.ProvisioningState", - "registration_definition_id": "description.LighthouseAssignment.Properties.RegistrationDefinitionID", - "resource_group": "description.ResourceGroup", - "scope": "description.Scope", - "title": "description.LighthouseAssignment.Name", - "type": "description.LighthouseAssignment.Type", + "id": "Description.LighthouseAssignment.ID", + "name": "Description.LighthouseAssignment.Name", + "provisioning_state": "Description.LighthouseAssignment.Properties.ProvisioningState", + "registration_definition_id": "Description.LighthouseAssignment.Properties.RegistrationDefinitionID", + "resource_group": "Description.ResourceGroup", + "scope": "Description.Scope", + "title": "Description.LighthouseAssignment.Name", + "type": "Description.LighthouseAssignment.Type", } func ListLighthouseAssignment(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -60519,14 +47742,14 @@ func ListLighthouseAssignment(ctx context.Context, d *plugin.QueryData, _ *plugi } var getLighthouseAssignmentFilters = map[string]string{ - "id": "description.LighthouseAssignment.ID", - "name": "description.LighthouseAssignment.Name", - "provisioning_state": "description.LighthouseAssignment.Properties.ProvisioningState", - "registration_definition_id": "description.LighthouseAssignment.Properties.RegistrationDefinitionID", - "resource_group": "description.ResourceGroup", - "scope": "description.Scope", - "title": "description.LighthouseAssignment.Name", - "type": "description.LighthouseAssignment.Type", + "id": "Description.LighthouseAssignment.ID", + "name": "Description.LighthouseAssignment.Name", + "provisioning_state": "Description.LighthouseAssignment.Properties.ProvisioningState", + "registration_definition_id": "Description.LighthouseAssignment.Properties.RegistrationDefinitionID", + "resource_group": "Description.ResourceGroup", + "scope": "Description.Scope", + "title": "Description.LighthouseAssignment.Name", + "type": "Description.LighthouseAssignment.Type", } func GetLighthouseAssignment(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -60587,72 +47810,14 @@ func GetLighthouseAssignment(ctx context.Context, d *plugin.QueryData, _ *plugin // ========================== START: MaintenanceConfiguration ============================= type MaintenanceConfiguration struct { - Description azure.MaintenanceConfigurationDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *MaintenanceConfiguration) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.MaintenanceConfigurationDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.MaintenanceConfigurationDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type MaintenanceConfigurationHit struct { @@ -60723,22 +47888,22 @@ func (p MaintenanceConfigurationPaginator) NextPage(ctx context.Context) ([]Main } var listMaintenanceConfigurationFilters = map[string]string{ - "created_by": "description.MaintenanceConfiguration.SystemData.CreatedBy", - "created_by_type": "description.MaintenanceConfiguration.SystemData.CreatedByType", + "created_by": "Description.MaintenanceConfiguration.SystemData.CreatedBy", + "created_by_type": "Description.MaintenanceConfiguration.SystemData.CreatedByType", "extension_properties": "CDescription.MaintenanceConfiguration.Properties.ExtensionProperties", - "id": "description.MaintenanceConfiguration.ID", - "last_modified_by": "description.MaintenanceConfiguration.SystemData.LastModifiedBy", - "last_modified_by_type": "description.MaintenanceConfiguration.SystemData.LastModifiedByType", - "maintenance_scope": "description.MaintenanceConfiguration.Properties.MaintenanceScope", - "name": "description.MaintenanceConfiguration.Name", - "namespace": "description.MaintenanceConfiguration.Properties.Namespace", - "resource_group": "description.ResourceGroup", - "system_data": "description.MaintenanceConfiguration.SystemData", - "tags": "description.MaintenanceConfiguration.Tags", - "title": "description.MaintenanceConfiguration.Name", - "type": "description.MaintenanceConfiguration.Type", - "visibility": "description.MaintenanceConfiguration.Properties.Visibility", - "window": "description.MaintenanceConfiguration.Properties.Window", + "id": "Description.MaintenanceConfiguration.ID", + "last_modified_by": "Description.MaintenanceConfiguration.SystemData.LastModifiedBy", + "last_modified_by_type": "Description.MaintenanceConfiguration.SystemData.LastModifiedByType", + "maintenance_scope": "Description.MaintenanceConfiguration.Properties.MaintenanceScope", + "name": "Description.MaintenanceConfiguration.Name", + "namespace": "Description.MaintenanceConfiguration.Properties.Namespace", + "resource_group": "Description.ResourceGroup", + "system_data": "Description.MaintenanceConfiguration.SystemData", + "tags": "Description.MaintenanceConfiguration.Tags", + "title": "Description.MaintenanceConfiguration.Name", + "type": "Description.MaintenanceConfiguration.Type", + "visibility": "Description.MaintenanceConfiguration.Properties.Visibility", + "window": "Description.MaintenanceConfiguration.Properties.Window", } func ListMaintenanceConfiguration(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -60802,22 +47967,22 @@ func ListMaintenanceConfiguration(ctx context.Context, d *plugin.QueryData, _ *p } var getMaintenanceConfigurationFilters = map[string]string{ - "created_by": "description.MaintenanceConfiguration.SystemData.CreatedBy", - "created_by_type": "description.MaintenanceConfiguration.SystemData.CreatedByType", + "created_by": "Description.MaintenanceConfiguration.SystemData.CreatedBy", + "created_by_type": "Description.MaintenanceConfiguration.SystemData.CreatedByType", "extension_properties": "CDescription.MaintenanceConfiguration.Properties.ExtensionProperties", - "id": "description.MaintenanceConfiguration.ID", - "last_modified_by": "description.MaintenanceConfiguration.SystemData.LastModifiedBy", - "last_modified_by_type": "description.MaintenanceConfiguration.SystemData.LastModifiedByType", - "maintenance_scope": "description.MaintenanceConfiguration.Properties.MaintenanceScope", - "name": "description.MaintenanceConfiguration.Name", - "namespace": "description.MaintenanceConfiguration.Properties.Namespace", - "resource_group": "description.ResourceGroup", - "system_data": "description.MaintenanceConfiguration.SystemData", - "tags": "description.MaintenanceConfiguration.Tags", - "title": "description.MaintenanceConfiguration.Name", - "type": "description.MaintenanceConfiguration.Type", - "visibility": "description.MaintenanceConfiguration.Properties.Visibility", - "window": "description.MaintenanceConfiguration.Properties.Window", + "id": "Description.MaintenanceConfiguration.ID", + "last_modified_by": "Description.MaintenanceConfiguration.SystemData.LastModifiedBy", + "last_modified_by_type": "Description.MaintenanceConfiguration.SystemData.LastModifiedByType", + "maintenance_scope": "Description.MaintenanceConfiguration.Properties.MaintenanceScope", + "name": "Description.MaintenanceConfiguration.Name", + "namespace": "Description.MaintenanceConfiguration.Properties.Namespace", + "resource_group": "Description.ResourceGroup", + "system_data": "Description.MaintenanceConfiguration.SystemData", + "tags": "Description.MaintenanceConfiguration.Tags", + "title": "Description.MaintenanceConfiguration.Name", + "type": "Description.MaintenanceConfiguration.Type", + "visibility": "Description.MaintenanceConfiguration.Properties.Visibility", + "window": "Description.MaintenanceConfiguration.Properties.Window", } func GetMaintenanceConfiguration(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -60878,72 +48043,14 @@ func GetMaintenanceConfiguration(ctx context.Context, d *plugin.QueryData, _ *pl // ========================== START: MonitorLogProfile ============================= type MonitorLogProfile struct { - Description azure.MonitorLogProfileDescription `json:"description"` - Metadata azure.Metadata `json:"metadata"` - ResourceJobID int `json:"resource_job_id"` - SourceJobID int `json:"source_job_id"` - ResourceType string `json:"resource_type"` - SourceType string `json:"source_type"` - ID string `json:"id"` - ARN string `json:"arn"` - SourceID string `json:"source_id"` -} - -func (r *MonitorLogProfile) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := azureDescriber.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.(azure.MonitorLogProfileDescription) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_job_id": - if err := json.Unmarshal(v, &r.ResourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_job_id": - if err := json.Unmarshal(v, &r.SourceJobID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_type": - if err := json.Unmarshal(v, &r.SourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "id": - if err := json.Unmarshal(v, &r.ID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "arn": - if err := json.Unmarshal(v, &r.ARN); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "source_id": - if err := json.Unmarshal(v, &r.SourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil + ResourceID string `json:"resource_id"` + PlatformID string `json:"platform_id"` + Description azure.MonitorLogProfileDescription `json:"description"` + Metadata azure.Metadata `json:"metadata"` + DescribedBy int `json:"described_by"` + ResourceType string `json:"resource_type"` + IntegrationType string `json:"integration_type"` + IntegrationID string `json:"integration_id"` } type MonitorLogProfileHit struct { @@ -61014,17 +48121,17 @@ func (p MonitorLogProfilePaginator) NextPage(ctx context.Context) ([]MonitorLogP } var listMonitorLogProfileFilters = map[string]string{ - "categories": "description.LogProfile.Properties.Categories", - "id": "description.LogProfile.ID", - "location": "description.LogProfile.Location", - "locations": "description.LogProfile.Properties.Locations", - "name": "description.LogProfile.Name", - "retention_policy": "description.LogProfile.Properties.RetentionPolicy", - "service_bus_rule_id": "description.LogProfile.Properties.ServiceBusRuleID", - "storage_account_id": "description.LogProfile.Properties.StorageAccountID", - "tags": "description.LogProfile.Tags", - "title": "description.LogProfile.Name", - "type": "description.LogProfile.Type", + "categories": "Description.LogProfile.Properties.Categories", + "id": "Description.LogProfile.ID", + "location": "Description.LogProfile.Location", + "locations": "Description.LogProfile.Properties.Locations", + "name": "Description.LogProfile.Name", + "retention_policy": "Description.LogProfile.Properties.RetentionPolicy", + "service_bus_rule_id": "Description.LogProfile.Properties.ServiceBusRuleID", + "storage_account_id": "Description.LogProfile.Properties.StorageAccountID", + "tags": "Description.LogProfile.Tags", + "title": "Description.LogProfile.Name", + "type": "Description.LogProfile.Type", } func ListMonitorLogProfile(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -61088,17 +48195,17 @@ func ListMonitorLogProfile(ctx context.Context, d *plugin.QueryData, _ *plugin.H } var getMonitorLogProfileFilters = map[string]string{ - "categories": "description.LogProfile.Properties.Categories", - "id": "description.LogProfile.ID", - "location": "description.LogProfile.Location", - "locations": "description.LogProfile.Properties.Locations", - "name": "description.LogProfile.Name", - "retention_policy": "description.LogProfile.Properties.RetentionPolicy", - "service_bus_rule_id": "description.LogProfile.Properties.ServiceBusRuleID", - "storage_account_id": "description.LogProfile.Properties.StorageAccountID", - "tags": "description.LogProfile.Tags", - "title": "description.LogProfile.Name", - "type": "description.LogProfile.Type", + "categories": "Description.LogProfile.Properties.Categories", + "id": "Description.LogProfile.ID", + "location": "Description.LogProfile.Location", + "locations": "Description.LogProfile.Properties.Locations", + "name": "Description.LogProfile.Name", + "retention_policy": "Description.LogProfile.Properties.RetentionPolicy", + "service_bus_rule_id": "Description.LogProfile.Properties.ServiceBusRuleID", + "storage_account_id": "Description.LogProfile.Properties.StorageAccountID", + "tags": "Description.LogProfile.Tags", + "title": "Description.LogProfile.Name", + "type": "Description.LogProfile.Type", } func GetMonitorLogProfile(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { diff --git a/pkg/sdk/runable/steampipe_es_client_generator/main.go b/pkg/sdk/runable/steampipe_es_client_generator/main.go index 9ed75f2f..091c2b77 100755 --- a/pkg/sdk/runable/steampipe_es_client_generator/main.go +++ b/pkg/sdk/runable/steampipe_es_client_generator/main.go @@ -23,7 +23,7 @@ var ( pluginPath = flag.String("pluginPath", "", "Location of the steampipe plugin") ) -const PluginPath = "../../../../steampipe-plugin-azuread/azuread" +const PluginPath = "../../../../steampipe-plugin-azure/azure" // TODO: change to steampipe plugin type IntegrationType struct { Name string @@ -82,61 +82,13 @@ type {{ .Name }} struct { ResourceID string ` + "`json:\"resource_id\"`" + ` PlatformID string ` + "`json:\"platform_id\"`" + ` Description {{ .IntegrationType }}.{{ .Name }}Description ` + "`json:\"description\"`" + ` + Metadata {{ .IntegrationType }}.Metadata ` + "`json:\"metadata\"`" + ` DescribedBy int ` + "`json:\"described_by\"`" + ` ResourceType string ` + "`json:\"resource_type\"`" + ` IntegrationType string ` + "`json:\"integration_type\"`" + ` IntegrationID string ` + "`json:\"integration_id\"`" + ` } -func (r *{{ .Name }}) UnmarshalJSON(b []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(b, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for k, v := range rawMsg { - switch k { - case "description": - wrapper := {{ .IntegrationType }}Describer.JSONAllFieldsMarshaller{ - Value: r.Description, - } - if err := json.Unmarshal(v, &wrapper); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - var ok bool - r.Description, ok = wrapper.Value.({{ .IntegrationType }}.{{ .Name }}Description) - if !ok { - return fmt.Errorf("unmarshalling type %T: %v", r, fmt.Errorf("expected type %T, got %T", r.Description, wrapper.Value)) - } - case "platform_id": - if err := json.Unmarshal(v, &r.PlatformID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_id": - if err := json.Unmarshal(v, &r.ResourceID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "resource_type": - if err := json.Unmarshal(v, &r.ResourceType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "described_by": - if err := json.Unmarshal(v, &r.DescribedBy); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "integration_type": - if err := json.Unmarshal(v, &r.IntegrationType); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - case "integration_id": - if err := json.Unmarshal(v, &r.IntegrationID); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type {{ .Name }}Hit struct { ID string ` + "`json:\"_id\"`" + ` Score float64 ` + "`json:\"_score\"`" + `