diff --git a/go.mod b/go.mod index e68c8bac..3668c291 100755 --- a/go.mod +++ b/go.mod @@ -108,7 +108,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.6.3 + github.com/opengovern/og-util v1.7.0 github.com/opengovern/opencomply v0.475.2 github.com/spf13/cobra v1.8.1 github.com/tombuildsstuff/giovanni v0.18.0 diff --git a/go.sum b/go.sum index 659f3e6f..90c4583e 100644 --- a/go.sum +++ b/go.sum @@ -927,6 +927,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.6.3 h1:QMF+OAEG2O1TzUVVKb7W5jpC8YWFaGfQFMUZzDO8qCg= github.com/opengovern/og-util v1.6.3/go.mod h1:ob8RSaNZG3RWnLH3lDXQaVpIf+B8Ry7ds3twYlDJPp0= +github.com/opengovern/og-util v1.7.0 h1:2L3jXkasNLM+JO+vUmbmTCRf4ptjLvjDYqe/760CkFY= +github.com/opengovern/og-util v1.7.0/go.mod h1:ob8RSaNZG3RWnLH3lDXQaVpIf+B8Ry7ds3twYlDJPp0= github.com/opengovern/opencomply v0.475.2 h1:JHs12+mhJb9HzFZYMLLgw079PRa+qLKntugvwWiCVL0= github.com/opengovern/opencomply v0.475.2/go.mod h1:FsJTfdLz+DDRAzW2/KyCFRxVxM89jMysP7ZfQjaS8+A= github.com/opensearch-project/opensearch-go/v2 v2.3.0 h1:nQIEMr+A92CkhHrZgUhcfsrZjibvB3APXf2a1VwCmMQ= diff --git a/pkg/sdk/es/resources_clients.go b/pkg/sdk/es/resources_clients.go index 2bf23273..247c57e3 100644 --- a/pkg/sdk/es/resources_clients.go +++ b/pkg/sdk/es/resources_clients.go @@ -3,9 +3,6 @@ package opengovernance import ( "context" - "encoding/json" - "fmt" - azureDescriber "github.com/opengovern/og-describer-azure/provider/describer" azure "github.com/opengovern/og-describer-azure/provider/model" essdk "github.com/opengovern/og-util/pkg/opengovernance-es-sdk" steampipesdk "github.com/opengovern/og-util/pkg/steampipe" @@ -22,7 +19,7 @@ type Client struct { type APIManagement struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.APIManagementDescription `json:"Description"` + Description azure.APIManagementDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -30,59 +27,6 @@ type APIManagement struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type APIManagementHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -171,6 +115,7 @@ var listAPIManagementFilters = map[string]string{ "management_api_url": "Description.APIManagement.Properties.ManagementAPIURL", "name": "Description.APIManagement.Name", "notification_sender_email": "Description.APIManagement.Properties.NotificationSenderEmail", + "platform_account_id": "metadata.IntegrationID", "portal_url": "Description.APIManagement.Properties.PortalURL", "private_ip_addresses": "Description.APIManagement.Properties.PrivateIPAddresses", "provisioning_state": "Description.APIManagement.Properties.ProvisioningState", @@ -211,7 +156,7 @@ func ListAPIManagement(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra plugin.Logger(ctx).Error("ListAPIManagement NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListAPIManagement GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -227,7 +172,7 @@ func ListAPIManagement(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra return nil, err } - paginator, err := k.NewAPIManagementPaginator(essdk.BuildFilter(ctx, d.QueryContext, listAPIManagementFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewAPIManagementPaginator(essdk.BuildFilter(ctx, d.QueryContext, listAPIManagementFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListAPIManagement NewAPIManagementPaginator", "error", err) return nil, err @@ -274,6 +219,7 @@ var getAPIManagementFilters = map[string]string{ "management_api_url": "Description.APIManagement.Properties.ManagementAPIURL", "name": "description.APIManagement.name", "notification_sender_email": "Description.APIManagement.Properties.NotificationSenderEmail", + "platform_account_id": "metadata.IntegrationID", "portal_url": "Description.APIManagement.Properties.PortalURL", "private_ip_addresses": "Description.APIManagement.Properties.PrivateIPAddresses", "provisioning_state": "Description.APIManagement.Properties.ProvisioningState", @@ -311,7 +257,7 @@ func GetAPIManagement(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -325,7 +271,7 @@ func GetAPIManagement(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat } limit := int64(1) - paginator, err := k.NewAPIManagementPaginator(essdk.BuildFilter(ctx, d.QueryContext, getAPIManagementFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewAPIManagementPaginator(essdk.BuildFilter(ctx, d.QueryContext, getAPIManagementFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -356,7 +302,7 @@ func GetAPIManagement(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat type APIManagementBackend struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.APIManagementBackendDescription `json:"Description"` + Description azure.APIManagementBackendDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -364,59 +310,6 @@ type APIManagementBackend struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type APIManagementBackendHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -519,7 +412,7 @@ func ListAPIManagementBackend(ctx context.Context, d *plugin.QueryData, _ *plugi plugin.Logger(ctx).Error("ListAPIManagementBackend NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListAPIManagementBackend GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -535,7 +428,7 @@ func ListAPIManagementBackend(ctx context.Context, d *plugin.QueryData, _ *plugi return nil, err } - paginator, err := k.NewAPIManagementBackendPaginator(essdk.BuildFilter(ctx, d.QueryContext, listAPIManagementBackendFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewAPIManagementBackendPaginator(essdk.BuildFilter(ctx, d.QueryContext, listAPIManagementBackendFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListAPIManagementBackend NewAPIManagementBackendPaginator", "error", err) return nil, err @@ -593,7 +486,7 @@ func GetAPIManagementBackend(ctx context.Context, d *plugin.QueryData, _ *plugin if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -607,7 +500,7 @@ func GetAPIManagementBackend(ctx context.Context, d *plugin.QueryData, _ *plugin } limit := int64(1) - paginator, err := k.NewAPIManagementBackendPaginator(essdk.BuildFilter(ctx, d.QueryContext, getAPIManagementBackendFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewAPIManagementBackendPaginator(essdk.BuildFilter(ctx, d.QueryContext, getAPIManagementBackendFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -638,7 +531,7 @@ func GetAPIManagementBackend(ctx context.Context, d *plugin.QueryData, _ *plugin type AutomationAccounts struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.AutomationAccountsDescription `json:"Description"` + Description azure.AutomationAccountsDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -646,59 +539,6 @@ type AutomationAccounts struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type AutomationAccountsHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -767,20 +607,21 @@ 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", - "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", + "platform_account_id": "metadata.IntegrationID", + "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) { @@ -801,7 +642,7 @@ func ListAutomationAccounts(ctx context.Context, d *plugin.QueryData, _ *plugin. plugin.Logger(ctx).Error("ListAutomationAccounts NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListAutomationAccounts GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -817,7 +658,7 @@ func ListAutomationAccounts(ctx context.Context, d *plugin.QueryData, _ *plugin. return nil, err } - paginator, err := k.NewAutomationAccountsPaginator(essdk.BuildFilter(ctx, d.QueryContext, listAutomationAccountsFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewAutomationAccountsPaginator(essdk.BuildFilter(ctx, d.QueryContext, listAutomationAccountsFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListAutomationAccounts NewAutomationAccountsPaginator", "error", err) return nil, err @@ -844,20 +685,21 @@ 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", - "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", + "platform_account_id": "metadata.IntegrationID", + "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) { @@ -875,7 +717,7 @@ func GetAutomationAccounts(ctx context.Context, d *plugin.QueryData, _ *plugin.H if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -889,7 +731,7 @@ func GetAutomationAccounts(ctx context.Context, d *plugin.QueryData, _ *plugin.H } limit := int64(1) - paginator, err := k.NewAutomationAccountsPaginator(essdk.BuildFilter(ctx, d.QueryContext, getAutomationAccountsFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewAutomationAccountsPaginator(essdk.BuildFilter(ctx, d.QueryContext, getAutomationAccountsFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -920,7 +762,7 @@ func GetAutomationAccounts(ctx context.Context, d *plugin.QueryData, _ *plugin.H type AutomationVariables struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.AutomationVariablesDescription `json:"Description"` + Description azure.AutomationVariablesDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -928,59 +770,6 @@ type AutomationVariables struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type AutomationVariablesHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -1049,17 +838,18 @@ 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", - "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", + "platform_account_id": "metadata.IntegrationID", + "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) { @@ -1080,7 +870,7 @@ func ListAutomationVariables(ctx context.Context, d *plugin.QueryData, _ *plugin plugin.Logger(ctx).Error("ListAutomationVariables NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListAutomationVariables GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -1096,7 +886,7 @@ func ListAutomationVariables(ctx context.Context, d *plugin.QueryData, _ *plugin return nil, err } - paginator, err := k.NewAutomationVariablesPaginator(essdk.BuildFilter(ctx, d.QueryContext, listAutomationVariablesFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewAutomationVariablesPaginator(essdk.BuildFilter(ctx, d.QueryContext, listAutomationVariablesFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListAutomationVariables NewAutomationVariablesPaginator", "error", err) return nil, err @@ -1123,17 +913,18 @@ 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", - "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", + "platform_account_id": "metadata.IntegrationID", + "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) { @@ -1151,7 +942,7 @@ func GetAutomationVariables(ctx context.Context, d *plugin.QueryData, _ *plugin. if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -1165,7 +956,7 @@ func GetAutomationVariables(ctx context.Context, d *plugin.QueryData, _ *plugin. } limit := int64(1) - paginator, err := k.NewAutomationVariablesPaginator(essdk.BuildFilter(ctx, d.QueryContext, getAutomationVariablesFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewAutomationVariablesPaginator(essdk.BuildFilter(ctx, d.QueryContext, getAutomationVariablesFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -1196,7 +987,7 @@ func GetAutomationVariables(ctx context.Context, d *plugin.QueryData, _ *plugin. type AppConfiguration struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.AppConfigurationDescription `json:"Description"` + Description azure.AppConfigurationDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -1204,59 +995,6 @@ type AppConfiguration struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type AppConfigurationHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -1331,6 +1069,7 @@ var listAppConfigurationFilters = map[string]string{ "id": "Description.ConfigurationStore.ID", "identity": "Description.ConfigurationStore.Identity", "name": "Description.ConfigurationStore.Name", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.ConfigurationStore.Properties.ProvisioningState", "resource_group": "Description.ResourceGroup", "sku_name": "Description.ConfigurationStore.SKU.Name", @@ -1357,7 +1096,7 @@ func ListAppConfiguration(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy plugin.Logger(ctx).Error("ListAppConfiguration NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListAppConfiguration GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -1373,7 +1112,7 @@ func ListAppConfiguration(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy return nil, err } - paginator, err := k.NewAppConfigurationPaginator(essdk.BuildFilter(ctx, d.QueryContext, listAppConfigurationFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewAppConfigurationPaginator(essdk.BuildFilter(ctx, d.QueryContext, listAppConfigurationFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListAppConfiguration NewAppConfigurationPaginator", "error", err) return nil, err @@ -1406,6 +1145,7 @@ var getAppConfigurationFilters = map[string]string{ "id": "Description.ConfigurationStore.ID", "identity": "Description.ConfigurationStore.Identity", "name": "description.ConfigurationStore.name", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.ConfigurationStore.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", "sku_name": "Description.ConfigurationStore.SKU.Name", @@ -1429,7 +1169,7 @@ func GetAppConfiguration(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -1443,7 +1183,7 @@ func GetAppConfiguration(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd } limit := int64(1) - paginator, err := k.NewAppConfigurationPaginator(essdk.BuildFilter(ctx, d.QueryContext, getAppConfigurationFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewAppConfigurationPaginator(essdk.BuildFilter(ctx, d.QueryContext, getAppConfigurationFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -1474,7 +1214,7 @@ func GetAppConfiguration(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd type AppServiceEnvironment struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.AppServiceEnvironmentDescription `json:"Description"` + Description azure.AppServiceEnvironmentDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -1482,59 +1222,6 @@ type AppServiceEnvironment struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type AppServiceEnvironmentHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -1613,6 +1300,7 @@ var listAppServiceEnvironmentFilters = map[string]string{ "is_healthy_environment": "Description.AppServiceEnvironmentResource.Properties.EnvironmentIsHealthy", "kind": "Description.AppServiceEnvironmentResource.Kind", "name": "Description.AppServiceEnvironmentResource.Name", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.AppServiceEnvironmentResource.Properties.ProvisioningState", "status": "Description.AppServiceEnvironmentResource.Properties.Status", "suspended": "Description.AppServiceEnvironmentResource.Properties.Suspended", @@ -1639,7 +1327,7 @@ func ListAppServiceEnvironment(ctx context.Context, d *plugin.QueryData, _ *plug plugin.Logger(ctx).Error("ListAppServiceEnvironment NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListAppServiceEnvironment GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -1655,7 +1343,7 @@ func ListAppServiceEnvironment(ctx context.Context, d *plugin.QueryData, _ *plug return nil, err } - paginator, err := k.NewAppServiceEnvironmentPaginator(essdk.BuildFilter(ctx, d.QueryContext, listAppServiceEnvironmentFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewAppServiceEnvironmentPaginator(essdk.BuildFilter(ctx, d.QueryContext, listAppServiceEnvironmentFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListAppServiceEnvironment NewAppServiceEnvironmentPaginator", "error", err) return nil, err @@ -1692,6 +1380,7 @@ var getAppServiceEnvironmentFilters = map[string]string{ "is_healthy_environment": "Description.AppServiceEnvironmentResource.Properties.EnvironmentIsHealthy", "kind": "Description.AppServiceEnvironmentResource.Kind", "name": "description.AppServiceEnvironmentResource.name", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.AppServiceEnvironmentResource.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", "status": "Description.AppServiceEnvironmentResource.Properties.Status", @@ -1716,7 +1405,7 @@ func GetAppServiceEnvironment(ctx context.Context, d *plugin.QueryData, _ *plugi if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -1730,7 +1419,7 @@ func GetAppServiceEnvironment(ctx context.Context, d *plugin.QueryData, _ *plugi } limit := int64(1) - paginator, err := k.NewAppServiceEnvironmentPaginator(essdk.BuildFilter(ctx, d.QueryContext, getAppServiceEnvironmentFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewAppServiceEnvironmentPaginator(essdk.BuildFilter(ctx, d.QueryContext, getAppServiceEnvironmentFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -1761,7 +1450,7 @@ func GetAppServiceEnvironment(ctx context.Context, d *plugin.QueryData, _ *plugi type AppServiceFunctionApp struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.AppServiceFunctionAppDescription `json:"Description"` + Description azure.AppServiceFunctionAppDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -1769,59 +1458,6 @@ type AppServiceFunctionApp struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type AppServiceFunctionAppHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -1903,6 +1539,7 @@ var listAppServiceFunctionAppFilters = map[string]string{ "kind": "Description.Site.Kind", "name": "Description.Site.Name", "outbound_ip_addresses": "Description.Site.Properties.OutboundIPAddresses", + "platform_account_id": "metadata.IntegrationID", "possible_outbound_ip_addresses": "Description.Site.Properties.PossibleOutboundIPAddresses", "reserved": "Description.Site.Properties.Reserved", "site_config": "Description.Site.Properties.SiteConfig", @@ -1930,7 +1567,7 @@ func ListAppServiceFunctionApp(ctx context.Context, d *plugin.QueryData, _ *plug plugin.Logger(ctx).Error("ListAppServiceFunctionApp NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListAppServiceFunctionApp GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -1946,7 +1583,7 @@ func ListAppServiceFunctionApp(ctx context.Context, d *plugin.QueryData, _ *plug return nil, err } - paginator, err := k.NewAppServiceFunctionAppPaginator(essdk.BuildFilter(ctx, d.QueryContext, listAppServiceFunctionAppFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewAppServiceFunctionAppPaginator(essdk.BuildFilter(ctx, d.QueryContext, listAppServiceFunctionAppFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListAppServiceFunctionApp NewAppServiceFunctionAppPaginator", "error", err) return nil, err @@ -1986,6 +1623,7 @@ var getAppServiceFunctionAppFilters = map[string]string{ "kind": "Description.Site.Kind", "name": "description.Site.name", "outbound_ip_addresses": "Description.Site.Properties.OutboundIPAddresses", + "platform_account_id": "metadata.IntegrationID", "possible_outbound_ip_addresses": "Description.Site.Properties.PossibleOutboundIPAddresses", "reserved": "Description.Site.Properties.Reserved", "resource_group": "description.ResourceGroup", @@ -2011,7 +1649,7 @@ func GetAppServiceFunctionApp(ctx context.Context, d *plugin.QueryData, _ *plugi if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -2025,7 +1663,7 @@ func GetAppServiceFunctionApp(ctx context.Context, d *plugin.QueryData, _ *plugi } limit := int64(1) - paginator, err := k.NewAppServiceFunctionAppPaginator(essdk.BuildFilter(ctx, d.QueryContext, getAppServiceFunctionAppFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewAppServiceFunctionAppPaginator(essdk.BuildFilter(ctx, d.QueryContext, getAppServiceFunctionAppFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -2056,7 +1694,7 @@ func GetAppServiceFunctionApp(ctx context.Context, d *plugin.QueryData, _ *plugi type AppServiceWebApp struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.AppServiceWebAppDescription `json:"Description"` + Description azure.AppServiceWebAppDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -2064,59 +1702,6 @@ type AppServiceWebApp struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type AppServiceWebAppHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -2199,6 +1784,7 @@ var listAppServiceWebAppFilters = map[string]string{ "kind": "Description.Site.Kind", "name": "Description.Site.Name", "outbound_ip_addresses": "Description.Site.Properties.OutboundIPAddresses", + "platform_account_id": "metadata.IntegrationID", "possible_outbound_ip_addresses": "Description.Site.Properties.PossibleOutboundIPAddresses", "reserved": "Description.Site.Properties.Reserved", "site_config": "Description.Site.Properties.SiteConfig", @@ -2227,7 +1813,7 @@ func ListAppServiceWebApp(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy plugin.Logger(ctx).Error("ListAppServiceWebApp NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListAppServiceWebApp GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -2243,7 +1829,7 @@ func ListAppServiceWebApp(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy return nil, err } - paginator, err := k.NewAppServiceWebAppPaginator(essdk.BuildFilter(ctx, d.QueryContext, listAppServiceWebAppFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewAppServiceWebAppPaginator(essdk.BuildFilter(ctx, d.QueryContext, listAppServiceWebAppFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListAppServiceWebApp NewAppServiceWebAppPaginator", "error", err) return nil, err @@ -2284,6 +1870,7 @@ var getAppServiceWebAppFilters = map[string]string{ "kind": "Description.Site.Kind", "name": "description.Site.name", "outbound_ip_addresses": "Description.Site.Properties.OutboundIPAddresses", + "platform_account_id": "metadata.IntegrationID", "possible_outbound_ip_addresses": "Description.Site.Properties.PossibleOutboundIPAddresses", "reserved": "Description.Site.Properties.Reserved", "resource_group": "description.ResourceGroup", @@ -2310,7 +1897,7 @@ func GetAppServiceWebApp(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -2324,7 +1911,7 @@ func GetAppServiceWebApp(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd } limit := int64(1) - paginator, err := k.NewAppServiceWebAppPaginator(essdk.BuildFilter(ctx, d.QueryContext, getAppServiceWebAppFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewAppServiceWebAppPaginator(essdk.BuildFilter(ctx, d.QueryContext, getAppServiceWebAppFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -2355,7 +1942,7 @@ func GetAppServiceWebApp(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd type AppServiceWebAppSlot struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.AppServiceWebAppSlotDescription `json:"Description"` + Description azure.AppServiceWebAppSlotDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -2363,59 +1950,6 @@ type AppServiceWebAppSlot struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type AppServiceWebAppSlotHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -2545,7 +2079,7 @@ func ListAppServiceWebAppSlot(ctx context.Context, d *plugin.QueryData, _ *plugi plugin.Logger(ctx).Error("ListAppServiceWebAppSlot NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListAppServiceWebAppSlot GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -2561,7 +2095,7 @@ func ListAppServiceWebAppSlot(ctx context.Context, d *plugin.QueryData, _ *plugi return nil, err } - paginator, err := k.NewAppServiceWebAppSlotPaginator(essdk.BuildFilter(ctx, d.QueryContext, listAppServiceWebAppSlotFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewAppServiceWebAppSlotPaginator(essdk.BuildFilter(ctx, d.QueryContext, listAppServiceWebAppSlotFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListAppServiceWebAppSlot NewAppServiceWebAppSlotPaginator", "error", err) return nil, err @@ -2646,7 +2180,7 @@ func GetAppServiceWebAppSlot(ctx context.Context, d *plugin.QueryData, _ *plugin if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -2660,7 +2194,7 @@ func GetAppServiceWebAppSlot(ctx context.Context, d *plugin.QueryData, _ *plugin } limit := int64(1) - paginator, err := k.NewAppServiceWebAppSlotPaginator(essdk.BuildFilter(ctx, d.QueryContext, getAppServiceWebAppSlotFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewAppServiceWebAppSlotPaginator(essdk.BuildFilter(ctx, d.QueryContext, getAppServiceWebAppSlotFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -2691,7 +2225,7 @@ func GetAppServiceWebAppSlot(ctx context.Context, d *plugin.QueryData, _ *plugin type AppServicePlan struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.AppServicePlanDescription `json:"Description"` + Description azure.AppServicePlanDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -2699,59 +2233,6 @@ type AppServicePlan struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type AppServicePlanHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -2830,6 +2311,7 @@ var listAppServicePlanFilters = map[string]string{ "maximum_number_of_workers": "Description.Plan.Properties.MaximumNumberOfWorkers", "name": "Description.Plan.Name", "per_site_scaling": "Description.Plan.Properties.PerSiteScaling", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.Plan.Properties.ProvisioningState", "reserved": "Description.Plan.Properties.Reserved", "sku_capacity": "Description.Plan.SKU.Capacity", @@ -2861,7 +2343,7 @@ func ListAppServicePlan(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr plugin.Logger(ctx).Error("ListAppServicePlan NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListAppServicePlan GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -2877,7 +2359,7 @@ func ListAppServicePlan(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr return nil, err } - paginator, err := k.NewAppServicePlanPaginator(essdk.BuildFilter(ctx, d.QueryContext, listAppServicePlanFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewAppServicePlanPaginator(essdk.BuildFilter(ctx, d.QueryContext, listAppServicePlanFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListAppServicePlan NewAppServicePlanPaginator", "error", err) return nil, err @@ -2914,6 +2396,7 @@ var getAppServicePlanFilters = map[string]string{ "maximum_number_of_workers": "Description.Plan.Properties.MaximumNumberOfWorkers", "name": "description.Site.name", "per_site_scaling": "Description.Plan.Properties.PerSiteScaling", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.Plan.Properties.ProvisioningState", "reserved": "Description.Plan.Properties.Reserved", "resource_group": "description.ResourceGroup", @@ -2943,7 +2426,7 @@ func GetAppServicePlan(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -2957,7 +2440,7 @@ func GetAppServicePlan(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra } limit := int64(1) - paginator, err := k.NewAppServicePlanPaginator(essdk.BuildFilter(ctx, d.QueryContext, getAppServicePlanFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewAppServicePlanPaginator(essdk.BuildFilter(ctx, d.QueryContext, getAppServicePlanFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -2988,7 +2471,7 @@ func GetAppServicePlan(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra type ContainerApp struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.ContainerAppDescription `json:"Description"` + Description azure.ContainerAppDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -2996,59 +2479,6 @@ type ContainerApp struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type ContainerAppHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -3117,10 +2547,11 @@ func (p ContainerAppPaginator) NextPage(ctx context.Context) ([]ContainerApp, er } var listContainerAppFilters = map[string]string{ - "id": "Description.Server.ID", - "name": "Description.Server.Name", - "tags": "Description.Server.Tags", - "title": "Description.Server.Name", + "id": "Description.Server.ID", + "name": "Description.Server.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.Server.Tags", + "title": "Description.Server.Name", } func ListContainerApp(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -3141,7 +2572,7 @@ func ListContainerApp(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat plugin.Logger(ctx).Error("ListContainerApp NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListContainerApp GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -3157,7 +2588,7 @@ func ListContainerApp(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat return nil, err } - paginator, err := k.NewContainerAppPaginator(essdk.BuildFilter(ctx, d.QueryContext, listContainerAppFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewContainerAppPaginator(essdk.BuildFilter(ctx, d.QueryContext, listContainerAppFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListContainerApp NewContainerAppPaginator", "error", err) return nil, err @@ -3184,10 +2615,11 @@ func ListContainerApp(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat } var getContainerAppFilters = map[string]string{ - "id": "Description.Server.ID", - "name": "Description.Server.Name", - "tags": "Description.Server.Tags", - "title": "Description.Server.Name", + "id": "Description.Server.ID", + "name": "Description.Server.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.Server.Tags", + "title": "Description.Server.Name", } func GetContainerApp(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -3205,7 +2637,7 @@ func GetContainerApp(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -3219,7 +2651,7 @@ func GetContainerApp(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate } limit := int64(1) - paginator, err := k.NewContainerAppPaginator(essdk.BuildFilter(ctx, d.QueryContext, getContainerAppFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewContainerAppPaginator(essdk.BuildFilter(ctx, d.QueryContext, getContainerAppFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -3250,7 +2682,7 @@ func GetContainerApp(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate type WebServerFarms struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.WebServerFarmsDescription `json:"Description"` + Description azure.WebServerFarmsDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -3258,59 +2690,6 @@ type WebServerFarms struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type WebServerFarmsHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -3379,10 +2758,11 @@ func (p WebServerFarmsPaginator) NextPage(ctx context.Context) ([]WebServerFarms } var listWebServerFarmsFilters = map[string]string{ - "id": "Description.ServerFarm.ID", - "name": "Description.ServerFarm.Name", - "tags": "Description.ServerFarm.Tags", - "title": "Description.ServerFarm.Name", + "id": "Description.ServerFarm.ID", + "name": "Description.ServerFarm.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.ServerFarm.Tags", + "title": "Description.ServerFarm.Name", } func ListWebServerFarms(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -3403,7 +2783,7 @@ func ListWebServerFarms(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr plugin.Logger(ctx).Error("ListWebServerFarms NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListWebServerFarms GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -3419,7 +2799,7 @@ func ListWebServerFarms(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr return nil, err } - paginator, err := k.NewWebServerFarmsPaginator(essdk.BuildFilter(ctx, d.QueryContext, listWebServerFarmsFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewWebServerFarmsPaginator(essdk.BuildFilter(ctx, d.QueryContext, listWebServerFarmsFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListWebServerFarms NewWebServerFarmsPaginator", "error", err) return nil, err @@ -3446,10 +2826,11 @@ func ListWebServerFarms(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr } var getWebServerFarmsFilters = map[string]string{ - "id": "Description.ServerFarm.ID", - "name": "Description.ServerFarm.Name", - "tags": "Description.ServerFarm.Tags", - "title": "Description.ServerFarm.Name", + "id": "Description.ServerFarm.ID", + "name": "Description.ServerFarm.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.ServerFarm.Tags", + "title": "Description.ServerFarm.Name", } func GetWebServerFarms(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -3467,7 +2848,7 @@ func GetWebServerFarms(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -3481,7 +2862,7 @@ func GetWebServerFarms(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra } limit := int64(1) - paginator, err := k.NewWebServerFarmsPaginator(essdk.BuildFilter(ctx, d.QueryContext, getWebServerFarmsFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewWebServerFarmsPaginator(essdk.BuildFilter(ctx, d.QueryContext, getWebServerFarmsFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -3512,7 +2893,7 @@ func GetWebServerFarms(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra type Blueprint struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.BlueprintDescription `json:"Description"` + Description azure.BlueprintDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -3520,59 +2901,6 @@ type Blueprint struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type BlueprintHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -3641,9 +2969,10 @@ func (p BlueprintPaginator) NextPage(ctx context.Context) ([]Blueprint, error) { } var listBlueprintFilters = map[string]string{ - "id": "Description.Blueprints.ID", - "name": "Description.Blueprint.Name", - "title": "Description.Blueprint.Name", + "id": "Description.Blueprints.ID", + "name": "Description.Blueprint.Name", + "platform_account_id": "metadata.IntegrationID", + "title": "Description.Blueprint.Name", } func ListBlueprint(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -3664,7 +2993,7 @@ func ListBlueprint(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDa plugin.Logger(ctx).Error("ListBlueprint NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListBlueprint GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -3680,7 +3009,7 @@ func ListBlueprint(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDa return nil, err } - paginator, err := k.NewBlueprintPaginator(essdk.BuildFilter(ctx, d.QueryContext, listBlueprintFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewBlueprintPaginator(essdk.BuildFilter(ctx, d.QueryContext, listBlueprintFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListBlueprint NewBlueprintPaginator", "error", err) return nil, err @@ -3707,9 +3036,10 @@ func ListBlueprint(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDa } var getBlueprintFilters = map[string]string{ - "id": "Description.Blueprints.ID", - "name": "Description.Blueprint.Name", - "title": "Description.Blueprint.Name", + "id": "Description.Blueprints.ID", + "name": "Description.Blueprint.Name", + "platform_account_id": "metadata.IntegrationID", + "title": "Description.Blueprint.Name", } func GetBlueprint(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -3727,7 +3057,7 @@ func GetBlueprint(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDat if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -3741,7 +3071,7 @@ func GetBlueprint(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDat } limit := int64(1) - paginator, err := k.NewBlueprintPaginator(essdk.BuildFilter(ctx, d.QueryContext, getBlueprintFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewBlueprintPaginator(essdk.BuildFilter(ctx, d.QueryContext, getBlueprintFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -3772,7 +3102,7 @@ func GetBlueprint(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDat type ComputeDisk struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.ComputeDiskDescription `json:"Description"` + Description azure.ComputeDiskDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -3780,59 +3110,6 @@ type ComputeDisk struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type ComputeDiskHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -3932,6 +3209,7 @@ var listComputeDiskFilters = map[string]string{ "name": "Description.Disk.Name", "network_access_policy": "Description.Disk.Properties.NetworkAccessPolicy", "os_type": "Description.Disk.Properties.OSType", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.Disk.ProvisioningState", "resource_group": "Description.ResourceGroup", "share_info": "Description.Disk.Properties.ShareInfo", @@ -3962,7 +3240,7 @@ func ListComputeDisk(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate plugin.Logger(ctx).Error("ListComputeDisk NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListComputeDisk GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -3978,7 +3256,7 @@ func ListComputeDisk(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate return nil, err } - paginator, err := k.NewComputeDiskPaginator(essdk.BuildFilter(ctx, d.QueryContext, listComputeDiskFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewComputeDiskPaginator(essdk.BuildFilter(ctx, d.QueryContext, listComputeDiskFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListComputeDisk NewComputeDiskPaginator", "error", err) return nil, err @@ -4036,6 +3314,7 @@ var getComputeDiskFilters = map[string]string{ "name": "description.Disk.name", "network_access_policy": "Description.Disk.Properties.NetworkAccessPolicy", "os_type": "Description.Disk.Properties.OSType", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.Disk.ProvisioningState", "resource_group": "description.ResourceGroup", "share_info": "Description.Disk.Properties.ShareInfo", @@ -4063,7 +3342,7 @@ func GetComputeDisk(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -4077,7 +3356,7 @@ func GetComputeDisk(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD } limit := int64(1) - paginator, err := k.NewComputeDiskPaginator(essdk.BuildFilter(ctx, d.QueryContext, getComputeDiskFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewComputeDiskPaginator(essdk.BuildFilter(ctx, d.QueryContext, getComputeDiskFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -4108,7 +3387,7 @@ func GetComputeDisk(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD type ComputeDiskAccess struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.ComputeDiskAccessDescription `json:"Description"` + Description azure.ComputeDiskAccessDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -4116,59 +3395,6 @@ type ComputeDiskAccess struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type ComputeDiskAccessHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -4237,13 +3463,14 @@ func (p ComputeDiskAccessPaginator) NextPage(ctx context.Context) ([]ComputeDisk } var listComputeDiskAccessFilters = map[string]string{ - "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", + "id": "Description.DiskAccess.ID", + "name": "Description.DiskAccess.Name", + "platform_account_id": "metadata.IntegrationID", + "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) { @@ -4264,7 +3491,7 @@ func ListComputeDiskAccess(ctx context.Context, d *plugin.QueryData, _ *plugin.H plugin.Logger(ctx).Error("ListComputeDiskAccess NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListComputeDiskAccess GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -4280,7 +3507,7 @@ func ListComputeDiskAccess(ctx context.Context, d *plugin.QueryData, _ *plugin.H return nil, err } - paginator, err := k.NewComputeDiskAccessPaginator(essdk.BuildFilter(ctx, d.QueryContext, listComputeDiskAccessFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewComputeDiskAccessPaginator(essdk.BuildFilter(ctx, d.QueryContext, listComputeDiskAccessFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListComputeDiskAccess NewComputeDiskAccessPaginator", "error", err) return nil, err @@ -4307,13 +3534,14 @@ func ListComputeDiskAccess(ctx context.Context, d *plugin.QueryData, _ *plugin.H } var getComputeDiskAccessFilters = map[string]string{ - "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", + "id": "Description.DiskAccess.ID", + "name": "description.DiskAccess.name", + "platform_account_id": "metadata.IntegrationID", + "provisioning_state": "Description.DiskAccess.Properties.ProvisioningState", + "resource_group": "description.ResourceGroup", + "tags": "Description.DiskAccess.Tags", + "title": "Description.DiskAccess.Name", + "type": "Description.DiskAccess.Type", } func GetComputeDiskAccess(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -4331,7 +3559,7 @@ func GetComputeDiskAccess(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -4345,7 +3573,7 @@ func GetComputeDiskAccess(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy } limit := int64(1) - paginator, err := k.NewComputeDiskAccessPaginator(essdk.BuildFilter(ctx, d.QueryContext, getComputeDiskAccessFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewComputeDiskAccessPaginator(essdk.BuildFilter(ctx, d.QueryContext, getComputeDiskAccessFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -4376,7 +3604,7 @@ func GetComputeDiskAccess(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy type ComputeVirtualMachineScaleSet struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.ComputeVirtualMachineScaleSetDescription `json:"Description"` + Description azure.ComputeVirtualMachineScaleSetDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -4384,59 +3612,6 @@ type ComputeVirtualMachineScaleSet struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type ComputeVirtualMachineScaleSetHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -4513,6 +3688,7 @@ var listComputeVirtualMachineScaleSetFilters = map[string]string{ "name": "Description.VirtualMachineScaleSet.Name", "overprovision": "Description.VirtualMachineScaleSet.Properties.Overprovision", "plan": "Description.VirtualMachineScaleSet.Plan", + "platform_account_id": "metadata.IntegrationID", "platform_fault_domain_count": "Description.VirtualMachineScaleSet.Properties.PlatformFaultDomainCount", "provisioning_state": "Description.VirtualMachineScaleSet.Properties.ProvisioningState", "resource_group": "Description.ResourceGroup", @@ -4554,7 +3730,7 @@ func ListComputeVirtualMachineScaleSet(ctx context.Context, d *plugin.QueryData, plugin.Logger(ctx).Error("ListComputeVirtualMachineScaleSet NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListComputeVirtualMachineScaleSet GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -4570,7 +3746,7 @@ func ListComputeVirtualMachineScaleSet(ctx context.Context, d *plugin.QueryData, return nil, err } - paginator, err := k.NewComputeVirtualMachineScaleSetPaginator(essdk.BuildFilter(ctx, d.QueryContext, listComputeVirtualMachineScaleSetFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewComputeVirtualMachineScaleSetPaginator(essdk.BuildFilter(ctx, d.QueryContext, listComputeVirtualMachineScaleSetFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListComputeVirtualMachineScaleSet NewComputeVirtualMachineScaleSetPaginator", "error", err) return nil, err @@ -4605,6 +3781,7 @@ var getComputeVirtualMachineScaleSetFilters = map[string]string{ "name": "description.VirtualMachineScaleSet.name", "overprovision": "Description.VirtualMachineScaleSet.Properties.Overprovision", "plan": "Description.VirtualMachineScaleSet.Plan", + "platform_account_id": "metadata.IntegrationID", "platform_fault_domain_count": "Description.VirtualMachineScaleSet.Properties.PlatformFaultDomainCount", "provisioning_state": "Description.VirtualMachineScaleSet.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", @@ -4643,7 +3820,7 @@ func GetComputeVirtualMachineScaleSet(ctx context.Context, d *plugin.QueryData, if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -4657,7 +3834,7 @@ func GetComputeVirtualMachineScaleSet(ctx context.Context, d *plugin.QueryData, } limit := int64(1) - paginator, err := k.NewComputeVirtualMachineScaleSetPaginator(essdk.BuildFilter(ctx, d.QueryContext, getComputeVirtualMachineScaleSetFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewComputeVirtualMachineScaleSetPaginator(essdk.BuildFilter(ctx, d.QueryContext, getComputeVirtualMachineScaleSetFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -4688,7 +3865,7 @@ func GetComputeVirtualMachineScaleSet(ctx context.Context, d *plugin.QueryData, type ComputeVirtualMachineScaleSetNetworkInterface struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.ComputeVirtualMachineScaleSetNetworkInterfaceDescription `json:"Description"` + Description azure.ComputeVirtualMachineScaleSetNetworkInterfaceDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -4696,59 +3873,6 @@ type ComputeVirtualMachineScaleSetNetworkInterface struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type ComputeVirtualMachineScaleSetNetworkInterfaceHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -4817,14 +3941,15 @@ func (p ComputeVirtualMachineScaleSetNetworkInterfacePaginator) NextPage(ctx con } var listComputeVirtualMachineScaleSetNetworkInterfaceFilters = map[string]string{ - "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", + "id": "Description.NetworkInterface.ID", + "mac_address": "Description.NetworkInterface.MacAddress", + "name": "Description.NetworkInterface.Name", + "platform_account_id": "metadata.IntegrationID", + "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) { @@ -4845,7 +3970,7 @@ func ListComputeVirtualMachineScaleSetNetworkInterface(ctx context.Context, d *p plugin.Logger(ctx).Error("ListComputeVirtualMachineScaleSetNetworkInterface NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListComputeVirtualMachineScaleSetNetworkInterface GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -4861,7 +3986,7 @@ func ListComputeVirtualMachineScaleSetNetworkInterface(ctx context.Context, d *p return nil, err } - paginator, err := k.NewComputeVirtualMachineScaleSetNetworkInterfacePaginator(essdk.BuildFilter(ctx, d.QueryContext, listComputeVirtualMachineScaleSetNetworkInterfaceFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewComputeVirtualMachineScaleSetNetworkInterfacePaginator(essdk.BuildFilter(ctx, d.QueryContext, listComputeVirtualMachineScaleSetNetworkInterfaceFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListComputeVirtualMachineScaleSetNetworkInterface NewComputeVirtualMachineScaleSetNetworkInterfacePaginator", "error", err) return nil, err @@ -4888,14 +4013,15 @@ func ListComputeVirtualMachineScaleSetNetworkInterface(ctx context.Context, d *p } var getComputeVirtualMachineScaleSetNetworkInterfaceFilters = map[string]string{ - "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", + "id": "Description.NetworkInterface.ID", + "mac_address": "Description.NetworkInterface.MacAddress", + "name": "Description.NetworkInterface.Name", + "platform_account_id": "metadata.IntegrationID", + "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) { @@ -4913,7 +4039,7 @@ func GetComputeVirtualMachineScaleSetNetworkInterface(ctx context.Context, d *pl if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -4927,7 +4053,7 @@ func GetComputeVirtualMachineScaleSetNetworkInterface(ctx context.Context, d *pl } limit := int64(1) - paginator, err := k.NewComputeVirtualMachineScaleSetNetworkInterfacePaginator(essdk.BuildFilter(ctx, d.QueryContext, getComputeVirtualMachineScaleSetNetworkInterfaceFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewComputeVirtualMachineScaleSetNetworkInterfacePaginator(essdk.BuildFilter(ctx, d.QueryContext, getComputeVirtualMachineScaleSetNetworkInterfaceFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -4958,7 +4084,7 @@ func GetComputeVirtualMachineScaleSetNetworkInterface(ctx context.Context, d *pl type ComputeVirtualMachineScaleSetVm struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.ComputeVirtualMachineScaleSetVmDescription `json:"Description"` + Description azure.ComputeVirtualMachineScaleSetVmDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -4966,59 +4092,6 @@ type ComputeVirtualMachineScaleSetVm struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type ComputeVirtualMachineScaleSetVmHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -5097,6 +4170,7 @@ var listComputeVirtualMachineScaleSetVmFilters = map[string]string{ "model_definition_applied": "Description.ScaleSetVM.Properties.ModelDefinitionApplied", "name": "Description.ScaleSetVM.Name", "plan": "Description.ScaleSetVM.Plan", + "platform_account_id": "metadata.IntegrationID", "power_state": "Description.PowerState", "protection_policy": "Description.VirtualMachineScaleSet.Properties.SpotRestorePolicy", "provisioning_state": "Description.VirtualMachineScaleSet.Properties.ProvisioningState", @@ -5140,7 +4214,7 @@ func ListComputeVirtualMachineScaleSetVm(ctx context.Context, d *plugin.QueryDat plugin.Logger(ctx).Error("ListComputeVirtualMachineScaleSetVm NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListComputeVirtualMachineScaleSetVm GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -5156,7 +4230,7 @@ func ListComputeVirtualMachineScaleSetVm(ctx context.Context, d *plugin.QueryDat return nil, err } - paginator, err := k.NewComputeVirtualMachineScaleSetVmPaginator(essdk.BuildFilter(ctx, d.QueryContext, listComputeVirtualMachineScaleSetVmFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewComputeVirtualMachineScaleSetVmPaginator(essdk.BuildFilter(ctx, d.QueryContext, listComputeVirtualMachineScaleSetVmFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListComputeVirtualMachineScaleSetVm NewComputeVirtualMachineScaleSetVmPaginator", "error", err) return nil, err @@ -5193,6 +4267,7 @@ var getComputeVirtualMachineScaleSetVmFilters = map[string]string{ "model_definition_applied": "Description.ScaleSetVM.Properties.ModelDefinitionApplied", "name": "Description.ScaleSetVM.Name", "plan": "Description.ScaleSetVM.Plan", + "platform_account_id": "metadata.IntegrationID", "power_state": "Description.PowerState", "protection_policy": "Description.VirtualMachineScaleSet.Properties.SpotRestorePolicy", "provisioning_state": "Description.VirtualMachineScaleSet.Properties.ProvisioningState", @@ -5233,7 +4308,7 @@ func GetComputeVirtualMachineScaleSetVm(ctx context.Context, d *plugin.QueryData if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -5247,7 +4322,7 @@ func GetComputeVirtualMachineScaleSetVm(ctx context.Context, d *plugin.QueryData } limit := int64(1) - paginator, err := k.NewComputeVirtualMachineScaleSetVmPaginator(essdk.BuildFilter(ctx, d.QueryContext, getComputeVirtualMachineScaleSetVmFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewComputeVirtualMachineScaleSetVmPaginator(essdk.BuildFilter(ctx, d.QueryContext, getComputeVirtualMachineScaleSetVmFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -5278,7 +4353,7 @@ func GetComputeVirtualMachineScaleSetVm(ctx context.Context, d *plugin.QueryData type ComputeSnapshots struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.ComputeSnapshotsDescription `json:"Description"` + Description azure.ComputeSnapshotsDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -5286,59 +4361,6 @@ type ComputeSnapshots struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type ComputeSnapshotsHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -5426,6 +4448,7 @@ var listComputeSnapshotsFilters = map[string]string{ "name": "Description.Snapshot.Name", "network_access_policy": "Description.Snapshot.Properties.NetworkAccessPolicy", "os_type": "Description.Snapshot.Properties.OSType", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.Snapshot.Properties.ProvisioningState", "resource_group": "Description.ResourceGroup", "sku_name": "Description.Snapshot.SKU.Name", @@ -5459,7 +4482,7 @@ func ListComputeSnapshots(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy plugin.Logger(ctx).Error("ListComputeSnapshots NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListComputeSnapshots GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -5475,7 +4498,7 @@ func ListComputeSnapshots(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy return nil, err } - paginator, err := k.NewComputeSnapshotsPaginator(essdk.BuildFilter(ctx, d.QueryContext, listComputeSnapshotsFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewComputeSnapshotsPaginator(essdk.BuildFilter(ctx, d.QueryContext, listComputeSnapshotsFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListComputeSnapshots NewComputeSnapshotsPaginator", "error", err) return nil, err @@ -5521,6 +4544,7 @@ var getComputeSnapshotsFilters = map[string]string{ "name": "description.Snapshot.Name", "network_access_policy": "Description.Snapshot.Properties.NetworkAccessPolicy", "os_type": "Description.Snapshot.Properties.OSType", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.Snapshot.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", "sku_name": "Description.Snapshot.SKU.Name", @@ -5551,7 +4575,7 @@ func GetComputeSnapshots(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -5565,7 +4589,7 @@ func GetComputeSnapshots(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd } limit := int64(1) - paginator, err := k.NewComputeSnapshotsPaginator(essdk.BuildFilter(ctx, d.QueryContext, getComputeSnapshotsFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewComputeSnapshotsPaginator(essdk.BuildFilter(ctx, d.QueryContext, getComputeSnapshotsFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -5596,7 +4620,7 @@ func GetComputeSnapshots(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd type ComputeAvailabilitySet struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.ComputeAvailabilitySetDescription `json:"Description"` + Description azure.ComputeAvailabilitySetDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -5604,59 +4628,6 @@ type ComputeAvailabilitySet struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type ComputeAvailabilitySetHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -5727,6 +4698,7 @@ func (p ComputeAvailabilitySetPaginator) NextPage(ctx context.Context) ([]Comput var listComputeAvailabilitySetFilters = map[string]string{ "id": "Description.AvailabilitySet.ID", "name": "Description.AvailabilitySet.Name", + "platform_account_id": "metadata.IntegrationID", "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", @@ -5759,7 +4731,7 @@ func ListComputeAvailabilitySet(ctx context.Context, d *plugin.QueryData, _ *plu plugin.Logger(ctx).Error("ListComputeAvailabilitySet NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListComputeAvailabilitySet GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -5775,7 +4747,7 @@ func ListComputeAvailabilitySet(ctx context.Context, d *plugin.QueryData, _ *plu return nil, err } - paginator, err := k.NewComputeAvailabilitySetPaginator(essdk.BuildFilter(ctx, d.QueryContext, listComputeAvailabilitySetFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewComputeAvailabilitySetPaginator(essdk.BuildFilter(ctx, d.QueryContext, listComputeAvailabilitySetFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListComputeAvailabilitySet NewComputeAvailabilitySetPaginator", "error", err) return nil, err @@ -5804,6 +4776,7 @@ func ListComputeAvailabilitySet(ctx context.Context, d *plugin.QueryData, _ *plu var getComputeAvailabilitySetFilters = map[string]string{ "id": "Description.AvailabilitySet.ID", "name": "description.AvailabilitySet.Name", + "platform_account_id": "metadata.IntegrationID", "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", @@ -5833,7 +4806,7 @@ func GetComputeAvailabilitySet(ctx context.Context, d *plugin.QueryData, _ *plug if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -5847,7 +4820,7 @@ func GetComputeAvailabilitySet(ctx context.Context, d *plugin.QueryData, _ *plug } limit := int64(1) - paginator, err := k.NewComputeAvailabilitySetPaginator(essdk.BuildFilter(ctx, d.QueryContext, getComputeAvailabilitySetFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewComputeAvailabilitySetPaginator(essdk.BuildFilter(ctx, d.QueryContext, getComputeAvailabilitySetFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -5878,7 +4851,7 @@ func GetComputeAvailabilitySet(ctx context.Context, d *plugin.QueryData, _ *plug type ComputeDiskEncryptionSet struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.ComputeDiskEncryptionSetDescription `json:"Description"` + Description azure.ComputeDiskEncryptionSetDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -5886,59 +4859,6 @@ type ComputeDiskEncryptionSet struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type ComputeDiskEncryptionSetHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -6015,6 +4935,7 @@ var listComputeDiskEncryptionSetFilters = map[string]string{ "identity_tenant_id": "Description.DiskEncryptionSet.Identity.TenantID", "identity_type": "Description.DiskEncryptionSet.Identity.Type", "name": "Description.DiskEncryptionSet.Name", + "platform_account_id": "metadata.IntegrationID", "previous_keys": "Description.DiskEncryptionSet.Properties.PreviousKeys", "provisioning_state": "Description.DiskEncryptionSet.Properties.ProvisioningState", "resource_group": "Description.ResourceGroup", @@ -6041,7 +4962,7 @@ func ListComputeDiskEncryptionSet(ctx context.Context, d *plugin.QueryData, _ *p plugin.Logger(ctx).Error("ListComputeDiskEncryptionSet NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListComputeDiskEncryptionSet GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -6057,7 +4978,7 @@ func ListComputeDiskEncryptionSet(ctx context.Context, d *plugin.QueryData, _ *p return nil, err } - paginator, err := k.NewComputeDiskEncryptionSetPaginator(essdk.BuildFilter(ctx, d.QueryContext, listComputeDiskEncryptionSetFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewComputeDiskEncryptionSetPaginator(essdk.BuildFilter(ctx, d.QueryContext, listComputeDiskEncryptionSetFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListComputeDiskEncryptionSet NewComputeDiskEncryptionSetPaginator", "error", err) return nil, err @@ -6092,6 +5013,7 @@ var getComputeDiskEncryptionSetFilters = map[string]string{ "identity_tenant_id": "Description.DiskEncryptionSet.Identity.TenantID", "identity_type": "Description.DiskEncryptionSet.Identity.Type", "name": "description.DiskEncryptionSet.Name", + "platform_account_id": "metadata.IntegrationID", "previous_keys": "Description.DiskEncryptionSet.Properties.PreviousKeys", "provisioning_state": "Description.DiskEncryptionSet.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", @@ -6115,7 +5037,7 @@ func GetComputeDiskEncryptionSet(ctx context.Context, d *plugin.QueryData, _ *pl if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -6129,7 +5051,7 @@ func GetComputeDiskEncryptionSet(ctx context.Context, d *plugin.QueryData, _ *pl } limit := int64(1) - paginator, err := k.NewComputeDiskEncryptionSetPaginator(essdk.BuildFilter(ctx, d.QueryContext, getComputeDiskEncryptionSetFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewComputeDiskEncryptionSetPaginator(essdk.BuildFilter(ctx, d.QueryContext, getComputeDiskEncryptionSetFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -6160,7 +5082,7 @@ func GetComputeDiskEncryptionSet(ctx context.Context, d *plugin.QueryData, _ *pl type ComputeImageGallery struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.ComputeImageGalleryDescription `json:"Description"` + Description azure.ComputeImageGalleryDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -6168,59 +5090,6 @@ type ComputeImageGallery struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type ComputeImageGalleryHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -6289,10 +5158,11 @@ func (p ComputeImageGalleryPaginator) NextPage(ctx context.Context) ([]ComputeIm } var listComputeImageGalleryFilters = map[string]string{ - "id": "Description.ImageGallery.ID", - "name": "Description.ImageGallery.Name", - "tags": "Description.ImageGallery.Tags", - "title": "Description.ImageGallery.Name", + "id": "Description.ImageGallery.ID", + "name": "Description.ImageGallery.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.ImageGallery.Tags", + "title": "Description.ImageGallery.Name", } func ListComputeImageGallery(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -6313,7 +5183,7 @@ func ListComputeImageGallery(ctx context.Context, d *plugin.QueryData, _ *plugin plugin.Logger(ctx).Error("ListComputeImageGallery NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListComputeImageGallery GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -6329,7 +5199,7 @@ func ListComputeImageGallery(ctx context.Context, d *plugin.QueryData, _ *plugin return nil, err } - paginator, err := k.NewComputeImageGalleryPaginator(essdk.BuildFilter(ctx, d.QueryContext, listComputeImageGalleryFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewComputeImageGalleryPaginator(essdk.BuildFilter(ctx, d.QueryContext, listComputeImageGalleryFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListComputeImageGallery NewComputeImageGalleryPaginator", "error", err) return nil, err @@ -6356,11 +5226,12 @@ func ListComputeImageGallery(ctx context.Context, d *plugin.QueryData, _ *plugin } var getComputeImageGalleryFilters = map[string]string{ - "id": "Description.ImageGallery.ID", - "name": "description.ImageGallery.Name", - "resource_group": "description.ResourceGroup", - "tags": "Description.ImageGallery.Tags", - "title": "Description.ImageGallery.Name", + "id": "Description.ImageGallery.ID", + "name": "description.ImageGallery.Name", + "platform_account_id": "metadata.IntegrationID", + "resource_group": "description.ResourceGroup", + "tags": "Description.ImageGallery.Tags", + "title": "Description.ImageGallery.Name", } func GetComputeImageGallery(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -6378,7 +5249,7 @@ func GetComputeImageGallery(ctx context.Context, d *plugin.QueryData, _ *plugin. if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -6392,7 +5263,7 @@ func GetComputeImageGallery(ctx context.Context, d *plugin.QueryData, _ *plugin. } limit := int64(1) - paginator, err := k.NewComputeImageGalleryPaginator(essdk.BuildFilter(ctx, d.QueryContext, getComputeImageGalleryFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewComputeImageGalleryPaginator(essdk.BuildFilter(ctx, d.QueryContext, getComputeImageGalleryFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -6423,7 +5294,7 @@ func GetComputeImageGallery(ctx context.Context, d *plugin.QueryData, _ *plugin. type ComputeImage struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.ComputeImageDescription `json:"Description"` + Description azure.ComputeImageDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -6431,59 +5302,6 @@ type ComputeImage struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type ComputeImageHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -6555,6 +5373,7 @@ var listComputeImageFilters = map[string]string{ "hyper_v_generation": "Description.Image.Properties.HyperVGeneration", "id": "Description.Image.ID", "name": "Description.Image.Name", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.Image.Properties.ProvisioningState", "resource_group": "Description.ResourceGroup", "source_virtual_machine_id": "Description.Image.Properties.SourceVirtualMachine.ID", @@ -6592,7 +5411,7 @@ func ListComputeImage(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat plugin.Logger(ctx).Error("ListComputeImage NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListComputeImage GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -6608,7 +5427,7 @@ func ListComputeImage(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat return nil, err } - paginator, err := k.NewComputeImagePaginator(essdk.BuildFilter(ctx, d.QueryContext, listComputeImageFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewComputeImagePaginator(essdk.BuildFilter(ctx, d.QueryContext, listComputeImageFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListComputeImage NewComputeImagePaginator", "error", err) return nil, err @@ -6638,6 +5457,7 @@ var getComputeImageFilters = map[string]string{ "hyper_v_generation": "Description.Image.Properties.HyperVGeneration", "id": "Description.Image.ID", "name": "Description.Image.Name", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.Image.Properties.ProvisioningState", "resource_group": "Description.Image.ResourceGroup", "source_virtual_machine_id": "Description.Image.Properties.SourceVirtualMachine.ID", @@ -6672,7 +5492,7 @@ func GetComputeImage(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -6686,7 +5506,7 @@ func GetComputeImage(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate } limit := int64(1) - paginator, err := k.NewComputeImagePaginator(essdk.BuildFilter(ctx, d.QueryContext, getComputeImageFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewComputeImagePaginator(essdk.BuildFilter(ctx, d.QueryContext, getComputeImageFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -6717,7 +5537,7 @@ func GetComputeImage(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate type ComputeHostGroup struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.ComputeHostGroupDescription `json:"Description"` + Description azure.ComputeHostGroupDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -6725,59 +5545,6 @@ type ComputeHostGroup struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type ComputeHostGroupHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -6870,7 +5637,7 @@ func ListComputeHostGroup(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy plugin.Logger(ctx).Error("ListComputeHostGroup NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListComputeHostGroup GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -6886,7 +5653,7 @@ func ListComputeHostGroup(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy return nil, err } - paginator, err := k.NewComputeHostGroupPaginator(essdk.BuildFilter(ctx, d.QueryContext, listComputeHostGroupFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewComputeHostGroupPaginator(essdk.BuildFilter(ctx, d.QueryContext, listComputeHostGroupFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListComputeHostGroup NewComputeHostGroupPaginator", "error", err) return nil, err @@ -6934,7 +5701,7 @@ func GetComputeHostGroup(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -6948,7 +5715,7 @@ func GetComputeHostGroup(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd } limit := int64(1) - paginator, err := k.NewComputeHostGroupPaginator(essdk.BuildFilter(ctx, d.QueryContext, getComputeHostGroupFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewComputeHostGroupPaginator(essdk.BuildFilter(ctx, d.QueryContext, getComputeHostGroupFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -6979,7 +5746,7 @@ func GetComputeHostGroup(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd type ComputeHostGroupHost struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.ComputeHostGroupHostDescription `json:"Description"` + Description azure.ComputeHostGroupHostDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -6987,59 +5754,6 @@ type ComputeHostGroupHost struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type ComputeHostGroupHostHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -7132,7 +5846,7 @@ func ListComputeHostGroupHost(ctx context.Context, d *plugin.QueryData, _ *plugi plugin.Logger(ctx).Error("ListComputeHostGroupHost NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListComputeHostGroupHost GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -7148,7 +5862,7 @@ func ListComputeHostGroupHost(ctx context.Context, d *plugin.QueryData, _ *plugi return nil, err } - paginator, err := k.NewComputeHostGroupHostPaginator(essdk.BuildFilter(ctx, d.QueryContext, listComputeHostGroupHostFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewComputeHostGroupHostPaginator(essdk.BuildFilter(ctx, d.QueryContext, listComputeHostGroupHostFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListComputeHostGroupHost NewComputeHostGroupHostPaginator", "error", err) return nil, err @@ -7196,7 +5910,7 @@ func GetComputeHostGroupHost(ctx context.Context, d *plugin.QueryData, _ *plugin if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -7210,7 +5924,7 @@ func GetComputeHostGroupHost(ctx context.Context, d *plugin.QueryData, _ *plugin } limit := int64(1) - paginator, err := k.NewComputeHostGroupHostPaginator(essdk.BuildFilter(ctx, d.QueryContext, getComputeHostGroupHostFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewComputeHostGroupHostPaginator(essdk.BuildFilter(ctx, d.QueryContext, getComputeHostGroupHostFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -7241,7 +5955,7 @@ func GetComputeHostGroupHost(ctx context.Context, d *plugin.QueryData, _ *plugin type ComputeRestorePointCollection struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.ComputeRestorePointCollectionDescription `json:"Description"` + Description azure.ComputeRestorePointCollectionDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -7249,59 +5963,6 @@ type ComputeRestorePointCollection struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type ComputeRestorePointCollectionHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -7394,7 +6055,7 @@ func ListComputeRestorePointCollection(ctx context.Context, d *plugin.QueryData, plugin.Logger(ctx).Error("ListComputeRestorePointCollection NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListComputeRestorePointCollection GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -7410,7 +6071,7 @@ func ListComputeRestorePointCollection(ctx context.Context, d *plugin.QueryData, return nil, err } - paginator, err := k.NewComputeRestorePointCollectionPaginator(essdk.BuildFilter(ctx, d.QueryContext, listComputeRestorePointCollectionFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewComputeRestorePointCollectionPaginator(essdk.BuildFilter(ctx, d.QueryContext, listComputeRestorePointCollectionFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListComputeRestorePointCollection NewComputeRestorePointCollectionPaginator", "error", err) return nil, err @@ -7458,7 +6119,7 @@ func GetComputeRestorePointCollection(ctx context.Context, d *plugin.QueryData, if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -7472,7 +6133,7 @@ func GetComputeRestorePointCollection(ctx context.Context, d *plugin.QueryData, } limit := int64(1) - paginator, err := k.NewComputeRestorePointCollectionPaginator(essdk.BuildFilter(ctx, d.QueryContext, getComputeRestorePointCollectionFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewComputeRestorePointCollectionPaginator(essdk.BuildFilter(ctx, d.QueryContext, getComputeRestorePointCollectionFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -7503,7 +6164,7 @@ func GetComputeRestorePointCollection(ctx context.Context, d *plugin.QueryData, type ComputeSSHPublicKey struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.ComputeSSHPublicKeyDescription `json:"Description"` + Description azure.ComputeSSHPublicKeyDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -7511,59 +6172,6 @@ type ComputeSSHPublicKey struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type ComputeSSHPublicKeyHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -7659,7 +6267,7 @@ func ListComputeSSHPublicKey(ctx context.Context, d *plugin.QueryData, _ *plugin plugin.Logger(ctx).Error("ListComputeSSHPublicKey NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListComputeSSHPublicKey GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -7675,7 +6283,7 @@ func ListComputeSSHPublicKey(ctx context.Context, d *plugin.QueryData, _ *plugin return nil, err } - paginator, err := k.NewComputeSSHPublicKeyPaginator(essdk.BuildFilter(ctx, d.QueryContext, listComputeSSHPublicKeyFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewComputeSSHPublicKeyPaginator(essdk.BuildFilter(ctx, d.QueryContext, listComputeSSHPublicKeyFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListComputeSSHPublicKey NewComputeSSHPublicKeyPaginator", "error", err) return nil, err @@ -7726,7 +6334,7 @@ func GetComputeSSHPublicKey(ctx context.Context, d *plugin.QueryData, _ *plugin. if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -7740,7 +6348,7 @@ func GetComputeSSHPublicKey(ctx context.Context, d *plugin.QueryData, _ *plugin. } limit := int64(1) - paginator, err := k.NewComputeSSHPublicKeyPaginator(essdk.BuildFilter(ctx, d.QueryContext, getComputeSSHPublicKeyFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewComputeSSHPublicKeyPaginator(essdk.BuildFilter(ctx, d.QueryContext, getComputeSSHPublicKeyFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -7771,7 +6379,7 @@ func GetComputeSSHPublicKey(ctx context.Context, d *plugin.QueryData, _ *plugin. type DataboxEdgeDevice struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.DataboxEdgeDeviceDescription `json:"Description"` + Description azure.DataboxEdgeDeviceDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -7779,59 +6387,6 @@ type DataboxEdgeDevice struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type DataboxEdgeDeviceHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -7916,6 +6471,7 @@ var listDataboxEdgeDeviceFilters = map[string]string{ "model_description": "Description.Device.Properties.ModelDescription", "name": "Description.Device.Name", "node_count": "Description.Device.Properties.NodeCount", + "platform_account_id": "metadata.IntegrationID", "resource_group": "Description.ResourceGroup", "serial_number": "Description.Device.Properties.SerialNumber", "sku_name": "Description.Device.SKU.Name", @@ -7944,7 +6500,7 @@ func ListDataboxEdgeDevice(ctx context.Context, d *plugin.QueryData, _ *plugin.H plugin.Logger(ctx).Error("ListDataboxEdgeDevice NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListDataboxEdgeDevice GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -7960,7 +6516,7 @@ func ListDataboxEdgeDevice(ctx context.Context, d *plugin.QueryData, _ *plugin.H return nil, err } - paginator, err := k.NewDataboxEdgeDevicePaginator(essdk.BuildFilter(ctx, d.QueryContext, listDataboxEdgeDeviceFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewDataboxEdgeDevicePaginator(essdk.BuildFilter(ctx, d.QueryContext, listDataboxEdgeDeviceFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListDataboxEdgeDevice NewDataboxEdgeDevicePaginator", "error", err) return nil, err @@ -8003,6 +6559,7 @@ var getDataboxEdgeDeviceFilters = map[string]string{ "model_description": "Description.Device.Properties.ModelDescription", "name": "description.Device.name", "node_count": "Description.Device.Properties.NodeCount", + "platform_account_id": "metadata.IntegrationID", "resource_group": "description.ResourceGroup", "serial_number": "Description.Device.Properties.SerialNumber", "sku_name": "Description.Device.SKU.Name", @@ -8028,7 +6585,7 @@ func GetDataboxEdgeDevice(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -8042,7 +6599,7 @@ func GetDataboxEdgeDevice(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy } limit := int64(1) - paginator, err := k.NewDataboxEdgeDevicePaginator(essdk.BuildFilter(ctx, d.QueryContext, getDataboxEdgeDeviceFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewDataboxEdgeDevicePaginator(essdk.BuildFilter(ctx, d.QueryContext, getDataboxEdgeDeviceFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -8073,7 +6630,7 @@ func GetDataboxEdgeDevice(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy type HealthcareService struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.HealthcareServiceDescription `json:"Description"` + Description azure.HealthcareServiceDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -8081,59 +6638,6 @@ type HealthcareService struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type HealthcareServiceHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -8217,6 +6721,7 @@ var listHealthcareServiceFilters = map[string]string{ "methods": "Description.ServicesDescription.Properties.CorsConfiguration.Methods", "name": "Description.ServicesDescription.Name", "origins": "Description.ServicesDescription.Properties.CorsConfiguration.Origins", + "platform_account_id": "metadata.IntegrationID", "private_endpoint_connections": "Description.ServicesDescription.Properties.PrivateEndpointConnections", "provisioning_state": "Description.ServicesDescription.Properties.ProvisioningState", "resource_group": "Description.ResourceGroup", @@ -8244,7 +6749,7 @@ func ListHealthcareService(ctx context.Context, d *plugin.QueryData, _ *plugin.H plugin.Logger(ctx).Error("ListHealthcareService NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListHealthcareService GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -8260,7 +6765,7 @@ func ListHealthcareService(ctx context.Context, d *plugin.QueryData, _ *plugin.H return nil, err } - paginator, err := k.NewHealthcareServicePaginator(essdk.BuildFilter(ctx, d.QueryContext, listHealthcareServiceFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewHealthcareServicePaginator(essdk.BuildFilter(ctx, d.QueryContext, listHealthcareServiceFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListHealthcareService NewHealthcareServicePaginator", "error", err) return nil, err @@ -8302,6 +6807,7 @@ var getHealthcareServiceFilters = map[string]string{ "methods": "Description.ServicesDescription.Properties.CorsConfiguration.Methods", "name": "description.ServicesDescription.name", "origins": "Description.ServicesDescription.Properties.CorsConfiguration.Origins", + "platform_account_id": "metadata.IntegrationID", "private_endpoint_connections": "Description.ServicesDescription.Properties.PrivateEndpointConnections", "provisioning_state": "Description.ServicesDescription.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", @@ -8326,7 +6832,7 @@ func GetHealthcareService(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -8340,7 +6846,7 @@ func GetHealthcareService(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy } limit := int64(1) - paginator, err := k.NewHealthcareServicePaginator(essdk.BuildFilter(ctx, d.QueryContext, getHealthcareServiceFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewHealthcareServicePaginator(essdk.BuildFilter(ctx, d.QueryContext, getHealthcareServiceFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -8371,7 +6877,7 @@ func GetHealthcareService(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy type HpcCache struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.HpcCacheDescription `json:"Description"` + Description azure.HpcCacheDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -8379,59 +6885,6 @@ type HpcCache struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type HpcCacheHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -8508,6 +6961,7 @@ var listHpcCacheFilters = map[string]string{ "identity": "Description.Cache.Identity", "mount_addresses": "Description.Cache.Properties.MountAddresses", "name": "Description.Cache.Name", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.Cache.Properties.ProvisioningState", "resource_group": "Description.ResourceGroup", "security_settings": "Description.Cache.Properties.SecuritySettings", @@ -8537,7 +6991,7 @@ func ListHpcCache(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDat plugin.Logger(ctx).Error("ListHpcCache NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListHpcCache GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -8553,7 +7007,7 @@ func ListHpcCache(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDat return nil, err } - paginator, err := k.NewHpcCachePaginator(essdk.BuildFilter(ctx, d.QueryContext, listHpcCacheFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewHpcCachePaginator(essdk.BuildFilter(ctx, d.QueryContext, listHpcCacheFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListHpcCache NewHpcCachePaginator", "error", err) return nil, err @@ -8588,6 +7042,7 @@ var getHpcCacheFilters = map[string]string{ "identity": "Description.Cache.Identity", "mount_addresses": "Description.Cache.Properties.MountAddresses", "name": "description.Cache.name", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.Cache.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", "security_settings": "Description.Cache.Properties.SecuritySettings", @@ -8614,7 +7069,7 @@ func GetHpcCache(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -8628,7 +7083,7 @@ func GetHpcCache(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData } limit := int64(1) - paginator, err := k.NewHpcCachePaginator(essdk.BuildFilter(ctx, d.QueryContext, getHpcCacheFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewHpcCachePaginator(essdk.BuildFilter(ctx, d.QueryContext, getHpcCacheFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -8659,7 +7114,7 @@ func GetHpcCache(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData type KeyVaultKey struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.KeyVaultKeyDescription `json:"Description"` + Description azure.KeyVaultKeyDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -8667,59 +7122,6 @@ type KeyVaultKey struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type KeyVaultKeyHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -8798,6 +7200,7 @@ var listKeyVaultKeyFilters = map[string]string{ "key_uri_with_version": "Description.Key.Properties.KeyURIWithVersion", "location": "Description.Key.Location", "name": "Description.Key.Name", + "platform_account_id": "metadata.IntegrationID", "recovery_level": "Description.Key.Properties.Attributes.RecoveryLevel", "resource_group": "Description.ResourceGroup", "tags": "Description.Key.Tags", @@ -8823,7 +7226,7 @@ func ListKeyVaultKey(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate plugin.Logger(ctx).Error("ListKeyVaultKey NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListKeyVaultKey GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -8839,7 +7242,7 @@ func ListKeyVaultKey(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate return nil, err } - paginator, err := k.NewKeyVaultKeyPaginator(essdk.BuildFilter(ctx, d.QueryContext, listKeyVaultKeyFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewKeyVaultKeyPaginator(essdk.BuildFilter(ctx, d.QueryContext, listKeyVaultKeyFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListKeyVaultKey NewKeyVaultKeyPaginator", "error", err) return nil, err @@ -8876,6 +7279,7 @@ var getKeyVaultKeyFilters = map[string]string{ "key_uri_with_version": "Description.Key.Properties.KeyURIWithVersion", "location": "Description.Key.Location", "name": "description.Key.name", + "platform_account_id": "metadata.IntegrationID", "recovery_level": "Description.Key.Properties.Attributes.RecoveryLevel", "resource_group": "description.ResourceGroup", "tags": "Description.Key.Tags", @@ -8899,7 +7303,7 @@ func GetKeyVaultKey(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -8913,7 +7317,7 @@ func GetKeyVaultKey(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD } limit := int64(1) - paginator, err := k.NewKeyVaultKeyPaginator(essdk.BuildFilter(ctx, d.QueryContext, getKeyVaultKeyFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewKeyVaultKeyPaginator(essdk.BuildFilter(ctx, d.QueryContext, getKeyVaultKeyFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -8944,7 +7348,7 @@ func GetKeyVaultKey(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD type KeyVaultKeyVersion struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.KeyVaultKeyVersionDescription `json:"Description"` + Description azure.KeyVaultKeyVersionDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -8952,59 +7356,6 @@ type KeyVaultKeyVersion struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type KeyVaultKeyVersionHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -9085,6 +7436,7 @@ var listKeyVaultKeyVersionFilters = map[string]string{ "key_uri_with_version": "Description.Version.Properties.KeyURIWithVersion", "location": "Description.Version.Location", "name": "Description.Version.Name", + "platform_account_id": "metadata.IntegrationID", "recovery_level": "Description.Version.Properties.Attributes.RecoveryLevel", "resource_group": "Description.ResourceGroup", "tags": "Description.Version.Tags", @@ -9111,7 +7463,7 @@ func ListKeyVaultKeyVersion(ctx context.Context, d *plugin.QueryData, _ *plugin. plugin.Logger(ctx).Error("ListKeyVaultKeyVersion NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListKeyVaultKeyVersion GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -9127,7 +7479,7 @@ func ListKeyVaultKeyVersion(ctx context.Context, d *plugin.QueryData, _ *plugin. return nil, err } - paginator, err := k.NewKeyVaultKeyVersionPaginator(essdk.BuildFilter(ctx, d.QueryContext, listKeyVaultKeyVersionFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewKeyVaultKeyVersionPaginator(essdk.BuildFilter(ctx, d.QueryContext, listKeyVaultKeyVersionFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListKeyVaultKeyVersion NewKeyVaultKeyVersionPaginator", "error", err) return nil, err @@ -9166,6 +7518,7 @@ var getKeyVaultKeyVersionFilters = map[string]string{ "key_uri_with_version": "Description.Version.Properties.KeyURIWithVersion", "location": "Description.Version.Location", "name": "description.Version.name", + "platform_account_id": "metadata.IntegrationID", "recovery_level": "Description.Version.Properties.Attributes.RecoveryLevel", "resource_group": "description.ResourceGroup", "tags": "Description.Version.Tags", @@ -9189,7 +7542,7 @@ func GetKeyVaultKeyVersion(ctx context.Context, d *plugin.QueryData, _ *plugin.H if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -9203,7 +7556,7 @@ func GetKeyVaultKeyVersion(ctx context.Context, d *plugin.QueryData, _ *plugin.H } limit := int64(1) - paginator, err := k.NewKeyVaultKeyVersionPaginator(essdk.BuildFilter(ctx, d.QueryContext, getKeyVaultKeyVersionFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewKeyVaultKeyVersionPaginator(essdk.BuildFilter(ctx, d.QueryContext, getKeyVaultKeyVersionFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -9234,7 +7587,7 @@ func GetKeyVaultKeyVersion(ctx context.Context, d *plugin.QueryData, _ *plugin.H type KubernetesCluster struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.KubernetesClusterDescription `json:"Description"` + Description azure.KubernetesClusterDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -9242,59 +7595,6 @@ type KubernetesCluster struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type KubernetesClusterHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -9386,6 +7686,7 @@ var listKubernetesClusterFilters = map[string]string{ "name": "Description.ManagedCluster.Name", "network_profile": "Description.ManagedCluster.Properties.NetworkProfile", "node_resource_group": "Description.ManagedCluster.Properties.NodeResourceGroup", + "platform_account_id": "metadata.IntegrationID", "pod_identity_profile": "Description.ManagedCluster.Properties.PodIdentityProfile", "power_state": "Description.ManagedCluster.Properties.PowerState", "private_fqdn": "Description.ManagedCluster.Properties.PrivateFQDN", @@ -9417,7 +7718,7 @@ func ListKubernetesCluster(ctx context.Context, d *plugin.QueryData, _ *plugin.H plugin.Logger(ctx).Error("ListKubernetesCluster NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListKubernetesCluster GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -9433,7 +7734,7 @@ func ListKubernetesCluster(ctx context.Context, d *plugin.QueryData, _ *plugin.H return nil, err } - paginator, err := k.NewKubernetesClusterPaginator(essdk.BuildFilter(ctx, d.QueryContext, listKubernetesClusterFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewKubernetesClusterPaginator(essdk.BuildFilter(ctx, d.QueryContext, listKubernetesClusterFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListKubernetesCluster NewKubernetesClusterPaginator", "error", err) return nil, err @@ -9483,6 +7784,7 @@ var getKubernetesClusterFilters = map[string]string{ "name": "description.ManagedCluster.name", "network_profile": "Description.ManagedCluster.Properties.NetworkProfile", "node_resource_group": "Description.ManagedCluster.Properties.NodeResourceGroup", + "platform_account_id": "metadata.IntegrationID", "pod_identity_profile": "Description.ManagedCluster.Properties.PodIdentityProfile", "power_state": "Description.ManagedCluster.Properties.PowerState", "private_fqdn": "Description.ManagedCluster.Properties.PrivateFQDN", @@ -9511,7 +7813,7 @@ func GetKubernetesCluster(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -9525,7 +7827,7 @@ func GetKubernetesCluster(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy } limit := int64(1) - paginator, err := k.NewKubernetesClusterPaginator(essdk.BuildFilter(ctx, d.QueryContext, getKubernetesClusterFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewKubernetesClusterPaginator(essdk.BuildFilter(ctx, d.QueryContext, getKubernetesClusterFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -9556,7 +7858,7 @@ func GetKubernetesCluster(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy type KubernetesServiceVersion struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.KubernetesServiceVersionDescription `json:"Description"` + Description azure.KubernetesServiceVersionDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -9564,59 +7866,6 @@ type KubernetesServiceVersion struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type KubernetesServiceVersionHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -9685,11 +7934,12 @@ func (p KubernetesServiceVersionPaginator) NextPage(ctx context.Context) ([]Kube } var listKubernetesServiceVersionFilters = map[string]string{ - "capabilities": "Description.Version.Capabilities", - "is_preview": "Description.Version.IsPreview", - "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", + "platform_account_id": "metadata.IntegrationID", + "title": "Description.Version.Version", + "version": "Description.Version.Version", } func ListKubernetesServiceVersion(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -9710,7 +7960,7 @@ func ListKubernetesServiceVersion(ctx context.Context, d *plugin.QueryData, _ *p plugin.Logger(ctx).Error("ListKubernetesServiceVersion NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListKubernetesServiceVersion GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -9726,7 +7976,7 @@ func ListKubernetesServiceVersion(ctx context.Context, d *plugin.QueryData, _ *p return nil, err } - paginator, err := k.NewKubernetesServiceVersionPaginator(essdk.BuildFilter(ctx, d.QueryContext, listKubernetesServiceVersionFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewKubernetesServiceVersionPaginator(essdk.BuildFilter(ctx, d.QueryContext, listKubernetesServiceVersionFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListKubernetesServiceVersion NewKubernetesServiceVersionPaginator", "error", err) return nil, err @@ -9753,13 +8003,14 @@ func ListKubernetesServiceVersion(ctx context.Context, d *plugin.QueryData, _ *p } var getKubernetesServiceVersionFilters = map[string]string{ - "capabilities": "Description.Version.Capabilities", - "is_preview": "Description.Version.IsPreview", - "name": "description.Orchestrator.name", - "patch_versions": "Description.Version.PatchVersions", - "resource_group": "description.ResourceGroup", - "title": "Description.Version.Version", - "version": "Description.Version.Version", + "capabilities": "Description.Version.Capabilities", + "is_preview": "Description.Version.IsPreview", + "name": "description.Orchestrator.name", + "patch_versions": "Description.Version.PatchVersions", + "platform_account_id": "metadata.IntegrationID", + "resource_group": "description.ResourceGroup", + "title": "Description.Version.Version", + "version": "Description.Version.Version", } func GetKubernetesServiceVersion(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -9777,7 +8028,7 @@ func GetKubernetesServiceVersion(ctx context.Context, d *plugin.QueryData, _ *pl if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -9791,7 +8042,7 @@ func GetKubernetesServiceVersion(ctx context.Context, d *plugin.QueryData, _ *pl } limit := int64(1) - paginator, err := k.NewKubernetesServiceVersionPaginator(essdk.BuildFilter(ctx, d.QueryContext, getKubernetesServiceVersionFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewKubernetesServiceVersionPaginator(essdk.BuildFilter(ctx, d.QueryContext, getKubernetesServiceVersionFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -9822,7 +8073,7 @@ func GetKubernetesServiceVersion(ctx context.Context, d *plugin.QueryData, _ *pl type ContainerInstanceContainerGroup struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.ContainerInstanceContainerGroupDescription `json:"Description"` + Description azure.ContainerInstanceContainerGroupDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -9830,59 +8081,6 @@ type ContainerInstanceContainerGroup struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type ContainerInstanceContainerGroupHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -9963,6 +8161,7 @@ var listContainerInstanceContainerGroupFilters = map[string]string{ "ip_address": "Description.ContainerGroup.Properties.IPAddress", "name": "Description.ContainerGroup.Name", "os_type": "Description.ContainerGroup.Properties.OSType", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.ContainerGroup.Properties.ProvisioningState", "resource_group": "Description.ResourceGroup", "restart_policy": "Description.ContainerGroup.Properties.RestartPolicy", @@ -9992,7 +8191,7 @@ func ListContainerInstanceContainerGroup(ctx context.Context, d *plugin.QueryDat plugin.Logger(ctx).Error("ListContainerInstanceContainerGroup NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListContainerInstanceContainerGroup GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -10008,7 +8207,7 @@ func ListContainerInstanceContainerGroup(ctx context.Context, d *plugin.QueryDat return nil, err } - paginator, err := k.NewContainerInstanceContainerGroupPaginator(essdk.BuildFilter(ctx, d.QueryContext, listContainerInstanceContainerGroupFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewContainerInstanceContainerGroupPaginator(essdk.BuildFilter(ctx, d.QueryContext, listContainerInstanceContainerGroupFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListContainerInstanceContainerGroup NewContainerInstanceContainerGroupPaginator", "error", err) return nil, err @@ -10047,6 +8246,7 @@ var getContainerInstanceContainerGroupFilters = map[string]string{ "ip_address": "Description.ContainerGroup.Properties.IPAddress", "name": "Description.ContainerGroup.Name", "os_type": "Description.ContainerGroup.Properties.OSType", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.ContainerGroup.Properties.ProvisioningState", "resource_group": "Description.ResourceGroup", "restart_policy": "Description.ContainerGroup.Properties.RestartPolicy", @@ -10073,7 +8273,7 @@ func GetContainerInstanceContainerGroup(ctx context.Context, d *plugin.QueryData if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -10087,7 +8287,7 @@ func GetContainerInstanceContainerGroup(ctx context.Context, d *plugin.QueryData } limit := int64(1) - paginator, err := k.NewContainerInstanceContainerGroupPaginator(essdk.BuildFilter(ctx, d.QueryContext, getContainerInstanceContainerGroupFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewContainerInstanceContainerGroupPaginator(essdk.BuildFilter(ctx, d.QueryContext, getContainerInstanceContainerGroupFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -10118,7 +8318,7 @@ func GetContainerInstanceContainerGroup(ctx context.Context, d *plugin.QueryData type CDNProfile struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.CDNProfileDescription `json:"Description"` + Description azure.CDNProfileDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -10126,59 +8326,6 @@ type CDNProfile struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type CDNProfileHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -10252,6 +8399,7 @@ var listCDNProfileFilters = map[string]string{ "kind": "Description.Profile.Kind", "name": "Description.Profile.Name", "origin_response_timeout_seconds": "Description.Profile.Properties.OriginResponseTimeoutSeconds", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.Profile.Properties.ProvisioningState", "resource_group": "Description.ResourceGroup", "sku_name": "Description.Profile.SKU.Name", @@ -10278,7 +8426,7 @@ func ListCDNProfile(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD plugin.Logger(ctx).Error("ListCDNProfile NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListCDNProfile GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -10294,7 +8442,7 @@ func ListCDNProfile(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD return nil, err } - paginator, err := k.NewCDNProfilePaginator(essdk.BuildFilter(ctx, d.QueryContext, listCDNProfileFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewCDNProfilePaginator(essdk.BuildFilter(ctx, d.QueryContext, listCDNProfileFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListCDNProfile NewCDNProfilePaginator", "error", err) return nil, err @@ -10326,6 +8474,7 @@ var getCDNProfileFilters = map[string]string{ "kind": "Description.Profile.Kind", "name": "Description.Profile.Name", "origin_response_timeout_seconds": "Description.Profile.Properties.OriginResponseTimeoutSeconds", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.Profile.Properties.ProvisioningState", "resource_group": "Description.ResourceGroup", "sku_name": "Description.Profile.SKU.Name", @@ -10349,7 +8498,7 @@ func GetCDNProfile(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDa if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -10363,7 +8512,7 @@ func GetCDNProfile(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDa } limit := int64(1) - paginator, err := k.NewCDNProfilePaginator(essdk.BuildFilter(ctx, d.QueryContext, getCDNProfileFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewCDNProfilePaginator(essdk.BuildFilter(ctx, d.QueryContext, getCDNProfileFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -10394,7 +8543,7 @@ func GetCDNProfile(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDa type CDNEndpoint struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.CDNEndpointDescription `json:"Description"` + Description azure.CDNEndpointDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -10402,59 +8551,6 @@ type CDNEndpoint struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type CDNEndpointHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -10547,7 +8643,7 @@ func ListCDNEndpoint(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate plugin.Logger(ctx).Error("ListCDNEndpoint NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListCDNEndpoint GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -10563,7 +8659,7 @@ func ListCDNEndpoint(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate return nil, err } - paginator, err := k.NewCDNEndpointPaginator(essdk.BuildFilter(ctx, d.QueryContext, listCDNEndpointFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewCDNEndpointPaginator(essdk.BuildFilter(ctx, d.QueryContext, listCDNEndpointFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListCDNEndpoint NewCDNEndpointPaginator", "error", err) return nil, err @@ -10611,7 +8707,7 @@ func GetCDNEndpoint(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -10625,7 +8721,7 @@ func GetCDNEndpoint(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD } limit := int64(1) - paginator, err := k.NewCDNEndpointPaginator(essdk.BuildFilter(ctx, d.QueryContext, getCDNEndpointFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewCDNEndpointPaginator(essdk.BuildFilter(ctx, d.QueryContext, getCDNEndpointFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -10656,7 +8752,7 @@ func GetCDNEndpoint(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD type NetworkInterface struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.NetworkInterfaceDescription `json:"Description"` + Description azure.NetworkInterfaceDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -10664,59 +8760,6 @@ type NetworkInterface struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type NetworkInterfaceHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -10804,6 +8847,7 @@ var listNetworkInterfaceFilters = map[string]string{ "name": "Description.Interface.Name", "network_security_group_id": "Description.Interface.Properties.NetworkSecurityGroup.ID", "nic_type": "Description.Interface.Properties.NicType", + "platform_account_id": "metadata.IntegrationID", "private_endpoint": "Description.Interface.Properties.PrivateEndpoint", "private_link_service": "Description.Interface.Properties.PrivateLinkService", "provisioning_state": "Description.Interface.Properties.ProvisioningState", @@ -10836,7 +8880,7 @@ func ListNetworkInterface(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy plugin.Logger(ctx).Error("ListNetworkInterface NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListNetworkInterface GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -10852,7 +8896,7 @@ func ListNetworkInterface(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy return nil, err } - paginator, err := k.NewNetworkInterfacePaginator(essdk.BuildFilter(ctx, d.QueryContext, listNetworkInterfaceFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewNetworkInterfacePaginator(essdk.BuildFilter(ctx, d.QueryContext, listNetworkInterfaceFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListNetworkInterface NewNetworkInterfacePaginator", "error", err) return nil, err @@ -10898,6 +8942,7 @@ var getNetworkInterfaceFilters = map[string]string{ "name": "description.Interface.name", "network_security_group_id": "Description.Interface.Properties.NetworkSecurityGroup.ID", "nic_type": "Description.Interface.Properties.NicType", + "platform_account_id": "metadata.IntegrationID", "private_endpoint": "Description.Interface.Properties.PrivateEndpoint", "private_link_service": "Description.Interface.Properties.PrivateLinkService", "provisioning_state": "Description.Interface.Properties.ProvisioningState", @@ -10927,7 +8972,7 @@ func GetNetworkInterface(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -10941,7 +8986,7 @@ func GetNetworkInterface(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd } limit := int64(1) - paginator, err := k.NewNetworkInterfacePaginator(essdk.BuildFilter(ctx, d.QueryContext, getNetworkInterfaceFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewNetworkInterfacePaginator(essdk.BuildFilter(ctx, d.QueryContext, getNetworkInterfaceFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -10972,7 +9017,7 @@ func GetNetworkInterface(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd type NetworkWatcherFlowLog struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.NetworkWatcherFlowLogDescription `json:"Description"` + Description azure.NetworkWatcherFlowLogDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -10980,59 +9025,6 @@ type NetworkWatcherFlowLog struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type NetworkWatcherFlowLogHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -11107,6 +9099,7 @@ var listNetworkWatcherFlowLogFilters = map[string]string{ "id": "Description.FlowLog.ID", "name": "Description.FlowLog.Name", "network_watcher_name": "Description.NetworkWatcherName", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.FlowLog.Properties.ProvisioningState", "resource_group": "Description.ResourceGroup", "retention_policy_days": "Description.FlowLog.Properties.RetentionPolicy.Days", @@ -11139,7 +9132,7 @@ func ListNetworkWatcherFlowLog(ctx context.Context, d *plugin.QueryData, _ *plug plugin.Logger(ctx).Error("ListNetworkWatcherFlowLog NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListNetworkWatcherFlowLog GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -11155,7 +9148,7 @@ func ListNetworkWatcherFlowLog(ctx context.Context, d *plugin.QueryData, _ *plug return nil, err } - paginator, err := k.NewNetworkWatcherFlowLogPaginator(essdk.BuildFilter(ctx, d.QueryContext, listNetworkWatcherFlowLogFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewNetworkWatcherFlowLogPaginator(essdk.BuildFilter(ctx, d.QueryContext, listNetworkWatcherFlowLogFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListNetworkWatcherFlowLog NewNetworkWatcherFlowLogPaginator", "error", err) return nil, err @@ -11188,6 +9181,7 @@ var getNetworkWatcherFlowLogFilters = map[string]string{ "id": "Description.FlowLog.ID", "name": "description.ManagedCluster.name", "network_watcher_name": "description.NetworkWatcherName", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.FlowLog.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", "retention_policy_days": "Description.FlowLog.Properties.RetentionPolicy.Days", @@ -11217,7 +9211,7 @@ func GetNetworkWatcherFlowLog(ctx context.Context, d *plugin.QueryData, _ *plugi if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -11231,7 +9225,7 @@ func GetNetworkWatcherFlowLog(ctx context.Context, d *plugin.QueryData, _ *plugi } limit := int64(1) - paginator, err := k.NewNetworkWatcherFlowLogPaginator(essdk.BuildFilter(ctx, d.QueryContext, getNetworkWatcherFlowLogFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewNetworkWatcherFlowLogPaginator(essdk.BuildFilter(ctx, d.QueryContext, getNetworkWatcherFlowLogFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -11262,7 +9256,7 @@ func GetNetworkWatcherFlowLog(ctx context.Context, d *plugin.QueryData, _ *plugi type RouteTables struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.RouteTablesDescription `json:"Description"` + Description azure.RouteTablesDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -11270,59 +9264,6 @@ type RouteTables struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type RouteTablesHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -11394,6 +9335,7 @@ var listRouteTablesFilters = map[string]string{ "disable_bgp_route_propagation": "Description.RouteTable.Properties.DisableBgpRoutePropagation", "etag": "Description.RouteTable.Etag", "name": "Description.RouteTable.Name", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.RouteTable.Properties.ProvisioningState", "routes": "Description.RouteTable.Properties.Routes", "subnets": "Description.RouteTable.Properties.Subnets", @@ -11420,7 +9362,7 @@ func ListRouteTables(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate plugin.Logger(ctx).Error("ListRouteTables NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListRouteTables GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -11436,7 +9378,7 @@ func ListRouteTables(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate return nil, err } - paginator, err := k.NewRouteTablesPaginator(essdk.BuildFilter(ctx, d.QueryContext, listRouteTablesFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewRouteTablesPaginator(essdk.BuildFilter(ctx, d.QueryContext, listRouteTablesFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListRouteTables NewRouteTablesPaginator", "error", err) return nil, err @@ -11466,6 +9408,7 @@ var getRouteTablesFilters = map[string]string{ "disable_bgp_route_propagation": "Description.RouteTable.Properties.DisableBgpRoutePropagation", "etag": "Description.RouteTable.Etag", "name": "description.RouteTable.Name", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.RouteTable.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", "routes": "Description.RouteTable.Properties.Routes", @@ -11490,7 +9433,7 @@ func GetRouteTables(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -11504,7 +9447,7 @@ func GetRouteTables(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD } limit := int64(1) - paginator, err := k.NewRouteTablesPaginator(essdk.BuildFilter(ctx, d.QueryContext, getRouteTablesFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewRouteTablesPaginator(essdk.BuildFilter(ctx, d.QueryContext, getRouteTablesFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -11535,7 +9478,7 @@ func GetRouteTables(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD type NetworkApplicationSecurityGroups struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.NetworkApplicationSecurityGroupsDescription `json:"Description"` + Description azure.NetworkApplicationSecurityGroupsDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -11543,59 +9486,6 @@ type NetworkApplicationSecurityGroups struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type NetworkApplicationSecurityGroupsHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -11664,14 +9554,15 @@ func (p NetworkApplicationSecurityGroupsPaginator) NextPage(ctx context.Context) } var listNetworkApplicationSecurityGroupsFilters = map[string]string{ - "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", + "etag": "Description.ApplicationSecurityGroup.Etag", + "name": "Description.ApplicationSecurityGroup.Name", + "platform_account_id": "metadata.IntegrationID", + "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) { @@ -11692,7 +9583,7 @@ func ListNetworkApplicationSecurityGroups(ctx context.Context, d *plugin.QueryDa plugin.Logger(ctx).Error("ListNetworkApplicationSecurityGroups NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListNetworkApplicationSecurityGroups GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -11708,7 +9599,7 @@ func ListNetworkApplicationSecurityGroups(ctx context.Context, d *plugin.QueryDa return nil, err } - paginator, err := k.NewNetworkApplicationSecurityGroupsPaginator(essdk.BuildFilter(ctx, d.QueryContext, listNetworkApplicationSecurityGroupsFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewNetworkApplicationSecurityGroupsPaginator(essdk.BuildFilter(ctx, d.QueryContext, listNetworkApplicationSecurityGroupsFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListNetworkApplicationSecurityGroups NewNetworkApplicationSecurityGroupsPaginator", "error", err) return nil, err @@ -11735,14 +9626,15 @@ func ListNetworkApplicationSecurityGroups(ctx context.Context, d *plugin.QueryDa } var getNetworkApplicationSecurityGroupsFilters = map[string]string{ - "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", + "etag": "Description.ApplicationSecurityGroup.Etag", + "name": "description.ApplicationSecurityGroup.Name", + "platform_account_id": "metadata.IntegrationID", + "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 GetNetworkApplicationSecurityGroups(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -11760,7 +9652,7 @@ func GetNetworkApplicationSecurityGroups(ctx context.Context, d *plugin.QueryDat if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -11774,7 +9666,7 @@ func GetNetworkApplicationSecurityGroups(ctx context.Context, d *plugin.QueryDat } limit := int64(1) - paginator, err := k.NewNetworkApplicationSecurityGroupsPaginator(essdk.BuildFilter(ctx, d.QueryContext, getNetworkApplicationSecurityGroupsFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewNetworkApplicationSecurityGroupsPaginator(essdk.BuildFilter(ctx, d.QueryContext, getNetworkApplicationSecurityGroupsFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -11805,7 +9697,7 @@ func GetNetworkApplicationSecurityGroups(ctx context.Context, d *plugin.QueryDat type NetworkAzureFirewall struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.NetworkAzureFirewallDescription `json:"Description"` + Description azure.NetworkAzureFirewallDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -11813,59 +9705,6 @@ type NetworkAzureFirewall struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type NetworkAzureFirewallHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -11947,6 +9786,7 @@ var listNetworkAzureFirewallFilters = map[string]string{ "name": "Description.AzureFirewall.Name", "nat_rule_collections": "Description.AzureFirewall.Properties.NatRuleCollections", "network_rule_collections": "Description.AzureFirewall.Properties.NetworkRuleCollections", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.AzureFirewall.Properties.ProvisioningState", "resource_group": "Description.ResourceGroup", "sku_name": "Description.AzureFirewall.Properties.SKU.Name", @@ -11976,7 +9816,7 @@ func ListNetworkAzureFirewall(ctx context.Context, d *plugin.QueryData, _ *plugi plugin.Logger(ctx).Error("ListNetworkAzureFirewall NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListNetworkAzureFirewall GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -11992,7 +9832,7 @@ func ListNetworkAzureFirewall(ctx context.Context, d *plugin.QueryData, _ *plugi return nil, err } - paginator, err := k.NewNetworkAzureFirewallPaginator(essdk.BuildFilter(ctx, d.QueryContext, listNetworkAzureFirewallFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewNetworkAzureFirewallPaginator(essdk.BuildFilter(ctx, d.QueryContext, listNetworkAzureFirewallFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListNetworkAzureFirewall NewNetworkAzureFirewallPaginator", "error", err) return nil, err @@ -12032,6 +9872,7 @@ var getNetworkAzureFirewallFilters = map[string]string{ "name": "description.AzureFirewall.Name", "nat_rule_collections": "Description.AzureFirewall.Properties.NatRuleCollections", "network_rule_collections": "Description.AzureFirewall.Properties.NetworkRuleCollections", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.AzureFirewall.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", "sku_name": "Description.AzureFirewall.Properties.SKU.Name", @@ -12058,7 +9899,7 @@ func GetNetworkAzureFirewall(ctx context.Context, d *plugin.QueryData, _ *plugin if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -12072,7 +9913,7 @@ func GetNetworkAzureFirewall(ctx context.Context, d *plugin.QueryData, _ *plugin } limit := int64(1) - paginator, err := k.NewNetworkAzureFirewallPaginator(essdk.BuildFilter(ctx, d.QueryContext, getNetworkAzureFirewallFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewNetworkAzureFirewallPaginator(essdk.BuildFilter(ctx, d.QueryContext, getNetworkAzureFirewallFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -12103,7 +9944,7 @@ func GetNetworkAzureFirewall(ctx context.Context, d *plugin.QueryData, _ *plugin type ExpressRouteCircuit struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.ExpressRouteCircuitDescription `json:"Description"` + Description azure.ExpressRouteCircuitDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -12111,59 +9952,6 @@ type ExpressRouteCircuit struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type ExpressRouteCircuitHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -12242,6 +10030,7 @@ var listExpressRouteCircuitFilters = map[string]string{ "id": "Description.ExpressRouteCircuit.ID", "name": "Description.ExpressRouteCircuit.Name", "peerings": "Description.ExpressRouteCircuit.Properties.Peerings", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.ExpressRouteCircuit.Properties.ProvisioningState", "resource_group": "Description.ResourceGroup", "service_key": "Description.ExpressRouteCircuit.Properties.ServiceKey", @@ -12273,7 +10062,7 @@ func ListExpressRouteCircuit(ctx context.Context, d *plugin.QueryData, _ *plugin plugin.Logger(ctx).Error("ListExpressRouteCircuit NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListExpressRouteCircuit GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -12289,7 +10078,7 @@ func ListExpressRouteCircuit(ctx context.Context, d *plugin.QueryData, _ *plugin return nil, err } - paginator, err := k.NewExpressRouteCircuitPaginator(essdk.BuildFilter(ctx, d.QueryContext, listExpressRouteCircuitFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewExpressRouteCircuitPaginator(essdk.BuildFilter(ctx, d.QueryContext, listExpressRouteCircuitFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListExpressRouteCircuit NewExpressRouteCircuitPaginator", "error", err) return nil, err @@ -12326,6 +10115,7 @@ var getExpressRouteCircuitFilters = map[string]string{ "id": "Description.ExpressRouteCircuit.ID", "name": "description.ExpressRouteCircuit.name", "peerings": "Description.ExpressRouteCircuit.Properties.Peerings", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.ExpressRouteCircuit.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", "service_key": "Description.ExpressRouteCircuit.Properties.ServiceKey", @@ -12354,7 +10144,7 @@ func GetExpressRouteCircuit(ctx context.Context, d *plugin.QueryData, _ *plugin. if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -12368,7 +10158,7 @@ func GetExpressRouteCircuit(ctx context.Context, d *plugin.QueryData, _ *plugin. } limit := int64(1) - paginator, err := k.NewExpressRouteCircuitPaginator(essdk.BuildFilter(ctx, d.QueryContext, getExpressRouteCircuitFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewExpressRouteCircuitPaginator(essdk.BuildFilter(ctx, d.QueryContext, getExpressRouteCircuitFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -12399,7 +10189,7 @@ func GetExpressRouteCircuit(ctx context.Context, d *plugin.QueryData, _ *plugin. type VirtualNetworkGateway struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.VirtualNetworkGatewayDescription `json:"Description"` + Description azure.VirtualNetworkGatewayDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -12407,59 +10197,6 @@ type VirtualNetworkGateway struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type VirtualNetworkGatewayHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -12542,6 +10279,7 @@ var listVirtualNetworkGatewayFilters = map[string]string{ "inbound_dns_forwarding_endpoint": "Description.VirtualNetworkGateway.Properties.InboundDNSForwardingEndpoint", "ip_configurations": "Description.VirtualNetworkGateway.Properties.IPConfigurations", "name": "Description.VirtualNetworkGateway.Name", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.VirtualNetworkGateway.Properties.ProvisioningState", "resource_group": "Description.ResourceGroup", "resource_guid": "Description.VirtualNetworkGateway.Properties.ResourceGUID", @@ -12574,7 +10312,7 @@ func ListVirtualNetworkGateway(ctx context.Context, d *plugin.QueryData, _ *plug plugin.Logger(ctx).Error("ListVirtualNetworkGateway NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListVirtualNetworkGateway GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -12590,7 +10328,7 @@ func ListVirtualNetworkGateway(ctx context.Context, d *plugin.QueryData, _ *plug return nil, err } - paginator, err := k.NewVirtualNetworkGatewayPaginator(essdk.BuildFilter(ctx, d.QueryContext, listVirtualNetworkGatewayFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewVirtualNetworkGatewayPaginator(essdk.BuildFilter(ctx, d.QueryContext, listVirtualNetworkGatewayFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListVirtualNetworkGateway NewVirtualNetworkGatewayPaginator", "error", err) return nil, err @@ -12631,6 +10369,7 @@ var getVirtualNetworkGatewayFilters = map[string]string{ "inbound_dns_forwarding_endpoint": "Description.VirtualNetworkGateway.Properties.InboundDNSForwardingEndpoint", "ip_configurations": "Description.VirtualNetworkGateway.Properties.IPConfigurations", "name": "description.VirtualNetworkGateway.Name", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.VirtualNetworkGateway.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", "resource_guid": "Description.VirtualNetworkGateway.Properties.ResourceGUID", @@ -12660,7 +10399,7 @@ func GetVirtualNetworkGateway(ctx context.Context, d *plugin.QueryData, _ *plugi if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -12674,7 +10413,7 @@ func GetVirtualNetworkGateway(ctx context.Context, d *plugin.QueryData, _ *plugi } limit := int64(1) - paginator, err := k.NewVirtualNetworkGatewayPaginator(essdk.BuildFilter(ctx, d.QueryContext, getVirtualNetworkGatewayFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewVirtualNetworkGatewayPaginator(essdk.BuildFilter(ctx, d.QueryContext, getVirtualNetworkGatewayFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -12705,7 +10444,7 @@ func GetVirtualNetworkGateway(ctx context.Context, d *plugin.QueryData, _ *plugi type FirewallPolicy struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.FirewallPolicyDescription `json:"Description"` + Description azure.FirewallPolicyDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -12713,59 +10452,6 @@ type FirewallPolicy struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type FirewallPolicyHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -12844,6 +10530,7 @@ var listFirewallPolicyFilters = map[string]string{ "intrusion_detection_configuration": "Description.FirewallPolicy.Properties.IntrusionDetection.Configuration", "intrusion_detection_mode": "Description.FirewallPolicy.Properties.IntrusionDetection.Mode", "name": "Description.FirewallPolicy.Name", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.FirewallPolicy.Properties.ProvisioningState", "resource_group": "Description.ResourceGroup", "rule_collection_groups": "Description.FirewallPolicy.Properties.RuleCollectionGroups", @@ -12875,7 +10562,7 @@ func ListFirewallPolicy(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr plugin.Logger(ctx).Error("ListFirewallPolicy NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListFirewallPolicy GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -12891,7 +10578,7 @@ func ListFirewallPolicy(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr return nil, err } - paginator, err := k.NewFirewallPolicyPaginator(essdk.BuildFilter(ctx, d.QueryContext, listFirewallPolicyFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewFirewallPolicyPaginator(essdk.BuildFilter(ctx, d.QueryContext, listFirewallPolicyFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListFirewallPolicy NewFirewallPolicyPaginator", "error", err) return nil, err @@ -12928,6 +10615,7 @@ var getFirewallPolicyFilters = map[string]string{ "intrusion_detection_configuration": "Description.FirewallPolicy.Properties.IntrusionDetection.Configuration", "intrusion_detection_mode": "Description.FirewallPolicy.Properties.IntrusionDetection.Mode", "name": "description.FirewallPolicy.Name", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.FirewallPolicy.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", "rule_collection_groups": "Description.FirewallPolicy.Properties.RuleCollectionGroups", @@ -12956,7 +10644,7 @@ func GetFirewallPolicy(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -12970,7 +10658,7 @@ func GetFirewallPolicy(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra } limit := int64(1) - paginator, err := k.NewFirewallPolicyPaginator(essdk.BuildFilter(ctx, d.QueryContext, getFirewallPolicyFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewFirewallPolicyPaginator(essdk.BuildFilter(ctx, d.QueryContext, getFirewallPolicyFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -13001,7 +10689,7 @@ func GetFirewallPolicy(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra type LocalNetworkGateway struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.LocalNetworkGatewayDescription `json:"Description"` + Description azure.LocalNetworkGatewayDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -13009,59 +10697,6 @@ type LocalNetworkGateway struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type LocalNetworkGatewayHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -13130,10 +10765,11 @@ func (p LocalNetworkGatewayPaginator) NextPage(ctx context.Context) ([]LocalNetw } var listLocalNetworkGatewayFilters = map[string]string{ - "id": "Description.LocalNetworkGateways.ID", - "name": "Description.LocalNetworkGateway.Name", - "tags": "Description.LocalNetworkGateway.Tags", - "title": "Description.LocalNetworkGateway.Name", + "id": "Description.LocalNetworkGateways.ID", + "name": "Description.LocalNetworkGateway.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.LocalNetworkGateway.Tags", + "title": "Description.LocalNetworkGateway.Name", } func ListLocalNetworkGateway(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -13154,7 +10790,7 @@ func ListLocalNetworkGateway(ctx context.Context, d *plugin.QueryData, _ *plugin plugin.Logger(ctx).Error("ListLocalNetworkGateway NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListLocalNetworkGateway GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -13170,7 +10806,7 @@ func ListLocalNetworkGateway(ctx context.Context, d *plugin.QueryData, _ *plugin return nil, err } - paginator, err := k.NewLocalNetworkGatewayPaginator(essdk.BuildFilter(ctx, d.QueryContext, listLocalNetworkGatewayFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewLocalNetworkGatewayPaginator(essdk.BuildFilter(ctx, d.QueryContext, listLocalNetworkGatewayFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListLocalNetworkGateway NewLocalNetworkGatewayPaginator", "error", err) return nil, err @@ -13197,11 +10833,12 @@ func ListLocalNetworkGateway(ctx context.Context, d *plugin.QueryData, _ *plugin } var getLocalNetworkGatewayFilters = map[string]string{ - "id": "Description.LocalNetworkGateways.ID", - "name": "description.LocalNetworkGateway.Name", - "resource_group": "description.ResourceGroup", - "tags": "Description.LocalNetworkGateway.Tags", - "title": "Description.LocalNetworkGateway.Name", + "id": "Description.LocalNetworkGateways.ID", + "name": "description.LocalNetworkGateway.Name", + "platform_account_id": "metadata.IntegrationID", + "resource_group": "description.ResourceGroup", + "tags": "Description.LocalNetworkGateway.Tags", + "title": "Description.LocalNetworkGateway.Name", } func GetLocalNetworkGateway(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -13219,7 +10856,7 @@ func GetLocalNetworkGateway(ctx context.Context, d *plugin.QueryData, _ *plugin. if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -13233,7 +10870,7 @@ func GetLocalNetworkGateway(ctx context.Context, d *plugin.QueryData, _ *plugin. } limit := int64(1) - paginator, err := k.NewLocalNetworkGatewayPaginator(essdk.BuildFilter(ctx, d.QueryContext, getLocalNetworkGatewayFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewLocalNetworkGatewayPaginator(essdk.BuildFilter(ctx, d.QueryContext, getLocalNetworkGatewayFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -13264,7 +10901,7 @@ func GetLocalNetworkGateway(ctx context.Context, d *plugin.QueryData, _ *plugin. type NatGateway struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.NatGatewayDescription `json:"Description"` + Description azure.NatGatewayDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -13272,59 +10909,6 @@ type NatGateway struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type NatGatewayHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -13393,15 +10977,16 @@ func (p NatGatewayPaginator) NextPage(ctx context.Context) ([]NatGateway, error) } var listNatGatewayFilters = map[string]string{ - "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", + "etag": "Description.NatGateway.Etag", + "id": "Description.NatGateway.ID", + "name": "Description.NatGateway.Name", + "platform_account_id": "metadata.IntegrationID", + "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) { @@ -13422,7 +11007,7 @@ func ListNatGateway(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD plugin.Logger(ctx).Error("ListNatGateway NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListNatGateway GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -13438,7 +11023,7 @@ func ListNatGateway(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD return nil, err } - paginator, err := k.NewNatGatewayPaginator(essdk.BuildFilter(ctx, d.QueryContext, listNatGatewayFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewNatGatewayPaginator(essdk.BuildFilter(ctx, d.QueryContext, listNatGatewayFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListNatGateway NewNatGatewayPaginator", "error", err) return nil, err @@ -13465,15 +11050,16 @@ func ListNatGateway(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD } var getNatGatewayFilters = map[string]string{ - "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", + "etag": "Description.NatGateway.Etag", + "id": "Description.NatGateway.ID", + "name": "description.NatGateway.Name", + "platform_account_id": "metadata.IntegrationID", + "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 GetNatGateway(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -13491,7 +11077,7 @@ func GetNatGateway(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDa if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -13505,7 +11091,7 @@ func GetNatGateway(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDa } limit := int64(1) - paginator, err := k.NewNatGatewayPaginator(essdk.BuildFilter(ctx, d.QueryContext, getNatGatewayFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewNatGatewayPaginator(essdk.BuildFilter(ctx, d.QueryContext, getNatGatewayFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -13536,7 +11122,7 @@ func GetNatGateway(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDa type PrivateLinkService struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.PrivateLinkServiceDescription `json:"Description"` + Description azure.PrivateLinkServiceDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -13544,59 +11130,6 @@ type PrivateLinkService struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type PrivateLinkServiceHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -13665,10 +11198,11 @@ func (p PrivateLinkServicePaginator) NextPage(ctx context.Context) ([]PrivateLin } var listPrivateLinkServiceFilters = map[string]string{ - "id": "Description.PrivateLinkServices.ID", - "name": "Description.PrivateLinkService.Name", - "tags": "Description.PrivateLinkService.Tags", - "title": "Description.PrivateLinkService.Name", + "id": "Description.PrivateLinkServices.ID", + "name": "Description.PrivateLinkService.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.PrivateLinkService.Tags", + "title": "Description.PrivateLinkService.Name", } func ListPrivateLinkService(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -13689,7 +11223,7 @@ func ListPrivateLinkService(ctx context.Context, d *plugin.QueryData, _ *plugin. plugin.Logger(ctx).Error("ListPrivateLinkService NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListPrivateLinkService GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -13705,7 +11239,7 @@ func ListPrivateLinkService(ctx context.Context, d *plugin.QueryData, _ *plugin. return nil, err } - paginator, err := k.NewPrivateLinkServicePaginator(essdk.BuildFilter(ctx, d.QueryContext, listPrivateLinkServiceFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewPrivateLinkServicePaginator(essdk.BuildFilter(ctx, d.QueryContext, listPrivateLinkServiceFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListPrivateLinkService NewPrivateLinkServicePaginator", "error", err) return nil, err @@ -13732,11 +11266,12 @@ func ListPrivateLinkService(ctx context.Context, d *plugin.QueryData, _ *plugin. } var getPrivateLinkServiceFilters = map[string]string{ - "id": "Description.PrivateLinkServices.ID", - "name": "description.PrivateLinkService.Name", - "resource_group": "description.ResourceGroup", - "tags": "Description.PrivateLinkService.Tags", - "title": "Description.PrivateLinkService.Name", + "id": "Description.PrivateLinkServices.ID", + "name": "description.PrivateLinkService.Name", + "platform_account_id": "metadata.IntegrationID", + "resource_group": "description.ResourceGroup", + "tags": "Description.PrivateLinkService.Tags", + "title": "Description.PrivateLinkService.Name", } func GetPrivateLinkService(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -13754,7 +11289,7 @@ func GetPrivateLinkService(ctx context.Context, d *plugin.QueryData, _ *plugin.H if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -13768,7 +11303,7 @@ func GetPrivateLinkService(ctx context.Context, d *plugin.QueryData, _ *plugin.H } limit := int64(1) - paginator, err := k.NewPrivateLinkServicePaginator(essdk.BuildFilter(ctx, d.QueryContext, getPrivateLinkServiceFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewPrivateLinkServicePaginator(essdk.BuildFilter(ctx, d.QueryContext, getPrivateLinkServiceFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -13799,7 +11334,7 @@ func GetPrivateLinkService(ctx context.Context, d *plugin.QueryData, _ *plugin.H type VpnGateway struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.VpnGatewayDescription `json:"Description"` + Description azure.VpnGatewayDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -13807,59 +11342,6 @@ type VpnGateway struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type VpnGatewayHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -13928,10 +11410,11 @@ func (p VpnGatewayPaginator) NextPage(ctx context.Context) ([]VpnGateway, error) } var listVpnGatewayFilters = map[string]string{ - "id": "Description.VPNGateways.ID", - "name": "Description.VpnGateway.Name", - "tags": "Description.VpnGateway.Tags", - "title": "Description.VpnGateway.Name", + "id": "Description.VPNGateways.ID", + "name": "Description.VpnGateway.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.VpnGateway.Tags", + "title": "Description.VpnGateway.Name", } func ListVpnGateway(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -13952,7 +11435,7 @@ func ListVpnGateway(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD plugin.Logger(ctx).Error("ListVpnGateway NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListVpnGateway GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -13968,7 +11451,7 @@ func ListVpnGateway(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD return nil, err } - paginator, err := k.NewVpnGatewayPaginator(essdk.BuildFilter(ctx, d.QueryContext, listVpnGatewayFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewVpnGatewayPaginator(essdk.BuildFilter(ctx, d.QueryContext, listVpnGatewayFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListVpnGateway NewVpnGatewayPaginator", "error", err) return nil, err @@ -13995,11 +11478,12 @@ func ListVpnGateway(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD } var getVpnGatewayFilters = map[string]string{ - "id": "Description.VPNGateways.ID", - "name": "description.VpnGateway.Name", - "resource_group": "description.ResourceGroup", - "tags": "Description.VpnGateway.Tags", - "title": "Description.VpnGateway.Name", + "id": "Description.VPNGateways.ID", + "name": "description.VpnGateway.Name", + "platform_account_id": "metadata.IntegrationID", + "resource_group": "description.ResourceGroup", + "tags": "Description.VpnGateway.Tags", + "title": "Description.VpnGateway.Name", } func GetVpnGateway(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -14017,7 +11501,7 @@ func GetVpnGateway(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDa if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -14031,7 +11515,7 @@ func GetVpnGateway(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDa } limit := int64(1) - paginator, err := k.NewVpnGatewayPaginator(essdk.BuildFilter(ctx, d.QueryContext, getVpnGatewayFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewVpnGatewayPaginator(essdk.BuildFilter(ctx, d.QueryContext, getVpnGatewayFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -14062,7 +11546,7 @@ func GetVpnGateway(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDa type VpnGatewayVpnConnection struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.VpnGatewayVpnConnectionDescription `json:"Description"` + Description azure.VpnGatewayVpnConnectionDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -14070,59 +11554,6 @@ type VpnGatewayVpnConnection struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type VpnGatewayVpnConnectionHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -14191,10 +11622,11 @@ func (p VpnGatewayVpnConnectionPaginator) NextPage(ctx context.Context) ([]VpnGa } var listVpnGatewayVpnConnectionFilters = map[string]string{ - "id": "Description.VPNConnections.ID", - "name": "Description.VpnConnection.Name", - "tags": "Description.VpnConnection.Etag", - "title": "Description.VpnConnection.Name", + "id": "Description.VPNConnections.ID", + "name": "Description.VpnConnection.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.VpnConnection.Etag", + "title": "Description.VpnConnection.Name", } func ListVpnGatewayVpnConnection(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -14215,7 +11647,7 @@ func ListVpnGatewayVpnConnection(ctx context.Context, d *plugin.QueryData, _ *pl plugin.Logger(ctx).Error("ListVpnGatewayVpnConnection NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListVpnGatewayVpnConnection GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -14231,7 +11663,7 @@ func ListVpnGatewayVpnConnection(ctx context.Context, d *plugin.QueryData, _ *pl return nil, err } - paginator, err := k.NewVpnGatewayVpnConnectionPaginator(essdk.BuildFilter(ctx, d.QueryContext, listVpnGatewayVpnConnectionFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewVpnGatewayVpnConnectionPaginator(essdk.BuildFilter(ctx, d.QueryContext, listVpnGatewayVpnConnectionFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListVpnGatewayVpnConnection NewVpnGatewayVpnConnectionPaginator", "error", err) return nil, err @@ -14258,10 +11690,11 @@ func ListVpnGatewayVpnConnection(ctx context.Context, d *plugin.QueryData, _ *pl } var getVpnGatewayVpnConnectionFilters = map[string]string{ - "id": "Description.VPNConnections.ID", - "name": "Description.VpnConnection.Name", - "tags": "Description.VpnConnection.Etag", - "title": "Description.VpnConnection.Name", + "id": "Description.VPNConnections.ID", + "name": "Description.VpnConnection.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.VpnConnection.Etag", + "title": "Description.VpnConnection.Name", } func GetVpnGatewayVpnConnection(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -14279,7 +11712,7 @@ func GetVpnGatewayVpnConnection(ctx context.Context, d *plugin.QueryData, _ *plu if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -14293,7 +11726,7 @@ func GetVpnGatewayVpnConnection(ctx context.Context, d *plugin.QueryData, _ *plu } limit := int64(1) - paginator, err := k.NewVpnGatewayVpnConnectionPaginator(essdk.BuildFilter(ctx, d.QueryContext, getVpnGatewayVpnConnectionFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewVpnGatewayVpnConnectionPaginator(essdk.BuildFilter(ctx, d.QueryContext, getVpnGatewayVpnConnectionFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -14324,7 +11757,7 @@ func GetVpnGatewayVpnConnection(ctx context.Context, d *plugin.QueryData, _ *plu type VpnSite struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.VpnSiteDescription `json:"Description"` + Description azure.VpnSiteDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -14332,59 +11765,6 @@ type VpnSite struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type VpnSiteHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -14453,10 +11833,11 @@ func (p VpnSitePaginator) NextPage(ctx context.Context) ([]VpnSite, error) { } var listVpnSiteFilters = map[string]string{ - "id": "Description.VPNSites.ID", - "name": "Description.VpnSite.Name", - "tags": "Description.VpnSite.Tags", - "title": "Description.VpnSite.Name", + "id": "Description.VPNSites.ID", + "name": "Description.VpnSite.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.VpnSite.Tags", + "title": "Description.VpnSite.Name", } func ListVpnSite(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -14477,7 +11858,7 @@ func ListVpnSite(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData plugin.Logger(ctx).Error("ListVpnSite NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListVpnSite GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -14493,7 +11874,7 @@ func ListVpnSite(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData return nil, err } - paginator, err := k.NewVpnSitePaginator(essdk.BuildFilter(ctx, d.QueryContext, listVpnSiteFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewVpnSitePaginator(essdk.BuildFilter(ctx, d.QueryContext, listVpnSiteFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListVpnSite NewVpnSitePaginator", "error", err) return nil, err @@ -14520,10 +11901,11 @@ func ListVpnSite(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData } var getVpnSiteFilters = map[string]string{ - "id": "Description.VPNSites.ID", - "name": "Description.VpnSite.Name", - "tags": "Description.VpnSite.Tags", - "title": "Description.VpnSite.Name", + "id": "Description.VPNSites.ID", + "name": "Description.VpnSite.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.VpnSite.Tags", + "title": "Description.VpnSite.Name", } func GetVpnSite(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -14541,7 +11923,7 @@ func GetVpnSite(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -14555,7 +11937,7 @@ func GetVpnSite(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) } limit := int64(1) - paginator, err := k.NewVpnSitePaginator(essdk.BuildFilter(ctx, d.QueryContext, getVpnSiteFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewVpnSitePaginator(essdk.BuildFilter(ctx, d.QueryContext, getVpnSiteFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -14586,7 +11968,7 @@ func GetVpnSite(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) type PublicIPAddress struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.PublicIPAddressDescription `json:"Description"` + Description azure.PublicIPAddressDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -14594,59 +11976,6 @@ type PublicIPAddress struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type PublicIPAddressHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -14728,6 +12057,7 @@ var listPublicIPAddressFilters = map[string]string{ "ip_configuration_id": "Description.PublicIPAddress.Properties.IPConfiguration.ID", "ip_tags": "Description.PublicIPAddress.PublicIPAddressPropertiesFormat.IPTags", "name": "Description.PublicIPAddress.Name", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.PublicIPAddress.Properties.ProvisioningState", "public_ip_address_version": "Description.PublicIPAddress.Properties.PublicIPAddressVersion", "public_ip_allocation_method": "Description.PublicIPAddress.Properties.PublicIPAllocationMethod", @@ -14759,7 +12089,7 @@ func ListPublicIPAddress(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd plugin.Logger(ctx).Error("ListPublicIPAddress NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListPublicIPAddress GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -14775,7 +12105,7 @@ func ListPublicIPAddress(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd return nil, err } - paginator, err := k.NewPublicIPAddressPaginator(essdk.BuildFilter(ctx, d.QueryContext, listPublicIPAddressFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewPublicIPAddressPaginator(essdk.BuildFilter(ctx, d.QueryContext, listPublicIPAddressFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListPublicIPAddress NewPublicIPAddressPaginator", "error", err) return nil, err @@ -14815,6 +12145,7 @@ var getPublicIPAddressFilters = map[string]string{ "ip_configuration_id": "Description.PublicIPAddress.Properties.IPConfiguration.ID", "ip_tags": "Description.PublicIPAddress.PublicIPAddressPropertiesFormat.IPTags", "name": "description.PublicIPAddress.Name", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.PublicIPAddress.Properties.ProvisioningState", "public_ip_address_version": "Description.PublicIPAddress.Properties.PublicIPAddressVersion", "public_ip_allocation_method": "Description.PublicIPAddress.Properties.PublicIPAllocationMethod", @@ -14843,7 +12174,7 @@ func GetPublicIPAddress(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -14857,7 +12188,7 @@ func GetPublicIPAddress(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr } limit := int64(1) - paginator, err := k.NewPublicIPAddressPaginator(essdk.BuildFilter(ctx, d.QueryContext, getPublicIPAddressFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewPublicIPAddressPaginator(essdk.BuildFilter(ctx, d.QueryContext, getPublicIPAddressFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -14888,7 +12219,7 @@ func GetPublicIPAddress(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr type PublicIPPrefix struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.PublicIPPrefixDescription `json:"Description"` + Description azure.PublicIPPrefixDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -14896,59 +12227,6 @@ type PublicIPPrefix struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type PublicIPPrefixHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -15017,10 +12295,11 @@ func (p PublicIPPrefixPaginator) NextPage(ctx context.Context) ([]PublicIPPrefix } var listPublicIPPrefixFilters = map[string]string{ - "id": "Description.PublicIPPrefixes.ID", - "name": "Description.PublicIPPrefix.Name", - "tags": "Description.PublicIPPrefix.Tags", - "title": "Description.PublicIPPrefix.Name", + "id": "Description.PublicIPPrefixes.ID", + "name": "Description.PublicIPPrefix.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.PublicIPPrefix.Tags", + "title": "Description.PublicIPPrefix.Name", } func ListPublicIPPrefix(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -15041,7 +12320,7 @@ func ListPublicIPPrefix(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr plugin.Logger(ctx).Error("ListPublicIPPrefix NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListPublicIPPrefix GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -15057,7 +12336,7 @@ func ListPublicIPPrefix(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr return nil, err } - paginator, err := k.NewPublicIPPrefixPaginator(essdk.BuildFilter(ctx, d.QueryContext, listPublicIPPrefixFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewPublicIPPrefixPaginator(essdk.BuildFilter(ctx, d.QueryContext, listPublicIPPrefixFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListPublicIPPrefix NewPublicIPPrefixPaginator", "error", err) return nil, err @@ -15084,10 +12363,11 @@ func ListPublicIPPrefix(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr } var getPublicIPPrefixFilters = map[string]string{ - "id": "Description.PublicIPPrefixes.ID", - "name": "Description.PublicIPPrefix.Name", - "tags": "Description.PublicIPPrefix.Tags", - "title": "Description.PublicIPPrefix.Name", + "id": "Description.PublicIPPrefixes.ID", + "name": "Description.PublicIPPrefix.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.PublicIPPrefix.Tags", + "title": "Description.PublicIPPrefix.Name", } func GetPublicIPPrefix(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -15105,7 +12385,7 @@ func GetPublicIPPrefix(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -15119,7 +12399,7 @@ func GetPublicIPPrefix(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra } limit := int64(1) - paginator, err := k.NewPublicIPPrefixPaginator(essdk.BuildFilter(ctx, d.QueryContext, getPublicIPPrefixFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewPublicIPPrefixPaginator(essdk.BuildFilter(ctx, d.QueryContext, getPublicIPPrefixFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -15150,7 +12430,7 @@ func GetPublicIPPrefix(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra type DNSZones struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.DNSZonesDescription `json:"Description"` + Description azure.DNSZonesDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -15158,59 +12438,6 @@ type DNSZones struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type DNSZonesHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -15286,6 +12513,7 @@ var listDNSZonesFilters = map[string]string{ "name": "Description.Zone.Name", "name_servers": "Description.Zone.Properties.NameServers", "number_of_record_sets": "Description.Zone.Properties.NumberOfRecordSets", + "platform_account_id": "metadata.IntegrationID", "registration_virtual_networks": "Description.Zone.Properties.RegistrationVirtualNetworks", "resolution_virtual_networks": "Description.Zone.Properties.ResolutionVirtualNetworks", "resource_group": "Description.ResourceGroup", @@ -15313,7 +12541,7 @@ func ListDNSZones(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDat plugin.Logger(ctx).Error("ListDNSZones NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListDNSZones GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -15329,7 +12557,7 @@ func ListDNSZones(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDat return nil, err } - paginator, err := k.NewDNSZonesPaginator(essdk.BuildFilter(ctx, d.QueryContext, listDNSZonesFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewDNSZonesPaginator(essdk.BuildFilter(ctx, d.QueryContext, listDNSZonesFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListDNSZones NewDNSZonesPaginator", "error", err) return nil, err @@ -15363,6 +12591,7 @@ var getDNSZonesFilters = map[string]string{ "name": "Description.Zone.Name", "name_servers": "Description.Zone.Properties.NameServers", "number_of_record_sets": "Description.Zone.Properties.NumberOfRecordSets", + "platform_account_id": "metadata.IntegrationID", "registration_virtual_networks": "Description.Zone.Properties.RegistrationVirtualNetworks", "resolution_virtual_networks": "Description.Zone.Properties.ResolutionVirtualNetworks", "resource_group": "Description.ResourceGroup", @@ -15387,7 +12616,7 @@ func GetDNSZones(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -15401,7 +12630,7 @@ func GetDNSZones(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData } limit := int64(1) - paginator, err := k.NewDNSZonesPaginator(essdk.BuildFilter(ctx, d.QueryContext, getDNSZonesFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewDNSZonesPaginator(essdk.BuildFilter(ctx, d.QueryContext, getDNSZonesFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -15432,7 +12661,7 @@ func GetDNSZones(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData type BastionHosts struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.BastionHostsDescription `json:"Description"` + Description azure.BastionHostsDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -15440,59 +12669,6 @@ type BastionHosts struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type BastionHostsHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -15561,17 +12737,18 @@ 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", - "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", + "platform_account_id": "metadata.IntegrationID", + "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) { @@ -15592,7 +12769,7 @@ func ListBastionHosts(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat plugin.Logger(ctx).Error("ListBastionHosts NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListBastionHosts GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -15608,7 +12785,7 @@ func ListBastionHosts(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat return nil, err } - paginator, err := k.NewBastionHostsPaginator(essdk.BuildFilter(ctx, d.QueryContext, listBastionHostsFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewBastionHostsPaginator(essdk.BuildFilter(ctx, d.QueryContext, listBastionHostsFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListBastionHosts NewBastionHostsPaginator", "error", err) return nil, err @@ -15635,17 +12812,18 @@ 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", - "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", + "platform_account_id": "metadata.IntegrationID", + "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) { @@ -15663,7 +12841,7 @@ func GetBastionHosts(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -15677,7 +12855,7 @@ func GetBastionHosts(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate } limit := int64(1) - paginator, err := k.NewBastionHostsPaginator(essdk.BuildFilter(ctx, d.QueryContext, getBastionHostsFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewBastionHostsPaginator(essdk.BuildFilter(ctx, d.QueryContext, getBastionHostsFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -15708,7 +12886,7 @@ func GetBastionHosts(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate type Connection struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.ConnectionDescription `json:"Description"` + Description azure.ConnectionDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -15716,59 +12894,6 @@ type Connection struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type ConnectionHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -15837,10 +12962,11 @@ func (p ConnectionPaginator) NextPage(ctx context.Context) ([]Connection, error) } var listConnectionFilters = map[string]string{ - "id": "Description.Connection.ID", - "name": "Description.Connection.Name", - "tags": "Description.Connection.Tags", - "title": "Description.Connection.Name", + "id": "Description.Connection.ID", + "name": "Description.Connection.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.Connection.Tags", + "title": "Description.Connection.Name", } func ListConnection(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -15861,7 +12987,7 @@ func ListConnection(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD plugin.Logger(ctx).Error("ListConnection NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListConnection GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -15877,7 +13003,7 @@ func ListConnection(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD return nil, err } - paginator, err := k.NewConnectionPaginator(essdk.BuildFilter(ctx, d.QueryContext, listConnectionFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewConnectionPaginator(essdk.BuildFilter(ctx, d.QueryContext, listConnectionFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListConnection NewConnectionPaginator", "error", err) return nil, err @@ -15904,10 +13030,11 @@ func ListConnection(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD } var getConnectionFilters = map[string]string{ - "id": "Description.Connection.ID", - "name": "Description.Connection.Name", - "tags": "Description.Connection.Tags", - "title": "Description.Connection.Name", + "id": "Description.Connection.ID", + "name": "Description.Connection.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.Connection.Tags", + "title": "Description.Connection.Name", } func GetConnection(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -15925,7 +13052,7 @@ func GetConnection(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDa if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -15939,7 +13066,7 @@ func GetConnection(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDa } limit := int64(1) - paginator, err := k.NewConnectionPaginator(essdk.BuildFilter(ctx, d.QueryContext, getConnectionFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewConnectionPaginator(essdk.BuildFilter(ctx, d.QueryContext, getConnectionFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -15970,7 +13097,7 @@ func GetConnection(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDa type VirtualHubs struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.VirtualHubsDescription `json:"Description"` + Description azure.VirtualHubsDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -15978,59 +13105,6 @@ type VirtualHubs struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type VirtualHubsHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -16099,10 +13173,11 @@ func (p VirtualHubsPaginator) NextPage(ctx context.Context) ([]VirtualHubs, erro } var listVirtualHubsFilters = map[string]string{ - "id": "Description.VirtualHubs.ID", - "name": "Description.VirtualHub.Name", - "tags": "Description.VirtualHub.Tags", - "title": "Description.VirtualHub.Name", + "id": "Description.VirtualHubs.ID", + "name": "Description.VirtualHub.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.VirtualHub.Tags", + "title": "Description.VirtualHub.Name", } func ListVirtualHubs(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -16123,7 +13198,7 @@ func ListVirtualHubs(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate plugin.Logger(ctx).Error("ListVirtualHubs NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListVirtualHubs GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -16139,7 +13214,7 @@ func ListVirtualHubs(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate return nil, err } - paginator, err := k.NewVirtualHubsPaginator(essdk.BuildFilter(ctx, d.QueryContext, listVirtualHubsFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewVirtualHubsPaginator(essdk.BuildFilter(ctx, d.QueryContext, listVirtualHubsFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListVirtualHubs NewVirtualHubsPaginator", "error", err) return nil, err @@ -16166,10 +13241,11 @@ func ListVirtualHubs(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate } var getVirtualHubsFilters = map[string]string{ - "id": "Description.VirtualHubs.ID", - "name": "Description.VirtualHub.Name", - "tags": "Description.VirtualHub.Tags", - "title": "Description.VirtualHub.Name", + "id": "Description.VirtualHubs.ID", + "name": "Description.VirtualHub.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.VirtualHub.Tags", + "title": "Description.VirtualHub.Name", } func GetVirtualHubs(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -16187,7 +13263,7 @@ func GetVirtualHubs(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -16201,7 +13277,7 @@ func GetVirtualHubs(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD } limit := int64(1) - paginator, err := k.NewVirtualHubsPaginator(essdk.BuildFilter(ctx, d.QueryContext, getVirtualHubsFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewVirtualHubsPaginator(essdk.BuildFilter(ctx, d.QueryContext, getVirtualHubsFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -16232,7 +13308,7 @@ func GetVirtualHubs(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD type VirtualWans struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.VirtualWansDescription `json:"Description"` + Description azure.VirtualWansDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -16240,59 +13316,6 @@ type VirtualWans struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type VirtualWansHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -16361,10 +13384,11 @@ func (p VirtualWansPaginator) NextPage(ctx context.Context) ([]VirtualWans, erro } var listVirtualWansFilters = map[string]string{ - "id": "Description.VirtualWans.ID", - "name": "Description.VirtualWan.Name", - "tags": "Description.VirtualWan.Tags", - "title": "Description.VirtualWan.Name", + "id": "Description.VirtualWans.ID", + "name": "Description.VirtualWan.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.VirtualWan.Tags", + "title": "Description.VirtualWan.Name", } func ListVirtualWans(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -16385,7 +13409,7 @@ func ListVirtualWans(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate plugin.Logger(ctx).Error("ListVirtualWans NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListVirtualWans GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -16401,7 +13425,7 @@ func ListVirtualWans(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate return nil, err } - paginator, err := k.NewVirtualWansPaginator(essdk.BuildFilter(ctx, d.QueryContext, listVirtualWansFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewVirtualWansPaginator(essdk.BuildFilter(ctx, d.QueryContext, listVirtualWansFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListVirtualWans NewVirtualWansPaginator", "error", err) return nil, err @@ -16428,10 +13452,11 @@ func ListVirtualWans(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate } var getVirtualWansFilters = map[string]string{ - "id": "Description.VirtualWans.ID", - "name": "Description.VirtualWan.Name", - "tags": "Description.VirtualWan.Tags", - "title": "Description.VirtualWan.Name", + "id": "Description.VirtualWans.ID", + "name": "Description.VirtualWan.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.VirtualWan.Tags", + "title": "Description.VirtualWan.Name", } func GetVirtualWans(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -16449,7 +13474,7 @@ func GetVirtualWans(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -16463,7 +13488,7 @@ func GetVirtualWans(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD } limit := int64(1) - paginator, err := k.NewVirtualWansPaginator(essdk.BuildFilter(ctx, d.QueryContext, getVirtualWansFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewVirtualWansPaginator(essdk.BuildFilter(ctx, d.QueryContext, getVirtualWansFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -16494,7 +13519,7 @@ func GetVirtualWans(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD type DNSResolver struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.DNSResolverDescription `json:"Description"` + Description azure.DNSResolverDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -16502,59 +13527,6 @@ type DNSResolver struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type DNSResolverHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -16623,10 +13595,11 @@ func (p DNSResolverPaginator) NextPage(ctx context.Context) ([]DNSResolver, erro } var listDNSResolverFilters = map[string]string{ - "id": "Description.DNSResolver.ID", - "name": "Description.DNSResolver.Name", - "tags": "Description.DNSResolver.Tags", - "title": "Description.DNSResolver.Name", + "id": "Description.DNSResolver.ID", + "name": "Description.DNSResolver.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.DNSResolver.Tags", + "title": "Description.DNSResolver.Name", } func ListDNSResolver(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -16647,7 +13620,7 @@ func ListDNSResolver(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate plugin.Logger(ctx).Error("ListDNSResolver NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListDNSResolver GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -16663,7 +13636,7 @@ func ListDNSResolver(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate return nil, err } - paginator, err := k.NewDNSResolverPaginator(essdk.BuildFilter(ctx, d.QueryContext, listDNSResolverFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewDNSResolverPaginator(essdk.BuildFilter(ctx, d.QueryContext, listDNSResolverFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListDNSResolver NewDNSResolverPaginator", "error", err) return nil, err @@ -16690,10 +13663,11 @@ func ListDNSResolver(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate } var getDNSResolverFilters = map[string]string{ - "id": "Description.DNSResolver.ID", - "name": "Description.DNSResolver.Name", - "tags": "Description.DNSResolver.Tags", - "title": "Description.DNSResolver.Name", + "id": "Description.DNSResolver.ID", + "name": "Description.DNSResolver.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.DNSResolver.Tags", + "title": "Description.DNSResolver.Name", } func GetDNSResolver(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -16711,7 +13685,7 @@ func GetDNSResolver(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -16725,7 +13699,7 @@ func GetDNSResolver(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD } limit := int64(1) - paginator, err := k.NewDNSResolverPaginator(essdk.BuildFilter(ctx, d.QueryContext, getDNSResolverFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewDNSResolverPaginator(essdk.BuildFilter(ctx, d.QueryContext, getDNSResolverFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -16756,7 +13730,7 @@ func GetDNSResolver(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD type TrafficManagerProfile struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.TrafficManagerProfileDescription `json:"Description"` + Description azure.TrafficManagerProfileDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -16764,59 +13738,6 @@ type TrafficManagerProfile struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type TrafficManagerProfileHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -16909,7 +13830,7 @@ func ListTrafficManagerProfile(ctx context.Context, d *plugin.QueryData, _ *plug plugin.Logger(ctx).Error("ListTrafficManagerProfile NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListTrafficManagerProfile GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -16925,7 +13846,7 @@ func ListTrafficManagerProfile(ctx context.Context, d *plugin.QueryData, _ *plug return nil, err } - paginator, err := k.NewTrafficManagerProfilePaginator(essdk.BuildFilter(ctx, d.QueryContext, listTrafficManagerProfileFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewTrafficManagerProfilePaginator(essdk.BuildFilter(ctx, d.QueryContext, listTrafficManagerProfileFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListTrafficManagerProfile NewTrafficManagerProfilePaginator", "error", err) return nil, err @@ -16973,7 +13894,7 @@ func GetTrafficManagerProfile(ctx context.Context, d *plugin.QueryData, _ *plugi if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -16987,7 +13908,7 @@ func GetTrafficManagerProfile(ctx context.Context, d *plugin.QueryData, _ *plugi } limit := int64(1) - paginator, err := k.NewTrafficManagerProfilePaginator(essdk.BuildFilter(ctx, d.QueryContext, getTrafficManagerProfileFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewTrafficManagerProfilePaginator(essdk.BuildFilter(ctx, d.QueryContext, getTrafficManagerProfileFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -17018,7 +13939,7 @@ func GetTrafficManagerProfile(ctx context.Context, d *plugin.QueryData, _ *plugi type PrivateDNSZones struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.PrivateDNSZonesDescription `json:"Description"` + Description azure.PrivateDNSZonesDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -17026,59 +13947,6 @@ type PrivateDNSZones struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type PrivateDNSZonesHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -17156,11 +14024,12 @@ var listPrivateDNSZonesFilters = map[string]string{ "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", + "platform_account_id": "metadata.IntegrationID", + "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) { @@ -17181,7 +14050,7 @@ func ListPrivateDNSZones(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd plugin.Logger(ctx).Error("ListPrivateDNSZones NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListPrivateDNSZones GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -17197,7 +14066,7 @@ func ListPrivateDNSZones(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd return nil, err } - paginator, err := k.NewPrivateDNSZonesPaginator(essdk.BuildFilter(ctx, d.QueryContext, listPrivateDNSZonesFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewPrivateDNSZonesPaginator(essdk.BuildFilter(ctx, d.QueryContext, listPrivateDNSZonesFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListPrivateDNSZones NewPrivateDNSZonesPaginator", "error", err) return nil, err @@ -17233,11 +14102,12 @@ var getPrivateDNSZonesFilters = map[string]string{ "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", + "platform_account_id": "metadata.IntegrationID", + "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) { @@ -17255,7 +14125,7 @@ func GetPrivateDNSZones(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -17269,7 +14139,7 @@ func GetPrivateDNSZones(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr } limit := int64(1) - paginator, err := k.NewPrivateDNSZonesPaginator(essdk.BuildFilter(ctx, d.QueryContext, getPrivateDNSZonesFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewPrivateDNSZonesPaginator(essdk.BuildFilter(ctx, d.QueryContext, getPrivateDNSZonesFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -17300,7 +14170,7 @@ func GetPrivateDNSZones(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr type PrivateEndpoint struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.PrivateEndpointDescription `json:"Description"` + Description azure.PrivateEndpointDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -17308,59 +14178,6 @@ type PrivateEndpoint struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type PrivateEndpointHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -17429,10 +14246,11 @@ func (p PrivateEndpointPaginator) NextPage(ctx context.Context) ([]PrivateEndpoi } var listPrivateEndpointFilters = map[string]string{ - "id": "Description.PrivateEndpoints.ID", - "name": "Description.PrivateEndpoint.Name", - "tags": "Description.PrivateEndpoint.Tags", - "title": "Description.PrivateEndpoint.Name", + "id": "Description.PrivateEndpoints.ID", + "name": "Description.PrivateEndpoint.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.PrivateEndpoint.Tags", + "title": "Description.PrivateEndpoint.Name", } func ListPrivateEndpoint(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -17453,7 +14271,7 @@ func ListPrivateEndpoint(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd plugin.Logger(ctx).Error("ListPrivateEndpoint NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListPrivateEndpoint GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -17469,7 +14287,7 @@ func ListPrivateEndpoint(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd return nil, err } - paginator, err := k.NewPrivateEndpointPaginator(essdk.BuildFilter(ctx, d.QueryContext, listPrivateEndpointFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewPrivateEndpointPaginator(essdk.BuildFilter(ctx, d.QueryContext, listPrivateEndpointFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListPrivateEndpoint NewPrivateEndpointPaginator", "error", err) return nil, err @@ -17496,10 +14314,11 @@ func ListPrivateEndpoint(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd } var getPrivateEndpointFilters = map[string]string{ - "id": "Description.PrivateEndpoints.ID", - "name": "Description.PrivateEndpoint.Name", - "tags": "Description.PrivateEndpoint.Tags", - "title": "Description.PrivateEndpoint.Name", + "id": "Description.PrivateEndpoints.ID", + "name": "Description.PrivateEndpoint.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.PrivateEndpoint.Tags", + "title": "Description.PrivateEndpoint.Name", } func GetPrivateEndpoint(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -17517,7 +14336,7 @@ func GetPrivateEndpoint(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -17531,7 +14350,7 @@ func GetPrivateEndpoint(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr } limit := int64(1) - paginator, err := k.NewPrivateEndpointPaginator(essdk.BuildFilter(ctx, d.QueryContext, getPrivateEndpointFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewPrivateEndpointPaginator(essdk.BuildFilter(ctx, d.QueryContext, getPrivateEndpointFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -17562,7 +14381,7 @@ func GetPrivateEndpoint(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr type NetworkDDoSProtectionPlan struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.NetworkDDoSProtectionPlanDescription `json:"Description"` + Description azure.NetworkDDoSProtectionPlanDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -17570,59 +14389,6 @@ type NetworkDDoSProtectionPlan struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type NetworkDDoSProtectionPlanHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -17715,7 +14481,7 @@ func ListNetworkDDoSProtectionPlan(ctx context.Context, d *plugin.QueryData, _ * plugin.Logger(ctx).Error("ListNetworkDDoSProtectionPlan NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListNetworkDDoSProtectionPlan GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -17731,7 +14497,7 @@ func ListNetworkDDoSProtectionPlan(ctx context.Context, d *plugin.QueryData, _ * return nil, err } - paginator, err := k.NewNetworkDDoSProtectionPlanPaginator(essdk.BuildFilter(ctx, d.QueryContext, listNetworkDDoSProtectionPlanFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewNetworkDDoSProtectionPlanPaginator(essdk.BuildFilter(ctx, d.QueryContext, listNetworkDDoSProtectionPlanFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListNetworkDDoSProtectionPlan NewNetworkDDoSProtectionPlanPaginator", "error", err) return nil, err @@ -17779,7 +14545,7 @@ func GetNetworkDDoSProtectionPlan(ctx context.Context, d *plugin.QueryData, _ *p if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -17793,7 +14559,7 @@ func GetNetworkDDoSProtectionPlan(ctx context.Context, d *plugin.QueryData, _ *p } limit := int64(1) - paginator, err := k.NewNetworkDDoSProtectionPlanPaginator(essdk.BuildFilter(ctx, d.QueryContext, getNetworkDDoSProtectionPlanFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewNetworkDDoSProtectionPlanPaginator(essdk.BuildFilter(ctx, d.QueryContext, getNetworkDDoSProtectionPlanFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -17824,7 +14590,7 @@ func GetNetworkDDoSProtectionPlan(ctx context.Context, d *plugin.QueryData, _ *p type PolicyAssignment struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.PolicyAssignmentDescription `json:"Description"` + Description azure.PolicyAssignmentDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -17832,59 +14598,6 @@ type PolicyAssignment struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type PolicyAssignmentHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -17962,6 +14675,7 @@ var listPolicyAssignmentFilters = map[string]string{ "name": "Description.Assignment.Name", "not_scopes": "Description.Assignment.Properties.NotScopes", "parameters": "Description.Assignment.Properties.Parameters", + "platform_account_id": "metadata.IntegrationID", "policy_definition_id": "Description.Assignment.Properties.PolicyDefinitionID", "scope": "Description.Assignment.Properties.Scope", "sku_name": "Description.Resource.SKU.Name", @@ -17988,7 +14702,7 @@ func ListPolicyAssignment(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy plugin.Logger(ctx).Error("ListPolicyAssignment NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListPolicyAssignment GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -18004,7 +14718,7 @@ func ListPolicyAssignment(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy return nil, err } - paginator, err := k.NewPolicyAssignmentPaginator(essdk.BuildFilter(ctx, d.QueryContext, listPolicyAssignmentFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewPolicyAssignmentPaginator(essdk.BuildFilter(ctx, d.QueryContext, listPolicyAssignmentFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListPolicyAssignment NewPolicyAssignmentPaginator", "error", err) return nil, err @@ -18040,6 +14754,7 @@ var getPolicyAssignmentFilters = map[string]string{ "name": "description.Assignment.name", "not_scopes": "Description.Assignment.Properties.NotScopes", "parameters": "Description.Assignment.Properties.Parameters", + "platform_account_id": "metadata.IntegrationID", "policy_definition_id": "Description.Assignment.Properties.PolicyDefinitionID", "scope": "Description.Assignment.Properties.Scope", "sku_name": "Description.Resource.SKU.Name", @@ -18063,7 +14778,7 @@ func GetPolicyAssignment(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -18077,7 +14792,7 @@ func GetPolicyAssignment(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd } limit := int64(1) - paginator, err := k.NewPolicyAssignmentPaginator(essdk.BuildFilter(ctx, d.QueryContext, getPolicyAssignmentFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewPolicyAssignmentPaginator(essdk.BuildFilter(ctx, d.QueryContext, getPolicyAssignmentFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -18108,7 +14823,7 @@ func GetPolicyAssignment(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd type RedisCache struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.RedisCacheDescription `json:"Description"` + Description azure.RedisCacheDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -18116,59 +14831,6 @@ type RedisCache struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type RedisCacheHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -18244,6 +14906,7 @@ var listRedisCacheFilters = map[string]string{ "instances": "Description.ResourceInfo.Properties.Instances", "linked_servers": "Description.ResourceInfo.Properties.LinkedServers", "name": "Description.ResourceInfo.Name", + "platform_account_id": "metadata.IntegrationID", "port": "Description.ResourceInfo.Properties.Port", "private_endpoint_connections": "Description.ResourceInfo.Properties.PrivateEndpointConnections", "provisioning_state": "Description.ResourceInfo.Properties.ProvisioningState", @@ -18284,7 +14947,7 @@ func ListRedisCache(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD plugin.Logger(ctx).Error("ListRedisCache NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListRedisCache GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -18300,7 +14963,7 @@ func ListRedisCache(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD return nil, err } - paginator, err := k.NewRedisCachePaginator(essdk.BuildFilter(ctx, d.QueryContext, listRedisCacheFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewRedisCachePaginator(essdk.BuildFilter(ctx, d.QueryContext, listRedisCacheFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListRedisCache NewRedisCachePaginator", "error", err) return nil, err @@ -18334,6 +14997,7 @@ var getRedisCacheFilters = map[string]string{ "instances": "Description.ResourceInfo.Properties.Instances", "linked_servers": "Description.ResourceInfo.Properties.LinkedServers", "name": "description.ResourceType.name", + "platform_account_id": "metadata.IntegrationID", "port": "Description.ResourceInfo.Properties.Port", "private_endpoint_connections": "Description.ResourceInfo.Properties.PrivateEndpointConnections", "provisioning_state": "Description.ResourceInfo.Properties.ProvisioningState", @@ -18371,7 +15035,7 @@ func GetRedisCache(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDa if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -18385,7 +15049,7 @@ func GetRedisCache(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDa } limit := int64(1) - paginator, err := k.NewRedisCachePaginator(essdk.BuildFilter(ctx, d.QueryContext, getRedisCacheFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewRedisCachePaginator(essdk.BuildFilter(ctx, d.QueryContext, getRedisCacheFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -18416,7 +15080,7 @@ func GetRedisCache(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDa type RedisEnterpriseCache struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.RedisEnterpriseCacheDescription `json:"Description"` + Description azure.RedisEnterpriseCacheDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -18424,59 +15088,6 @@ type RedisEnterpriseCache struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type RedisEnterpriseCacheHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -18545,10 +15156,11 @@ func (p RedisEnterpriseCachePaginator) NextPage(ctx context.Context) ([]RedisEnt } var listRedisEnterpriseCacheFilters = map[string]string{ - "id": "Description.RedisEnterprise.ID", - "name": "Description.RedisEnterprise.Name", - "tags": "Description.RedisEnterprise.Tags", - "title": "Description.RedisEnterprise.Name", + "id": "Description.RedisEnterprise.ID", + "name": "Description.RedisEnterprise.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.RedisEnterprise.Tags", + "title": "Description.RedisEnterprise.Name", } func ListRedisEnterpriseCache(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -18569,7 +15181,7 @@ func ListRedisEnterpriseCache(ctx context.Context, d *plugin.QueryData, _ *plugi plugin.Logger(ctx).Error("ListRedisEnterpriseCache NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListRedisEnterpriseCache GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -18585,7 +15197,7 @@ func ListRedisEnterpriseCache(ctx context.Context, d *plugin.QueryData, _ *plugi return nil, err } - paginator, err := k.NewRedisEnterpriseCachePaginator(essdk.BuildFilter(ctx, d.QueryContext, listRedisEnterpriseCacheFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewRedisEnterpriseCachePaginator(essdk.BuildFilter(ctx, d.QueryContext, listRedisEnterpriseCacheFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListRedisEnterpriseCache NewRedisEnterpriseCachePaginator", "error", err) return nil, err @@ -18612,10 +15224,11 @@ func ListRedisEnterpriseCache(ctx context.Context, d *plugin.QueryData, _ *plugi } var getRedisEnterpriseCacheFilters = map[string]string{ - "id": "Description.RedisEnterprise.ID", - "name": "Description.RedisEnterprise.Name", - "tags": "Description.RedisEnterprise.Tags", - "title": "Description.RedisEnterprise.Name", + "id": "Description.RedisEnterprise.ID", + "name": "Description.RedisEnterprise.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.RedisEnterprise.Tags", + "title": "Description.RedisEnterprise.Name", } func GetRedisEnterpriseCache(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -18633,7 +15246,7 @@ func GetRedisEnterpriseCache(ctx context.Context, d *plugin.QueryData, _ *plugin if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -18647,7 +15260,7 @@ func GetRedisEnterpriseCache(ctx context.Context, d *plugin.QueryData, _ *plugin } limit := int64(1) - paginator, err := k.NewRedisEnterpriseCachePaginator(essdk.BuildFilter(ctx, d.QueryContext, getRedisEnterpriseCacheFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewRedisEnterpriseCachePaginator(essdk.BuildFilter(ctx, d.QueryContext, getRedisEnterpriseCacheFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -18678,7 +15291,7 @@ func GetRedisEnterpriseCache(ctx context.Context, d *plugin.QueryData, _ *plugin type ResourceLink struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.ResourceLinkDescription `json:"Description"` + Description azure.ResourceLinkDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -18686,59 +15299,6 @@ type ResourceLink struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type ResourceLinkHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -18807,14 +15367,15 @@ func (p ResourceLinkPaginator) NextPage(ctx context.Context) ([]ResourceLink, er } var listResourceLinkFilters = map[string]string{ - "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", + "id": "Description.ResourceLink.ID", + "name": "Description.ResourceLink.Name", + "notes": "Description.ResourceLink.Properties.Notes", + "platform_account_id": "metadata.IntegrationID", + "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) { @@ -18835,7 +15396,7 @@ func ListResourceLink(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat plugin.Logger(ctx).Error("ListResourceLink NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListResourceLink GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -18851,7 +15412,7 @@ func ListResourceLink(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat return nil, err } - paginator, err := k.NewResourceLinkPaginator(essdk.BuildFilter(ctx, d.QueryContext, listResourceLinkFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewResourceLinkPaginator(essdk.BuildFilter(ctx, d.QueryContext, listResourceLinkFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListResourceLink NewResourceLinkPaginator", "error", err) return nil, err @@ -18878,14 +15439,15 @@ func ListResourceLink(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat } var getResourceLinkFilters = map[string]string{ - "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", + "id": "description.ResourceLink.id", + "name": "Description.ResourceLink.Name", + "notes": "Description.ResourceLink.Properties.Notes", + "platform_account_id": "metadata.IntegrationID", + "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) { @@ -18903,7 +15465,7 @@ func GetResourceLink(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -18917,7 +15479,7 @@ func GetResourceLink(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate } limit := int64(1) - paginator, err := k.NewResourceLinkPaginator(essdk.BuildFilter(ctx, d.QueryContext, getResourceLinkFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewResourceLinkPaginator(essdk.BuildFilter(ctx, d.QueryContext, getResourceLinkFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -18948,7 +15510,7 @@ func GetResourceLink(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate type RoleAssignment struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.RoleAssignmentDescription `json:"Description"` + Description azure.RoleAssignmentDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -18956,59 +15518,6 @@ type RoleAssignment struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type RoleAssignmentHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -19077,16 +15586,17 @@ func (p RoleAssignmentPaginator) NextPage(ctx context.Context) ([]RoleAssignment } var listRoleAssignmentFilters = map[string]string{ - "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", + "created_on": "Description.RoleAssignment.Properties.CreatedOn", + "id": "Description.RoleAssignment.ID", + "name": "Description.RoleAssignment.Name", + "platform_account_id": "metadata.IntegrationID", + "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) { @@ -19107,7 +15617,7 @@ func ListRoleAssignment(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr plugin.Logger(ctx).Error("ListRoleAssignment NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListRoleAssignment GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -19123,7 +15633,7 @@ func ListRoleAssignment(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr return nil, err } - paginator, err := k.NewRoleAssignmentPaginator(essdk.BuildFilter(ctx, d.QueryContext, listRoleAssignmentFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewRoleAssignmentPaginator(essdk.BuildFilter(ctx, d.QueryContext, listRoleAssignmentFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListRoleAssignment NewRoleAssignmentPaginator", "error", err) return nil, err @@ -19150,16 +15660,17 @@ func ListRoleAssignment(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr } var getRoleAssignmentFilters = map[string]string{ - "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", + "created_on": "Description.RoleAssignment.Properties.CreatedOn", + "id": "description.RoleAssignment.id", + "name": "Description.RoleAssignment.Name", + "platform_account_id": "metadata.IntegrationID", + "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) { @@ -19177,7 +15688,7 @@ func GetRoleAssignment(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -19191,7 +15702,7 @@ func GetRoleAssignment(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra } limit := int64(1) - paginator, err := k.NewRoleAssignmentPaginator(essdk.BuildFilter(ctx, d.QueryContext, getRoleAssignmentFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewRoleAssignmentPaginator(essdk.BuildFilter(ctx, d.QueryContext, getRoleAssignmentFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -19222,7 +15733,7 @@ func GetRoleAssignment(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra type RoleDefinition struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.RoleDefinitionDescription `json:"Description"` + Description azure.RoleDefinitionDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -19230,59 +15741,6 @@ type RoleDefinition struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type RoleDefinitionHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -19351,14 +15809,15 @@ 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", - "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", + "platform_account_id": "metadata.IntegrationID", + "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) { @@ -19379,7 +15838,7 @@ func ListRoleDefinition(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr plugin.Logger(ctx).Error("ListRoleDefinition NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListRoleDefinition GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -19395,7 +15854,7 @@ func ListRoleDefinition(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr return nil, err } - paginator, err := k.NewRoleDefinitionPaginator(essdk.BuildFilter(ctx, d.QueryContext, listRoleDefinitionFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewRoleDefinitionPaginator(essdk.BuildFilter(ctx, d.QueryContext, listRoleDefinitionFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListRoleDefinition NewRoleDefinitionPaginator", "error", err) return nil, err @@ -19422,14 +15881,15 @@ 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", - "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", + "platform_account_id": "metadata.IntegrationID", + "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) { @@ -19447,7 +15907,7 @@ func GetRoleDefinition(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -19461,7 +15921,7 @@ func GetRoleDefinition(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra } limit := int64(1) - paginator, err := k.NewRoleDefinitionPaginator(essdk.BuildFilter(ctx, d.QueryContext, getRoleDefinitionFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewRoleDefinitionPaginator(essdk.BuildFilter(ctx, d.QueryContext, getRoleDefinitionFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -19492,7 +15952,7 @@ func GetRoleDefinition(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra type PolicyDefinition struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.PolicyDefinitionDescription `json:"Description"` + Description azure.PolicyDefinitionDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -19500,59 +15960,6 @@ type PolicyDefinition struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type PolicyDefinitionHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -19621,18 +16028,19 @@ 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": "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", + "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", + "platform_account_id": "metadata.IntegrationID", + "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) { @@ -19653,7 +16061,7 @@ func ListPolicyDefinition(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy plugin.Logger(ctx).Error("ListPolicyDefinition NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListPolicyDefinition GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -19669,7 +16077,7 @@ func ListPolicyDefinition(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy return nil, err } - paginator, err := k.NewPolicyDefinitionPaginator(essdk.BuildFilter(ctx, d.QueryContext, listPolicyDefinitionFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewPolicyDefinitionPaginator(essdk.BuildFilter(ctx, d.QueryContext, listPolicyDefinitionFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListPolicyDefinition NewPolicyDefinitionPaginator", "error", err) return nil, err @@ -19696,18 +16104,19 @@ 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": "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", + "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", + "platform_account_id": "metadata.IntegrationID", + "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) { @@ -19725,7 +16134,7 @@ func GetPolicyDefinition(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -19739,7 +16148,7 @@ func GetPolicyDefinition(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd } limit := int64(1) - paginator, err := k.NewPolicyDefinitionPaginator(essdk.BuildFilter(ctx, d.QueryContext, getPolicyDefinitionFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewPolicyDefinitionPaginator(essdk.BuildFilter(ctx, d.QueryContext, getPolicyDefinitionFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -19770,7 +16179,7 @@ func GetPolicyDefinition(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd type UserEffectiveAccess struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.UserEffectiveAccessDescription `json:"Description"` + Description azure.UserEffectiveAccessDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -19778,59 +16187,6 @@ type UserEffectiveAccess struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type UserEffectiveAccessHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -19902,6 +16258,7 @@ var listUserEffectiveAccessFilters = map[string]string{ "assignment_type": "Description.AssignmentType", "id": "ResourceID", "parent_principal_id": "Description.ParentPrincipalId", + "platform_account_id": "metadata.IntegrationID", "principal_id": "Description.PrincipalId", "principal_name": "Description.PrincipalName", "principal_type": "Description.PrincipalType", @@ -19928,7 +16285,7 @@ func ListUserEffectiveAccess(ctx context.Context, d *plugin.QueryData, _ *plugin plugin.Logger(ctx).Error("ListUserEffectiveAccess NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListUserEffectiveAccess GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -19944,7 +16301,7 @@ func ListUserEffectiveAccess(ctx context.Context, d *plugin.QueryData, _ *plugin return nil, err } - paginator, err := k.NewUserEffectiveAccessPaginator(essdk.BuildFilter(ctx, d.QueryContext, listUserEffectiveAccessFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewUserEffectiveAccessPaginator(essdk.BuildFilter(ctx, d.QueryContext, listUserEffectiveAccessFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListUserEffectiveAccess NewUserEffectiveAccessPaginator", "error", err) return nil, err @@ -19974,6 +16331,7 @@ var getUserEffectiveAccessFilters = map[string]string{ "assignment_type": "Description.AssignmentType", "id": "ResourceID", "parent_principal_id": "Description.ParentPrincipalId", + "platform_account_id": "metadata.IntegrationID", "principal_id": "Description.PrincipalId", "principal_name": "Description.PrincipalName", "principal_type": "Description.PrincipalType", @@ -19997,7 +16355,7 @@ func GetUserEffectiveAccess(ctx context.Context, d *plugin.QueryData, _ *plugin. if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -20011,7 +16369,7 @@ func GetUserEffectiveAccess(ctx context.Context, d *plugin.QueryData, _ *plugin. } limit := int64(1) - paginator, err := k.NewUserEffectiveAccessPaginator(essdk.BuildFilter(ctx, d.QueryContext, getUserEffectiveAccessFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewUserEffectiveAccessPaginator(essdk.BuildFilter(ctx, d.QueryContext, getUserEffectiveAccessFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -20042,7 +16400,7 @@ func GetUserEffectiveAccess(ctx context.Context, d *plugin.QueryData, _ *plugin. type SecurityCenterAutoProvisioning struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.SecurityCenterAutoProvisioningDescription `json:"Description"` + Description azure.SecurityCenterAutoProvisioningDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -20050,59 +16408,6 @@ type SecurityCenterAutoProvisioning struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type SecurityCenterAutoProvisioningHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -20171,11 +16476,12 @@ func (p SecurityCenterAutoProvisioningPaginator) NextPage(ctx context.Context) ( } var listSecurityCenterAutoProvisioningFilters = map[string]string{ - "auto_provision": "Description.AutoProvisioningSetting.Properties.AutoProvision", - "id": "Description.AutoProvisioningSetting.ID", - "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", + "platform_account_id": "metadata.IntegrationID", + "title": "Description.AutoProvisioningSetting.Name", + "type": "Description.AutoProvisioningSetting.Type", } func ListSecurityCenterAutoProvisioning(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -20196,7 +16502,7 @@ func ListSecurityCenterAutoProvisioning(ctx context.Context, d *plugin.QueryData plugin.Logger(ctx).Error("ListSecurityCenterAutoProvisioning NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListSecurityCenterAutoProvisioning GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -20212,7 +16518,7 @@ func ListSecurityCenterAutoProvisioning(ctx context.Context, d *plugin.QueryData return nil, err } - paginator, err := k.NewSecurityCenterAutoProvisioningPaginator(essdk.BuildFilter(ctx, d.QueryContext, listSecurityCenterAutoProvisioningFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewSecurityCenterAutoProvisioningPaginator(essdk.BuildFilter(ctx, d.QueryContext, listSecurityCenterAutoProvisioningFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListSecurityCenterAutoProvisioning NewSecurityCenterAutoProvisioningPaginator", "error", err) return nil, err @@ -20239,11 +16545,12 @@ func ListSecurityCenterAutoProvisioning(ctx context.Context, d *plugin.QueryData } var getSecurityCenterAutoProvisioningFilters = map[string]string{ - "auto_provision": "Description.AutoProvisioningSetting.Properties.AutoProvision", - "id": "Description.AutoProvisioningSetting.ID", - "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", + "platform_account_id": "metadata.IntegrationID", + "title": "Description.AutoProvisioningSetting.Name", + "type": "Description.AutoProvisioningSetting.Type", } func GetSecurityCenterAutoProvisioning(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -20261,7 +16568,7 @@ func GetSecurityCenterAutoProvisioning(ctx context.Context, d *plugin.QueryData, if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -20275,7 +16582,7 @@ func GetSecurityCenterAutoProvisioning(ctx context.Context, d *plugin.QueryData, } limit := int64(1) - paginator, err := k.NewSecurityCenterAutoProvisioningPaginator(essdk.BuildFilter(ctx, d.QueryContext, getSecurityCenterAutoProvisioningFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewSecurityCenterAutoProvisioningPaginator(essdk.BuildFilter(ctx, d.QueryContext, getSecurityCenterAutoProvisioningFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -20306,7 +16613,7 @@ func GetSecurityCenterAutoProvisioning(ctx context.Context, d *plugin.QueryData, type SecurityCenterContact struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.SecurityCenterContactDescription `json:"Description"` + Description azure.SecurityCenterContactDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -20314,59 +16621,6 @@ type SecurityCenterContact struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type SecurityCenterContactHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -20441,6 +16695,7 @@ var listSecurityCenterContactFilters = map[string]string{ "id": "Description.Contact.ID", "name": "Description.Contact.Name", "phone": "Description.Contact.Properties.Phone", + "platform_account_id": "metadata.IntegrationID", "title": "Description.Contact.Name", "type": "Description.Contact.Type", } @@ -20463,7 +16718,7 @@ func ListSecurityCenterContact(ctx context.Context, d *plugin.QueryData, _ *plug plugin.Logger(ctx).Error("ListSecurityCenterContact NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListSecurityCenterContact GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -20479,7 +16734,7 @@ func ListSecurityCenterContact(ctx context.Context, d *plugin.QueryData, _ *plug return nil, err } - paginator, err := k.NewSecurityCenterContactPaginator(essdk.BuildFilter(ctx, d.QueryContext, listSecurityCenterContactFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewSecurityCenterContactPaginator(essdk.BuildFilter(ctx, d.QueryContext, listSecurityCenterContactFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListSecurityCenterContact NewSecurityCenterContactPaginator", "error", err) return nil, err @@ -20512,6 +16767,7 @@ var getSecurityCenterContactFilters = map[string]string{ "id": "Description.Contact.ID", "name": "description.Contact.name", "phone": "Description.Contact.Properties.Phone", + "platform_account_id": "metadata.IntegrationID", "title": "Description.Contact.Name", "type": "Description.Contact.Type", } @@ -20531,7 +16787,7 @@ func GetSecurityCenterContact(ctx context.Context, d *plugin.QueryData, _ *plugi if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -20545,7 +16801,7 @@ func GetSecurityCenterContact(ctx context.Context, d *plugin.QueryData, _ *plugi } limit := int64(1) - paginator, err := k.NewSecurityCenterContactPaginator(essdk.BuildFilter(ctx, d.QueryContext, getSecurityCenterContactFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewSecurityCenterContactPaginator(essdk.BuildFilter(ctx, d.QueryContext, getSecurityCenterContactFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -20576,7 +16832,7 @@ func GetSecurityCenterContact(ctx context.Context, d *plugin.QueryData, _ *plugi type SecurityCenterJitNetworkAccessPolicy struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.SecurityCenterJitNetworkAccessPolicyDescription `json:"Description"` + Description azure.SecurityCenterJitNetworkAccessPolicyDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -20584,59 +16840,6 @@ type SecurityCenterJitNetworkAccessPolicy struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type SecurityCenterJitNetworkAccessPolicyHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -20705,13 +16908,14 @@ func (p SecurityCenterJitNetworkAccessPolicyPaginator) NextPage(ctx context.Cont } var listSecurityCenterJitNetworkAccessPolicyFilters = map[string]string{ - "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", + "id": "Description.JitNetworkAccessPolicy.ID", + "kind": "Description.JitNetworkAccessPolicy.Kind", + "name": "Description.JitNetworkAccessPolicy.Name", + "platform_account_id": "metadata.IntegrationID", + "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) { @@ -20732,7 +16936,7 @@ func ListSecurityCenterJitNetworkAccessPolicy(ctx context.Context, d *plugin.Que plugin.Logger(ctx).Error("ListSecurityCenterJitNetworkAccessPolicy NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListSecurityCenterJitNetworkAccessPolicy GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -20748,7 +16952,7 @@ func ListSecurityCenterJitNetworkAccessPolicy(ctx context.Context, d *plugin.Que return nil, err } - paginator, err := k.NewSecurityCenterJitNetworkAccessPolicyPaginator(essdk.BuildFilter(ctx, d.QueryContext, listSecurityCenterJitNetworkAccessPolicyFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewSecurityCenterJitNetworkAccessPolicyPaginator(essdk.BuildFilter(ctx, d.QueryContext, listSecurityCenterJitNetworkAccessPolicyFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListSecurityCenterJitNetworkAccessPolicy NewSecurityCenterJitNetworkAccessPolicyPaginator", "error", err) return nil, err @@ -20775,13 +16979,14 @@ func ListSecurityCenterJitNetworkAccessPolicy(ctx context.Context, d *plugin.Que } var getSecurityCenterJitNetworkAccessPolicyFilters = map[string]string{ - "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", + "id": "Description.JitNetworkAccessPolicy.ID", + "kind": "Description.JitNetworkAccessPolicy.Kind", + "name": "Description.JitNetworkAccessPolicy.Name", + "platform_account_id": "metadata.IntegrationID", + "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) { @@ -20799,7 +17004,7 @@ func GetSecurityCenterJitNetworkAccessPolicy(ctx context.Context, d *plugin.Quer if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -20813,7 +17018,7 @@ func GetSecurityCenterJitNetworkAccessPolicy(ctx context.Context, d *plugin.Quer } limit := int64(1) - paginator, err := k.NewSecurityCenterJitNetworkAccessPolicyPaginator(essdk.BuildFilter(ctx, d.QueryContext, getSecurityCenterJitNetworkAccessPolicyFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewSecurityCenterJitNetworkAccessPolicyPaginator(essdk.BuildFilter(ctx, d.QueryContext, getSecurityCenterJitNetworkAccessPolicyFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -20844,7 +17049,7 @@ func GetSecurityCenterJitNetworkAccessPolicy(ctx context.Context, d *plugin.Quer type SecurityCenterSetting struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.SecurityCenterSettingDescription `json:"Description"` + Description azure.SecurityCenterSettingDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -20852,59 +17057,6 @@ type SecurityCenterSetting struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type SecurityCenterSettingHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -20973,12 +17125,13 @@ func (p SecurityCenterSettingPaginator) NextPage(ctx context.Context) ([]Securit } var listSecurityCenterSettingFilters = map[string]string{ - "enabled": "Description.ExportSettingStatus", - "id": "Description.Setting.ID", - "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", + "platform_account_id": "metadata.IntegrationID", + "title": "Description.Setting.Name", + "type": "Description.Setting.Type", } func ListSecurityCenterSetting(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -20999,7 +17152,7 @@ func ListSecurityCenterSetting(ctx context.Context, d *plugin.QueryData, _ *plug plugin.Logger(ctx).Error("ListSecurityCenterSetting NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListSecurityCenterSetting GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -21015,7 +17168,7 @@ func ListSecurityCenterSetting(ctx context.Context, d *plugin.QueryData, _ *plug return nil, err } - paginator, err := k.NewSecurityCenterSettingPaginator(essdk.BuildFilter(ctx, d.QueryContext, listSecurityCenterSettingFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewSecurityCenterSettingPaginator(essdk.BuildFilter(ctx, d.QueryContext, listSecurityCenterSettingFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListSecurityCenterSetting NewSecurityCenterSettingPaginator", "error", err) return nil, err @@ -21042,12 +17195,13 @@ func ListSecurityCenterSetting(ctx context.Context, d *plugin.QueryData, _ *plug } var getSecurityCenterSettingFilters = map[string]string{ - "enabled": "Description.ExportSettingStatus", - "id": "Description.Setting.ID", - "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", + "platform_account_id": "metadata.IntegrationID", + "title": "Description.Setting.Name", + "type": "Description.Setting.Type", } func GetSecurityCenterSetting(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -21065,7 +17219,7 @@ func GetSecurityCenterSetting(ctx context.Context, d *plugin.QueryData, _ *plugi if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -21079,7 +17233,7 @@ func GetSecurityCenterSetting(ctx context.Context, d *plugin.QueryData, _ *plugi } limit := int64(1) - paginator, err := k.NewSecurityCenterSettingPaginator(essdk.BuildFilter(ctx, d.QueryContext, getSecurityCenterSettingFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewSecurityCenterSettingPaginator(essdk.BuildFilter(ctx, d.QueryContext, getSecurityCenterSettingFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -21110,7 +17264,7 @@ func GetSecurityCenterSetting(ctx context.Context, d *plugin.QueryData, _ *plugi type SecurityCenterSubscriptionPricing struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.SecurityCenterSubscriptionPricingDescription `json:"Description"` + Description azure.SecurityCenterSubscriptionPricingDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -21118,59 +17272,6 @@ type SecurityCenterSubscriptionPricing struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type SecurityCenterSubscriptionPricingHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -21242,6 +17343,7 @@ var listSecurityCenterSubscriptionPricingFilters = map[string]string{ "free_trial_remaining_time": "Description.Pricing.Properties.FreeTrialRemainingTime", "id": "Description.Pricing.ID", "name": "Description.Pricing.Name", + "platform_account_id": "metadata.IntegrationID", "pricing_tier": "Description.Pricing.Properties.PricingTier", "title": "Description.Pricing.Name", "type": "Description.Pricing.Type", @@ -21265,7 +17367,7 @@ func ListSecurityCenterSubscriptionPricing(ctx context.Context, d *plugin.QueryD plugin.Logger(ctx).Error("ListSecurityCenterSubscriptionPricing NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListSecurityCenterSubscriptionPricing GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -21281,7 +17383,7 @@ func ListSecurityCenterSubscriptionPricing(ctx context.Context, d *plugin.QueryD return nil, err } - paginator, err := k.NewSecurityCenterSubscriptionPricingPaginator(essdk.BuildFilter(ctx, d.QueryContext, listSecurityCenterSubscriptionPricingFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewSecurityCenterSubscriptionPricingPaginator(essdk.BuildFilter(ctx, d.QueryContext, listSecurityCenterSubscriptionPricingFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListSecurityCenterSubscriptionPricing NewSecurityCenterSubscriptionPricingPaginator", "error", err) return nil, err @@ -21311,6 +17413,7 @@ var getSecurityCenterSubscriptionPricingFilters = map[string]string{ "free_trial_remaining_time": "Description.Pricing.Properties.FreeTrialRemainingTime", "id": "Description.Pricing.ID", "name": "description.Pricing.Name", + "platform_account_id": "metadata.IntegrationID", "pricing_tier": "Description.Pricing.Properties.PricingTier", "title": "Description.Pricing.Name", "type": "Description.Pricing.Type", @@ -21331,7 +17434,7 @@ func GetSecurityCenterSubscriptionPricing(ctx context.Context, d *plugin.QueryDa if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -21345,7 +17448,7 @@ func GetSecurityCenterSubscriptionPricing(ctx context.Context, d *plugin.QueryDa } limit := int64(1) - paginator, err := k.NewSecurityCenterSubscriptionPricingPaginator(essdk.BuildFilter(ctx, d.QueryContext, getSecurityCenterSubscriptionPricingFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewSecurityCenterSubscriptionPricingPaginator(essdk.BuildFilter(ctx, d.QueryContext, getSecurityCenterSubscriptionPricingFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -21376,7 +17479,7 @@ func GetSecurityCenterSubscriptionPricing(ctx context.Context, d *plugin.QueryDa type SecurityCenterAutomation struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.SecurityCenterAutomationDescription `json:"Description"` + Description azure.SecurityCenterAutomationDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -21384,59 +17487,6 @@ type SecurityCenterAutomation struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type SecurityCenterAutomationHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -21505,19 +17555,20 @@ 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", - "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", + "platform_account_id": "metadata.IntegrationID", + "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) { @@ -21538,7 +17589,7 @@ func ListSecurityCenterAutomation(ctx context.Context, d *plugin.QueryData, _ *p plugin.Logger(ctx).Error("ListSecurityCenterAutomation NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListSecurityCenterAutomation GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -21554,7 +17605,7 @@ func ListSecurityCenterAutomation(ctx context.Context, d *plugin.QueryData, _ *p return nil, err } - paginator, err := k.NewSecurityCenterAutomationPaginator(essdk.BuildFilter(ctx, d.QueryContext, listSecurityCenterAutomationFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewSecurityCenterAutomationPaginator(essdk.BuildFilter(ctx, d.QueryContext, listSecurityCenterAutomationFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListSecurityCenterAutomation NewSecurityCenterAutomationPaginator", "error", err) return nil, err @@ -21581,19 +17632,20 @@ 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", - "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", + "platform_account_id": "metadata.IntegrationID", + "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 GetSecurityCenterAutomation(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -21611,7 +17663,7 @@ func GetSecurityCenterAutomation(ctx context.Context, d *plugin.QueryData, _ *pl if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -21625,7 +17677,7 @@ func GetSecurityCenterAutomation(ctx context.Context, d *plugin.QueryData, _ *pl } limit := int64(1) - paginator, err := k.NewSecurityCenterAutomationPaginator(essdk.BuildFilter(ctx, d.QueryContext, getSecurityCenterAutomationFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewSecurityCenterAutomationPaginator(essdk.BuildFilter(ctx, d.QueryContext, getSecurityCenterAutomationFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -21656,7 +17708,7 @@ func GetSecurityCenterAutomation(ctx context.Context, d *plugin.QueryData, _ *pl type SecurityCenterSubAssessment struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.SecurityCenterSubAssessmentDescription `json:"Description"` + Description azure.SecurityCenterSubAssessmentDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -21664,59 +17716,6 @@ type SecurityCenterSubAssessment struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type SecurityCenterSubAssessmentHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -21785,17 +17784,18 @@ 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", - "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", + "platform_account_id": "metadata.IntegrationID", + "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) { @@ -21816,7 +17816,7 @@ func ListSecurityCenterSubAssessment(ctx context.Context, d *plugin.QueryData, _ plugin.Logger(ctx).Error("ListSecurityCenterSubAssessment NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListSecurityCenterSubAssessment GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -21832,7 +17832,7 @@ func ListSecurityCenterSubAssessment(ctx context.Context, d *plugin.QueryData, _ return nil, err } - paginator, err := k.NewSecurityCenterSubAssessmentPaginator(essdk.BuildFilter(ctx, d.QueryContext, listSecurityCenterSubAssessmentFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewSecurityCenterSubAssessmentPaginator(essdk.BuildFilter(ctx, d.QueryContext, listSecurityCenterSubAssessmentFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListSecurityCenterSubAssessment NewSecurityCenterSubAssessmentPaginator", "error", err) return nil, err @@ -21859,17 +17859,18 @@ 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", - "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", + "platform_account_id": "metadata.IntegrationID", + "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) { @@ -21887,7 +17888,7 @@ func GetSecurityCenterSubAssessment(ctx context.Context, d *plugin.QueryData, _ if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -21901,7 +17902,7 @@ func GetSecurityCenterSubAssessment(ctx context.Context, d *plugin.QueryData, _ } limit := int64(1) - paginator, err := k.NewSecurityCenterSubAssessmentPaginator(essdk.BuildFilter(ctx, d.QueryContext, getSecurityCenterSubAssessmentFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewSecurityCenterSubAssessmentPaginator(essdk.BuildFilter(ctx, d.QueryContext, getSecurityCenterSubAssessmentFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -21932,7 +17933,7 @@ func GetSecurityCenterSubAssessment(ctx context.Context, d *plugin.QueryData, _ type StorageContainer struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.StorageContainerDescription `json:"Description"` + Description azure.StorageContainerDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -21940,59 +17941,6 @@ type StorageContainer struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type StorageContainerHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -22075,6 +18023,7 @@ var listStorageContainerFilters = map[string]string{ "legal_hold": "Description.ListContainerItem.Properties.LegalHold", "metadata": "Description.ListContainerItem.Properties.Metadata", "name": "Description.ListContainerItem.Name", + "platform_account_id": "metadata.IntegrationID", "public_access": "Description.ListContainerItem.Properties.PublicAccess", "remaining_retention_days": "Description.ListContainerItem.Properties.RemainingRetentionDays", "resource_group": "Description.ResourceGroup", @@ -22101,7 +18050,7 @@ func ListStorageContainer(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy plugin.Logger(ctx).Error("ListStorageContainer NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListStorageContainer GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -22117,7 +18066,7 @@ func ListStorageContainer(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy return nil, err } - paginator, err := k.NewStorageContainerPaginator(essdk.BuildFilter(ctx, d.QueryContext, listStorageContainerFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewStorageContainerPaginator(essdk.BuildFilter(ctx, d.QueryContext, listStorageContainerFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListStorageContainer NewStorageContainerPaginator", "error", err) return nil, err @@ -22158,6 +18107,7 @@ var getStorageContainerFilters = map[string]string{ "legal_hold": "Description.ListContainerItem.Properties.LegalHold", "metadata": "Description.ListContainerItem.Properties.Metadata", "name": "description.ListContainerItem.name", + "platform_account_id": "metadata.IntegrationID", "public_access": "Description.ListContainerItem.Properties.PublicAccess", "remaining_retention_days": "Description.ListContainerItem.Properties.RemainingRetentionDays", "resource_group": "description.ResourceGroup", @@ -22181,7 +18131,7 @@ func GetStorageContainer(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -22195,7 +18145,7 @@ func GetStorageContainer(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd } limit := int64(1) - paginator, err := k.NewStorageContainerPaginator(essdk.BuildFilter(ctx, d.QueryContext, getStorageContainerFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewStorageContainerPaginator(essdk.BuildFilter(ctx, d.QueryContext, getStorageContainerFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -22226,7 +18176,7 @@ func GetStorageContainer(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd type StorageBlob struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.StorageBlobDescription `json:"Description"` + Description azure.StorageBlobDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -22234,59 +18184,6 @@ type StorageBlob struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type StorageBlobHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -22392,6 +18289,7 @@ var listStorageBlobFilters = map[string]string{ "lease_status": "Description.Blob.Properties.LeaseStatus", "metadata": "Description.Blob.Metadata", "name": "Description.Blob.Name", + "platform_account_id": "metadata.IntegrationID", "remaining_retention_days": "Description.Blob.Properties.RemainingRetentionDays", "resource_group": "description.ResourceGroup", "server_encrypted": "Description.Blob.Properties.ServerEncrypted", @@ -22420,7 +18318,7 @@ func ListStorageBlob(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate plugin.Logger(ctx).Error("ListStorageBlob NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListStorageBlob GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -22436,7 +18334,7 @@ func ListStorageBlob(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate return nil, err } - paginator, err := k.NewStorageBlobPaginator(essdk.BuildFilter(ctx, d.QueryContext, listStorageBlobFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewStorageBlobPaginator(essdk.BuildFilter(ctx, d.QueryContext, listStorageBlobFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListStorageBlob NewStorageBlobPaginator", "error", err) return nil, err @@ -22500,6 +18398,7 @@ var getStorageBlobFilters = map[string]string{ "lease_status": "Description.Blob.Properties.LeaseStatus", "metadata": "Description.Blob.Metadata", "name": "Description.Blob.Name", + "platform_account_id": "metadata.IntegrationID", "remaining_retention_days": "Description.Blob.Properties.RemainingRetentionDays", "server_encrypted": "Description.Blob.Properties.ServerEncrypted", "snapshot": "Description.Blob.Snapshot", @@ -22524,7 +18423,7 @@ func GetStorageBlob(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -22538,7 +18437,7 @@ func GetStorageBlob(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD } limit := int64(1) - paginator, err := k.NewStorageBlobPaginator(essdk.BuildFilter(ctx, d.QueryContext, getStorageBlobFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewStorageBlobPaginator(essdk.BuildFilter(ctx, d.QueryContext, getStorageBlobFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -22569,7 +18468,7 @@ func GetStorageBlob(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD type StorageBlobService struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.StorageBlobServiceDescription `json:"Description"` + Description azure.StorageBlobServiceDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -22577,59 +18476,6 @@ type StorageBlobService struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type StorageBlobServiceHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -22707,6 +18553,7 @@ var listStorageBlobServiceFilters = map[string]string{ "id": "Description.BlobService.ID", "is_versioning_enabled": "Description.BlobService.BlobServiceProperties.IsVersioningEnabled", "name": "Description.BlobService.Name", + "platform_account_id": "metadata.IntegrationID", "resource_group": "description.ResourceGroup", "restore_policy": "Description.BlobService.BlobServiceProperties.RestorePolicy", "sku_name": "Description.BlobService.SKU.Name", @@ -22734,7 +18581,7 @@ func ListStorageBlobService(ctx context.Context, d *plugin.QueryData, _ *plugin. plugin.Logger(ctx).Error("ListStorageBlobService NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListStorageBlobService GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -22750,7 +18597,7 @@ func ListStorageBlobService(ctx context.Context, d *plugin.QueryData, _ *plugin. return nil, err } - paginator, err := k.NewStorageBlobServicePaginator(essdk.BuildFilter(ctx, d.QueryContext, listStorageBlobServiceFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewStorageBlobServicePaginator(essdk.BuildFilter(ctx, d.QueryContext, listStorageBlobServiceFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListStorageBlobService NewStorageBlobServicePaginator", "error", err) return nil, err @@ -22786,6 +18633,7 @@ var getStorageBlobServiceFilters = map[string]string{ "id": "Description.BlobService.ID", "is_versioning_enabled": "Description.BlobService.BlobServiceProperties.IsVersioningEnabled", "name": "Description.BlobService.Name", + "platform_account_id": "metadata.IntegrationID", "resource_group": "Description.ResourceGroup", "restore_policy": "Description.BlobService.BlobServiceProperties.RestorePolicy", "sku_name": "Description.BlobService.SKU.Name", @@ -22810,7 +18658,7 @@ func GetStorageBlobService(ctx context.Context, d *plugin.QueryData, _ *plugin.H if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -22824,7 +18672,7 @@ func GetStorageBlobService(ctx context.Context, d *plugin.QueryData, _ *plugin.H } limit := int64(1) - paginator, err := k.NewStorageBlobServicePaginator(essdk.BuildFilter(ctx, d.QueryContext, getStorageBlobServiceFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewStorageBlobServicePaginator(essdk.BuildFilter(ctx, d.QueryContext, getStorageBlobServiceFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -22855,7 +18703,7 @@ func GetStorageBlobService(ctx context.Context, d *plugin.QueryData, _ *plugin.H type StorageQueue struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.StorageQueueDescription `json:"Description"` + Description azure.StorageQueueDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -22863,59 +18711,6 @@ type StorageQueue struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type StorageQueueHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -22987,6 +18782,7 @@ var listStorageQueueFilters = map[string]string{ "id": "Description.Queue.ID", "metadata": "Description.Queue.QueueProperties.Metadata", "name": "description.Queue.Name", + "platform_account_id": "metadata.IntegrationID", "resource_group": "description.ResourceGroup", "storage_account_name": "description.AccountName", "title": "Description.Queue.Name", @@ -23011,7 +18807,7 @@ func ListStorageQueue(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat plugin.Logger(ctx).Error("ListStorageQueue NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListStorageQueue GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -23027,7 +18823,7 @@ func ListStorageQueue(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat return nil, err } - paginator, err := k.NewStorageQueuePaginator(essdk.BuildFilter(ctx, d.QueryContext, listStorageQueueFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewStorageQueuePaginator(essdk.BuildFilter(ctx, d.QueryContext, listStorageQueueFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListStorageQueue NewStorageQueuePaginator", "error", err) return nil, err @@ -23057,6 +18853,7 @@ var getStorageQueueFilters = map[string]string{ "id": "Description.Queue.ID", "metadata": "Description.Queue.QueueProperties.Metadata", "name": "Description.Queue.Name", + "platform_account_id": "metadata.IntegrationID", "resource_group": "Description.ResourceGroup", "storage_account_name": "Description.AccountName", "title": "Description.Queue.Name", @@ -23078,7 +18875,7 @@ func GetStorageQueue(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -23092,7 +18889,7 @@ func GetStorageQueue(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate } limit := int64(1) - paginator, err := k.NewStorageQueuePaginator(essdk.BuildFilter(ctx, d.QueryContext, getStorageQueueFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewStorageQueuePaginator(essdk.BuildFilter(ctx, d.QueryContext, getStorageQueueFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -23123,7 +18920,7 @@ func GetStorageQueue(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate type StorageFileShare struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.StorageFileShareDescription `json:"Description"` + Description azure.StorageFileShareDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -23131,59 +18928,6 @@ type StorageFileShare struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type StorageFileShareHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -23259,6 +19003,7 @@ var listStorageFileShareFilters = map[string]string{ "id": "Description.FileShare.ID", "metadata": "Description.FileShare.Properties.Metadata", "name": "description.FileShare.Name", + "platform_account_id": "metadata.IntegrationID", "remaining_retention_days": "Description.FileShare.Properties.RemainingRetentionDays", "resource_group": "description.ResourceGroup", "root_squash": "Description.FileShare.Properties.RootSquash", @@ -23288,7 +19033,7 @@ func ListStorageFileShare(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy plugin.Logger(ctx).Error("ListStorageFileShare NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListStorageFileShare GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -23304,7 +19049,7 @@ func ListStorageFileShare(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy return nil, err } - paginator, err := k.NewStorageFileSharePaginator(essdk.BuildFilter(ctx, d.QueryContext, listStorageFileShareFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewStorageFileSharePaginator(essdk.BuildFilter(ctx, d.QueryContext, listStorageFileShareFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListStorageFileShare NewStorageFileSharePaginator", "error", err) return nil, err @@ -23338,6 +19083,7 @@ var getStorageFileShareFilters = map[string]string{ "id": "Description.FileShare.ID", "metadata": "Description.FileShare.Properties.Metadata", "name": "Description.FileShare.Name", + "platform_account_id": "metadata.IntegrationID", "remaining_retention_days": "Description.FileShare.Properties.RemainingRetentionDays", "root_squash": "Description.FileShare.Properties.RootSquash", "share_quota": "Description.FileShare.Properties.ShareQuota", @@ -23363,7 +19109,7 @@ func GetStorageFileShare(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -23377,7 +19123,7 @@ func GetStorageFileShare(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd } limit := int64(1) - paginator, err := k.NewStorageFileSharePaginator(essdk.BuildFilter(ctx, d.QueryContext, getStorageFileShareFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewStorageFileSharePaginator(essdk.BuildFilter(ctx, d.QueryContext, getStorageFileShareFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -23408,7 +19154,7 @@ func GetStorageFileShare(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd type StorageTable struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.StorageTableDescription `json:"Description"` + Description azure.StorageTableDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -23416,59 +19162,6 @@ type StorageTable struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type StorageTableHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -23539,6 +19232,7 @@ func (p StorageTablePaginator) NextPage(ctx context.Context) ([]StorageTable, er var listStorageTableFilters = map[string]string{ "id": "Description.Table.ID", "name": "description.Table.Name", + "platform_account_id": "metadata.IntegrationID", "resource_group": "description.ResourceGroup", "storage_account_name": "description.AccountName", "title": "Description.Table.Name", @@ -23563,7 +19257,7 @@ func ListStorageTable(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat plugin.Logger(ctx).Error("ListStorageTable NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListStorageTable GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -23579,7 +19273,7 @@ func ListStorageTable(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat return nil, err } - paginator, err := k.NewStorageTablePaginator(essdk.BuildFilter(ctx, d.QueryContext, listStorageTableFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewStorageTablePaginator(essdk.BuildFilter(ctx, d.QueryContext, listStorageTableFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListStorageTable NewStorageTablePaginator", "error", err) return nil, err @@ -23608,6 +19302,7 @@ func ListStorageTable(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat var getStorageTableFilters = map[string]string{ "id": "Description.Table.ID", "name": "Description.Table.Name", + "platform_account_id": "metadata.IntegrationID", "storage_account_name": "Description.AccountName", "title": "Description.Table.Name", "type": "Description.Table.Type", @@ -23628,7 +19323,7 @@ func GetStorageTable(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -23642,7 +19337,7 @@ func GetStorageTable(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate } limit := int64(1) - paginator, err := k.NewStorageTablePaginator(essdk.BuildFilter(ctx, d.QueryContext, getStorageTableFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewStorageTablePaginator(essdk.BuildFilter(ctx, d.QueryContext, getStorageTableFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -23673,7 +19368,7 @@ func GetStorageTable(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate type StorageTableService struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.StorageTableServiceDescription `json:"Description"` + Description azure.StorageTableServiceDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -23681,59 +19376,6 @@ type StorageTableService struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type StorageTableServiceHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -23805,6 +19447,7 @@ var listStorageTableServiceFilters = map[string]string{ "cors_rules": "Description.TableService.TableServiceProperties.Cors.CorsRules", "id": "Description.TableService.ID", "name": "description.TableService.Name", + "platform_account_id": "metadata.IntegrationID", "resource_group": "description.ResourceGroup", "storage_account_name": "description.AccountName", "title": "Description.TableService.Name", @@ -23829,7 +19472,7 @@ func ListStorageTableService(ctx context.Context, d *plugin.QueryData, _ *plugin plugin.Logger(ctx).Error("ListStorageTableService NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListStorageTableService GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -23845,7 +19488,7 @@ func ListStorageTableService(ctx context.Context, d *plugin.QueryData, _ *plugin return nil, err } - paginator, err := k.NewStorageTableServicePaginator(essdk.BuildFilter(ctx, d.QueryContext, listStorageTableServiceFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewStorageTableServicePaginator(essdk.BuildFilter(ctx, d.QueryContext, listStorageTableServiceFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListStorageTableService NewStorageTableServicePaginator", "error", err) return nil, err @@ -23875,6 +19518,7 @@ var getStorageTableServiceFilters = map[string]string{ "cors_rules": "Description.TableService.TableServiceProperties.Cors.CorsRules", "id": "Description.TableService.ID", "name": "Description.TableService.Name", + "platform_account_id": "metadata.IntegrationID", "storage_account_name": "Description.AccountName", "title": "Description.TableService.Name", "type": "Description.TableService.Type", @@ -23895,7 +19539,7 @@ func GetStorageTableService(ctx context.Context, d *plugin.QueryData, _ *plugin. if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -23909,7 +19553,7 @@ func GetStorageTableService(ctx context.Context, d *plugin.QueryData, _ *plugin. } limit := int64(1) - paginator, err := k.NewStorageTableServicePaginator(essdk.BuildFilter(ctx, d.QueryContext, getStorageTableServiceFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewStorageTableServicePaginator(essdk.BuildFilter(ctx, d.QueryContext, getStorageTableServiceFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -23940,7 +19584,7 @@ func GetStorageTableService(ctx context.Context, d *plugin.QueryData, _ *plugin. type Subnet struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.SubnetDescription `json:"Description"` + Description azure.SubnetDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -23948,59 +19592,6 @@ type Subnet struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type SubnetHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -24077,6 +19668,7 @@ var listSubnetFilters = map[string]string{ "name": "Description.Subnet.Name", "nat_gateway_id": "Description.Subnet.Properties.NatGateway.ID", "network_security_group_id": "Description.Subnet.Properties.NetworkSecurityGroup.ID", + "platform_account_id": "metadata.IntegrationID", "private_endpoint_network_policies": "Description.Subnet.Properties.PrivateEndpointNetworkPolicies", "private_link_service_network_policies": "Description.Subnet.Properties.PrivateLinkServiceNetworkPolicies", "provisioning_state": "Description.Subnet.Properties.ProvisioningState", @@ -24106,7 +19698,7 @@ func ListSubnet(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) plugin.Logger(ctx).Error("ListSubnet NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListSubnet GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -24122,7 +19714,7 @@ func ListSubnet(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) return nil, err } - paginator, err := k.NewSubnetPaginator(essdk.BuildFilter(ctx, d.QueryContext, listSubnetFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewSubnetPaginator(essdk.BuildFilter(ctx, d.QueryContext, listSubnetFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListSubnet NewSubnetPaginator", "error", err) return nil, err @@ -24157,6 +19749,7 @@ var getSubnetFilters = map[string]string{ "name": "description.Subnet.name", "nat_gateway_id": "Description.Subnet.Properties.NatGateway.ID", "network_security_group_id": "Description.Subnet.Properties.NetworkSecurityGroup.ID", + "platform_account_id": "metadata.IntegrationID", "private_endpoint_network_policies": "Description.Subnet.Properties.PrivateEndpointNetworkPolicies", "private_link_service_network_policies": "Description.Subnet.Properties.PrivateLinkServiceNetworkPolicies", "provisioning_state": "Description.Subnet.Properties.ProvisioningState", @@ -24184,7 +19777,7 @@ func GetSubnet(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -24198,7 +19791,7 @@ func GetSubnet(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) } limit := int64(1) - paginator, err := k.NewSubnetPaginator(essdk.BuildFilter(ctx, d.QueryContext, getSubnetFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewSubnetPaginator(essdk.BuildFilter(ctx, d.QueryContext, getSubnetFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -24229,7 +19822,7 @@ func GetSubnet(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) type VirtualNetwork struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.VirtualNetworkDescription `json:"Description"` + Description azure.VirtualNetworkDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -24237,59 +19830,6 @@ type VirtualNetwork struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type VirtualNetworkHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -24365,6 +19905,7 @@ var listVirtualNetworkFilters = map[string]string{ "id": "Description.VirtualNetwork.ID", "name": "Description.VirtualNetwork.Name", "network_peerings": "Description.VirtualNetwork.Properties.VirtualNetworkPeerings", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.VirtualNetwork.Properties.ProvisioningState", "resource_group": "Description.ResourceGroup", "resource_guid": "Description.VirtualNetwork.Properties.ResourceGUID", @@ -24392,7 +19933,7 @@ func ListVirtualNetwork(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr plugin.Logger(ctx).Error("ListVirtualNetwork NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListVirtualNetwork GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -24408,7 +19949,7 @@ func ListVirtualNetwork(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr return nil, err } - paginator, err := k.NewVirtualNetworkPaginator(essdk.BuildFilter(ctx, d.QueryContext, listVirtualNetworkFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewVirtualNetworkPaginator(essdk.BuildFilter(ctx, d.QueryContext, listVirtualNetworkFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListVirtualNetwork NewVirtualNetworkPaginator", "error", err) return nil, err @@ -24442,6 +19983,7 @@ var getVirtualNetworkFilters = map[string]string{ "id": "Description.VirtualNetwork.ID", "name": "description.VirtualNetwork.name", "network_peerings": "Description.VirtualNetwork.Properties.VirtualNetworkPeerings", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.VirtualNetwork.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", "resource_guid": "Description.VirtualNetwork.Properties.ResourceGUID", @@ -24466,7 +20008,7 @@ func GetVirtualNetwork(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -24480,7 +20022,7 @@ func GetVirtualNetwork(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra } limit := int64(1) - paginator, err := k.NewVirtualNetworkPaginator(essdk.BuildFilter(ctx, d.QueryContext, getVirtualNetworkFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewVirtualNetworkPaginator(essdk.BuildFilter(ctx, d.QueryContext, getVirtualNetworkFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -24511,7 +20053,7 @@ func GetVirtualNetwork(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra type Tenant struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.TenantDescription `json:"Description"` + Description azure.TenantDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -24519,59 +20061,6 @@ type Tenant struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type TenantHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -24640,12 +20129,13 @@ func (p TenantPaginator) NextPage(ctx context.Context) ([]Tenant, error) { } var listTenantFilters = map[string]string{ - "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", + "display_name": "Description.TenantIDDescription.Name", + "id": "Description.TenantIDDescription.ID", + "name": "Description.TenantIDDescription.Name", + "platform_account_id": "metadata.IntegrationID", + "tenant_category": "TenantCategory", + "tenant_id": "Description.TenantIDDescription.TenantID", + "title": "Description.TenantIDDescription.Name", } func ListTenant(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -24666,7 +20156,7 @@ func ListTenant(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) plugin.Logger(ctx).Error("ListTenant NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListTenant GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -24682,7 +20172,7 @@ func ListTenant(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) return nil, err } - paginator, err := k.NewTenantPaginator(essdk.BuildFilter(ctx, d.QueryContext, listTenantFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewTenantPaginator(essdk.BuildFilter(ctx, d.QueryContext, listTenantFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListTenant NewTenantPaginator", "error", err) return nil, err @@ -24709,12 +20199,13 @@ func ListTenant(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) } var getTenantFilters = map[string]string{ - "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", + "display_name": "Description.TenantIDDescription.Name", + "id": "Description.TenantIDDescription.ID", + "name": "Description.TenantIDDescription.Name", + "platform_account_id": "metadata.IntegrationID", + "tenant_category": "TenantCategory", + "tenant_id": "Description.TenantIDDescription.TenantID", + "title": "Description.TenantIDDescription.Name", } func GetTenant(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -24732,7 +20223,7 @@ func GetTenant(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -24746,7 +20237,7 @@ func GetTenant(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) } limit := int64(1) - paginator, err := k.NewTenantPaginator(essdk.BuildFilter(ctx, d.QueryContext, getTenantFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewTenantPaginator(essdk.BuildFilter(ctx, d.QueryContext, getTenantFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -24777,7 +20268,7 @@ func GetTenant(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) type Subscription struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.SubscriptionDescription `json:"Description"` + Description azure.SubscriptionDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -24785,59 +20276,6 @@ type Subscription struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type SubscriptionHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -24909,6 +20347,7 @@ var listSubscriptionFilters = map[string]string{ "authorization_source": "Description.Subscription.AuthorizationSource", "display_name": "Description.Subscription.DisplayName", "id": "Description.Subscription.ID", + "platform_account_id": "metadata.IntegrationID", "state": "Description.Subscription.State", "subscription_id": "Description.Subscription.SubscriptionID", "subscription_policies": "Description.Subscription.SubscriptionPolicies", @@ -24935,7 +20374,7 @@ func ListSubscription(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat plugin.Logger(ctx).Error("ListSubscription NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListSubscription GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -24951,7 +20390,7 @@ func ListSubscription(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat return nil, err } - paginator, err := k.NewSubscriptionPaginator(essdk.BuildFilter(ctx, d.QueryContext, listSubscriptionFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewSubscriptionPaginator(essdk.BuildFilter(ctx, d.QueryContext, listSubscriptionFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListSubscription NewSubscriptionPaginator", "error", err) return nil, err @@ -24981,6 +20420,7 @@ var getSubscriptionFilters = map[string]string{ "authorization_source": "Description.Subscription.AuthorizationSource", "display_name": "Description.Subscription.DisplayName", "id": "Description.Subscription.ID", + "platform_account_id": "metadata.IntegrationID", "state": "Description.Subscription.State", "subscription_id": "Description.Subscription.SubscriptionID", "subscription_policies": "Description.Subscription.SubscriptionPolicies", @@ -25004,7 +20444,7 @@ func GetSubscription(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -25018,7 +20458,7 @@ func GetSubscription(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate } limit := int64(1) - paginator, err := k.NewSubscriptionPaginator(essdk.BuildFilter(ctx, d.QueryContext, getSubscriptionFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewSubscriptionPaginator(essdk.BuildFilter(ctx, d.QueryContext, getSubscriptionFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -25049,7 +20489,7 @@ func GetSubscription(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate type ApplicationGateway struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.ApplicationGatewayDescription `json:"Description"` + Description azure.ApplicationGatewayDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -25057,59 +20497,6 @@ type ApplicationGateway struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type ApplicationGatewayHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -25190,6 +20577,7 @@ var listApplicationGatewayFilters = map[string]string{ "identity": "Description.ApplicationGateway.Identity", "name": "Description.ApplicationGateway.Name", "operational_state": "Description.ApplicationGateway.Properties.OperationalState", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.ApplicationGateway.Properties.ProvisioningState", "redirect_configurations": "Description.ApplicationGateway.Properties.RedirectConfigurations", "resource_group": "Description.ResourceGroup", @@ -25221,7 +20609,7 @@ func ListApplicationGateway(ctx context.Context, d *plugin.QueryData, _ *plugin. plugin.Logger(ctx).Error("ListApplicationGateway NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListApplicationGateway GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -25237,7 +20625,7 @@ func ListApplicationGateway(ctx context.Context, d *plugin.QueryData, _ *plugin. return nil, err } - paginator, err := k.NewApplicationGatewayPaginator(essdk.BuildFilter(ctx, d.QueryContext, listApplicationGatewayFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewApplicationGatewayPaginator(essdk.BuildFilter(ctx, d.QueryContext, listApplicationGatewayFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListApplicationGateway NewApplicationGatewayPaginator", "error", err) return nil, err @@ -25276,6 +20664,7 @@ var getApplicationGatewayFilters = map[string]string{ "identity": "Description.ApplicationGateway.Identity", "name": "description.ApplicationGateway.name", "operational_state": "Description.ApplicationGateway.Properties.OperationalState", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.ApplicationGateway.Properties.ProvisioningState", "redirect_configurations": "Description.ApplicationGateway.Properties.RedirectConfigurations", "resource_group": "description.ResourceGroup", @@ -25304,7 +20693,7 @@ func GetApplicationGateway(ctx context.Context, d *plugin.QueryData, _ *plugin.H if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -25318,7 +20707,7 @@ func GetApplicationGateway(ctx context.Context, d *plugin.QueryData, _ *plugin.H } limit := int64(1) - paginator, err := k.NewApplicationGatewayPaginator(essdk.BuildFilter(ctx, d.QueryContext, getApplicationGatewayFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewApplicationGatewayPaginator(essdk.BuildFilter(ctx, d.QueryContext, getApplicationGatewayFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -25349,7 +20738,7 @@ func GetApplicationGateway(ctx context.Context, d *plugin.QueryData, _ *plugin.H type BatchAccount struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.BatchAccountDescription `json:"Description"` + Description azure.BatchAccountDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -25357,59 +20746,6 @@ type BatchAccount struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type BatchAccountHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -25491,6 +20827,7 @@ var listBatchAccountFilters = map[string]string{ "key_vault_reference": "Description.Account.Properties.KeyVaultReference", "low_priority_core_quota": "Description.Account.Properties.LowPriorityCoreQuota", "name": "Description.Account.Name", + "platform_account_id": "metadata.IntegrationID", "pool_allocation_mode": "Description.Account.Properties.PoolAllocationMode", "pool_quota": "Description.Account.Properties.PoolQuota", "private_endpoint_connections": "Description.Account.Properties.PrivateEndpointConnections", @@ -25520,7 +20857,7 @@ func ListBatchAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat plugin.Logger(ctx).Error("ListBatchAccount NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListBatchAccount GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -25536,7 +20873,7 @@ func ListBatchAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat return nil, err } - paginator, err := k.NewBatchAccountPaginator(essdk.BuildFilter(ctx, d.QueryContext, listBatchAccountFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewBatchAccountPaginator(essdk.BuildFilter(ctx, d.QueryContext, listBatchAccountFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListBatchAccount NewBatchAccountPaginator", "error", err) return nil, err @@ -25576,6 +20913,7 @@ var getBatchAccountFilters = map[string]string{ "key_vault_reference": "Description.Account.Properties.KeyVaultReference", "low_priority_core_quota": "Description.Account.Properties.LowPriorityCoreQuota", "name": "description.Account.name", + "platform_account_id": "metadata.IntegrationID", "pool_allocation_mode": "Description.Account.Properties.PoolAllocationMode", "pool_quota": "Description.Account.Properties.PoolQuota", "private_endpoint_connections": "Description.Account.Properties.PrivateEndpointConnections", @@ -25602,7 +20940,7 @@ func GetBatchAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -25616,7 +20954,7 @@ func GetBatchAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate } limit := int64(1) - paginator, err := k.NewBatchAccountPaginator(essdk.BuildFilter(ctx, d.QueryContext, getBatchAccountFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewBatchAccountPaginator(essdk.BuildFilter(ctx, d.QueryContext, getBatchAccountFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -25647,7 +20985,7 @@ func GetBatchAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate type CognitiveAccount struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.CognitiveAccountDescription `json:"Description"` + Description azure.CognitiveAccountDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -25655,59 +20993,6 @@ type CognitiveAccount struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type CognitiveAccountHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -25795,6 +21080,7 @@ var listCognitiveAccountFilters = map[string]string{ "migration_token": "Description.Account.Properties.MigrationToken", "name": "Description.Account.Name", "network_acls": "Description.Account.Properties.NetworkACLs", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.Account.Properties.ProvisioningState", "public_network_access": "Description.Account.Properties.PublicNetworkAccess", "quota_limit": "Description.Account.Properties.QuotaLimit", @@ -25828,7 +21114,7 @@ func ListCognitiveAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy plugin.Logger(ctx).Error("ListCognitiveAccount NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListCognitiveAccount GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -25844,7 +21130,7 @@ func ListCognitiveAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy return nil, err } - paginator, err := k.NewCognitiveAccountPaginator(essdk.BuildFilter(ctx, d.QueryContext, listCognitiveAccountFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewCognitiveAccountPaginator(essdk.BuildFilter(ctx, d.QueryContext, listCognitiveAccountFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListCognitiveAccount NewCognitiveAccountPaginator", "error", err) return nil, err @@ -25890,6 +21176,7 @@ var getCognitiveAccountFilters = map[string]string{ "migration_token": "Description.Account.Properties.MigrationToken", "name": "description.Account.name", "network_acls": "Description.Account.Properties.NetworkACLs", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.Account.Properties.ProvisioningState", "public_network_access": "Description.Account.Properties.PublicNetworkAccess", "quota_limit": "Description.Account.Properties.QuotaLimit", @@ -25920,7 +21207,7 @@ func GetCognitiveAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -25934,7 +21221,7 @@ func GetCognitiveAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd } limit := int64(1) - paginator, err := k.NewCognitiveAccountPaginator(essdk.BuildFilter(ctx, d.QueryContext, getCognitiveAccountFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewCognitiveAccountPaginator(essdk.BuildFilter(ctx, d.QueryContext, getCognitiveAccountFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -25965,7 +21252,7 @@ func GetCognitiveAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd type ComputeVirtualMachine struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.ComputeVirtualMachineDescription `json:"Description"` + Description azure.ComputeVirtualMachineDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -25973,59 +21260,6 @@ type ComputeVirtualMachine struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type ComputeVirtualMachineHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -26129,6 +21363,7 @@ var listComputeVirtualMachineFilters = map[string]string{ "os_type": "Description.VirtualMachine.Properties.StorageProfile.OSDisk.OSType", "os_version": "Description.VirtualMachineInstanceView.OSVersion", "patch_settings": "Description.VirtualMachine.Properties.OSProfile.WindowsConfiguration.PatchSettings", + "platform_account_id": "metadata.IntegrationID", "priority": "Description.VirtualMachine.Properties.Priority", "provision_vm_agent": "Description.VirtualMachine.Properties.OSProfile.LinuxConfiguration.ProvisionVMAgent", "provision_vm_agent_windows": "Description.VirtualMachine.Properties.OSProfile.WindowsConfiguration.ProvisionVMAgent", @@ -26168,7 +21403,7 @@ func ListComputeVirtualMachine(ctx context.Context, d *plugin.QueryData, _ *plug plugin.Logger(ctx).Error("ListComputeVirtualMachine NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListComputeVirtualMachine GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -26184,7 +21419,7 @@ func ListComputeVirtualMachine(ctx context.Context, d *plugin.QueryData, _ *plug return nil, err } - paginator, err := k.NewComputeVirtualMachinePaginator(essdk.BuildFilter(ctx, d.QueryContext, listComputeVirtualMachineFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewComputeVirtualMachinePaginator(essdk.BuildFilter(ctx, d.QueryContext, listComputeVirtualMachineFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListComputeVirtualMachine NewComputeVirtualMachinePaginator", "error", err) return nil, err @@ -26246,6 +21481,7 @@ var getComputeVirtualMachineFilters = map[string]string{ "os_type": "Description.VirtualMachine.Properties.StorageProfile.OSDisk.OSType", "os_version": "Description.VirtualMachineInstanceView.OSVersion", "patch_settings": "Description.VirtualMachine.Properties.OSProfile.WindowsConfiguration.PatchSettings", + "platform_account_id": "metadata.IntegrationID", "priority": "Description.VirtualMachine.Properties.Priority", "provision_vm_agent": "Description.VirtualMachine.Properties.OSProfile.LinuxConfiguration.ProvisionVMAgent", "provision_vm_agent_windows": "Description.VirtualMachine.Properties.OSProfile.WindowsConfiguration.ProvisionVMAgent", @@ -26282,7 +21518,7 @@ func GetComputeVirtualMachine(ctx context.Context, d *plugin.QueryData, _ *plugi if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -26296,7 +21532,7 @@ func GetComputeVirtualMachine(ctx context.Context, d *plugin.QueryData, _ *plugi } limit := int64(1) - paginator, err := k.NewComputeVirtualMachinePaginator(essdk.BuildFilter(ctx, d.QueryContext, getComputeVirtualMachineFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewComputeVirtualMachinePaginator(essdk.BuildFilter(ctx, d.QueryContext, getComputeVirtualMachineFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -26327,7 +21563,7 @@ func GetComputeVirtualMachine(ctx context.Context, d *plugin.QueryData, _ *plugi type ComputeResourceSKU struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.ComputeResourceSKUDescription `json:"Description"` + Description azure.ComputeResourceSKUDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -26335,59 +21571,6 @@ type ComputeResourceSKU struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type ComputeResourceSKUHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -26456,19 +21639,20 @@ 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", - "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", + "platform_account_id": "metadata.IntegrationID", + "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) { @@ -26489,7 +21673,7 @@ func ListComputeResourceSKU(ctx context.Context, d *plugin.QueryData, _ *plugin. plugin.Logger(ctx).Error("ListComputeResourceSKU NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListComputeResourceSKU GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -26505,7 +21689,7 @@ func ListComputeResourceSKU(ctx context.Context, d *plugin.QueryData, _ *plugin. return nil, err } - paginator, err := k.NewComputeResourceSKUPaginator(essdk.BuildFilter(ctx, d.QueryContext, listComputeResourceSKUFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewComputeResourceSKUPaginator(essdk.BuildFilter(ctx, d.QueryContext, listComputeResourceSKUFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListComputeResourceSKU NewComputeResourceSKUPaginator", "error", err) return nil, err @@ -26532,19 +21716,20 @@ 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", - "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", + "platform_account_id": "metadata.IntegrationID", + "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) { @@ -26562,7 +21747,7 @@ func GetComputeResourceSKU(ctx context.Context, d *plugin.QueryData, _ *plugin.H if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -26576,7 +21761,7 @@ func GetComputeResourceSKU(ctx context.Context, d *plugin.QueryData, _ *plugin.H } limit := int64(1) - paginator, err := k.NewComputeResourceSKUPaginator(essdk.BuildFilter(ctx, d.QueryContext, getComputeResourceSKUFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewComputeResourceSKUPaginator(essdk.BuildFilter(ctx, d.QueryContext, getComputeResourceSKUFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -26607,7 +21792,7 @@ func GetComputeResourceSKU(ctx context.Context, d *plugin.QueryData, _ *plugin.H type ComputeCloudService struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.ComputeCloudServiceDescription `json:"Description"` + Description azure.ComputeCloudServiceDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -26615,59 +21800,6 @@ type ComputeCloudService struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type ComputeCloudServiceHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -26736,10 +21868,11 @@ func (p ComputeCloudServicePaginator) NextPage(ctx context.Context) ([]ComputeCl } var listComputeCloudServiceFilters = map[string]string{ - "id": "Description.CloudServices.ID", - "name": "Description.CloudService.Name", - "tags": "Description.CloudService.Tags", - "title": "Description.CloudService.Name", + "id": "Description.CloudServices.ID", + "name": "Description.CloudService.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.CloudService.Tags", + "title": "Description.CloudService.Name", } func ListComputeCloudService(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -26760,7 +21893,7 @@ func ListComputeCloudService(ctx context.Context, d *plugin.QueryData, _ *plugin plugin.Logger(ctx).Error("ListComputeCloudService NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListComputeCloudService GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -26776,7 +21909,7 @@ func ListComputeCloudService(ctx context.Context, d *plugin.QueryData, _ *plugin return nil, err } - paginator, err := k.NewComputeCloudServicePaginator(essdk.BuildFilter(ctx, d.QueryContext, listComputeCloudServiceFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewComputeCloudServicePaginator(essdk.BuildFilter(ctx, d.QueryContext, listComputeCloudServiceFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListComputeCloudService NewComputeCloudServicePaginator", "error", err) return nil, err @@ -26803,10 +21936,11 @@ func ListComputeCloudService(ctx context.Context, d *plugin.QueryData, _ *plugin } var getComputeCloudServiceFilters = map[string]string{ - "id": "Description.CloudServices.ID", - "name": "Description.CloudService.Name", - "tags": "Description.CloudService.Tags", - "title": "Description.CloudService.Name", + "id": "Description.CloudServices.ID", + "name": "Description.CloudService.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.CloudService.Tags", + "title": "Description.CloudService.Name", } func GetComputeCloudService(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -26824,7 +21958,7 @@ func GetComputeCloudService(ctx context.Context, d *plugin.QueryData, _ *plugin. if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -26838,7 +21972,7 @@ func GetComputeCloudService(ctx context.Context, d *plugin.QueryData, _ *plugin. } limit := int64(1) - paginator, err := k.NewComputeCloudServicePaginator(essdk.BuildFilter(ctx, d.QueryContext, getComputeCloudServiceFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewComputeCloudServicePaginator(essdk.BuildFilter(ctx, d.QueryContext, getComputeCloudServiceFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -26869,7 +22003,7 @@ func GetComputeCloudService(ctx context.Context, d *plugin.QueryData, _ *plugin. type ContainerRegistry struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.ContainerRegistryDescription `json:"Description"` + Description azure.ContainerRegistryDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -26877,59 +22011,6 @@ type ContainerRegistry struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type ContainerRegistryHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -27009,6 +22090,7 @@ var listContainerRegistryFilters = map[string]string{ "name": "Description.Registry.Name", "network_rule_bypass_options": "Description.Registry.Properties.NetworkRuleBypassOptions", "network_rule_set": "Description.Registry.Properties.NetworkRuleSet", + "platform_account_id": "metadata.IntegrationID", "policies": "Description.Registry.Properties.Policies", "private_endpoint_connections": "Description.Registry.Properties.PrivateEndpointConnections", "provisioning_state": "Description.Registry.Properties.ProvisioningState", @@ -27046,7 +22128,7 @@ func ListContainerRegistry(ctx context.Context, d *plugin.QueryData, _ *plugin.H plugin.Logger(ctx).Error("ListContainerRegistry NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListContainerRegistry GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -27062,7 +22144,7 @@ func ListContainerRegistry(ctx context.Context, d *plugin.QueryData, _ *plugin.H return nil, err } - paginator, err := k.NewContainerRegistryPaginator(essdk.BuildFilter(ctx, d.QueryContext, listContainerRegistryFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewContainerRegistryPaginator(essdk.BuildFilter(ctx, d.QueryContext, listContainerRegistryFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListContainerRegistry NewContainerRegistryPaginator", "error", err) return nil, err @@ -27100,6 +22182,7 @@ var getContainerRegistryFilters = map[string]string{ "name": "description.Registry.name", "network_rule_bypass_options": "Description.Registry.Properties.NetworkRuleBypassOptions", "network_rule_set": "Description.Registry.Properties.NetworkRuleSet", + "platform_account_id": "metadata.IntegrationID", "policies": "Description.Registry.Properties.Policies", "private_endpoint_connections": "Description.Registry.Properties.PrivateEndpointConnections", "provisioning_state": "Description.Registry.Properties.ProvisioningState", @@ -27134,7 +22217,7 @@ func GetContainerRegistry(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -27148,7 +22231,7 @@ func GetContainerRegistry(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy } limit := int64(1) - paginator, err := k.NewContainerRegistryPaginator(essdk.BuildFilter(ctx, d.QueryContext, getContainerRegistryFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewContainerRegistryPaginator(essdk.BuildFilter(ctx, d.QueryContext, getContainerRegistryFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -27179,7 +22262,7 @@ func GetContainerRegistry(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy type CosmosdbAccount struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.CosmosdbAccountDescription `json:"Description"` + Description azure.CosmosdbAccountDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -27187,59 +22270,6 @@ type CosmosdbAccount struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type CosmosdbAccountHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -27332,6 +22362,7 @@ var listCosmosdbAccountFilters = map[string]string{ "kind": "Description.DatabaseAccountGetResults.Kind", "locations": "Description.DatabaseAccountGetResults.Properties.Locations", "name": "Description.DatabaseAccountGetResults.Name", + "platform_account_id": "metadata.IntegrationID", "private_endpoint_connections": "Description.DatabaseAccountGetResults.Properties.PrivateEndpointConnections", "provisioning_state": "Description.DatabaseAccountGetResults.Properties.ProvisioningState", "public_network_access": "Description.DatabaseAccountGetResults.Properties.PublicNetworkAccess", @@ -27363,7 +22394,7 @@ func ListCosmosdbAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd plugin.Logger(ctx).Error("ListCosmosdbAccount NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListCosmosdbAccount GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -27379,7 +22410,7 @@ func ListCosmosdbAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd return nil, err } - paginator, err := k.NewCosmosdbAccountPaginator(essdk.BuildFilter(ctx, d.QueryContext, listCosmosdbAccountFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewCosmosdbAccountPaginator(essdk.BuildFilter(ctx, d.QueryContext, listCosmosdbAccountFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListCosmosdbAccount NewCosmosdbAccountPaginator", "error", err) return nil, err @@ -27430,6 +22461,7 @@ var getCosmosdbAccountFilters = map[string]string{ "kind": "Description.DatabaseAccountGetResults.Kind", "locations": "Description.DatabaseAccountGetResults.Properties.Locations", "name": "description.DatabaseAccountGetResults.name", + "platform_account_id": "metadata.IntegrationID", "private_endpoint_connections": "Description.DatabaseAccountGetResults.Properties.PrivateEndpointConnections", "provisioning_state": "Description.DatabaseAccountGetResults.Properties.ProvisioningState", "public_network_access": "Description.DatabaseAccountGetResults.Properties.PublicNetworkAccess", @@ -27459,7 +22491,7 @@ func GetCosmosdbAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -27473,7 +22505,7 @@ func GetCosmosdbAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr } limit := int64(1) - paginator, err := k.NewCosmosdbAccountPaginator(essdk.BuildFilter(ctx, d.QueryContext, getCosmosdbAccountFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewCosmosdbAccountPaginator(essdk.BuildFilter(ctx, d.QueryContext, getCosmosdbAccountFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -27504,7 +22536,7 @@ func GetCosmosdbAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr type CosmosdbRestorableDatabaseAccount struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.CosmosdbRestorableDatabaseAccountDescription `json:"Description"` + Description azure.CosmosdbRestorableDatabaseAccountDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -27512,59 +22544,6 @@ type CosmosdbRestorableDatabaseAccount struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type CosmosdbRestorableDatabaseAccountHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -27639,6 +22618,7 @@ var listCosmosdbRestorableDatabaseAccountFilters = map[string]string{ "deletion_time": "Description.Account.Properties.DeletionTime", "id": "Description.Account.ID", "name": "Description.Account.Name", + "platform_account_id": "metadata.IntegrationID", "resource_group": "Description.ResourceGroup", "restorable_locations": "Description.Account.Properties.RestorableLocations", "title": "Description.Account.Name", @@ -27663,7 +22643,7 @@ func ListCosmosdbRestorableDatabaseAccount(ctx context.Context, d *plugin.QueryD plugin.Logger(ctx).Error("ListCosmosdbRestorableDatabaseAccount NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListCosmosdbRestorableDatabaseAccount GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -27679,7 +22659,7 @@ func ListCosmosdbRestorableDatabaseAccount(ctx context.Context, d *plugin.QueryD return nil, err } - paginator, err := k.NewCosmosdbRestorableDatabaseAccountPaginator(essdk.BuildFilter(ctx, d.QueryContext, listCosmosdbRestorableDatabaseAccountFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewCosmosdbRestorableDatabaseAccountPaginator(essdk.BuildFilter(ctx, d.QueryContext, listCosmosdbRestorableDatabaseAccountFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListCosmosdbRestorableDatabaseAccount NewCosmosdbRestorableDatabaseAccountPaginator", "error", err) return nil, err @@ -27712,6 +22692,7 @@ var getCosmosdbRestorableDatabaseAccountFilters = map[string]string{ "deletion_time": "Description.Account.Properties.DeletionTime", "id": "Description.Account.ID", "name": "description.Account.Name", + "platform_account_id": "metadata.IntegrationID", "resource_group": "description.ResourceGroup", "restorable_locations": "Description.Account.Properties.RestorableLocations", "title": "Description.Account.Name", @@ -27733,7 +22714,7 @@ func GetCosmosdbRestorableDatabaseAccount(ctx context.Context, d *plugin.QueryDa if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -27747,7 +22728,7 @@ func GetCosmosdbRestorableDatabaseAccount(ctx context.Context, d *plugin.QueryDa } limit := int64(1) - paginator, err := k.NewCosmosdbRestorableDatabaseAccountPaginator(essdk.BuildFilter(ctx, d.QueryContext, getCosmosdbRestorableDatabaseAccountFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewCosmosdbRestorableDatabaseAccountPaginator(essdk.BuildFilter(ctx, d.QueryContext, getCosmosdbRestorableDatabaseAccountFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -27778,7 +22759,7 @@ func GetCosmosdbRestorableDatabaseAccount(ctx context.Context, d *plugin.QueryDa type CosmosdbMongoDatabase struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.CosmosdbMongoDatabaseDescription `json:"Description"` + Description azure.CosmosdbMongoDatabaseDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -27786,59 +22767,6 @@ type CosmosdbMongoDatabase struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type CosmosdbMongoDatabaseHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -27914,6 +22842,7 @@ var listCosmosdbMongoDatabaseFilters = map[string]string{ "database_rid": "Description.MongoDatabase.Properties.Resource.Rid", "id": "Description.MongoDatabase.ID", "name": "Description.MongoDatabase.Name", + "platform_account_id": "metadata.IntegrationID", "tags": "Description.MongoDatabase.Tags", "throughput": "Description.MongoDatabase.Properties.Options.Throughput", "throughput_settings": "Description.MongoDatabase.Properties.Options.Throughput.ThroughputSettingsGetResults.Properties.Resource", @@ -27939,7 +22868,7 @@ func ListCosmosdbMongoDatabase(ctx context.Context, d *plugin.QueryData, _ *plug plugin.Logger(ctx).Error("ListCosmosdbMongoDatabase NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListCosmosdbMongoDatabase GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -27955,7 +22884,7 @@ func ListCosmosdbMongoDatabase(ctx context.Context, d *plugin.QueryData, _ *plug return nil, err } - paginator, err := k.NewCosmosdbMongoDatabasePaginator(essdk.BuildFilter(ctx, d.QueryContext, listCosmosdbMongoDatabaseFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewCosmosdbMongoDatabasePaginator(essdk.BuildFilter(ctx, d.QueryContext, listCosmosdbMongoDatabaseFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListCosmosdbMongoDatabase NewCosmosdbMongoDatabasePaginator", "error", err) return nil, err @@ -27989,6 +22918,7 @@ var getCosmosdbMongoDatabaseFilters = map[string]string{ "database_rid": "Description.MongoDatabase.Properties.Resource.Rid", "id": "Description.MongoDatabase.ID", "name": "description.MongoDatabase.name", + "platform_account_id": "metadata.IntegrationID", "resource_group": "description.ResourceGroup", "tags": "Description.MongoDatabase.Tags", "throughput": "Description.MongoDatabase.Properties.Options.Throughput", @@ -28012,7 +22942,7 @@ func GetCosmosdbMongoDatabase(ctx context.Context, d *plugin.QueryData, _ *plugi if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -28026,7 +22956,7 @@ func GetCosmosdbMongoDatabase(ctx context.Context, d *plugin.QueryData, _ *plugi } limit := int64(1) - paginator, err := k.NewCosmosdbMongoDatabasePaginator(essdk.BuildFilter(ctx, d.QueryContext, getCosmosdbMongoDatabaseFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewCosmosdbMongoDatabasePaginator(essdk.BuildFilter(ctx, d.QueryContext, getCosmosdbMongoDatabaseFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -28057,7 +22987,7 @@ func GetCosmosdbMongoDatabase(ctx context.Context, d *plugin.QueryData, _ *plugi type CosmosdbMongoCollection struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.CosmosdbMongoCollectionDescription `json:"Description"` + Description azure.CosmosdbMongoCollectionDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -28065,59 +22995,6 @@ type CosmosdbMongoCollection struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type CosmosdbMongoCollectionHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -28196,6 +23073,7 @@ var listCosmosdbMongoCollectionFilters = map[string]string{ "id": "Description.MongoCollection.ID", "indexes": "Description.MongoCollection.Properties.Resource.Indexes", "name": "Description.MongoCollection.Name", + "platform_account_id": "metadata.IntegrationID", "resource_group": "Description.ResourceGroup", "shard_key": "Description.MongoCollection.Properties.Resource.ShardKey", "tags": "Description.MongoCollection.Tags", @@ -28223,7 +23101,7 @@ func ListCosmosdbMongoCollection(ctx context.Context, d *plugin.QueryData, _ *pl plugin.Logger(ctx).Error("ListCosmosdbMongoCollection NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListCosmosdbMongoCollection GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -28239,7 +23117,7 @@ func ListCosmosdbMongoCollection(ctx context.Context, d *plugin.QueryData, _ *pl return nil, err } - paginator, err := k.NewCosmosdbMongoCollectionPaginator(essdk.BuildFilter(ctx, d.QueryContext, listCosmosdbMongoCollectionFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewCosmosdbMongoCollectionPaginator(essdk.BuildFilter(ctx, d.QueryContext, listCosmosdbMongoCollectionFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListCosmosdbMongoCollection NewCosmosdbMongoCollectionPaginator", "error", err) return nil, err @@ -28276,6 +23154,7 @@ var getCosmosdbMongoCollectionFilters = map[string]string{ "id": "Description.MongoCollection.ID", "indexes": "Description.MongoCollection.Properties.Resource.Indexes", "name": "description.MongoCollection.name", + "platform_account_id": "metadata.IntegrationID", "resource_group": "description.ResourceGroup", "shard_key": "Description.MongoCollection.Properties.Resource.ShardKey", "tags": "Description.MongoCollection.Tags", @@ -28300,7 +23179,7 @@ func GetCosmosdbMongoCollection(ctx context.Context, d *plugin.QueryData, _ *plu if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -28314,7 +23193,7 @@ func GetCosmosdbMongoCollection(ctx context.Context, d *plugin.QueryData, _ *plu } limit := int64(1) - paginator, err := k.NewCosmosdbMongoCollectionPaginator(essdk.BuildFilter(ctx, d.QueryContext, getCosmosdbMongoCollectionFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewCosmosdbMongoCollectionPaginator(essdk.BuildFilter(ctx, d.QueryContext, getCosmosdbMongoCollectionFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -28345,7 +23224,7 @@ func GetCosmosdbMongoCollection(ctx context.Context, d *plugin.QueryData, _ *plu type CosmosdbSqlDatabase struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.CosmosdbSqlDatabaseDescription `json:"Description"` + Description azure.CosmosdbSqlDatabaseDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -28353,59 +23232,6 @@ type CosmosdbSqlDatabase struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type CosmosdbSqlDatabaseHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -28483,6 +23309,7 @@ var listCosmosdbSqlDatabaseFilters = map[string]string{ "database_users": "Description.SqlDatabase.Properties.Resource.Users", "id": "Description.SqlDatabase.ID", "name": "Description.SqlDatabase.Name", + "platform_account_id": "metadata.IntegrationID", "tags": "Description.SqlDatabase.Tags", "throughput": "Description.SqlDatabase.Properties.Options.Throughput", "title": "Description.SqlDatabase.Name", @@ -28507,7 +23334,7 @@ func ListCosmosdbSqlDatabase(ctx context.Context, d *plugin.QueryData, _ *plugin plugin.Logger(ctx).Error("ListCosmosdbSqlDatabase NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListCosmosdbSqlDatabase GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -28523,7 +23350,7 @@ func ListCosmosdbSqlDatabase(ctx context.Context, d *plugin.QueryData, _ *plugin return nil, err } - paginator, err := k.NewCosmosdbSqlDatabasePaginator(essdk.BuildFilter(ctx, d.QueryContext, listCosmosdbSqlDatabaseFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewCosmosdbSqlDatabasePaginator(essdk.BuildFilter(ctx, d.QueryContext, listCosmosdbSqlDatabaseFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListCosmosdbSqlDatabase NewCosmosdbSqlDatabasePaginator", "error", err) return nil, err @@ -28559,6 +23386,7 @@ var getCosmosdbSqlDatabaseFilters = map[string]string{ "database_users": "Description.SqlDatabase.Properties.Resource.Users", "id": "Description.SqlDatabase.ID", "name": "description.SqlDatabase.name", + "platform_account_id": "metadata.IntegrationID", "resource_group": "description.ResourceGroup", "tags": "Description.SqlDatabase.Tags", "throughput": "Description.SqlDatabase.Properties.Options.Throughput", @@ -28581,7 +23409,7 @@ func GetCosmosdbSqlDatabase(ctx context.Context, d *plugin.QueryData, _ *plugin. if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -28595,7 +23423,7 @@ func GetCosmosdbSqlDatabase(ctx context.Context, d *plugin.QueryData, _ *plugin. } limit := int64(1) - paginator, err := k.NewCosmosdbSqlDatabasePaginator(essdk.BuildFilter(ctx, d.QueryContext, getCosmosdbSqlDatabaseFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewCosmosdbSqlDatabasePaginator(essdk.BuildFilter(ctx, d.QueryContext, getCosmosdbSqlDatabaseFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -28626,7 +23454,7 @@ func GetCosmosdbSqlDatabase(ctx context.Context, d *plugin.QueryData, _ *plugin. type CosmosdbCassandraCluster struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.CosmosdbCassandraClusterDescription `json:"Description"` + Description azure.CosmosdbCassandraClusterDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -28634,59 +23462,6 @@ type CosmosdbCassandraCluster struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type CosmosdbCassandraClusterHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -28779,7 +23554,7 @@ func ListCosmosdbCassandraCluster(ctx context.Context, d *plugin.QueryData, _ *p plugin.Logger(ctx).Error("ListCosmosdbCassandraCluster NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListCosmosdbCassandraCluster GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -28795,7 +23570,7 @@ func ListCosmosdbCassandraCluster(ctx context.Context, d *plugin.QueryData, _ *p return nil, err } - paginator, err := k.NewCosmosdbCassandraClusterPaginator(essdk.BuildFilter(ctx, d.QueryContext, listCosmosdbCassandraClusterFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewCosmosdbCassandraClusterPaginator(essdk.BuildFilter(ctx, d.QueryContext, listCosmosdbCassandraClusterFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListCosmosdbCassandraCluster NewCosmosdbCassandraClusterPaginator", "error", err) return nil, err @@ -28843,7 +23618,7 @@ func GetCosmosdbCassandraCluster(ctx context.Context, d *plugin.QueryData, _ *pl if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -28857,7 +23632,7 @@ func GetCosmosdbCassandraCluster(ctx context.Context, d *plugin.QueryData, _ *pl } limit := int64(1) - paginator, err := k.NewCosmosdbCassandraClusterPaginator(essdk.BuildFilter(ctx, d.QueryContext, getCosmosdbCassandraClusterFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewCosmosdbCassandraClusterPaginator(essdk.BuildFilter(ctx, d.QueryContext, getCosmosdbCassandraClusterFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -28888,7 +23663,7 @@ func GetCosmosdbCassandraCluster(ctx context.Context, d *plugin.QueryData, _ *pl type DatabricksWorkspace struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.DatabricksWorkspaceDescription `json:"Description"` + Description azure.DatabricksWorkspaceDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -28896,59 +23671,6 @@ type DatabricksWorkspace struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type DatabricksWorkspaceHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -29024,6 +23746,7 @@ var listDatabricksWorkspaceFilters = map[string]string{ "managed_resource_group_id": "Description.Workspace.Properties.ManagedResourceGroupID", "name": "Description.Workspace.Name", "parameters": "Description.Workspace.Properties.Parameters", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.Workspace.Properties.ProvisioningState", "resource_group": "Description.ResourceGroup", "sku": "Description.Workspace.SKU", @@ -29055,7 +23778,7 @@ func ListDatabricksWorkspace(ctx context.Context, d *plugin.QueryData, _ *plugin plugin.Logger(ctx).Error("ListDatabricksWorkspace NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListDatabricksWorkspace GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -29071,7 +23794,7 @@ func ListDatabricksWorkspace(ctx context.Context, d *plugin.QueryData, _ *plugin return nil, err } - paginator, err := k.NewDatabricksWorkspacePaginator(essdk.BuildFilter(ctx, d.QueryContext, listDatabricksWorkspaceFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewDatabricksWorkspacePaginator(essdk.BuildFilter(ctx, d.QueryContext, listDatabricksWorkspaceFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListDatabricksWorkspace NewDatabricksWorkspacePaginator", "error", err) return nil, err @@ -29105,6 +23828,7 @@ var getDatabricksWorkspaceFilters = map[string]string{ "managed_resource_group_id": "Description.Workspace.Properties.ManagedResourceGroupID", "name": "Description.Workspace.Name", "parameters": "Description.Workspace.Properties.Parameters", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.Workspace.Properties.ProvisioningState", "resource_group": "Description.ResourceGroup", "sku": "Description.Workspace.SKU", @@ -29133,7 +23857,7 @@ func GetDatabricksWorkspace(ctx context.Context, d *plugin.QueryData, _ *plugin. if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -29147,7 +23871,7 @@ func GetDatabricksWorkspace(ctx context.Context, d *plugin.QueryData, _ *plugin. } limit := int64(1) - paginator, err := k.NewDatabricksWorkspacePaginator(essdk.BuildFilter(ctx, d.QueryContext, getDatabricksWorkspaceFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewDatabricksWorkspacePaginator(essdk.BuildFilter(ctx, d.QueryContext, getDatabricksWorkspaceFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -29178,7 +23902,7 @@ func GetDatabricksWorkspace(ctx context.Context, d *plugin.QueryData, _ *plugin. type DataMigrationService struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.DataMigrationServiceDescription `json:"Description"` + Description azure.DataMigrationServiceDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -29186,59 +23910,6 @@ type DataMigrationService struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type DataMigrationServiceHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -29307,10 +23978,11 @@ func (p DataMigrationServicePaginator) NextPage(ctx context.Context) ([]DataMigr } var listDataMigrationServiceFilters = map[string]string{ - "id": "Description.Service.ID", - "name": "Description.Service.Name", - "tags": "Description.Service.Tags", - "title": "Description.Service.Name", + "id": "Description.Service.ID", + "name": "Description.Service.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.Service.Tags", + "title": "Description.Service.Name", } func ListDataMigrationService(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -29331,7 +24003,7 @@ func ListDataMigrationService(ctx context.Context, d *plugin.QueryData, _ *plugi plugin.Logger(ctx).Error("ListDataMigrationService NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListDataMigrationService GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -29347,7 +24019,7 @@ func ListDataMigrationService(ctx context.Context, d *plugin.QueryData, _ *plugi return nil, err } - paginator, err := k.NewDataMigrationServicePaginator(essdk.BuildFilter(ctx, d.QueryContext, listDataMigrationServiceFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewDataMigrationServicePaginator(essdk.BuildFilter(ctx, d.QueryContext, listDataMigrationServiceFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListDataMigrationService NewDataMigrationServicePaginator", "error", err) return nil, err @@ -29374,10 +24046,11 @@ func ListDataMigrationService(ctx context.Context, d *plugin.QueryData, _ *plugi } var getDataMigrationServiceFilters = map[string]string{ - "id": "Description.Service.ID", - "name": "Description.Service.Name", - "tags": "Description.Service.Tags", - "title": "Description.Service.Name", + "id": "Description.Service.ID", + "name": "Description.Service.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.Service.Tags", + "title": "Description.Service.Name", } func GetDataMigrationService(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -29395,7 +24068,7 @@ func GetDataMigrationService(ctx context.Context, d *plugin.QueryData, _ *plugin if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -29409,7 +24082,7 @@ func GetDataMigrationService(ctx context.Context, d *plugin.QueryData, _ *plugin } limit := int64(1) - paginator, err := k.NewDataMigrationServicePaginator(essdk.BuildFilter(ctx, d.QueryContext, getDataMigrationServiceFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewDataMigrationServicePaginator(essdk.BuildFilter(ctx, d.QueryContext, getDataMigrationServiceFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -29440,7 +24113,7 @@ func GetDataMigrationService(ctx context.Context, d *plugin.QueryData, _ *plugin type DataProtectionBackupVaults struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.DataProtectionBackupVaultsDescription `json:"Description"` + Description azure.DataProtectionBackupVaultsDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -29448,59 +24121,6 @@ type DataProtectionBackupVaults struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type DataProtectionBackupVaultsHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -29573,6 +24193,7 @@ var listDataProtectionBackupVaultsFilters = map[string]string{ "identity": "Description.BackupVaults.Identity", "monitoring_settings": "Description.BackupVaults.Properties.MonitoringSettings", "name": "Description.BackupVaults.Name", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.BackupVaults.Properties.ProvisioningState", "resource_move_state": "Description.BackupVaults.Properties.ResourceMoveState", "storage_settings": "Description.BackupVaults.Properties.StorageSettings", @@ -29600,7 +24221,7 @@ func ListDataProtectionBackupVaults(ctx context.Context, d *plugin.QueryData, _ plugin.Logger(ctx).Error("ListDataProtectionBackupVaults NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListDataProtectionBackupVaults GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -29616,7 +24237,7 @@ func ListDataProtectionBackupVaults(ctx context.Context, d *plugin.QueryData, _ return nil, err } - paginator, err := k.NewDataProtectionBackupVaultsPaginator(essdk.BuildFilter(ctx, d.QueryContext, listDataProtectionBackupVaultsFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewDataProtectionBackupVaultsPaginator(essdk.BuildFilter(ctx, d.QueryContext, listDataProtectionBackupVaultsFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListDataProtectionBackupVaults NewDataProtectionBackupVaultsPaginator", "error", err) return nil, err @@ -29647,6 +24268,7 @@ var getDataProtectionBackupVaultsFilters = map[string]string{ "identity": "Description.BackupVaults.Identity", "monitoring_settings": "Description.BackupVaults.Properties.MonitoringSettings", "name": "Description.BackupVaults.Name", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.BackupVaults.Properties.ProvisioningState", "resource_move_state": "Description.BackupVaults.Properties.ResourceMoveState", "storage_settings": "Description.BackupVaults.Properties.StorageSettings", @@ -29671,7 +24293,7 @@ func GetDataProtectionBackupVaults(ctx context.Context, d *plugin.QueryData, _ * if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -29685,7 +24307,7 @@ func GetDataProtectionBackupVaults(ctx context.Context, d *plugin.QueryData, _ * } limit := int64(1) - paginator, err := k.NewDataProtectionBackupVaultsPaginator(essdk.BuildFilter(ctx, d.QueryContext, getDataProtectionBackupVaultsFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewDataProtectionBackupVaultsPaginator(essdk.BuildFilter(ctx, d.QueryContext, getDataProtectionBackupVaultsFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -29716,7 +24338,7 @@ func GetDataProtectionBackupVaults(ctx context.Context, d *plugin.QueryData, _ * type DataProtectionBackupVaultsBackupPolicies struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.DataProtectionBackupVaultsBackupPoliciesDescription `json:"Description"` + Description azure.DataProtectionBackupVaultsBackupPoliciesDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -29724,59 +24346,6 @@ type DataProtectionBackupVaultsBackupPolicies struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type DataProtectionBackupVaultsBackupPoliciesHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -29845,9 +24414,10 @@ func (p DataProtectionBackupVaultsBackupPoliciesPaginator) NextPage(ctx context. } var listDataProtectionBackupVaultsBackupPoliciesFilters = map[string]string{ - "id": "Description.BackupPolicies.ID", - "name": "Description.BackupPolicies.Name", - "title": "Description.BackupPolicies.Name", + "id": "Description.BackupPolicies.ID", + "name": "Description.BackupPolicies.Name", + "platform_account_id": "metadata.IntegrationID", + "title": "Description.BackupPolicies.Name", } func ListDataProtectionBackupVaultsBackupPolicies(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -29868,7 +24438,7 @@ func ListDataProtectionBackupVaultsBackupPolicies(ctx context.Context, d *plugin plugin.Logger(ctx).Error("ListDataProtectionBackupVaultsBackupPolicies NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListDataProtectionBackupVaultsBackupPolicies GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -29884,7 +24454,7 @@ func ListDataProtectionBackupVaultsBackupPolicies(ctx context.Context, d *plugin return nil, err } - paginator, err := k.NewDataProtectionBackupVaultsBackupPoliciesPaginator(essdk.BuildFilter(ctx, d.QueryContext, listDataProtectionBackupVaultsBackupPoliciesFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewDataProtectionBackupVaultsBackupPoliciesPaginator(essdk.BuildFilter(ctx, d.QueryContext, listDataProtectionBackupVaultsBackupPoliciesFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListDataProtectionBackupVaultsBackupPolicies NewDataProtectionBackupVaultsBackupPoliciesPaginator", "error", err) return nil, err @@ -29911,9 +24481,10 @@ func ListDataProtectionBackupVaultsBackupPolicies(ctx context.Context, d *plugin } var getDataProtectionBackupVaultsBackupPoliciesFilters = map[string]string{ - "id": "Description.BackupPolicies.ID", - "name": "Description.BackupPolicies.Name", - "title": "Description.BackupPolicies.Name", + "id": "Description.BackupPolicies.ID", + "name": "Description.BackupPolicies.Name", + "platform_account_id": "metadata.IntegrationID", + "title": "Description.BackupPolicies.Name", } func GetDataProtectionBackupVaultsBackupPolicies(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -29931,7 +24502,7 @@ func GetDataProtectionBackupVaultsBackupPolicies(ctx context.Context, d *plugin. if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -29945,7 +24516,7 @@ func GetDataProtectionBackupVaultsBackupPolicies(ctx context.Context, d *plugin. } limit := int64(1) - paginator, err := k.NewDataProtectionBackupVaultsBackupPoliciesPaginator(essdk.BuildFilter(ctx, d.QueryContext, getDataProtectionBackupVaultsBackupPoliciesFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewDataProtectionBackupVaultsBackupPoliciesPaginator(essdk.BuildFilter(ctx, d.QueryContext, getDataProtectionBackupVaultsBackupPoliciesFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -29976,7 +24547,7 @@ func GetDataProtectionBackupVaultsBackupPolicies(ctx context.Context, d *plugin. type DataProtectionJob struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.DataProtectionJobDescription `json:"Description"` + Description azure.DataProtectionJobDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -29984,59 +24555,6 @@ type DataProtectionJob struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type DataProtectionJobHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -30158,7 +24676,7 @@ func ListDataProtectionJob(ctx context.Context, d *plugin.QueryData, _ *plugin.H plugin.Logger(ctx).Error("ListDataProtectionJob NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListDataProtectionJob GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -30174,7 +24692,7 @@ func ListDataProtectionJob(ctx context.Context, d *plugin.QueryData, _ *plugin.H return nil, err } - paginator, err := k.NewDataProtectionJobPaginator(essdk.BuildFilter(ctx, d.QueryContext, listDataProtectionJobFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewDataProtectionJobPaginator(essdk.BuildFilter(ctx, d.QueryContext, listDataProtectionJobFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListDataProtectionJob NewDataProtectionJobPaginator", "error", err) return nil, err @@ -30251,7 +24769,7 @@ func GetDataProtectionJob(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -30265,7 +24783,7 @@ func GetDataProtectionJob(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy } limit := int64(1) - paginator, err := k.NewDataProtectionJobPaginator(essdk.BuildFilter(ctx, d.QueryContext, getDataProtectionJobFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewDataProtectionJobPaginator(essdk.BuildFilter(ctx, d.QueryContext, getDataProtectionJobFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -30296,7 +24814,7 @@ func GetDataProtectionJob(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy type DataFactory struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.DataFactoryDescription `json:"Description"` + Description azure.DataFactoryDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -30304,59 +24822,6 @@ type DataFactory struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type DataFactoryHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -30432,6 +24897,7 @@ var listDataFactoryFilters = map[string]string{ "id": "Description.Factory.ID", "identity": "Description.Factory.Identity", "name": "Description.Factory.Name", + "platform_account_id": "metadata.IntegrationID", "private_endpoint_connections": "Description.PrivateEndPointConnections", "provisioning_state": "Description.Factory.Properties.ProvisioningState", "public_network_access": "Description.Factory.Properties.PublicNetworkAccess", @@ -30461,7 +24927,7 @@ func ListDataFactory(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate plugin.Logger(ctx).Error("ListDataFactory NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListDataFactory GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -30477,7 +24943,7 @@ func ListDataFactory(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate return nil, err } - paginator, err := k.NewDataFactoryPaginator(essdk.BuildFilter(ctx, d.QueryContext, listDataFactoryFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewDataFactoryPaginator(essdk.BuildFilter(ctx, d.QueryContext, listDataFactoryFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListDataFactory NewDataFactoryPaginator", "error", err) return nil, err @@ -30511,6 +24977,7 @@ var getDataFactoryFilters = map[string]string{ "id": "Description.Factory.ID", "identity": "Description.Factory.Identity", "name": "description.Factory.name", + "platform_account_id": "metadata.IntegrationID", "private_endpoint_connections": "Description.PrivateEndPointConnections", "provisioning_state": "Description.Factory.Properties.ProvisioningState", "public_network_access": "Description.Factory.Properties.PublicNetworkAccess", @@ -30537,7 +25004,7 @@ func GetDataFactory(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -30551,7 +25018,7 @@ func GetDataFactory(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD } limit := int64(1) - paginator, err := k.NewDataFactoryPaginator(essdk.BuildFilter(ctx, d.QueryContext, getDataFactoryFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewDataFactoryPaginator(essdk.BuildFilter(ctx, d.QueryContext, getDataFactoryFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -30582,7 +25049,7 @@ func GetDataFactory(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD type DataFactoryDataset struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.DataFactoryDatasetDescription `json:"Description"` + Description azure.DataFactoryDatasetDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -30590,59 +25057,6 @@ type DataFactoryDataset struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type DataFactoryDatasetHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -30711,14 +25125,15 @@ 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", - "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", + "platform_account_id": "metadata.IntegrationID", + "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) { @@ -30739,7 +25154,7 @@ func ListDataFactoryDataset(ctx context.Context, d *plugin.QueryData, _ *plugin. plugin.Logger(ctx).Error("ListDataFactoryDataset NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListDataFactoryDataset GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -30755,7 +25170,7 @@ func ListDataFactoryDataset(ctx context.Context, d *plugin.QueryData, _ *plugin. return nil, err } - paginator, err := k.NewDataFactoryDatasetPaginator(essdk.BuildFilter(ctx, d.QueryContext, listDataFactoryDatasetFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewDataFactoryDatasetPaginator(essdk.BuildFilter(ctx, d.QueryContext, listDataFactoryDatasetFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListDataFactoryDataset NewDataFactoryDatasetPaginator", "error", err) return nil, err @@ -30782,14 +25197,15 @@ func ListDataFactoryDataset(ctx context.Context, d *plugin.QueryData, _ *plugin. } var getDataFactoryDatasetFilters = map[string]string{ - "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", + "etag": "Description.Dataset.Etag", + "factory_name": "description.Factory.name", + "id": "Description.Dataset.ID", + "name": "description.Dataset.name", + "platform_account_id": "metadata.IntegrationID", + "properties": "Description.Dataset.Properties", + "resource_group": "description.ResourceGroup", + "title": "Description.Dataset.Name", + "type": "Description.Dataset.Type", } func GetDataFactoryDataset(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -30807,7 +25223,7 @@ func GetDataFactoryDataset(ctx context.Context, d *plugin.QueryData, _ *plugin.H if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -30821,7 +25237,7 @@ func GetDataFactoryDataset(ctx context.Context, d *plugin.QueryData, _ *plugin.H } limit := int64(1) - paginator, err := k.NewDataFactoryDatasetPaginator(essdk.BuildFilter(ctx, d.QueryContext, getDataFactoryDatasetFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewDataFactoryDatasetPaginator(essdk.BuildFilter(ctx, d.QueryContext, getDataFactoryDatasetFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -30852,7 +25268,7 @@ func GetDataFactoryDataset(ctx context.Context, d *plugin.QueryData, _ *plugin.H type DataFactoryPipeline struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.DataFactoryPipelineDescription `json:"Description"` + Description azure.DataFactoryPipelineDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -30860,59 +25276,6 @@ type DataFactoryPipeline struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type DataFactoryPipelineHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -30981,22 +25344,23 @@ 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", - "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", + "platform_account_id": "metadata.IntegrationID", + "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) { @@ -31017,7 +25381,7 @@ func ListDataFactoryPipeline(ctx context.Context, d *plugin.QueryData, _ *plugin plugin.Logger(ctx).Error("ListDataFactoryPipeline NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListDataFactoryPipeline GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -31033,7 +25397,7 @@ func ListDataFactoryPipeline(ctx context.Context, d *plugin.QueryData, _ *plugin return nil, err } - paginator, err := k.NewDataFactoryPipelinePaginator(essdk.BuildFilter(ctx, d.QueryContext, listDataFactoryPipelineFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewDataFactoryPipelinePaginator(essdk.BuildFilter(ctx, d.QueryContext, listDataFactoryPipelineFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListDataFactoryPipeline NewDataFactoryPipelinePaginator", "error", err) return nil, err @@ -31060,22 +25424,23 @@ 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", - "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", + "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", + "platform_account_id": "metadata.IntegrationID", + "resource_group": "description.ResourceGroup", + "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) { @@ -31093,7 +25458,7 @@ func GetDataFactoryPipeline(ctx context.Context, d *plugin.QueryData, _ *plugin. if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -31107,7 +25472,7 @@ func GetDataFactoryPipeline(ctx context.Context, d *plugin.QueryData, _ *plugin. } limit := int64(1) - paginator, err := k.NewDataFactoryPipelinePaginator(essdk.BuildFilter(ctx, d.QueryContext, getDataFactoryPipelineFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewDataFactoryPipelinePaginator(essdk.BuildFilter(ctx, d.QueryContext, getDataFactoryPipelineFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -31138,7 +25503,7 @@ func GetDataFactoryPipeline(ctx context.Context, d *plugin.QueryData, _ *plugin. type DataLakeAnalyticsAccount struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.DataLakeAnalyticsAccountDescription `json:"Description"` + Description azure.DataLakeAnalyticsAccountDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -31146,59 +25511,6 @@ type DataLakeAnalyticsAccount struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type DataLakeAnalyticsAccountHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -31284,6 +25596,7 @@ var listDataLakeAnalyticsAccountFilters = map[string]string{ "min_priority_per_job": "Description.DataLakeAnalyticsAccount.Properties.MinPriorityPerJob", "name": "Description.DataLakeAnalyticsAccount.Name", "new_tier": "Description.DataLakeAnalyticsAccount.Properties.NewTier", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.DataLakeAnalyticsAccount.Properties.ProvisioningState", "query_store_retention": "Description.DataLakeAnalyticsAccount.Properties.QueryStoreRetention", "resource_group": "Description.ResourceGroup", @@ -31314,7 +25627,7 @@ func ListDataLakeAnalyticsAccount(ctx context.Context, d *plugin.QueryData, _ *p plugin.Logger(ctx).Error("ListDataLakeAnalyticsAccount NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListDataLakeAnalyticsAccount GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -31330,7 +25643,7 @@ func ListDataLakeAnalyticsAccount(ctx context.Context, d *plugin.QueryData, _ *p return nil, err } - paginator, err := k.NewDataLakeAnalyticsAccountPaginator(essdk.BuildFilter(ctx, d.QueryContext, listDataLakeAnalyticsAccountFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewDataLakeAnalyticsAccountPaginator(essdk.BuildFilter(ctx, d.QueryContext, listDataLakeAnalyticsAccountFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListDataLakeAnalyticsAccount NewDataLakeAnalyticsAccountPaginator", "error", err) return nil, err @@ -31374,6 +25687,7 @@ var getDataLakeAnalyticsAccountFilters = map[string]string{ "min_priority_per_job": "Description.DataLakeAnalyticsAccount.Properties.MinPriorityPerJob", "name": "description.DataLakeAnalyticsAccount.name", "new_tier": "Description.DataLakeAnalyticsAccount.Properties.NewTier", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.DataLakeAnalyticsAccount.Properties.ProvisioningState", "query_store_retention": "Description.DataLakeAnalyticsAccount.Properties.QueryStoreRetention", "resource_group": "description.ResourceGroup", @@ -31401,7 +25715,7 @@ func GetDataLakeAnalyticsAccount(ctx context.Context, d *plugin.QueryData, _ *pl if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -31415,7 +25729,7 @@ func GetDataLakeAnalyticsAccount(ctx context.Context, d *plugin.QueryData, _ *pl } limit := int64(1) - paginator, err := k.NewDataLakeAnalyticsAccountPaginator(essdk.BuildFilter(ctx, d.QueryContext, getDataLakeAnalyticsAccountFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewDataLakeAnalyticsAccountPaginator(essdk.BuildFilter(ctx, d.QueryContext, getDataLakeAnalyticsAccountFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -31446,7 +25760,7 @@ func GetDataLakeAnalyticsAccount(ctx context.Context, d *plugin.QueryData, _ *pl type DataLakeStore struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.DataLakeStoreDescription `json:"Description"` + Description azure.DataLakeStoreDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -31454,59 +25768,6 @@ type DataLakeStore struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type DataLakeStoreHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -31590,6 +25851,7 @@ var listDataLakeStoreFilters = map[string]string{ "identity": "Description.DataLakeStoreAccount.Identity", "name": "Description.DataLakeStoreAccount.Name", "new_tier": "Description.DataLakeStoreAccount.Properties.NewTier", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.DataLakeStoreAccount.Properties.ProvisioningState", "resource_group": "Description.ResourceGroup", "state": "Description.DataLakeStoreAccount.Properties.State", @@ -31619,7 +25881,7 @@ func ListDataLakeStore(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra plugin.Logger(ctx).Error("ListDataLakeStore NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListDataLakeStore GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -31635,7 +25897,7 @@ func ListDataLakeStore(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra return nil, err } - paginator, err := k.NewDataLakeStorePaginator(essdk.BuildFilter(ctx, d.QueryContext, listDataLakeStoreFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewDataLakeStorePaginator(essdk.BuildFilter(ctx, d.QueryContext, listDataLakeStoreFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListDataLakeStore NewDataLakeStorePaginator", "error", err) return nil, err @@ -31677,6 +25939,7 @@ var getDataLakeStoreFilters = map[string]string{ "identity": "Description.DataLakeStoreAccount.Identity", "name": "description.DataLakeStoreAccount.name", "new_tier": "Description.DataLakeStoreAccount.Properties.NewTier", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.DataLakeStoreAccount.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", "state": "Description.DataLakeStoreAccount.Properties.State", @@ -31703,7 +25966,7 @@ func GetDataLakeStore(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -31717,7 +25980,7 @@ func GetDataLakeStore(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat } limit := int64(1) - paginator, err := k.NewDataLakeStorePaginator(essdk.BuildFilter(ctx, d.QueryContext, getDataLakeStoreFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewDataLakeStorePaginator(essdk.BuildFilter(ctx, d.QueryContext, getDataLakeStoreFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -31748,7 +26011,7 @@ func GetDataLakeStore(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat type DiagnosticSetting struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.DiagnosticSettingDescription `json:"Description"` + Description azure.DiagnosticSettingDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -31756,59 +26019,6 @@ type DiagnosticSetting struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type DiagnosticSettingHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -31884,6 +26094,7 @@ var listDiagnosticSettingFilters = map[string]string{ "logs": "Description.DiagnosticSettingsResource.Properties.Logs", "metrics": "Description.DiagnosticSettingsResource.Properties.Metrics", "name": "Description.DiagnosticSettingsResource.Name", + "platform_account_id": "metadata.IntegrationID", "resource_group": "Description.ResourceGroup", "service_bus_rule_id": "Description.DiagnosticSettingsResource.Properties.ServiceBusRuleID", "storage_account_id": "Description.DiagnosticSettingsResource.Properties.StorageAccountID", @@ -31910,7 +26121,7 @@ func ListDiagnosticSetting(ctx context.Context, d *plugin.QueryData, _ *plugin.H plugin.Logger(ctx).Error("ListDiagnosticSetting NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListDiagnosticSetting GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -31926,7 +26137,7 @@ func ListDiagnosticSetting(ctx context.Context, d *plugin.QueryData, _ *plugin.H return nil, err } - paginator, err := k.NewDiagnosticSettingPaginator(essdk.BuildFilter(ctx, d.QueryContext, listDiagnosticSettingFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewDiagnosticSettingPaginator(essdk.BuildFilter(ctx, d.QueryContext, listDiagnosticSettingFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListDiagnosticSetting NewDiagnosticSettingPaginator", "error", err) return nil, err @@ -31960,6 +26171,7 @@ var getDiagnosticSettingFilters = map[string]string{ "logs": "Description.DiagnosticSettingsResource.Properties.Logs", "metrics": "Description.DiagnosticSettingsResource.Properties.Metrics", "name": "description.DiagnosticSettingsResource.name", + "platform_account_id": "metadata.IntegrationID", "resource_group": "description.ResourceGroup", "service_bus_rule_id": "Description.DiagnosticSettingsResource.Properties.ServiceBusRuleID", "storage_account_id": "Description.DiagnosticSettingsResource.Properties.StorageAccountID", @@ -31983,7 +26195,7 @@ func GetDiagnosticSetting(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -31997,7 +26209,7 @@ func GetDiagnosticSetting(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy } limit := int64(1) - paginator, err := k.NewDiagnosticSettingPaginator(essdk.BuildFilter(ctx, d.QueryContext, getDiagnosticSettingFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewDiagnosticSettingPaginator(essdk.BuildFilter(ctx, d.QueryContext, getDiagnosticSettingFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -32028,7 +26240,7 @@ func GetDiagnosticSetting(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy type AutoscaleSetting struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.AutoscaleSettingDescription `json:"Description"` + Description azure.AutoscaleSettingDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -32036,59 +26248,6 @@ type AutoscaleSetting struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type AutoscaleSettingHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -32161,6 +26320,7 @@ var listAutoscaleSettingFilters = map[string]string{ "id": "Description.AutoscaleSettingsResource.ID", "name": "Description.AutoscaleSettingsResource.Name", "notifications": "Description.AutoscaleSettingsResource.Properties.Notifications", + "platform_account_id": "metadata.IntegrationID", "profiles": "Description.AutoscaleSettingsResource.Properties.Profiles", "resource_group": "Description.ResourceGroup", "target_resource_location": "Description.AutoscaleSettingsResource.Properties.TargetResourceLocation", @@ -32187,7 +26347,7 @@ func ListAutoscaleSetting(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy plugin.Logger(ctx).Error("ListAutoscaleSetting NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListAutoscaleSetting GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -32203,7 +26363,7 @@ func ListAutoscaleSetting(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy return nil, err } - paginator, err := k.NewAutoscaleSettingPaginator(essdk.BuildFilter(ctx, d.QueryContext, listAutoscaleSettingFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewAutoscaleSettingPaginator(essdk.BuildFilter(ctx, d.QueryContext, listAutoscaleSettingFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListAutoscaleSetting NewAutoscaleSettingPaginator", "error", err) return nil, err @@ -32234,6 +26394,7 @@ var getAutoscaleSettingFilters = map[string]string{ "id": "Description.AutoscaleSettingsResource.ID", "name": "description.AutoscaleSettingsResource.name", "notifications": "Description.AutoscaleSettingsResource.Properties.Notifications", + "platform_account_id": "metadata.IntegrationID", "profiles": "Description.AutoscaleSettingsResource.Properties.Profiles", "resource_group": "description.ResourceGroup", "target_resource_location": "Description.AutoscaleSettingsResource.Properties.TargetResourceLocation", @@ -32257,7 +26418,7 @@ func GetAutoscaleSetting(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -32271,7 +26432,7 @@ func GetAutoscaleSetting(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd } limit := int64(1) - paginator, err := k.NewAutoscaleSettingPaginator(essdk.BuildFilter(ctx, d.QueryContext, getAutoscaleSettingFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewAutoscaleSettingPaginator(essdk.BuildFilter(ctx, d.QueryContext, getAutoscaleSettingFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -32302,7 +26463,7 @@ func GetAutoscaleSetting(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd type EventGridDomain struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.EventGridDomainDescription `json:"Description"` + Description azure.EventGridDomainDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -32310,59 +26471,6 @@ type EventGridDomain struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type EventGridDomainHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -32447,6 +26555,7 @@ var listEventGridDomainFilters = map[string]string{ "last_modified_by_type": "Description.Domain.SystemData.LastModifiedByType", "location": "Description.Domain.Location", "name": "Description.Domain.Name", + "platform_account_id": "metadata.IntegrationID", "principal_id": "Description.Domain.Identity.PrincipalID", "provisioning_state": "Description.Domain.Properties.ProvisioningState", "public_network_access": "Description.Domain.Properties.PublicNetworkAccess", @@ -32476,7 +26585,7 @@ func ListEventGridDomain(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd plugin.Logger(ctx).Error("ListEventGridDomain NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListEventGridDomain GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -32492,7 +26601,7 @@ func ListEventGridDomain(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd return nil, err } - paginator, err := k.NewEventGridDomainPaginator(essdk.BuildFilter(ctx, d.QueryContext, listEventGridDomainFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewEventGridDomainPaginator(essdk.BuildFilter(ctx, d.QueryContext, listEventGridDomainFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListEventGridDomain NewEventGridDomainPaginator", "error", err) return nil, err @@ -32535,6 +26644,7 @@ var getEventGridDomainFilters = map[string]string{ "last_modified_by_type": "Description.Domain.SystemData.LastModifiedByType", "location": "Description.Domain.Location", "name": "description.Domain.name", + "platform_account_id": "metadata.IntegrationID", "principal_id": "Description.Domain.Identity.PrincipalID", "provisioning_state": "Description.Domain.Properties.ProvisioningState", "public_network_access": "Description.Domain.Properties.PublicNetworkAccess", @@ -32561,7 +26671,7 @@ func GetEventGridDomain(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -32575,7 +26685,7 @@ func GetEventGridDomain(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr } limit := int64(1) - paginator, err := k.NewEventGridDomainPaginator(essdk.BuildFilter(ctx, d.QueryContext, getEventGridDomainFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewEventGridDomainPaginator(essdk.BuildFilter(ctx, d.QueryContext, getEventGridDomainFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -32606,7 +26716,7 @@ func GetEventGridDomain(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr type EventGridTopic struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.EventGridTopicDescription `json:"Description"` + Description azure.EventGridTopicDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -32614,59 +26724,6 @@ type EventGridTopic struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type EventGridTopicHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -32751,6 +26808,7 @@ var listEventGridTopicFilters = map[string]string{ "last_modified_by_type": "Description.Topic.SystemData.LastModifiedByType", "location": "Description.Topic.Location", "name": "Description.Topic.Name", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.Topic.Properties.ProvisioningState", "public_network_access": "Description.Topic.Properties.PublicNetworkAccess", "resource_group": "Description.ResourceGroup", @@ -32778,7 +26836,7 @@ func ListEventGridTopic(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr plugin.Logger(ctx).Error("ListEventGridTopic NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListEventGridTopic GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -32794,7 +26852,7 @@ func ListEventGridTopic(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr return nil, err } - paginator, err := k.NewEventGridTopicPaginator(essdk.BuildFilter(ctx, d.QueryContext, listEventGridTopicFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewEventGridTopicPaginator(essdk.BuildFilter(ctx, d.QueryContext, listEventGridTopicFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListEventGridTopic NewEventGridTopicPaginator", "error", err) return nil, err @@ -32837,6 +26895,7 @@ var getEventGridTopicFilters = map[string]string{ "last_modified_by_type": "Description.Topic.SystemData.LastModifiedByType", "location": "Description.Topic.Location", "name": "description.Topic.name", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.Topic.Properties.ProvisioningState", "public_network_access": "Description.Topic.Properties.PublicNetworkAccess", "resource_group": "description.ResourceGroup", @@ -32861,7 +26920,7 @@ func GetEventGridTopic(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -32875,7 +26934,7 @@ func GetEventGridTopic(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra } limit := int64(1) - paginator, err := k.NewEventGridTopicPaginator(essdk.BuildFilter(ctx, d.QueryContext, getEventGridTopicFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewEventGridTopicPaginator(essdk.BuildFilter(ctx, d.QueryContext, getEventGridTopicFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -32906,7 +26965,7 @@ func GetEventGridTopic(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra type EventhubNamespace struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.EventhubNamespaceDescription `json:"Description"` + Description azure.EventhubNamespaceDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -32914,59 +26973,6 @@ type EventhubNamespace struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type EventhubNamespaceHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -33046,6 +27052,7 @@ var listEventhubNamespaceFilters = map[string]string{ "metric_id": "Description.EHNamespace.Properties.MetricID", "name": "Description.EHNamespace.Name", "network_rule_set": "Description.NetworkRuleSet", + "platform_account_id": "metadata.IntegrationID", "private_endpoint_connections": "Description.EHNamespace.Properties.PrivateEndpointConnections", "provisioning_state": "Description.EHNamespace.Properties.ProvisioningState", "resource_group": "Description.ResourceGroup", @@ -33077,7 +27084,7 @@ func ListEventhubNamespace(ctx context.Context, d *plugin.QueryData, _ *plugin.H plugin.Logger(ctx).Error("ListEventhubNamespace NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListEventhubNamespace GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -33093,7 +27100,7 @@ func ListEventhubNamespace(ctx context.Context, d *plugin.QueryData, _ *plugin.H return nil, err } - paginator, err := k.NewEventhubNamespacePaginator(essdk.BuildFilter(ctx, d.QueryContext, listEventhubNamespaceFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewEventhubNamespacePaginator(essdk.BuildFilter(ctx, d.QueryContext, listEventhubNamespaceFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListEventhubNamespace NewEventhubNamespacePaginator", "error", err) return nil, err @@ -33131,6 +27138,7 @@ var getEventhubNamespaceFilters = map[string]string{ "metric_id": "Description.EHNamespace.Properties.MetricID", "name": "description.EHNamespace.name", "network_rule_set": "Description.NetworkRuleSet", + "platform_account_id": "metadata.IntegrationID", "private_endpoint_connections": "Description.EHNamespace.Properties.PrivateEndpointConnections", "provisioning_state": "Description.EHNamespace.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", @@ -33159,7 +27167,7 @@ func GetEventhubNamespace(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -33173,7 +27181,7 @@ func GetEventhubNamespace(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy } limit := int64(1) - paginator, err := k.NewEventhubNamespacePaginator(essdk.BuildFilter(ctx, d.QueryContext, getEventhubNamespaceFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewEventhubNamespacePaginator(essdk.BuildFilter(ctx, d.QueryContext, getEventhubNamespaceFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -33204,7 +27212,7 @@ func GetEventhubNamespace(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy type EventhubNamespaceEventhub struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.EventhubNamespaceEventhubDescription `json:"Description"` + Description azure.EventhubNamespaceEventhubDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -33212,59 +27220,6 @@ type EventhubNamespaceEventhub struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type EventhubNamespaceEventhubHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -33333,10 +27288,11 @@ func (p EventhubNamespaceEventhubPaginator) NextPage(ctx context.Context) ([]Eve } var listEventhubNamespaceEventhubFilters = map[string]string{ - "id": "Description.EventHub.ID", - "name": "Description.EHNamespace.Name", - "tags": "Description.EHNamespace.Tags", - "title": "Description.EHNamespace.Identity.Type", + "id": "Description.EventHub.ID", + "name": "Description.EHNamespace.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.EHNamespace.Tags", + "title": "Description.EHNamespace.Identity.Type", } func ListEventhubNamespaceEventhub(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -33357,7 +27313,7 @@ func ListEventhubNamespaceEventhub(ctx context.Context, d *plugin.QueryData, _ * plugin.Logger(ctx).Error("ListEventhubNamespaceEventhub NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListEventhubNamespaceEventhub GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -33373,7 +27329,7 @@ func ListEventhubNamespaceEventhub(ctx context.Context, d *plugin.QueryData, _ * return nil, err } - paginator, err := k.NewEventhubNamespaceEventhubPaginator(essdk.BuildFilter(ctx, d.QueryContext, listEventhubNamespaceEventhubFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewEventhubNamespaceEventhubPaginator(essdk.BuildFilter(ctx, d.QueryContext, listEventhubNamespaceEventhubFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListEventhubNamespaceEventhub NewEventhubNamespaceEventhubPaginator", "error", err) return nil, err @@ -33400,10 +27356,11 @@ func ListEventhubNamespaceEventhub(ctx context.Context, d *plugin.QueryData, _ * } var getEventhubNamespaceEventhubFilters = map[string]string{ - "id": "Description.EventHub.ID", - "name": "Description.EHNamespace.Name", - "tags": "Description.EHNamespace.Tags", - "title": "Description.EHNamespace.Identity.Type", + "id": "Description.EventHub.ID", + "name": "Description.EHNamespace.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.EHNamespace.Tags", + "title": "Description.EHNamespace.Identity.Type", } func GetEventhubNamespaceEventhub(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -33421,7 +27378,7 @@ func GetEventhubNamespaceEventhub(ctx context.Context, d *plugin.QueryData, _ *p if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -33435,7 +27392,7 @@ func GetEventhubNamespaceEventhub(ctx context.Context, d *plugin.QueryData, _ *p } limit := int64(1) - paginator, err := k.NewEventhubNamespaceEventhubPaginator(essdk.BuildFilter(ctx, d.QueryContext, getEventhubNamespaceEventhubFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewEventhubNamespaceEventhubPaginator(essdk.BuildFilter(ctx, d.QueryContext, getEventhubNamespaceEventhubFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -33466,7 +27423,7 @@ func GetEventhubNamespaceEventhub(ctx context.Context, d *plugin.QueryData, _ *p type Frontdoor struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.FrontdoorDescription `json:"Description"` + Description azure.FrontdoorDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -33474,59 +27431,6 @@ type Frontdoor struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type FrontdoorHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -33606,6 +27510,7 @@ var listFrontdoorFilters = map[string]string{ "id": "Description.FrontDoor.ID", "load_balancing_settings": "Description.FrontDoor.Properties.LoadBalancingSettings", "name": "Description.FrontDoor.Name", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.FrontDoor.Properties.ProvisioningState", "resource_group": "Description.ResourceGroup", "resource_state": "Description.FrontDoor.Properties.ResourceState", @@ -33634,7 +27539,7 @@ func ListFrontdoor(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDa plugin.Logger(ctx).Error("ListFrontdoor NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListFrontdoor GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -33650,7 +27555,7 @@ func ListFrontdoor(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDa return nil, err } - paginator, err := k.NewFrontdoorPaginator(essdk.BuildFilter(ctx, d.QueryContext, listFrontdoorFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewFrontdoorPaginator(essdk.BuildFilter(ctx, d.QueryContext, listFrontdoorFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListFrontdoor NewFrontdoorPaginator", "error", err) return nil, err @@ -33688,6 +27593,7 @@ var getFrontdoorFilters = map[string]string{ "id": "Description.FrontDoor.ID", "load_balancing_settings": "Description.FrontDoor.Properties.LoadBalancingSettings", "name": "description.FrontDoor.name", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.FrontDoor.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", "resource_state": "Description.FrontDoor.Properties.ResourceState", @@ -33713,7 +27619,7 @@ func GetFrontdoor(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDat if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -33727,7 +27633,7 @@ func GetFrontdoor(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDat } limit := int64(1) - paginator, err := k.NewFrontdoorPaginator(essdk.BuildFilter(ctx, d.QueryContext, getFrontdoorFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewFrontdoorPaginator(essdk.BuildFilter(ctx, d.QueryContext, getFrontdoorFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -33758,7 +27664,7 @@ func GetFrontdoor(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDat type HdinsightCluster struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.HdinsightClusterDescription `json:"Description"` + Description azure.HdinsightClusterDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -33766,59 +27672,6 @@ type HdinsightCluster struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type HdinsightClusterHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -33909,6 +27762,7 @@ var listHdinsightClusterFilters = map[string]string{ "name": "Description.Cluster.Name", "network_properties": "Description.Cluster.Properties.NetworkProperties", "os_type": "Description.Cluster.Properties.OSType", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.Cluster.Properties.ProvisioningState", "quota_info": "Description.Cluster.Properties.QuotaInfo", "resource_group": "Description.ResourceGroup", @@ -33938,7 +27792,7 @@ func ListHdinsightCluster(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy plugin.Logger(ctx).Error("ListHdinsightCluster NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListHdinsightCluster GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -33954,7 +27808,7 @@ func ListHdinsightCluster(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy return nil, err } - paginator, err := k.NewHdinsightClusterPaginator(essdk.BuildFilter(ctx, d.QueryContext, listHdinsightClusterFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewHdinsightClusterPaginator(essdk.BuildFilter(ctx, d.QueryContext, listHdinsightClusterFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListHdinsightCluster NewHdinsightClusterPaginator", "error", err) return nil, err @@ -34003,6 +27857,7 @@ var getHdinsightClusterFilters = map[string]string{ "name": "description.Cluster.name", "network_properties": "Description.Cluster.Properties.NetworkProperties", "os_type": "Description.Cluster.Properties.OSType", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.Cluster.Properties.ProvisioningState", "quota_info": "Description.Cluster.Properties.QuotaInfo", "resource_group": "description.ResourceGroup", @@ -34029,7 +27884,7 @@ func GetHdinsightCluster(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -34043,7 +27898,7 @@ func GetHdinsightCluster(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd } limit := int64(1) - paginator, err := k.NewHdinsightClusterPaginator(essdk.BuildFilter(ctx, d.QueryContext, getHdinsightClusterFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewHdinsightClusterPaginator(essdk.BuildFilter(ctx, d.QueryContext, getHdinsightClusterFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -34074,7 +27929,7 @@ func GetHdinsightCluster(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd type HybridComputeMachine struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.HybridComputeMachineDescription `json:"Description"` + Description azure.HybridComputeMachineDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -34082,59 +27937,6 @@ type HybridComputeMachine struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type HybridComputeMachineHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -34221,6 +28023,7 @@ var listHybridComputeMachineFilters = map[string]string{ "os_profile": "Description.Machine.Properties.OSProfile", "os_sku": "Description.Machine.Properties.OSSKU", "os_version": "Description.Machine.Properties.OSVersion", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.Machine.Properties.ProvisioningState", "resource_group": "Description.ResourceGroup", "status": "Description.Machine.Properties.Status", @@ -34249,7 +28052,7 @@ func ListHybridComputeMachine(ctx context.Context, d *plugin.QueryData, _ *plugi plugin.Logger(ctx).Error("ListHybridComputeMachine NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListHybridComputeMachine GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -34265,7 +28068,7 @@ func ListHybridComputeMachine(ctx context.Context, d *plugin.QueryData, _ *plugi return nil, err } - paginator, err := k.NewHybridComputeMachinePaginator(essdk.BuildFilter(ctx, d.QueryContext, listHybridComputeMachineFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewHybridComputeMachinePaginator(essdk.BuildFilter(ctx, d.QueryContext, listHybridComputeMachineFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListHybridComputeMachine NewHybridComputeMachinePaginator", "error", err) return nil, err @@ -34310,6 +28113,7 @@ var getHybridComputeMachineFilters = map[string]string{ "os_profile": "Description.Machine.Properties.OSProfile", "os_sku": "Description.Machine.Properties.OSSKU", "os_version": "Description.Machine.Properties.OSVersion", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.Machine.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", "status": "Description.Machine.Properties.Status", @@ -34335,7 +28139,7 @@ func GetHybridComputeMachine(ctx context.Context, d *plugin.QueryData, _ *plugin if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -34349,7 +28153,7 @@ func GetHybridComputeMachine(ctx context.Context, d *plugin.QueryData, _ *plugin } limit := int64(1) - paginator, err := k.NewHybridComputeMachinePaginator(essdk.BuildFilter(ctx, d.QueryContext, getHybridComputeMachineFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewHybridComputeMachinePaginator(essdk.BuildFilter(ctx, d.QueryContext, getHybridComputeMachineFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -34380,7 +28184,7 @@ func GetHybridComputeMachine(ctx context.Context, d *plugin.QueryData, _ *plugin type IOTHub struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.IOTHubDescription `json:"Description"` + Description azure.IOTHubDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -34388,59 +28192,6 @@ type IOTHub struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type IOTHubHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -34524,6 +28275,7 @@ var listIOTHubFilters = map[string]string{ "messaging_endpoints": "Description.IotHubDescription.Properties.MessagingEndpoints", "min_tls_version": "Description.IotHubDescription.Properties.MinTLSVersion", "name": "Description.IotHubDescription.Name", + "platform_account_id": "metadata.IntegrationID", "private_endpoint_connections": "Description.IotHubDescription.Properties.PrivateEndpointConnections", "provisioning_state": "Description.IotHubDescription.Properties.ProvisioningState", "public_network_access": "Description.IotHubDescription.Properties.PublicNetworkAccess", @@ -34557,7 +28309,7 @@ func ListIOTHub(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) plugin.Logger(ctx).Error("ListIOTHub NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListIOTHub GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -34573,7 +28325,7 @@ func ListIOTHub(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) return nil, err } - paginator, err := k.NewIOTHubPaginator(essdk.BuildFilter(ctx, d.QueryContext, listIOTHubFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewIOTHubPaginator(essdk.BuildFilter(ctx, d.QueryContext, listIOTHubFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListIOTHub NewIOTHubPaginator", "error", err) return nil, err @@ -34615,6 +28367,7 @@ var getIOTHubFilters = map[string]string{ "messaging_endpoints": "Description.IotHubDescription.Properties.MessagingEndpoints", "min_tls_version": "Description.IotHubDescription.Properties.MinTLSVersion", "name": "description.IotHubDescription.name", + "platform_account_id": "metadata.IntegrationID", "private_endpoint_connections": "Description.IotHubDescription.Properties.PrivateEndpointConnections", "provisioning_state": "Description.IotHubDescription.Properties.ProvisioningState", "public_network_access": "Description.IotHubDescription.Properties.PublicNetworkAccess", @@ -34645,7 +28398,7 @@ func GetIOTHub(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -34659,7 +28412,7 @@ func GetIOTHub(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) } limit := int64(1) - paginator, err := k.NewIOTHubPaginator(essdk.BuildFilter(ctx, d.QueryContext, getIOTHubFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewIOTHubPaginator(essdk.BuildFilter(ctx, d.QueryContext, getIOTHubFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -34690,7 +28443,7 @@ func GetIOTHub(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) type IOTHubDps struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.IOTHubDpsDescription `json:"Description"` + Description azure.IOTHubDpsDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -34698,59 +28451,6 @@ type IOTHubDps struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type IOTHubDpsHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -34828,6 +28528,7 @@ var listIOTHubDpsFilters = map[string]string{ "id_scope": "Description.IotHubDps.Properties.IDScope", "iot_hubs": "Description.IotHubDps.Properties.IotHubs", "name": "Description.IotHubDps.Name", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.IotHubDps.Properties.ProvisioningState", "resource_group": "Description.ResourceGroup", "service_operations_host_name": "Description.IotHubDps.Properties.ServiceOperationsHostName", @@ -34858,7 +28559,7 @@ func ListIOTHubDps(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDa plugin.Logger(ctx).Error("ListIOTHubDps NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListIOTHubDps GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -34874,7 +28575,7 @@ func ListIOTHubDps(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDa return nil, err } - paginator, err := k.NewIOTHubDpsPaginator(essdk.BuildFilter(ctx, d.QueryContext, listIOTHubDpsFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewIOTHubDpsPaginator(essdk.BuildFilter(ctx, d.QueryContext, listIOTHubDpsFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListIOTHubDps NewIOTHubDpsPaginator", "error", err) return nil, err @@ -34910,6 +28611,7 @@ var getIOTHubDpsFilters = map[string]string{ "id_scope": "Description.IotHubDps.Properties.IDScope", "iot_hubs": "Description.IotHubDps.Properties.IotHubs", "name": "description.IotHubDps.name", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.IotHubDps.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", "service_operations_host_name": "Description.IotHubDps.Properties.ServiceOperationsHostName", @@ -34937,7 +28639,7 @@ func GetIOTHubDps(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDat if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -34951,7 +28653,7 @@ func GetIOTHubDps(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDat } limit := int64(1) - paginator, err := k.NewIOTHubDpsPaginator(essdk.BuildFilter(ctx, d.QueryContext, getIOTHubDpsFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewIOTHubDpsPaginator(essdk.BuildFilter(ctx, d.QueryContext, getIOTHubDpsFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -34982,7 +28684,7 @@ func GetIOTHubDps(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDat type KeyVault struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.KeyVaultDescription `json:"Description"` + Description azure.KeyVaultDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -34990,59 +28692,6 @@ type KeyVault struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type KeyVaultHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -35120,6 +28769,7 @@ var listKeyVaultFilters = map[string]string{ "id": "Description.Vault.ID", "name": "Description.Vault.Name", "network_acls": "Description.Vault.Properties.NetworkACLs", + "platform_account_id": "metadata.IntegrationID", "purge_protection_enabled": "Description.Vault.Properties.EnablePurgeProtection", "resource_group": "Description.ResourceGroup", "sku_family": "Description.Vault.Properties.SKU.Family", @@ -35151,7 +28801,7 @@ func ListKeyVault(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDat plugin.Logger(ctx).Error("ListKeyVault NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListKeyVault GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -35167,7 +28817,7 @@ func ListKeyVault(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDat return nil, err } - paginator, err := k.NewKeyVaultPaginator(essdk.BuildFilter(ctx, d.QueryContext, listKeyVaultFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewKeyVaultPaginator(essdk.BuildFilter(ctx, d.QueryContext, listKeyVaultFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListKeyVault NewKeyVaultPaginator", "error", err) return nil, err @@ -35203,6 +28853,7 @@ var getKeyVaultFilters = map[string]string{ "id": "Description.Vault.ID", "name": "description.Resource.name", "network_acls": "Description.Vault.Properties.NetworkACLs", + "platform_account_id": "metadata.IntegrationID", "purge_protection_enabled": "Description.Vault.Properties.EnablePurgeProtection", "resource_group": "description.ResourceGroup", "sku_family": "Description.Vault.Properties.SKU.Family", @@ -35231,7 +28882,7 @@ func GetKeyVault(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -35245,7 +28896,7 @@ func GetKeyVault(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData } limit := int64(1) - paginator, err := k.NewKeyVaultPaginator(essdk.BuildFilter(ctx, d.QueryContext, getKeyVaultFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewKeyVaultPaginator(essdk.BuildFilter(ctx, d.QueryContext, getKeyVaultFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -35276,7 +28927,7 @@ func GetKeyVault(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData type KeyVaultCertificate struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.KeyVaultCertificateDescription `json:"Description"` + Description azure.KeyVaultCertificateDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -35284,59 +28935,6 @@ type KeyVaultCertificate struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type KeyVaultCertificateHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -35405,15 +29003,16 @@ 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", - "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", + "platform_account_id": "metadata.IntegrationID", + "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) { @@ -35434,7 +29033,7 @@ func ListKeyVaultCertificate(ctx context.Context, d *plugin.QueryData, _ *plugin plugin.Logger(ctx).Error("ListKeyVaultCertificate NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListKeyVaultCertificate GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -35450,7 +29049,7 @@ func ListKeyVaultCertificate(ctx context.Context, d *plugin.QueryData, _ *plugin return nil, err } - paginator, err := k.NewKeyVaultCertificatePaginator(essdk.BuildFilter(ctx, d.QueryContext, listKeyVaultCertificateFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewKeyVaultCertificatePaginator(essdk.BuildFilter(ctx, d.QueryContext, listKeyVaultCertificateFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListKeyVaultCertificate NewKeyVaultCertificatePaginator", "error", err) return nil, err @@ -35477,16 +29076,17 @@ 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", - "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", + "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", + "platform_account_id": "metadata.IntegrationID", + "resource_group": "description.ResourceGroup", + "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) { @@ -35504,7 +29104,7 @@ func GetKeyVaultCertificate(ctx context.Context, d *plugin.QueryData, _ *plugin. if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -35518,7 +29118,7 @@ func GetKeyVaultCertificate(ctx context.Context, d *plugin.QueryData, _ *plugin. } limit := int64(1) - paginator, err := k.NewKeyVaultCertificatePaginator(essdk.BuildFilter(ctx, d.QueryContext, getKeyVaultCertificateFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewKeyVaultCertificatePaginator(essdk.BuildFilter(ctx, d.QueryContext, getKeyVaultCertificateFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -35549,7 +29149,7 @@ func GetKeyVaultCertificate(ctx context.Context, d *plugin.QueryData, _ *plugin. type KeyVaultDeletedVault struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.KeyVaultDeletedVaultDescription `json:"Description"` + Description azure.KeyVaultDeletedVaultDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -35557,59 +29157,6 @@ type KeyVaultDeletedVault struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type KeyVaultDeletedVaultHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -35678,12 +29225,13 @@ func (p KeyVaultDeletedVaultPaginator) NextPage(ctx context.Context) ([]KeyVault } var listKeyVaultDeletedVaultFilters = map[string]string{ - "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", + "id": "Description.Vault.ID", + "name": "Description.Vault.Name", + "platform_account_id": "metadata.IntegrationID", + "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) { @@ -35704,7 +29252,7 @@ func ListKeyVaultDeletedVault(ctx context.Context, d *plugin.QueryData, _ *plugi plugin.Logger(ctx).Error("ListKeyVaultDeletedVault NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListKeyVaultDeletedVault GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -35720,7 +29268,7 @@ func ListKeyVaultDeletedVault(ctx context.Context, d *plugin.QueryData, _ *plugi return nil, err } - paginator, err := k.NewKeyVaultDeletedVaultPaginator(essdk.BuildFilter(ctx, d.QueryContext, listKeyVaultDeletedVaultFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewKeyVaultDeletedVaultPaginator(essdk.BuildFilter(ctx, d.QueryContext, listKeyVaultDeletedVaultFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListKeyVaultDeletedVault NewKeyVaultDeletedVaultPaginator", "error", err) return nil, err @@ -35747,13 +29295,14 @@ func ListKeyVaultDeletedVault(ctx context.Context, d *plugin.QueryData, _ *plugi } var getKeyVaultDeletedVaultFilters = map[string]string{ - "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", + "id": "Description.Vault.ID", + "name": "description.Vault.name", + "platform_account_id": "metadata.IntegrationID", + "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) { @@ -35771,7 +29320,7 @@ func GetKeyVaultDeletedVault(ctx context.Context, d *plugin.QueryData, _ *plugin if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -35785,7 +29334,7 @@ func GetKeyVaultDeletedVault(ctx context.Context, d *plugin.QueryData, _ *plugin } limit := int64(1) - paginator, err := k.NewKeyVaultDeletedVaultPaginator(essdk.BuildFilter(ctx, d.QueryContext, getKeyVaultDeletedVaultFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewKeyVaultDeletedVaultPaginator(essdk.BuildFilter(ctx, d.QueryContext, getKeyVaultDeletedVaultFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -35816,7 +29365,7 @@ func GetKeyVaultDeletedVault(ctx context.Context, d *plugin.QueryData, _ *plugin type KeyVaultManagedHardwareSecurityModule struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.KeyVaultManagedHardwareSecurityModuleDescription `json:"Description"` + Description azure.KeyVaultManagedHardwareSecurityModuleDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -35824,59 +29373,6 @@ type KeyVaultManagedHardwareSecurityModule struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type KeyVaultManagedHardwareSecurityModuleHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -35952,6 +29448,7 @@ var listKeyVaultManagedHardwareSecurityModuleFilters = map[string]string{ "hsm_uri": "Description.ManagedHsm.Properties.HsmURI", "id": "Description.ManagedHsm.ID", "name": "Description.ManagedHsm.Name", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.ManagedHsm.Properties.ProvisioningState", "resource_group": "Description.ResourceGroup", "sku_family": "Description.ManagedHsm.SKU.Family", @@ -35982,7 +29479,7 @@ func ListKeyVaultManagedHardwareSecurityModule(ctx context.Context, d *plugin.Qu plugin.Logger(ctx).Error("ListKeyVaultManagedHardwareSecurityModule NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListKeyVaultManagedHardwareSecurityModule GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -35998,7 +29495,7 @@ func ListKeyVaultManagedHardwareSecurityModule(ctx context.Context, d *plugin.Qu return nil, err } - paginator, err := k.NewKeyVaultManagedHardwareSecurityModulePaginator(essdk.BuildFilter(ctx, d.QueryContext, listKeyVaultManagedHardwareSecurityModuleFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewKeyVaultManagedHardwareSecurityModulePaginator(essdk.BuildFilter(ctx, d.QueryContext, listKeyVaultManagedHardwareSecurityModuleFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListKeyVaultManagedHardwareSecurityModule NewKeyVaultManagedHardwareSecurityModulePaginator", "error", err) return nil, err @@ -36032,6 +29529,7 @@ var getKeyVaultManagedHardwareSecurityModuleFilters = map[string]string{ "hsm_uri": "Description.ManagedHsm.Properties.HsmURI", "id": "Description.ManagedHsm.ID", "name": "description.ManagedHsm.name", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.ManagedHsm.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", "sku_family": "Description.ManagedHsm.SKU.Family", @@ -36059,7 +29557,7 @@ func GetKeyVaultManagedHardwareSecurityModule(ctx context.Context, d *plugin.Que if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -36073,7 +29571,7 @@ func GetKeyVaultManagedHardwareSecurityModule(ctx context.Context, d *plugin.Que } limit := int64(1) - paginator, err := k.NewKeyVaultManagedHardwareSecurityModulePaginator(essdk.BuildFilter(ctx, d.QueryContext, getKeyVaultManagedHardwareSecurityModuleFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewKeyVaultManagedHardwareSecurityModulePaginator(essdk.BuildFilter(ctx, d.QueryContext, getKeyVaultManagedHardwareSecurityModuleFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -36104,7 +29602,7 @@ func GetKeyVaultManagedHardwareSecurityModule(ctx context.Context, d *plugin.Que type KeyVaultSecret struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.KeyVaultSecretDescription `json:"Description"` + Description azure.KeyVaultSecretDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -36112,59 +29610,6 @@ type KeyVaultSecret struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type KeyVaultSecretHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -36233,16 +29678,17 @@ 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", - "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", + "platform_account_id": "metadata.IntegrationID", + "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) { @@ -36263,7 +29709,7 @@ func ListKeyVaultSecret(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr plugin.Logger(ctx).Error("ListKeyVaultSecret NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListKeyVaultSecret GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -36279,7 +29725,7 @@ func ListKeyVaultSecret(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr return nil, err } - paginator, err := k.NewKeyVaultSecretPaginator(essdk.BuildFilter(ctx, d.QueryContext, listKeyVaultSecretFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewKeyVaultSecretPaginator(essdk.BuildFilter(ctx, d.QueryContext, listKeyVaultSecretFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListKeyVaultSecret NewKeyVaultSecretPaginator", "error", err) return nil, err @@ -36306,16 +29752,17 @@ 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", - "kid": "Description.SecretBundle.Kid", - "name": "description.SecretItem.name", - "recoverable_days": "Description.Vault.Properties.SoftDeleteRetentionInDays", - "resource_group": "description.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", + "platform_account_id": "metadata.IntegrationID", + "recoverable_days": "Description.Vault.Properties.SoftDeleteRetentionInDays", + "resource_group": "description.ResourceGroup", + "tags": "Description.SecretItem.Tags", + "value": "Description.SecretItem.Properties.Value", } func GetKeyVaultSecret(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -36333,7 +29780,7 @@ func GetKeyVaultSecret(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -36347,7 +29794,7 @@ func GetKeyVaultSecret(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra } limit := int64(1) - paginator, err := k.NewKeyVaultSecretPaginator(essdk.BuildFilter(ctx, d.QueryContext, getKeyVaultSecretFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewKeyVaultSecretPaginator(essdk.BuildFilter(ctx, d.QueryContext, getKeyVaultSecretFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -36378,7 +29825,7 @@ func GetKeyVaultSecret(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra type KustoCluster struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.KustoClusterDescription `json:"Description"` + Description azure.KustoClusterDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -36386,59 +29833,6 @@ type KustoCluster struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type KustoClusterHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -36521,6 +29915,7 @@ var listKustoClusterFilters = map[string]string{ "location": "Description.Cluster.Location", "name": "Description.Cluster.Name", "optimized_autoscale": "Description.Cluster.Properties.OptimizedAutoscale", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.Cluster.Properties.ProvisioningState", "resource_group": "Description.ResourceGroup", "sku_capacity": "Description.Cluster.SKU.Capacity", @@ -36554,7 +29949,7 @@ func ListKustoCluster(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat plugin.Logger(ctx).Error("ListKustoCluster NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListKustoCluster GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -36570,7 +29965,7 @@ func ListKustoCluster(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat return nil, err } - paginator, err := k.NewKustoClusterPaginator(essdk.BuildFilter(ctx, d.QueryContext, listKustoClusterFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewKustoClusterPaginator(essdk.BuildFilter(ctx, d.QueryContext, listKustoClusterFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListKustoCluster NewKustoClusterPaginator", "error", err) return nil, err @@ -36611,6 +30006,7 @@ var getKustoClusterFilters = map[string]string{ "location": "Description.Cluster.Location", "name": "description.Cluster.name", "optimized_autoscale": "Description.Cluster.Properties.OptimizedAutoscale", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.Cluster.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", "sku_capacity": "Description.Cluster.SKU.Capacity", @@ -36641,7 +30037,7 @@ func GetKustoCluster(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -36655,7 +30051,7 @@ func GetKustoCluster(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate } limit := int64(1) - paginator, err := k.NewKustoClusterPaginator(essdk.BuildFilter(ctx, d.QueryContext, getKustoClusterFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewKustoClusterPaginator(essdk.BuildFilter(ctx, d.QueryContext, getKustoClusterFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -36686,7 +30082,7 @@ func GetKustoCluster(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate type LogAlert struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.LogAlertDescription `json:"Description"` + Description azure.LogAlertDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -36694,59 +30090,6 @@ type LogAlert struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type LogAlertHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -36815,18 +30158,19 @@ 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", - "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", + "platform_account_id": "metadata.IntegrationID", + "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) { @@ -36847,7 +30191,7 @@ func ListLogAlert(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDat plugin.Logger(ctx).Error("ListLogAlert NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListLogAlert GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -36863,7 +30207,7 @@ func ListLogAlert(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDat return nil, err } - paginator, err := k.NewLogAlertPaginator(essdk.BuildFilter(ctx, d.QueryContext, listLogAlertFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewLogAlertPaginator(essdk.BuildFilter(ctx, d.QueryContext, listLogAlertFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListLogAlert NewLogAlertPaginator", "error", err) return nil, err @@ -36890,18 +30234,19 @@ 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", - "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", + "platform_account_id": "metadata.IntegrationID", + "resource_group": "description.ResourceGroup", + "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) { @@ -36919,7 +30264,7 @@ func GetLogAlert(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -36933,7 +30278,7 @@ func GetLogAlert(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData } limit := int64(1) - paginator, err := k.NewLogAlertPaginator(essdk.BuildFilter(ctx, d.QueryContext, getLogAlertFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewLogAlertPaginator(essdk.BuildFilter(ctx, d.QueryContext, getLogAlertFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -36964,7 +30309,7 @@ func GetLogAlert(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData type LogProfile struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.LogProfileDescription `json:"Description"` + Description azure.LogProfileDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -36972,59 +30317,6 @@ type LogProfile struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type LogProfileHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -37098,6 +30390,7 @@ var listLogProfileFilters = map[string]string{ "location": "Description.LogProfileResource.Location", "log_event_location": "Description.LogProfileResource.Properties.Locations", "name": "Description.LogProfileResource.Name", + "platform_account_id": "metadata.IntegrationID", "resource_group": "Description.ResourceGroup", "retention_policy": "Description.LogProfileResource.Properties.RetentionPolicy", "service_bus_rule_id": "Description.LogProfileResource.Properties.ServiceBusRuleID", @@ -37125,7 +30418,7 @@ func ListLogProfile(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD plugin.Logger(ctx).Error("ListLogProfile NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListLogProfile GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -37141,7 +30434,7 @@ func ListLogProfile(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD return nil, err } - paginator, err := k.NewLogProfilePaginator(essdk.BuildFilter(ctx, d.QueryContext, listLogProfileFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewLogProfilePaginator(essdk.BuildFilter(ctx, d.QueryContext, listLogProfileFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListLogProfile NewLogProfilePaginator", "error", err) return nil, err @@ -37173,6 +30466,7 @@ var getLogProfileFilters = map[string]string{ "location": "Description.LogProfileResource.Location", "log_event_location": "Description.LogProfileResource.Properties.Locations", "name": "description.LogProfileResource.name", + "platform_account_id": "metadata.IntegrationID", "resource_group": "description.ResourceGroup", "retention_policy": "Description.LogProfileResource.Properties.RetentionPolicy", "service_bus_rule_id": "Description.LogProfileResource.Properties.ServiceBusRuleID", @@ -37197,7 +30491,7 @@ func GetLogProfile(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDa if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -37211,7 +30505,7 @@ func GetLogProfile(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDa } limit := int64(1) - paginator, err := k.NewLogProfilePaginator(essdk.BuildFilter(ctx, d.QueryContext, getLogProfileFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewLogProfilePaginator(essdk.BuildFilter(ctx, d.QueryContext, getLogProfileFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -37242,7 +30536,7 @@ func GetLogProfile(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDa type LogicAppWorkflow struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.LogicAppWorkflowDescription `json:"Description"` + Description azure.LogicAppWorkflowDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -37250,59 +30544,6 @@ type LogicAppWorkflow struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type LogicAppWorkflowHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -37381,6 +30622,7 @@ var listLogicAppWorkflowFilters = map[string]string{ "integration_service_environment": "Description.Workflow.Properties.IntegrationServiceEnvironment", "name": "Description.Workflow.Name", "parameters": "Description.Workflow.Properties.Parameters", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.Workflow.Properties.ProvisioningState", "resource_group": "Description.ResourceGroup", "sku_name": "Description.Workflow.Properties.SKU.Name", @@ -37410,7 +30652,7 @@ func ListLogicAppWorkflow(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy plugin.Logger(ctx).Error("ListLogicAppWorkflow NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListLogicAppWorkflow GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -37426,7 +30668,7 @@ func ListLogicAppWorkflow(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy return nil, err } - paginator, err := k.NewLogicAppWorkflowPaginator(essdk.BuildFilter(ctx, d.QueryContext, listLogicAppWorkflowFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewLogicAppWorkflowPaginator(essdk.BuildFilter(ctx, d.QueryContext, listLogicAppWorkflowFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListLogicAppWorkflow NewLogicAppWorkflowPaginator", "error", err) return nil, err @@ -37463,6 +30705,7 @@ var getLogicAppWorkflowFilters = map[string]string{ "integration_service_environment": "Description.Workflow.Properties.IntegrationServiceEnvironment", "name": "description.Workflow.name", "parameters": "Description.Workflow.Properties.Parameters", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.Workflow.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", "sku_name": "Description.Workflow.Properties.SKU.Name", @@ -37489,7 +30732,7 @@ func GetLogicAppWorkflow(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -37503,7 +30746,7 @@ func GetLogicAppWorkflow(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd } limit := int64(1) - paginator, err := k.NewLogicAppWorkflowPaginator(essdk.BuildFilter(ctx, d.QueryContext, getLogicAppWorkflowFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewLogicAppWorkflowPaginator(essdk.BuildFilter(ctx, d.QueryContext, getLogicAppWorkflowFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -37534,7 +30777,7 @@ func GetLogicAppWorkflow(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd type LogicIntegrationAccounts struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.LogicIntegrationAccountsDescription `json:"Description"` + Description azure.LogicIntegrationAccountsDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -37542,59 +30785,6 @@ type LogicIntegrationAccounts struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type LogicIntegrationAccountsHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -37663,10 +30853,11 @@ func (p LogicIntegrationAccountsPaginator) NextPage(ctx context.Context) ([]Logi } var listLogicIntegrationAccountsFilters = map[string]string{ - "id": "Description.IntegrationAccounts.ID", - "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", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.Account.Properties.IntegrationServiceEnvironment.Name", + "title": "Description.Account.Properties.IntegrationServiceEnvironment.Name", } func ListLogicIntegrationAccounts(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -37687,7 +30878,7 @@ func ListLogicIntegrationAccounts(ctx context.Context, d *plugin.QueryData, _ *p plugin.Logger(ctx).Error("ListLogicIntegrationAccounts NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListLogicIntegrationAccounts GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -37703,7 +30894,7 @@ func ListLogicIntegrationAccounts(ctx context.Context, d *plugin.QueryData, _ *p return nil, err } - paginator, err := k.NewLogicIntegrationAccountsPaginator(essdk.BuildFilter(ctx, d.QueryContext, listLogicIntegrationAccountsFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewLogicIntegrationAccountsPaginator(essdk.BuildFilter(ctx, d.QueryContext, listLogicIntegrationAccountsFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListLogicIntegrationAccounts NewLogicIntegrationAccountsPaginator", "error", err) return nil, err @@ -37730,10 +30921,11 @@ func ListLogicIntegrationAccounts(ctx context.Context, d *plugin.QueryData, _ *p } var getLogicIntegrationAccountsFilters = map[string]string{ - "id": "Description.IntegrationAccounts.ID", - "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", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.Account.Properties.IntegrationServiceEnvironment.Name", + "title": "Description.Account.Properties.IntegrationServiceEnvironment.Name", } func GetLogicIntegrationAccounts(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -37751,7 +30943,7 @@ func GetLogicIntegrationAccounts(ctx context.Context, d *plugin.QueryData, _ *pl if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -37765,7 +30957,7 @@ func GetLogicIntegrationAccounts(ctx context.Context, d *plugin.QueryData, _ *pl } limit := int64(1) - paginator, err := k.NewLogicIntegrationAccountsPaginator(essdk.BuildFilter(ctx, d.QueryContext, getLogicIntegrationAccountsFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewLogicIntegrationAccountsPaginator(essdk.BuildFilter(ctx, d.QueryContext, getLogicIntegrationAccountsFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -37796,7 +30988,7 @@ func GetLogicIntegrationAccounts(ctx context.Context, d *plugin.QueryData, _ *pl type MachineLearningWorkspace struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.MachineLearningWorkspaceDescription `json:"Description"` + Description azure.MachineLearningWorkspaceDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -37804,59 +30996,6 @@ type MachineLearningWorkspace struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type MachineLearningWorkspaceHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -37938,6 +31077,7 @@ var listMachineLearningWorkspaceFilters = map[string]string{ "key_vault": "Description.Workspace.Properties.KeyVault", "location": "Description.Workspace.Location", "name": "Description.Workspace.Name", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.Workspace.Properties.ProvisioningState", "resource_group": "Description.ResourceGroup", "service_provisioned_resource_group": "Description.Workspace.Properties.ServiceProvisionedResourceGroup", @@ -37968,7 +31108,7 @@ func ListMachineLearningWorkspace(ctx context.Context, d *plugin.QueryData, _ *p plugin.Logger(ctx).Error("ListMachineLearningWorkspace NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListMachineLearningWorkspace GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -37984,7 +31124,7 @@ func ListMachineLearningWorkspace(ctx context.Context, d *plugin.QueryData, _ *p return nil, err } - paginator, err := k.NewMachineLearningWorkspacePaginator(essdk.BuildFilter(ctx, d.QueryContext, listMachineLearningWorkspaceFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewMachineLearningWorkspacePaginator(essdk.BuildFilter(ctx, d.QueryContext, listMachineLearningWorkspaceFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListMachineLearningWorkspace NewMachineLearningWorkspacePaginator", "error", err) return nil, err @@ -38024,6 +31164,7 @@ var getMachineLearningWorkspaceFilters = map[string]string{ "key_vault": "Description.Workspace.Properties.KeyVault", "location": "Description.Workspace.Location", "name": "description.Workspace.name", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.Workspace.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", "service_provisioned_resource_group": "Description.Workspace.Properties.ServiceProvisionedResourceGroup", @@ -38051,7 +31192,7 @@ func GetMachineLearningWorkspace(ctx context.Context, d *plugin.QueryData, _ *pl if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -38065,7 +31206,7 @@ func GetMachineLearningWorkspace(ctx context.Context, d *plugin.QueryData, _ *pl } limit := int64(1) - paginator, err := k.NewMachineLearningWorkspacePaginator(essdk.BuildFilter(ctx, d.QueryContext, getMachineLearningWorkspaceFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewMachineLearningWorkspacePaginator(essdk.BuildFilter(ctx, d.QueryContext, getMachineLearningWorkspaceFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -38096,7 +31237,7 @@ func GetMachineLearningWorkspace(ctx context.Context, d *plugin.QueryData, _ *pl type MariadbServer struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.MariadbServerDescription `json:"Description"` + Description azure.MariadbServerDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -38104,59 +31245,6 @@ type MariadbServer struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type MariadbServerHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -38233,6 +31321,7 @@ var listMariadbServerFilters = map[string]string{ "id": "Description.Server.ID", "master_service_id": "Description.Server.Properties.MasterServerID", "name": "Description.Server.Name", + "platform_account_id": "metadata.IntegrationID", "private_endpoint_connections": "Description.Server.Properties.PrivateEndpointConnections", "public_network_access": "Description.Server.Properties.PublicNetworkAccess", "replica_capacity": "Description.Server.Properties.ReplicaCapacity", @@ -38270,7 +31359,7 @@ func ListMariadbServer(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra plugin.Logger(ctx).Error("ListMariadbServer NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListMariadbServer GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -38286,7 +31375,7 @@ func ListMariadbServer(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra return nil, err } - paginator, err := k.NewMariadbServerPaginator(essdk.BuildFilter(ctx, d.QueryContext, listMariadbServerFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewMariadbServerPaginator(essdk.BuildFilter(ctx, d.QueryContext, listMariadbServerFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListMariadbServer NewMariadbServerPaginator", "error", err) return nil, err @@ -38321,6 +31410,7 @@ var getMariadbServerFilters = map[string]string{ "id": "Description.Server.ID", "master_service_id": "Description.Server.Properties.MasterServerID", "name": "description.Server.name", + "platform_account_id": "metadata.IntegrationID", "private_endpoint_connections": "Description.Server.Properties.PrivateEndpointConnections", "public_network_access": "Description.Server.Properties.PublicNetworkAccess", "replica_capacity": "Description.Server.Properties.ReplicaCapacity", @@ -38355,7 +31445,7 @@ func GetMariadbServer(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -38369,7 +31459,7 @@ func GetMariadbServer(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat } limit := int64(1) - paginator, err := k.NewMariadbServerPaginator(essdk.BuildFilter(ctx, d.QueryContext, getMariadbServerFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewMariadbServerPaginator(essdk.BuildFilter(ctx, d.QueryContext, getMariadbServerFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -38400,7 +31490,7 @@ func GetMariadbServer(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat type MariadbDatabase struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.MariadbDatabaseDescription `json:"Description"` + Description azure.MariadbDatabaseDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -38408,59 +31498,6 @@ type MariadbDatabase struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type MariadbDatabaseHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -38529,10 +31566,11 @@ func (p MariadbDatabasePaginator) NextPage(ctx context.Context) ([]MariadbDataba } var listMariadbDatabaseFilters = map[string]string{ - "id": "Description.Databases.ID", - "name": "Description.Database.Name", - "tags": "Description.Database.Name", - "title": "Description.Database.Name", + "id": "Description.Databases.ID", + "name": "Description.Database.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.Database.Name", + "title": "Description.Database.Name", } func ListMariadbDatabase(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -38553,7 +31591,7 @@ func ListMariadbDatabase(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd plugin.Logger(ctx).Error("ListMariadbDatabase NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListMariadbDatabase GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -38569,7 +31607,7 @@ func ListMariadbDatabase(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd return nil, err } - paginator, err := k.NewMariadbDatabasePaginator(essdk.BuildFilter(ctx, d.QueryContext, listMariadbDatabaseFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewMariadbDatabasePaginator(essdk.BuildFilter(ctx, d.QueryContext, listMariadbDatabaseFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListMariadbDatabase NewMariadbDatabasePaginator", "error", err) return nil, err @@ -38596,10 +31634,11 @@ func ListMariadbDatabase(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd } var getMariadbDatabaseFilters = map[string]string{ - "id": "Description.Databases.ID", - "name": "Description.Database.Name", - "tags": "Description.Database.Name", - "title": "Description.Database.Name", + "id": "Description.Databases.ID", + "name": "Description.Database.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.Database.Name", + "title": "Description.Database.Name", } func GetMariadbDatabase(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -38617,7 +31656,7 @@ func GetMariadbDatabase(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -38631,7 +31670,7 @@ func GetMariadbDatabase(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr } limit := int64(1) - paginator, err := k.NewMariadbDatabasePaginator(essdk.BuildFilter(ctx, d.QueryContext, getMariadbDatabaseFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewMariadbDatabasePaginator(essdk.BuildFilter(ctx, d.QueryContext, getMariadbDatabaseFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -38662,7 +31701,7 @@ func GetMariadbDatabase(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr type MysqlServer struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.MysqlServerDescription `json:"Description"` + Description azure.MysqlServerDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -38670,59 +31709,6 @@ type MysqlServer struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type MysqlServerHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -38802,6 +31788,7 @@ var listMysqlServerFilters = map[string]string{ "master_server_id": "Description.Server.Properties.MasterServerID", "minimal_tls_version": "Description.Server.Properties.MinimalTLSVersion", "name": "Description.Server.Name", + "platform_account_id": "metadata.IntegrationID", "public_network_access": "Description.Server.Properties.PublicNetworkAccess", "replica_capacity": "Description.Server.Properties.ReplicaCapacity", "replication_role": "Description.Server.Properties.ReplicationRole", @@ -38844,7 +31831,7 @@ func ListMysqlServer(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate plugin.Logger(ctx).Error("ListMysqlServer NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListMysqlServer GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -38860,7 +31847,7 @@ func ListMysqlServer(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate return nil, err } - paginator, err := k.NewMysqlServerPaginator(essdk.BuildFilter(ctx, d.QueryContext, listMysqlServerFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewMysqlServerPaginator(essdk.BuildFilter(ctx, d.QueryContext, listMysqlServerFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListMysqlServer NewMysqlServerPaginator", "error", err) return nil, err @@ -38898,6 +31885,7 @@ var getMysqlServerFilters = map[string]string{ "master_server_id": "Description.Server.Properties.MasterServerID", "minimal_tls_version": "Description.Server.Properties.MinimalTLSVersion", "name": "description.Server.name", + "platform_account_id": "metadata.IntegrationID", "public_network_access": "Description.Server.Properties.PublicNetworkAccess", "replica_capacity": "Description.Server.Properties.ReplicaCapacity", "replication_role": "Description.Server.Properties.ReplicationRole", @@ -38937,7 +31925,7 @@ func GetMysqlServer(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -38951,7 +31939,7 @@ func GetMysqlServer(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD } limit := int64(1) - paginator, err := k.NewMysqlServerPaginator(essdk.BuildFilter(ctx, d.QueryContext, getMysqlServerFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewMysqlServerPaginator(essdk.BuildFilter(ctx, d.QueryContext, getMysqlServerFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -38982,7 +31970,7 @@ func GetMysqlServer(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD type MysqlFlexibleserver struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.MysqlFlexibleserverDescription `json:"Description"` + Description azure.MysqlFlexibleserverDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -38990,59 +31978,6 @@ type MysqlFlexibleserver struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type MysqlFlexibleserverHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -39111,10 +32046,11 @@ func (p MysqlFlexibleserverPaginator) NextPage(ctx context.Context) ([]MysqlFlex } var listMysqlFlexibleserverFilters = map[string]string{ - "id": "Description.Server.ID", - "name": "Description.Server.Name", - "tags": "Description.Server.Tags", - "title": "Description.Server.Name", + "id": "Description.Server.ID", + "name": "Description.Server.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.Server.Tags", + "title": "Description.Server.Name", } func ListMysqlFlexibleserver(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -39135,7 +32071,7 @@ func ListMysqlFlexibleserver(ctx context.Context, d *plugin.QueryData, _ *plugin plugin.Logger(ctx).Error("ListMysqlFlexibleserver NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListMysqlFlexibleserver GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -39151,7 +32087,7 @@ func ListMysqlFlexibleserver(ctx context.Context, d *plugin.QueryData, _ *plugin return nil, err } - paginator, err := k.NewMysqlFlexibleserverPaginator(essdk.BuildFilter(ctx, d.QueryContext, listMysqlFlexibleserverFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewMysqlFlexibleserverPaginator(essdk.BuildFilter(ctx, d.QueryContext, listMysqlFlexibleserverFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListMysqlFlexibleserver NewMysqlFlexibleserverPaginator", "error", err) return nil, err @@ -39178,10 +32114,11 @@ func ListMysqlFlexibleserver(ctx context.Context, d *plugin.QueryData, _ *plugin } var getMysqlFlexibleserverFilters = map[string]string{ - "id": "Description.Server.ID", - "name": "Description.Server.Name", - "tags": "Description.Server.Tags", - "title": "Description.Server.Name", + "id": "Description.Server.ID", + "name": "Description.Server.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.Server.Tags", + "title": "Description.Server.Name", } func GetMysqlFlexibleserver(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -39199,7 +32136,7 @@ func GetMysqlFlexibleserver(ctx context.Context, d *plugin.QueryData, _ *plugin. if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -39213,7 +32150,7 @@ func GetMysqlFlexibleserver(ctx context.Context, d *plugin.QueryData, _ *plugin. } limit := int64(1) - paginator, err := k.NewMysqlFlexibleserverPaginator(essdk.BuildFilter(ctx, d.QueryContext, getMysqlFlexibleserverFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewMysqlFlexibleserverPaginator(essdk.BuildFilter(ctx, d.QueryContext, getMysqlFlexibleserverFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -39244,7 +32181,7 @@ func GetMysqlFlexibleserver(ctx context.Context, d *plugin.QueryData, _ *plugin. type NetworkSecurityGroup struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.NetworkSecurityGroupDescription `json:"Description"` + Description azure.NetworkSecurityGroupDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -39252,59 +32189,6 @@ type NetworkSecurityGroup struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type NetworkSecurityGroupHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -39380,6 +32264,7 @@ var listNetworkSecurityGroupFilters = map[string]string{ "id": "Description.SecurityGroup.ID", "name": "Description.SecurityGroup.Name", "network_interfaces": "Description.SecurityGroup.Properties.NetworkInterfaces", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.SecurityGroup.Properties.ProvisioningState", "resource_group": "Description.ResourceGroup", "resource_guid": "Description.SecurityGroup.Properties.ResourceGUID", @@ -39408,7 +32293,7 @@ func ListNetworkSecurityGroup(ctx context.Context, d *plugin.QueryData, _ *plugi plugin.Logger(ctx).Error("ListNetworkSecurityGroup NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListNetworkSecurityGroup GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -39424,7 +32309,7 @@ func ListNetworkSecurityGroup(ctx context.Context, d *plugin.QueryData, _ *plugi return nil, err } - paginator, err := k.NewNetworkSecurityGroupPaginator(essdk.BuildFilter(ctx, d.QueryContext, listNetworkSecurityGroupFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewNetworkSecurityGroupPaginator(essdk.BuildFilter(ctx, d.QueryContext, listNetworkSecurityGroupFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListNetworkSecurityGroup NewNetworkSecurityGroupPaginator", "error", err) return nil, err @@ -39458,6 +32343,7 @@ var getNetworkSecurityGroupFilters = map[string]string{ "id": "Description.SecurityGroup.ID", "name": "description.SecurityGroup.name", "network_interfaces": "Description.SecurityGroup.Properties.NetworkInterfaces", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.SecurityGroup.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", "resource_guid": "Description.SecurityGroup.Properties.ResourceGUID", @@ -39483,7 +32369,7 @@ func GetNetworkSecurityGroup(ctx context.Context, d *plugin.QueryData, _ *plugin if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -39497,7 +32383,7 @@ func GetNetworkSecurityGroup(ctx context.Context, d *plugin.QueryData, _ *plugin } limit := int64(1) - paginator, err := k.NewNetworkSecurityGroupPaginator(essdk.BuildFilter(ctx, d.QueryContext, getNetworkSecurityGroupFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewNetworkSecurityGroupPaginator(essdk.BuildFilter(ctx, d.QueryContext, getNetworkSecurityGroupFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -39528,7 +32414,7 @@ func GetNetworkSecurityGroup(ctx context.Context, d *plugin.QueryData, _ *plugin type NetworkWatcher struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.NetworkWatcherDescription `json:"Description"` + Description azure.NetworkWatcherDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -39536,59 +32422,6 @@ type NetworkWatcher struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type NetworkWatcherHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -39657,14 +32490,15 @@ func (p NetworkWatcherPaginator) NextPage(ctx context.Context) ([]NetworkWatcher } var listNetworkWatcherFilters = map[string]string{ - "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", + "etag": "Description.Watcher.Etag", + "id": "Description.Watcher.ID", + "name": "Description.Watcher.Name", + "platform_account_id": "metadata.IntegrationID", + "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) { @@ -39685,7 +32519,7 @@ func ListNetworkWatcher(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr plugin.Logger(ctx).Error("ListNetworkWatcher NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListNetworkWatcher GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -39701,7 +32535,7 @@ func ListNetworkWatcher(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr return nil, err } - paginator, err := k.NewNetworkWatcherPaginator(essdk.BuildFilter(ctx, d.QueryContext, listNetworkWatcherFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewNetworkWatcherPaginator(essdk.BuildFilter(ctx, d.QueryContext, listNetworkWatcherFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListNetworkWatcher NewNetworkWatcherPaginator", "error", err) return nil, err @@ -39728,14 +32562,15 @@ func ListNetworkWatcher(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr } var getNetworkWatcherFilters = map[string]string{ - "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", + "etag": "Description.Watcher.Etag", + "id": "Description.Watcher.ID", + "name": "description.Watcher.name", + "platform_account_id": "metadata.IntegrationID", + "provisioning_state": "Description.Watcher.Properties.ProvisioningState", + "resource_group": "description.ResourceGroup", + "tags": "Description.Watcher.Tags", + "title": "Description.Watcher.Name", + "type": "Description.Watcher.Type", } func GetNetworkWatcher(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -39753,7 +32588,7 @@ func GetNetworkWatcher(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -39767,7 +32602,7 @@ func GetNetworkWatcher(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra } limit := int64(1) - paginator, err := k.NewNetworkWatcherPaginator(essdk.BuildFilter(ctx, d.QueryContext, getNetworkWatcherFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewNetworkWatcherPaginator(essdk.BuildFilter(ctx, d.QueryContext, getNetworkWatcherFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -39798,7 +32633,7 @@ func GetNetworkWatcher(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra type SearchService struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.SearchServiceDescription `json:"Description"` + Description azure.SearchServiceDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -39806,59 +32641,6 @@ type SearchService struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type SearchServiceHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -39934,6 +32716,7 @@ var listSearchServiceFilters = map[string]string{ "name": "Description.Service.Name", "network_rule_set": "Description.Service.Properties.NetworkRuleSet", "partition_count": "Description.Service.Properties.PartitionCount", + "platform_account_id": "metadata.IntegrationID", "private_endpoint_connections": "Description.Service.Properties.PrivateEndpointConnections", "provisioning_state": "Description.Service.Properties.ProvisioningState", "public_network_access": "Description.Service.Properties.PublicNetworkAccess", @@ -39965,7 +32748,7 @@ func ListSearchService(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra plugin.Logger(ctx).Error("ListSearchService NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListSearchService GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -39981,7 +32764,7 @@ func ListSearchService(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra return nil, err } - paginator, err := k.NewSearchServicePaginator(essdk.BuildFilter(ctx, d.QueryContext, listSearchServiceFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewSearchServicePaginator(essdk.BuildFilter(ctx, d.QueryContext, listSearchServiceFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListSearchService NewSearchServicePaginator", "error", err) return nil, err @@ -40015,6 +32798,7 @@ var getSearchServiceFilters = map[string]string{ "name": "description.Service.name", "network_rule_set": "Description.Service.Properties.NetworkRuleSet", "partition_count": "Description.Service.Properties.PartitionCount", + "platform_account_id": "metadata.IntegrationID", "private_endpoint_connections": "Description.Service.Properties.PrivateEndpointConnections", "provisioning_state": "Description.Service.Properties.ProvisioningState", "public_network_access": "Description.Service.Properties.PublicNetworkAccess", @@ -40044,7 +32828,7 @@ func GetSearchService(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -40058,7 +32842,7 @@ func GetSearchService(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat } limit := int64(1) - paginator, err := k.NewSearchServicePaginator(essdk.BuildFilter(ctx, d.QueryContext, getSearchServiceFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewSearchServicePaginator(essdk.BuildFilter(ctx, d.QueryContext, getSearchServiceFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -40089,7 +32873,7 @@ func GetSearchService(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat type ServiceFabricCluster struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.ServiceFabricClusterDescription `json:"Description"` + Description azure.ServiceFabricClusterDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -40097,59 +32881,6 @@ type ServiceFabricCluster struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type ServiceFabricClusterHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -40237,6 +32968,7 @@ var listServiceFabricClusterFilters = map[string]string{ "management_endpoint": "Description.Cluster.Properties.ManagementEndpoint", "name": "Description.Cluster.Name", "node_types": "Description.Cluster.Properties.NodeTypes", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.Cluster.Properties.ProvisioningState", "reliability_level": "Description.Cluster.Properties.ReliabilityLevel", "resource_group": "Description.ResourceGroup", @@ -40268,7 +33000,7 @@ func ListServiceFabricCluster(ctx context.Context, d *plugin.QueryData, _ *plugi plugin.Logger(ctx).Error("ListServiceFabricCluster NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListServiceFabricCluster GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -40284,7 +33016,7 @@ func ListServiceFabricCluster(ctx context.Context, d *plugin.QueryData, _ *plugi return nil, err } - paginator, err := k.NewServiceFabricClusterPaginator(essdk.BuildFilter(ctx, d.QueryContext, listServiceFabricClusterFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewServiceFabricClusterPaginator(essdk.BuildFilter(ctx, d.QueryContext, listServiceFabricClusterFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListServiceFabricCluster NewServiceFabricClusterPaginator", "error", err) return nil, err @@ -40330,6 +33062,7 @@ var getServiceFabricClusterFilters = map[string]string{ "management_endpoint": "Description.Cluster.Properties.ManagementEndpoint", "name": "description.Cluster.name", "node_types": "Description.Cluster.Properties.NodeTypes", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.Cluster.Properties.ProvisioningState", "reliability_level": "Description.Cluster.Properties.ReliabilityLevel", "resource_group": "description.ResourceGroup", @@ -40358,7 +33091,7 @@ func GetServiceFabricCluster(ctx context.Context, d *plugin.QueryData, _ *plugin if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -40372,7 +33105,7 @@ func GetServiceFabricCluster(ctx context.Context, d *plugin.QueryData, _ *plugin } limit := int64(1) - paginator, err := k.NewServiceFabricClusterPaginator(essdk.BuildFilter(ctx, d.QueryContext, getServiceFabricClusterFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewServiceFabricClusterPaginator(essdk.BuildFilter(ctx, d.QueryContext, getServiceFabricClusterFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -40403,7 +33136,7 @@ func GetServiceFabricCluster(ctx context.Context, d *plugin.QueryData, _ *plugin type ServicebusNamespace struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.ServicebusNamespaceDescription `json:"Description"` + Description azure.ServicebusNamespaceDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -40411,59 +33144,6 @@ type ServicebusNamespace struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type ServicebusNamespaceHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -40540,6 +33220,7 @@ var listServicebusNamespaceFilters = map[string]string{ "metric_id": "Description.SBNamespace.Properties.MetricID", "name": "Description.SBNamespace.Name", "network_rule_set": "Description.NetworkRuleSet", + "platform_account_id": "metadata.IntegrationID", "private_endpoint_connections": "Description.SBNamespace.Properties.PrivateEndpointConnections", "provisioning_state": "Description.SBNamespace.Properties.ProvisioningState", "resource_group": "Description.ResourceGroup", @@ -40572,7 +33253,7 @@ func ListServicebusNamespace(ctx context.Context, d *plugin.QueryData, _ *plugin plugin.Logger(ctx).Error("ListServicebusNamespace NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListServicebusNamespace GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -40588,7 +33269,7 @@ func ListServicebusNamespace(ctx context.Context, d *plugin.QueryData, _ *plugin return nil, err } - paginator, err := k.NewServicebusNamespacePaginator(essdk.BuildFilter(ctx, d.QueryContext, listServicebusNamespaceFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewServicebusNamespacePaginator(essdk.BuildFilter(ctx, d.QueryContext, listServicebusNamespaceFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListServicebusNamespace NewServicebusNamespacePaginator", "error", err) return nil, err @@ -40623,6 +33304,7 @@ var getServicebusNamespaceFilters = map[string]string{ "metric_id": "Description.SBNamespace.Properties.MetricID", "name": "description.SBNamespace.name", "network_rule_set": "Description.NetworkRuleSet", + "platform_account_id": "metadata.IntegrationID", "private_endpoint_connections": "Description.SBNamespace.Properties.PrivateEndpointConnections", "provisioning_state": "Description.SBNamespace.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", @@ -40652,7 +33334,7 @@ func GetServicebusNamespace(ctx context.Context, d *plugin.QueryData, _ *plugin. if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -40666,7 +33348,7 @@ func GetServicebusNamespace(ctx context.Context, d *plugin.QueryData, _ *plugin. } limit := int64(1) - paginator, err := k.NewServicebusNamespacePaginator(essdk.BuildFilter(ctx, d.QueryContext, getServicebusNamespaceFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewServicebusNamespacePaginator(essdk.BuildFilter(ctx, d.QueryContext, getServicebusNamespaceFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -40697,7 +33379,7 @@ func GetServicebusNamespace(ctx context.Context, d *plugin.QueryData, _ *plugin. type SignalrService struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.SignalrServiceDescription `json:"Description"` + Description azure.SignalrServiceDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -40705,59 +33387,6 @@ type SignalrService struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type SignalrServiceHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -40836,6 +33465,7 @@ var listSignalrServiceFilters = map[string]string{ "kind": "Description.ResourceInfo.Kind", "name": "Description.ResourceInfo.Name", "network_acls": "Description.ResourceInfo.Properties.NetworkACLs", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.ResourceInfo.Properties.ProvisioningState", "public_port": "Description.ResourceInfo.Properties.PublicPort", "resource_group": "Description.ResourceGroup", @@ -40866,7 +33496,7 @@ func ListSignalrService(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr plugin.Logger(ctx).Error("ListSignalrService NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListSignalrService GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -40882,7 +33512,7 @@ func ListSignalrService(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr return nil, err } - paginator, err := k.NewSignalrServicePaginator(essdk.BuildFilter(ctx, d.QueryContext, listSignalrServiceFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewSignalrServicePaginator(essdk.BuildFilter(ctx, d.QueryContext, listSignalrServiceFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListSignalrService NewSignalrServicePaginator", "error", err) return nil, err @@ -40919,6 +33549,7 @@ var getSignalrServiceFilters = map[string]string{ "kind": "Description.ResourceInfo.Kind", "name": "description.ResourceType.name", "network_acls": "Description.ResourceInfo.Properties.NetworkACLs", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.ResourceInfo.Properties.ProvisioningState", "public_port": "Description.ResourceInfo.Properties.PublicPort", "resource_group": "description.ResourceGroup", @@ -40946,7 +33577,7 @@ func GetSignalrService(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -40960,7 +33591,7 @@ func GetSignalrService(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra } limit := int64(1) - paginator, err := k.NewSignalrServicePaginator(essdk.BuildFilter(ctx, d.QueryContext, getSignalrServiceFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewSignalrServicePaginator(essdk.BuildFilter(ctx, d.QueryContext, getSignalrServiceFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -40991,7 +33622,7 @@ func GetSignalrService(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra type SpringCloudService struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.SpringCloudServiceDescription `json:"Description"` + Description azure.SpringCloudServiceDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -40999,59 +33630,6 @@ type SpringCloudService struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type SpringCloudServiceHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -41123,6 +33701,7 @@ var listSpringCloudServiceFilters = map[string]string{ "diagnostic_settings": "Description.DiagnosticSettingsResource", "id": "Description.App.ID", "name": "Description.App.Name", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.App.Properties.ProvisioningState", "resource_group": "Description.ResourceGroup", "tags": "Description.App.Tags", @@ -41149,7 +33728,7 @@ func ListSpringCloudService(ctx context.Context, d *plugin.QueryData, _ *plugin. plugin.Logger(ctx).Error("ListSpringCloudService NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListSpringCloudService GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -41165,7 +33744,7 @@ func ListSpringCloudService(ctx context.Context, d *plugin.QueryData, _ *plugin. return nil, err } - paginator, err := k.NewSpringCloudServicePaginator(essdk.BuildFilter(ctx, d.QueryContext, listSpringCloudServiceFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewSpringCloudServicePaginator(essdk.BuildFilter(ctx, d.QueryContext, listSpringCloudServiceFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListSpringCloudService NewSpringCloudServicePaginator", "error", err) return nil, err @@ -41195,6 +33774,7 @@ var getSpringCloudServiceFilters = map[string]string{ "diagnostic_settings": "Description.DiagnosticSettingsResource", "id": "Description.App.ID", "name": "description.ServiceResource.name", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.App.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", "tags": "Description.App.Tags", @@ -41218,7 +33798,7 @@ func GetSpringCloudService(ctx context.Context, d *plugin.QueryData, _ *plugin.H if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -41232,7 +33812,7 @@ func GetSpringCloudService(ctx context.Context, d *plugin.QueryData, _ *plugin.H } limit := int64(1) - paginator, err := k.NewSpringCloudServicePaginator(essdk.BuildFilter(ctx, d.QueryContext, getSpringCloudServiceFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewSpringCloudServicePaginator(essdk.BuildFilter(ctx, d.QueryContext, getSpringCloudServiceFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -41263,7 +33843,7 @@ func GetSpringCloudService(ctx context.Context, d *plugin.QueryData, _ *plugin.H type StreamAnalyticsJob struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.StreamAnalyticsJobDescription `json:"Description"` + Description azure.StreamAnalyticsJobDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -41271,59 +33851,6 @@ type StreamAnalyticsJob struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type StreamAnalyticsJobHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -41408,6 +33935,7 @@ var listStreamAnalyticsJobFilters = map[string]string{ "output_error_policy": "Description.StreamingJob.Properties.OutputErrorPolicy", "output_start_mode": "Description.StreamingJob.Properties.OutputStartMode", "outputs": "Description.StreamingJob.Properties.Outputs", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.StreamingJob.Properties.ProvisioningState", "resource_group": "Description.ResourceGroup", "sku_name": "Description.StreamingJob.Properties.SKU.Name", @@ -41435,7 +33963,7 @@ func ListStreamAnalyticsJob(ctx context.Context, d *plugin.QueryData, _ *plugin. plugin.Logger(ctx).Error("ListStreamAnalyticsJob NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListStreamAnalyticsJob GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -41451,7 +33979,7 @@ func ListStreamAnalyticsJob(ctx context.Context, d *plugin.QueryData, _ *plugin. return nil, err } - paginator, err := k.NewStreamAnalyticsJobPaginator(essdk.BuildFilter(ctx, d.QueryContext, listStreamAnalyticsJobFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewStreamAnalyticsJobPaginator(essdk.BuildFilter(ctx, d.QueryContext, listStreamAnalyticsJobFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListStreamAnalyticsJob NewStreamAnalyticsJobPaginator", "error", err) return nil, err @@ -41494,6 +34022,7 @@ var getStreamAnalyticsJobFilters = map[string]string{ "output_error_policy": "Description.StreamingJob.Properties.OutputErrorPolicy", "output_start_mode": "Description.StreamingJob.Properties.OutputStartMode", "outputs": "Description.StreamingJob.Properties.Outputs", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.StreamingJob.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", "sku_name": "Description.StreamingJob.Properties.SKU.Name", @@ -41518,7 +34047,7 @@ func GetStreamAnalyticsJob(ctx context.Context, d *plugin.QueryData, _ *plugin.H if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -41532,7 +34061,7 @@ func GetStreamAnalyticsJob(ctx context.Context, d *plugin.QueryData, _ *plugin.H } limit := int64(1) - paginator, err := k.NewStreamAnalyticsJobPaginator(essdk.BuildFilter(ctx, d.QueryContext, getStreamAnalyticsJobFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewStreamAnalyticsJobPaginator(essdk.BuildFilter(ctx, d.QueryContext, getStreamAnalyticsJobFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -41563,7 +34092,7 @@ func GetStreamAnalyticsJob(ctx context.Context, d *plugin.QueryData, _ *plugin.H type StreamAnalyticsCluster struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.StreamAnalyticsClusterDescription `json:"Description"` + Description azure.StreamAnalyticsClusterDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -41571,59 +34100,6 @@ type StreamAnalyticsCluster struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type StreamAnalyticsClusterHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -41692,10 +34168,11 @@ func (p StreamAnalyticsClusterPaginator) NextPage(ctx context.Context) ([]Stream } var listStreamAnalyticsClusterFilters = map[string]string{ - "id": "Description.Cluster.ID", - "name": "Description.StreamingJob.SKU.Name", - "tags": "Description.StreamingJob.Tags", - "title": "Description.StreamingJob.SKU.Name", + "id": "Description.Cluster.ID", + "name": "Description.StreamingJob.SKU.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.StreamingJob.Tags", + "title": "Description.StreamingJob.SKU.Name", } func ListStreamAnalyticsCluster(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -41716,7 +34193,7 @@ func ListStreamAnalyticsCluster(ctx context.Context, d *plugin.QueryData, _ *plu plugin.Logger(ctx).Error("ListStreamAnalyticsCluster NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListStreamAnalyticsCluster GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -41732,7 +34209,7 @@ func ListStreamAnalyticsCluster(ctx context.Context, d *plugin.QueryData, _ *plu return nil, err } - paginator, err := k.NewStreamAnalyticsClusterPaginator(essdk.BuildFilter(ctx, d.QueryContext, listStreamAnalyticsClusterFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewStreamAnalyticsClusterPaginator(essdk.BuildFilter(ctx, d.QueryContext, listStreamAnalyticsClusterFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListStreamAnalyticsCluster NewStreamAnalyticsClusterPaginator", "error", err) return nil, err @@ -41759,10 +34236,11 @@ func ListStreamAnalyticsCluster(ctx context.Context, d *plugin.QueryData, _ *plu } var getStreamAnalyticsClusterFilters = map[string]string{ - "id": "Description.Cluster.ID", - "name": "Description.StreamingJob.SKU.Name", - "tags": "Description.StreamingJob.Tags", - "title": "Description.StreamingJob.SKU.Name", + "id": "Description.Cluster.ID", + "name": "Description.StreamingJob.SKU.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.StreamingJob.Tags", + "title": "Description.StreamingJob.SKU.Name", } func GetStreamAnalyticsCluster(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -41780,7 +34258,7 @@ func GetStreamAnalyticsCluster(ctx context.Context, d *plugin.QueryData, _ *plug if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -41794,7 +34272,7 @@ func GetStreamAnalyticsCluster(ctx context.Context, d *plugin.QueryData, _ *plug } limit := int64(1) - paginator, err := k.NewStreamAnalyticsClusterPaginator(essdk.BuildFilter(ctx, d.QueryContext, getStreamAnalyticsClusterFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewStreamAnalyticsClusterPaginator(essdk.BuildFilter(ctx, d.QueryContext, getStreamAnalyticsClusterFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -41825,7 +34303,7 @@ func GetStreamAnalyticsCluster(ctx context.Context, d *plugin.QueryData, _ *plug type VirtualMachineImagesImageTemplates struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.VirtualMachineImagesImageTemplatesDescription `json:"Description"` + Description azure.VirtualMachineImagesImageTemplatesDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -41833,59 +34311,6 @@ type VirtualMachineImagesImageTemplates struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type VirtualMachineImagesImageTemplatesHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -41954,10 +34379,11 @@ func (p VirtualMachineImagesImageTemplatesPaginator) NextPage(ctx context.Contex } var listVirtualMachineImagesImageTemplatesFilters = map[string]string{ - "id": "Description.ImageTemplates.ID", - "name": "Description.ImageTemplate.Name", - "tags": "Description.ImageTemplate.Tags", - "title": "Description.ImageTemplate.Name", + "id": "Description.ImageTemplates.ID", + "name": "Description.ImageTemplate.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.ImageTemplate.Tags", + "title": "Description.ImageTemplate.Name", } func ListVirtualMachineImagesImageTemplates(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -41978,7 +34404,7 @@ func ListVirtualMachineImagesImageTemplates(ctx context.Context, d *plugin.Query plugin.Logger(ctx).Error("ListVirtualMachineImagesImageTemplates NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListVirtualMachineImagesImageTemplates GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -41994,7 +34420,7 @@ func ListVirtualMachineImagesImageTemplates(ctx context.Context, d *plugin.Query return nil, err } - paginator, err := k.NewVirtualMachineImagesImageTemplatesPaginator(essdk.BuildFilter(ctx, d.QueryContext, listVirtualMachineImagesImageTemplatesFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewVirtualMachineImagesImageTemplatesPaginator(essdk.BuildFilter(ctx, d.QueryContext, listVirtualMachineImagesImageTemplatesFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListVirtualMachineImagesImageTemplates NewVirtualMachineImagesImageTemplatesPaginator", "error", err) return nil, err @@ -42021,10 +34447,11 @@ func ListVirtualMachineImagesImageTemplates(ctx context.Context, d *plugin.Query } var getVirtualMachineImagesImageTemplatesFilters = map[string]string{ - "id": "Description.ImageTemplates.ID", - "name": "Description.ImageTemplate.Name", - "tags": "Description.ImageTemplate.Tags", - "title": "Description.ImageTemplate.Name", + "id": "Description.ImageTemplates.ID", + "name": "Description.ImageTemplate.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.ImageTemplate.Tags", + "title": "Description.ImageTemplate.Name", } func GetVirtualMachineImagesImageTemplates(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -42042,7 +34469,7 @@ func GetVirtualMachineImagesImageTemplates(ctx context.Context, d *plugin.QueryD if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -42056,7 +34483,7 @@ func GetVirtualMachineImagesImageTemplates(ctx context.Context, d *plugin.QueryD } limit := int64(1) - paginator, err := k.NewVirtualMachineImagesImageTemplatesPaginator(essdk.BuildFilter(ctx, d.QueryContext, getVirtualMachineImagesImageTemplatesFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewVirtualMachineImagesImageTemplatesPaginator(essdk.BuildFilter(ctx, d.QueryContext, getVirtualMachineImagesImageTemplatesFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -42087,7 +34514,7 @@ func GetVirtualMachineImagesImageTemplates(ctx context.Context, d *plugin.QueryD type OperationalInsightsWorkspaces struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.OperationalInsightsWorkspacesDescription `json:"Description"` + Description azure.OperationalInsightsWorkspacesDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -42095,59 +34522,6 @@ type OperationalInsightsWorkspaces struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type OperationalInsightsWorkspacesHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -42226,6 +34600,7 @@ var listOperationalInsightsWorkspacesFilters = map[string]string{ "immediate_purge_data_on_30_days": "Description.Workspace.Properties.Features.ImmediatePurgeDataOn30Days", "location": "Description.Workspace.Location", "name": "Description.Workspace.Name", + "platform_account_id": "metadata.IntegrationID", "private_link_scoped_resources": "Description.Workspace.Properties.PrivateLinkScopedResources", "provisioning_state": "Description.Workspace.Properties.ProvisioningState", "public_network_access_for_ingestion": "Description.Workspace.Properties.PublicNetworkAccessForIngestion", @@ -42257,7 +34632,7 @@ func ListOperationalInsightsWorkspaces(ctx context.Context, d *plugin.QueryData, plugin.Logger(ctx).Error("ListOperationalInsightsWorkspaces NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListOperationalInsightsWorkspaces GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -42273,7 +34648,7 @@ func ListOperationalInsightsWorkspaces(ctx context.Context, d *plugin.QueryData, return nil, err } - paginator, err := k.NewOperationalInsightsWorkspacesPaginator(essdk.BuildFilter(ctx, d.QueryContext, listOperationalInsightsWorkspacesFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewOperationalInsightsWorkspacesPaginator(essdk.BuildFilter(ctx, d.QueryContext, listOperationalInsightsWorkspacesFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListOperationalInsightsWorkspaces NewOperationalInsightsWorkspacesPaginator", "error", err) return nil, err @@ -42310,6 +34685,7 @@ var getOperationalInsightsWorkspacesFilters = map[string]string{ "immediate_purge_data_on_30_days": "Description.Workspace.Properties.Features.ImmediatePurgeDataOn30Days", "location": "Description.Workspace.Location", "name": "Description.Workspace.Name", + "platform_account_id": "metadata.IntegrationID", "private_link_scoped_resources": "Description.Workspace.Properties.PrivateLinkScopedResources", "provisioning_state": "Description.Workspace.Properties.ProvisioningState", "public_network_access_for_ingestion": "Description.Workspace.Properties.PublicNetworkAccessForIngestion", @@ -42338,7 +34714,7 @@ func GetOperationalInsightsWorkspaces(ctx context.Context, d *plugin.QueryData, if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -42352,7 +34728,7 @@ func GetOperationalInsightsWorkspaces(ctx context.Context, d *plugin.QueryData, } limit := int64(1) - paginator, err := k.NewOperationalInsightsWorkspacesPaginator(essdk.BuildFilter(ctx, d.QueryContext, getOperationalInsightsWorkspacesFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewOperationalInsightsWorkspacesPaginator(essdk.BuildFilter(ctx, d.QueryContext, getOperationalInsightsWorkspacesFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -42383,7 +34759,7 @@ func GetOperationalInsightsWorkspaces(ctx context.Context, d *plugin.QueryData, type TimeSeriesInsightsEnvironments struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.TimeSeriesInsightsEnvironmentsDescription `json:"Description"` + Description azure.TimeSeriesInsightsEnvironmentsDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -42391,59 +34767,6 @@ type TimeSeriesInsightsEnvironments struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type TimeSeriesInsightsEnvironmentsHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -42512,10 +34835,11 @@ func (p TimeSeriesInsightsEnvironmentsPaginator) NextPage(ctx context.Context) ( } var listTimeSeriesInsightsEnvironmentsFilters = map[string]string{ - "id": "Description.Environments.ID", - "name": "Description.Environment.Name", - "tags": "Description.Environment.Tags", - "title": "Description.Environment.Name", + "id": "Description.Environments.ID", + "name": "Description.Environment.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.Environment.Tags", + "title": "Description.Environment.Name", } func ListTimeSeriesInsightsEnvironments(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -42536,7 +34860,7 @@ func ListTimeSeriesInsightsEnvironments(ctx context.Context, d *plugin.QueryData plugin.Logger(ctx).Error("ListTimeSeriesInsightsEnvironments NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListTimeSeriesInsightsEnvironments GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -42552,7 +34876,7 @@ func ListTimeSeriesInsightsEnvironments(ctx context.Context, d *plugin.QueryData return nil, err } - paginator, err := k.NewTimeSeriesInsightsEnvironmentsPaginator(essdk.BuildFilter(ctx, d.QueryContext, listTimeSeriesInsightsEnvironmentsFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewTimeSeriesInsightsEnvironmentsPaginator(essdk.BuildFilter(ctx, d.QueryContext, listTimeSeriesInsightsEnvironmentsFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListTimeSeriesInsightsEnvironments NewTimeSeriesInsightsEnvironmentsPaginator", "error", err) return nil, err @@ -42579,10 +34903,11 @@ func ListTimeSeriesInsightsEnvironments(ctx context.Context, d *plugin.QueryData } var getTimeSeriesInsightsEnvironmentsFilters = map[string]string{ - "id": "Description.Environments.ID", - "name": "Description.Environment.Name", - "tags": "Description.Environment.Tags", - "title": "Description.Environment.Name", + "id": "Description.Environments.ID", + "name": "Description.Environment.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.Environment.Tags", + "title": "Description.Environment.Name", } func GetTimeSeriesInsightsEnvironments(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -42600,7 +34925,7 @@ func GetTimeSeriesInsightsEnvironments(ctx context.Context, d *plugin.QueryData, if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -42614,7 +34939,7 @@ func GetTimeSeriesInsightsEnvironments(ctx context.Context, d *plugin.QueryData, } limit := int64(1) - paginator, err := k.NewTimeSeriesInsightsEnvironmentsPaginator(essdk.BuildFilter(ctx, d.QueryContext, getTimeSeriesInsightsEnvironmentsFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewTimeSeriesInsightsEnvironmentsPaginator(essdk.BuildFilter(ctx, d.QueryContext, getTimeSeriesInsightsEnvironmentsFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -42645,7 +34970,7 @@ func GetTimeSeriesInsightsEnvironments(ctx context.Context, d *plugin.QueryData, type SynapseWorkspace struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.SynapseWorkspaceDescription `json:"Description"` + Description azure.SynapseWorkspaceDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -42653,59 +34978,6 @@ type SynapseWorkspace struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type SynapseWorkspaceHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -42785,6 +35057,7 @@ var listSynapseWorkspaceFilters = map[string]string{ "managed_virtual_network": "Description.Workspace.Properties.ManagedVirtualNetwork", "managed_virtual_network_settings": "Description.Workspace.Properties.ManagedVirtualNetworkSettings", "name": "Description.Workspace.Name", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.Workspace.Properties.ProvisioningState", "public_network_access": "Description.Workspace.Properties.PublicNetworkAccess", "purview_configuration": "Description.Workspace.Properties.PurviewConfiguration", @@ -42818,7 +35091,7 @@ func ListSynapseWorkspace(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy plugin.Logger(ctx).Error("ListSynapseWorkspace NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListSynapseWorkspace GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -42834,7 +35107,7 @@ func ListSynapseWorkspace(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy return nil, err } - paginator, err := k.NewSynapseWorkspacePaginator(essdk.BuildFilter(ctx, d.QueryContext, listSynapseWorkspaceFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewSynapseWorkspacePaginator(essdk.BuildFilter(ctx, d.QueryContext, listSynapseWorkspaceFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListSynapseWorkspace NewSynapseWorkspacePaginator", "error", err) return nil, err @@ -42872,6 +35145,7 @@ var getSynapseWorkspaceFilters = map[string]string{ "managed_virtual_network": "Description.Workspace.Properties.ManagedVirtualNetwork", "managed_virtual_network_settings": "Description.Workspace.Properties.ManagedVirtualNetworkSettings", "name": "description.Workspace.name", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.Workspace.Properties.ProvisioningState", "public_network_access": "Description.Workspace.Properties.PublicNetworkAccess", "purview_configuration": "Description.Workspace.Properties.PurviewConfiguration", @@ -42902,7 +35176,7 @@ func GetSynapseWorkspace(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -42916,7 +35190,7 @@ func GetSynapseWorkspace(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd } limit := int64(1) - paginator, err := k.NewSynapseWorkspacePaginator(essdk.BuildFilter(ctx, d.QueryContext, getSynapseWorkspaceFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewSynapseWorkspacePaginator(essdk.BuildFilter(ctx, d.QueryContext, getSynapseWorkspaceFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -42947,7 +35221,7 @@ func GetSynapseWorkspace(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd type SynapseWorkspaceBigdatapools struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.SynapseWorkspaceBigdatapoolsDescription `json:"Description"` + Description azure.SynapseWorkspaceBigdatapoolsDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -42955,59 +35229,6 @@ type SynapseWorkspaceBigdatapools struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type SynapseWorkspaceBigdatapoolsHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -43076,10 +35297,11 @@ func (p SynapseWorkspaceBigdatapoolsPaginator) NextPage(ctx context.Context) ([] } var listSynapseWorkspaceBigdatapoolsFilters = map[string]string{ - "id": "Description.BigDataPool.ID", - "name": "Description.BigDataPool.Name", - "tags": "Description.BigDataPool.Tags", - "title": "Description.BigDataPool.Name", + "id": "Description.BigDataPool.ID", + "name": "Description.BigDataPool.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.BigDataPool.Tags", + "title": "Description.BigDataPool.Name", } func ListSynapseWorkspaceBigdatapools(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -43100,7 +35322,7 @@ func ListSynapseWorkspaceBigdatapools(ctx context.Context, d *plugin.QueryData, plugin.Logger(ctx).Error("ListSynapseWorkspaceBigdatapools NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListSynapseWorkspaceBigdatapools GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -43116,7 +35338,7 @@ func ListSynapseWorkspaceBigdatapools(ctx context.Context, d *plugin.QueryData, return nil, err } - paginator, err := k.NewSynapseWorkspaceBigdatapoolsPaginator(essdk.BuildFilter(ctx, d.QueryContext, listSynapseWorkspaceBigdatapoolsFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewSynapseWorkspaceBigdatapoolsPaginator(essdk.BuildFilter(ctx, d.QueryContext, listSynapseWorkspaceBigdatapoolsFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListSynapseWorkspaceBigdatapools NewSynapseWorkspaceBigdatapoolsPaginator", "error", err) return nil, err @@ -43143,10 +35365,11 @@ func ListSynapseWorkspaceBigdatapools(ctx context.Context, d *plugin.QueryData, } var getSynapseWorkspaceBigdatapoolsFilters = map[string]string{ - "id": "Description.BigDataPool.ID", - "name": "Description.BigDataPool.Name", - "tags": "Description.BigDataPool.Tags", - "title": "Description.BigDataPool.Name", + "id": "Description.BigDataPool.ID", + "name": "Description.BigDataPool.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.BigDataPool.Tags", + "title": "Description.BigDataPool.Name", } func GetSynapseWorkspaceBigdatapools(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -43164,7 +35387,7 @@ func GetSynapseWorkspaceBigdatapools(ctx context.Context, d *plugin.QueryData, _ if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -43178,7 +35401,7 @@ func GetSynapseWorkspaceBigdatapools(ctx context.Context, d *plugin.QueryData, _ } limit := int64(1) - paginator, err := k.NewSynapseWorkspaceBigdatapoolsPaginator(essdk.BuildFilter(ctx, d.QueryContext, getSynapseWorkspaceBigdatapoolsFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewSynapseWorkspaceBigdatapoolsPaginator(essdk.BuildFilter(ctx, d.QueryContext, getSynapseWorkspaceBigdatapoolsFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -43209,7 +35432,7 @@ func GetSynapseWorkspaceBigdatapools(ctx context.Context, d *plugin.QueryData, _ type SynapseWorkspaceSqlpools struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.SynapseWorkspaceSqlpoolsDescription `json:"Description"` + Description azure.SynapseWorkspaceSqlpoolsDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -43217,59 +35440,6 @@ type SynapseWorkspaceSqlpools struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type SynapseWorkspaceSqlpoolsHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -43338,10 +35508,11 @@ func (p SynapseWorkspaceSqlpoolsPaginator) NextPage(ctx context.Context) ([]Syna } var listSynapseWorkspaceSqlpoolsFilters = map[string]string{ - "id": "Description.SqlPool.ID", - "name": "Description.SqlPool.Name", - "tags": "Description.SqlPool.Tags", - "title": "Description.SqlPool.Name", + "id": "Description.SqlPool.ID", + "name": "Description.SqlPool.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.SqlPool.Tags", + "title": "Description.SqlPool.Name", } func ListSynapseWorkspaceSqlpools(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -43362,7 +35533,7 @@ func ListSynapseWorkspaceSqlpools(ctx context.Context, d *plugin.QueryData, _ *p plugin.Logger(ctx).Error("ListSynapseWorkspaceSqlpools NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListSynapseWorkspaceSqlpools GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -43378,7 +35549,7 @@ func ListSynapseWorkspaceSqlpools(ctx context.Context, d *plugin.QueryData, _ *p return nil, err } - paginator, err := k.NewSynapseWorkspaceSqlpoolsPaginator(essdk.BuildFilter(ctx, d.QueryContext, listSynapseWorkspaceSqlpoolsFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewSynapseWorkspaceSqlpoolsPaginator(essdk.BuildFilter(ctx, d.QueryContext, listSynapseWorkspaceSqlpoolsFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListSynapseWorkspaceSqlpools NewSynapseWorkspaceSqlpoolsPaginator", "error", err) return nil, err @@ -43405,10 +35576,11 @@ func ListSynapseWorkspaceSqlpools(ctx context.Context, d *plugin.QueryData, _ *p } var getSynapseWorkspaceSqlpoolsFilters = map[string]string{ - "id": "Description.SqlPool.ID", - "name": "Description.SqlPool.Name", - "tags": "Description.SqlPool.Tags", - "title": "Description.SqlPool.Name", + "id": "Description.SqlPool.ID", + "name": "Description.SqlPool.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.SqlPool.Tags", + "title": "Description.SqlPool.Name", } func GetSynapseWorkspaceSqlpools(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -43426,7 +35598,7 @@ func GetSynapseWorkspaceSqlpools(ctx context.Context, d *plugin.QueryData, _ *pl if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -43440,7 +35612,7 @@ func GetSynapseWorkspaceSqlpools(ctx context.Context, d *plugin.QueryData, _ *pl } limit := int64(1) - paginator, err := k.NewSynapseWorkspaceSqlpoolsPaginator(essdk.BuildFilter(ctx, d.QueryContext, getSynapseWorkspaceSqlpoolsFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewSynapseWorkspaceSqlpoolsPaginator(essdk.BuildFilter(ctx, d.QueryContext, getSynapseWorkspaceSqlpoolsFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -43471,7 +35643,7 @@ func GetSynapseWorkspaceSqlpools(ctx context.Context, d *plugin.QueryData, _ *pl type Location struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.LocationDescription `json:"Description"` + Description azure.LocationDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -43479,59 +35651,6 @@ type Location struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type LocationHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -43600,12 +35719,13 @@ func (p LocationPaginator) NextPage(ctx context.Context) ([]Location, error) { } var listLocationFilters = map[string]string{ - "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", + "display_name": "Description.Location.DisplayName", + "id": "Description.Location.ID", + "latitude": "Description.Location.Latitude", + "longitude": "Description.Location.Longitude", + "name": "Description.Location.Name", + "platform_account_id": "metadata.IntegrationID", + "title": "Description.Location.Name", } func ListLocation(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -43626,7 +35746,7 @@ func ListLocation(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDat plugin.Logger(ctx).Error("ListLocation NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListLocation GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -43642,7 +35762,7 @@ func ListLocation(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDat return nil, err } - paginator, err := k.NewLocationPaginator(essdk.BuildFilter(ctx, d.QueryContext, listLocationFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewLocationPaginator(essdk.BuildFilter(ctx, d.QueryContext, listLocationFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListLocation NewLocationPaginator", "error", err) return nil, err @@ -43669,13 +35789,14 @@ func ListLocation(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDat } var getLocationFilters = map[string]string{ - "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", + "display_name": "Description.Location.DisplayName", + "id": "Description.Location.ID", + "latitude": "Description.Location.Latitude", + "longitude": "Description.Location.Longitude", + "name": "description.Location.name", + "platform_account_id": "metadata.IntegrationID", + "resource_group": "description.ResourceGroup", + "title": "Description.Location.Name", } func GetLocation(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -43693,7 +35814,7 @@ func GetLocation(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -43707,7 +35828,7 @@ func GetLocation(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData } limit := int64(1) - paginator, err := k.NewLocationPaginator(essdk.BuildFilter(ctx, d.QueryContext, getLocationFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewLocationPaginator(essdk.BuildFilter(ctx, d.QueryContext, getLocationFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -43738,7 +35859,7 @@ func GetLocation(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData type AnalysisServiceServer struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.AnalysisServiceServerDescription `json:"Description"` + Description azure.AnalysisServiceServerDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -43746,59 +35867,6 @@ type AnalysisServiceServer struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type AnalysisServiceServerHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -43867,10 +35935,11 @@ func (p AnalysisServiceServerPaginator) NextPage(ctx context.Context) ([]Analysi } var listAnalysisServiceServerFilters = map[string]string{ - "id": "Description.Servers.ID", - "name": "Description.Server.Properties.ServerFullName", - "tags": "Description.Server.Tags", - "title": "Description.Server.Properties.ServerFullName", + "id": "Description.Servers.ID", + "name": "Description.Server.Properties.ServerFullName", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.Server.Tags", + "title": "Description.Server.Properties.ServerFullName", } func ListAnalysisServiceServer(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -43891,7 +35960,7 @@ func ListAnalysisServiceServer(ctx context.Context, d *plugin.QueryData, _ *plug plugin.Logger(ctx).Error("ListAnalysisServiceServer NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListAnalysisServiceServer GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -43907,7 +35976,7 @@ func ListAnalysisServiceServer(ctx context.Context, d *plugin.QueryData, _ *plug return nil, err } - paginator, err := k.NewAnalysisServiceServerPaginator(essdk.BuildFilter(ctx, d.QueryContext, listAnalysisServiceServerFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewAnalysisServiceServerPaginator(essdk.BuildFilter(ctx, d.QueryContext, listAnalysisServiceServerFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListAnalysisServiceServer NewAnalysisServiceServerPaginator", "error", err) return nil, err @@ -43934,11 +36003,12 @@ func ListAnalysisServiceServer(ctx context.Context, d *plugin.QueryData, _ *plug } var getAnalysisServiceServerFilters = map[string]string{ - "id": "Description.Servers.ID", - "name": "description.Server.name", - "resource_group": "description.ResourceGroup", - "tags": "Description.Server.Tags", - "title": "Description.Server.Properties.ServerFullName", + "id": "Description.Servers.ID", + "name": "description.Server.name", + "platform_account_id": "metadata.IntegrationID", + "resource_group": "description.ResourceGroup", + "tags": "Description.Server.Tags", + "title": "Description.Server.Properties.ServerFullName", } func GetAnalysisServiceServer(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -43956,7 +36026,7 @@ func GetAnalysisServiceServer(ctx context.Context, d *plugin.QueryData, _ *plugi if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -43970,7 +36040,7 @@ func GetAnalysisServiceServer(ctx context.Context, d *plugin.QueryData, _ *plugi } limit := int64(1) - paginator, err := k.NewAnalysisServiceServerPaginator(essdk.BuildFilter(ctx, d.QueryContext, getAnalysisServiceServerFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewAnalysisServiceServerPaginator(essdk.BuildFilter(ctx, d.QueryContext, getAnalysisServiceServerFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -44001,7 +36071,7 @@ func GetAnalysisServiceServer(ctx context.Context, d *plugin.QueryData, _ *plugi type PostgresqlServer struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.PostgresqlServerDescription `json:"Description"` + Description azure.PostgresqlServerDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -44009,59 +36079,6 @@ type PostgresqlServer struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type PostgresqlServerHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -44142,6 +36159,7 @@ var listPostgresqlServerFilters = map[string]string{ "master_server_id": "Description.Server.Properties.MasterServerID", "minimal_tls_version": "Description.Server.Properties.MinimalTLSVersion", "name": "Description.Server.Name", + "platform_account_id": "metadata.IntegrationID", "public_network_access": "Description.Server.Properties.PublicNetworkAccess", "replica_capacity": "Description.Server.Properties.ReplicaCapacity", "replication_role": "Description.Server.Properties.ReplicationRole", @@ -44183,7 +36201,7 @@ func ListPostgresqlServer(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy plugin.Logger(ctx).Error("ListPostgresqlServer NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListPostgresqlServer GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -44199,7 +36217,7 @@ func ListPostgresqlServer(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy return nil, err } - paginator, err := k.NewPostgresqlServerPaginator(essdk.BuildFilter(ctx, d.QueryContext, listPostgresqlServerFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewPostgresqlServerPaginator(essdk.BuildFilter(ctx, d.QueryContext, listPostgresqlServerFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListPostgresqlServer NewPostgresqlServerPaginator", "error", err) return nil, err @@ -44238,6 +36256,7 @@ var getPostgresqlServerFilters = map[string]string{ "master_server_id": "Description.Server.Properties.MasterServerID", "minimal_tls_version": "Description.Server.Properties.MinimalTLSVersion", "name": "description.Server.name", + "platform_account_id": "metadata.IntegrationID", "public_network_access": "Description.Server.Properties.PublicNetworkAccess", "replica_capacity": "Description.Server.Properties.ReplicaCapacity", "replication_role": "Description.Server.Properties.ReplicationRole", @@ -44276,7 +36295,7 @@ func GetPostgresqlServer(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -44290,7 +36309,7 @@ func GetPostgresqlServer(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd } limit := int64(1) - paginator, err := k.NewPostgresqlServerPaginator(essdk.BuildFilter(ctx, d.QueryContext, getPostgresqlServerFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewPostgresqlServerPaginator(essdk.BuildFilter(ctx, d.QueryContext, getPostgresqlServerFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -44321,7 +36340,7 @@ func GetPostgresqlServer(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd type PostgresqlFlexibleServer struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.PostgresqlFlexibleServerDescription `json:"Description"` + Description azure.PostgresqlFlexibleServerDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -44329,59 +36348,6 @@ type PostgresqlFlexibleServer struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type PostgresqlFlexibleServerHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -44454,6 +36420,7 @@ var listPostgresqlFlexibleServerFilters = map[string]string{ "id": "Description.Server.ID", "location": "Description.Server.Location", "name": "Description.Server.Name", + "platform_account_id": "metadata.IntegrationID", "server_properties": "Description.Server.ServerProperties", "sku": "Description.Server.SKU", "tags": "Description.Server.Tags", @@ -44479,7 +36446,7 @@ func ListPostgresqlFlexibleServer(ctx context.Context, d *plugin.QueryData, _ *p plugin.Logger(ctx).Error("ListPostgresqlFlexibleServer NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListPostgresqlFlexibleServer GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -44495,7 +36462,7 @@ func ListPostgresqlFlexibleServer(ctx context.Context, d *plugin.QueryData, _ *p return nil, err } - paginator, err := k.NewPostgresqlFlexibleServerPaginator(essdk.BuildFilter(ctx, d.QueryContext, listPostgresqlFlexibleServerFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewPostgresqlFlexibleServerPaginator(essdk.BuildFilter(ctx, d.QueryContext, listPostgresqlFlexibleServerFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListPostgresqlFlexibleServer NewPostgresqlFlexibleServerPaginator", "error", err) return nil, err @@ -44526,6 +36493,7 @@ var getPostgresqlFlexibleServerFilters = map[string]string{ "id": "Description.Server.ID", "location": "Description.Server.Location", "name": "Description.Server.Name", + "platform_account_id": "metadata.IntegrationID", "server_properties": "Description.Server.ServerProperties", "sku": "Description.Server.SKU", "tags": "Description.Server.Tags", @@ -44548,7 +36516,7 @@ func GetPostgresqlFlexibleServer(ctx context.Context, d *plugin.QueryData, _ *pl if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -44562,7 +36530,7 @@ func GetPostgresqlFlexibleServer(ctx context.Context, d *plugin.QueryData, _ *pl } limit := int64(1) - paginator, err := k.NewPostgresqlFlexibleServerPaginator(essdk.BuildFilter(ctx, d.QueryContext, getPostgresqlFlexibleServerFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewPostgresqlFlexibleServerPaginator(essdk.BuildFilter(ctx, d.QueryContext, getPostgresqlFlexibleServerFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -44593,7 +36561,7 @@ func GetPostgresqlFlexibleServer(ctx context.Context, d *plugin.QueryData, _ *pl type StorageSync struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.StorageSyncDescription `json:"Description"` + Description azure.StorageSyncDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -44601,59 +36569,6 @@ type StorageSync struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type StorageSyncHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -44727,6 +36642,7 @@ var listStorageSyncFilters = map[string]string{ "last_operation_name": "Description.Service.Properties.LastOperationName", "last_workflow_id": "Description.Service.Properties.LastWorkflowID", "name": "Description.Service.Name", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.Service.Properties.ProvisioningState", "resource_group": "Description.ResourceGroup", "storage_sync_service_status": "Description.Service.Properties.StorageSyncServiceStatus", @@ -44754,7 +36670,7 @@ func ListStorageSync(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate plugin.Logger(ctx).Error("ListStorageSync NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListStorageSync GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -44770,7 +36686,7 @@ func ListStorageSync(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate return nil, err } - paginator, err := k.NewStorageSyncPaginator(essdk.BuildFilter(ctx, d.QueryContext, listStorageSyncFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewStorageSyncPaginator(essdk.BuildFilter(ctx, d.QueryContext, listStorageSyncFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListStorageSync NewStorageSyncPaginator", "error", err) return nil, err @@ -44802,6 +36718,7 @@ var getStorageSyncFilters = map[string]string{ "last_operation_name": "Description.Service.Properties.LastOperationName", "last_workflow_id": "Description.Service.Properties.LastWorkflowID", "name": "description.Service.name", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.Service.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", "storage_sync_service_status": "Description.Service.Properties.StorageSyncServiceStatus", @@ -44826,7 +36743,7 @@ func GetStorageSync(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -44840,7 +36757,7 @@ func GetStorageSync(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD } limit := int64(1) - paginator, err := k.NewStorageSyncPaginator(essdk.BuildFilter(ctx, d.QueryContext, getStorageSyncFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewStorageSyncPaginator(essdk.BuildFilter(ctx, d.QueryContext, getStorageSyncFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -44871,7 +36788,7 @@ func GetStorageSync(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD type MssqlManagedInstance struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.MssqlManagedInstanceDescription `json:"Description"` + Description azure.MssqlManagedInstanceDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -44879,59 +36796,6 @@ type MssqlManagedInstance struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type MssqlManagedInstanceHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -45015,6 +36879,7 @@ var listMssqlManagedInstanceFilters = map[string]string{ "managed_instance_create_mode": "Description.ManagedInstance.Properties.ManagedInstanceCreateMode", "minimal_tls_version": "Description.ManagedInstance.Properties.MinimalTLSVersion", "name": "Description.ManagedInstance.Name", + "platform_account_id": "metadata.IntegrationID", "proxy_override": "Description.ManagedInstance.Properties.ProxyOverride", "public_data_endpoint_enabled": "Description.ManagedInstance.Properties.PublicDataEndpointEnabled", "resource_group": "Description.ResourceGroup", @@ -45050,7 +36915,7 @@ func ListMssqlManagedInstance(ctx context.Context, d *plugin.QueryData, _ *plugi plugin.Logger(ctx).Error("ListMssqlManagedInstance NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListMssqlManagedInstance GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -45066,7 +36931,7 @@ func ListMssqlManagedInstance(ctx context.Context, d *plugin.QueryData, _ *plugi return nil, err } - paginator, err := k.NewMssqlManagedInstancePaginator(essdk.BuildFilter(ctx, d.QueryContext, listMssqlManagedInstanceFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewMssqlManagedInstancePaginator(essdk.BuildFilter(ctx, d.QueryContext, listMssqlManagedInstanceFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListMssqlManagedInstance NewMssqlManagedInstancePaginator", "error", err) return nil, err @@ -45108,6 +36973,7 @@ var getMssqlManagedInstanceFilters = map[string]string{ "managed_instance_create_mode": "Description.ManagedInstance.Properties.ManagedInstanceCreateMode", "minimal_tls_version": "Description.ManagedInstance.Properties.MinimalTLSVersion", "name": "description.ManagedInstance.name", + "platform_account_id": "metadata.IntegrationID", "proxy_override": "Description.ManagedInstance.Properties.ProxyOverride", "public_data_endpoint_enabled": "Description.ManagedInstance.Properties.PublicDataEndpointEnabled", "resource_group": "description.ResourceGroup", @@ -45140,7 +37006,7 @@ func GetMssqlManagedInstance(ctx context.Context, d *plugin.QueryData, _ *plugin if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -45154,7 +37020,7 @@ func GetMssqlManagedInstance(ctx context.Context, d *plugin.QueryData, _ *plugin } limit := int64(1) - paginator, err := k.NewMssqlManagedInstancePaginator(essdk.BuildFilter(ctx, d.QueryContext, getMssqlManagedInstanceFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewMssqlManagedInstancePaginator(essdk.BuildFilter(ctx, d.QueryContext, getMssqlManagedInstanceFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -45185,7 +37051,7 @@ func GetMssqlManagedInstance(ctx context.Context, d *plugin.QueryData, _ *plugin type MssqlManagedInstanceDatabases struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.MssqlManagedInstanceDatabasesDescription `json:"Description"` + Description azure.MssqlManagedInstanceDatabasesDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -45193,59 +37059,6 @@ type MssqlManagedInstanceDatabases struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type MssqlManagedInstanceDatabasesHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -45314,10 +37127,11 @@ func (p MssqlManagedInstanceDatabasesPaginator) NextPage(ctx context.Context) ([ } var listMssqlManagedInstanceDatabasesFilters = map[string]string{ - "id": "Description.ManagedInstance.ID", - "name": "Description.ManagedInstance.SKU.Name", - "tags": "Description.ManagedInstance.Tags", - "title": "Description.ManagedInstance.SKU.Name", + "id": "Description.ManagedInstance.ID", + "name": "Description.ManagedInstance.SKU.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.ManagedInstance.Tags", + "title": "Description.ManagedInstance.SKU.Name", } func ListMssqlManagedInstanceDatabases(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -45338,7 +37152,7 @@ func ListMssqlManagedInstanceDatabases(ctx context.Context, d *plugin.QueryData, plugin.Logger(ctx).Error("ListMssqlManagedInstanceDatabases NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListMssqlManagedInstanceDatabases GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -45354,7 +37168,7 @@ func ListMssqlManagedInstanceDatabases(ctx context.Context, d *plugin.QueryData, return nil, err } - paginator, err := k.NewMssqlManagedInstanceDatabasesPaginator(essdk.BuildFilter(ctx, d.QueryContext, listMssqlManagedInstanceDatabasesFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewMssqlManagedInstanceDatabasesPaginator(essdk.BuildFilter(ctx, d.QueryContext, listMssqlManagedInstanceDatabasesFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListMssqlManagedInstanceDatabases NewMssqlManagedInstanceDatabasesPaginator", "error", err) return nil, err @@ -45381,10 +37195,11 @@ func ListMssqlManagedInstanceDatabases(ctx context.Context, d *plugin.QueryData, } var getMssqlManagedInstanceDatabasesFilters = map[string]string{ - "id": "Description.ManagedInstance.ID", - "name": "Description.ManagedInstance.SKU.Name", - "tags": "Description.ManagedInstance.Tags", - "title": "Description.ManagedInstance.SKU.Name", + "id": "Description.ManagedInstance.ID", + "name": "Description.ManagedInstance.SKU.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.ManagedInstance.Tags", + "title": "Description.ManagedInstance.SKU.Name", } func GetMssqlManagedInstanceDatabases(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -45402,7 +37217,7 @@ func GetMssqlManagedInstanceDatabases(ctx context.Context, d *plugin.QueryData, if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -45416,7 +37231,7 @@ func GetMssqlManagedInstanceDatabases(ctx context.Context, d *plugin.QueryData, } limit := int64(1) - paginator, err := k.NewMssqlManagedInstanceDatabasesPaginator(essdk.BuildFilter(ctx, d.QueryContext, getMssqlManagedInstanceDatabasesFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewMssqlManagedInstanceDatabasesPaginator(essdk.BuildFilter(ctx, d.QueryContext, getMssqlManagedInstanceDatabasesFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -45447,7 +37262,7 @@ func GetMssqlManagedInstanceDatabases(ctx context.Context, d *plugin.QueryData, type SqlDatabase struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.SqlDatabaseDescription `json:"Description"` + Description azure.SqlDatabaseDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -45455,59 +37270,6 @@ type SqlDatabase struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type SqlDatabaseHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -45590,6 +37352,7 @@ var listSqlDatabaseFilters = map[string]string{ "location": "Description.Database.Location", "max_size_bytes": "Description.Database.Properties.MaxSizeBytes", "name": "Description.Database.Name", + "platform_account_id": "metadata.IntegrationID", "read_scale": "Description.Database.Properties.ReadScale", "recovery_services_recovery_point_resource_id": "Description.Database.Properties.RecoveryServicesRecoveryPointID", "requested_service_objective_id": "Description.Database.Properties.RequestedServiceObjectiveName", @@ -45631,7 +37394,7 @@ func ListSqlDatabase(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate plugin.Logger(ctx).Error("ListSqlDatabase NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListSqlDatabase GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -45647,7 +37410,7 @@ func ListSqlDatabase(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate return nil, err } - paginator, err := k.NewSqlDatabasePaginator(essdk.BuildFilter(ctx, d.QueryContext, listSqlDatabaseFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewSqlDatabasePaginator(essdk.BuildFilter(ctx, d.QueryContext, listSqlDatabaseFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListSqlDatabase NewSqlDatabasePaginator", "error", err) return nil, err @@ -45688,6 +37451,7 @@ var getSqlDatabaseFilters = map[string]string{ "location": "Description.Database.Location", "max_size_bytes": "Description.Database.Properties.MaxSizeBytes", "name": "description.Database.name", + "platform_account_id": "metadata.IntegrationID", "read_scale": "Description.Database.Properties.ReadScale", "recovery_services_recovery_point_resource_id": "Description.Database.Properties.RecoveryServicesRecoveryPointID", "requested_service_objective_id": "Description.Database.Properties.RequestedServiceObjectiveName", @@ -45726,7 +37490,7 @@ func GetSqlDatabase(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -45740,7 +37504,7 @@ func GetSqlDatabase(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD } limit := int64(1) - paginator, err := k.NewSqlDatabasePaginator(essdk.BuildFilter(ctx, d.QueryContext, getSqlDatabaseFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewSqlDatabasePaginator(essdk.BuildFilter(ctx, d.QueryContext, getSqlDatabaseFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -45771,7 +37535,7 @@ func GetSqlDatabase(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD type SqlInstancePool struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.SqlInstancePoolDescription `json:"Description"` + Description azure.SqlInstancePoolDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -45779,59 +37543,6 @@ type SqlInstancePool struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type SqlInstancePoolHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -45924,7 +37635,7 @@ func ListSqlInstancePool(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd plugin.Logger(ctx).Error("ListSqlInstancePool NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListSqlInstancePool GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -45940,7 +37651,7 @@ func ListSqlInstancePool(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd return nil, err } - paginator, err := k.NewSqlInstancePoolPaginator(essdk.BuildFilter(ctx, d.QueryContext, listSqlInstancePoolFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewSqlInstancePoolPaginator(essdk.BuildFilter(ctx, d.QueryContext, listSqlInstancePoolFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListSqlInstancePool NewSqlInstancePoolPaginator", "error", err) return nil, err @@ -45988,7 +37699,7 @@ func GetSqlInstancePool(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -46002,7 +37713,7 @@ func GetSqlInstancePool(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr } limit := int64(1) - paginator, err := k.NewSqlInstancePoolPaginator(essdk.BuildFilter(ctx, d.QueryContext, getSqlInstancePoolFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewSqlInstancePoolPaginator(essdk.BuildFilter(ctx, d.QueryContext, getSqlInstancePoolFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -46033,7 +37744,7 @@ func GetSqlInstancePool(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr type SqlServer struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.SqlServerDescription `json:"Description"` + Description azure.SqlServerDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -46041,59 +37752,6 @@ type SqlServer struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type SqlServerHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -46174,6 +37832,7 @@ var listSqlServerFilters = map[string]string{ "location": "Description.Server.Location", "minimal_tls_version": "Description.Server.Properties.MinimalTLSVersion", "name": "Description.Server.Name", + "platform_account_id": "metadata.IntegrationID", "private_endpoint_connections": "Description.PrivateEndpointConnections", "public_network_access": "Description.Server.Properties.PublicNetworkAccess", "resource_group": "Description.ResourceGroup", @@ -46208,7 +37867,7 @@ func ListSqlServer(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDa plugin.Logger(ctx).Error("ListSqlServer NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListSqlServer GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -46224,7 +37883,7 @@ func ListSqlServer(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDa return nil, err } - paginator, err := k.NewSqlServerPaginator(essdk.BuildFilter(ctx, d.QueryContext, listSqlServerFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewSqlServerPaginator(essdk.BuildFilter(ctx, d.QueryContext, listSqlServerFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListSqlServer NewSqlServerPaginator", "error", err) return nil, err @@ -46263,6 +37922,7 @@ var getSqlServerFilters = map[string]string{ "location": "Description.Server.Location", "minimal_tls_version": "Description.Server.Properties.MinimalTLSVersion", "name": "description.Server.name", + "platform_account_id": "metadata.IntegrationID", "private_endpoint_connections": "Description.PrivateEndpointConnections", "public_network_access": "Description.Server.Properties.PublicNetworkAccess", "resource_group": "description.ResourceGroup", @@ -46294,7 +37954,7 @@ func GetSqlServer(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDat if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -46308,7 +37968,7 @@ func GetSqlServer(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDat } limit := int64(1) - paginator, err := k.NewSqlServerPaginator(essdk.BuildFilter(ctx, d.QueryContext, getSqlServerFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewSqlServerPaginator(essdk.BuildFilter(ctx, d.QueryContext, getSqlServerFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -46339,7 +37999,7 @@ func GetSqlServer(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateDat type SqlServerJobAgent struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.SqlServerJobAgentDescription `json:"Description"` + Description azure.SqlServerJobAgentDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -46347,59 +38007,6 @@ type SqlServerJobAgent struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type SqlServerJobAgentHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -46468,10 +38075,11 @@ func (p SqlServerJobAgentPaginator) NextPage(ctx context.Context) ([]SqlServerJo } var listSqlServerJobAgentFilters = map[string]string{ - "id": "Description.JobAgent.ID", - "name": "Description.JobAgent.Name", - "tags": "Description.JobAgent.Tags", - "title": "Description.JobAgent.Name", + "id": "Description.JobAgent.ID", + "name": "Description.JobAgent.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.JobAgent.Tags", + "title": "Description.JobAgent.Name", } func ListSqlServerJobAgent(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -46492,7 +38100,7 @@ func ListSqlServerJobAgent(ctx context.Context, d *plugin.QueryData, _ *plugin.H plugin.Logger(ctx).Error("ListSqlServerJobAgent NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListSqlServerJobAgent GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -46508,7 +38116,7 @@ func ListSqlServerJobAgent(ctx context.Context, d *plugin.QueryData, _ *plugin.H return nil, err } - paginator, err := k.NewSqlServerJobAgentPaginator(essdk.BuildFilter(ctx, d.QueryContext, listSqlServerJobAgentFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewSqlServerJobAgentPaginator(essdk.BuildFilter(ctx, d.QueryContext, listSqlServerJobAgentFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListSqlServerJobAgent NewSqlServerJobAgentPaginator", "error", err) return nil, err @@ -46535,10 +38143,11 @@ func ListSqlServerJobAgent(ctx context.Context, d *plugin.QueryData, _ *plugin.H } var getSqlServerJobAgentFilters = map[string]string{ - "id": "Description.JobAgent.ID", - "name": "Description.JobAgent.Name", - "tags": "Description.JobAgent.Tags", - "title": "Description.JobAgent.Name", + "id": "Description.JobAgent.ID", + "name": "Description.JobAgent.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.JobAgent.Tags", + "title": "Description.JobAgent.Name", } func GetSqlServerJobAgent(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -46556,7 +38165,7 @@ func GetSqlServerJobAgent(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -46570,7 +38179,7 @@ func GetSqlServerJobAgent(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy } limit := int64(1) - paginator, err := k.NewSqlServerJobAgentPaginator(essdk.BuildFilter(ctx, d.QueryContext, getSqlServerJobAgentFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewSqlServerJobAgentPaginator(essdk.BuildFilter(ctx, d.QueryContext, getSqlServerJobAgentFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -46601,7 +38210,7 @@ func GetSqlServerJobAgent(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy type SqlVirtualClusters struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.SqlVirtualClustersDescription `json:"Description"` + Description azure.SqlVirtualClustersDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -46609,59 +38218,6 @@ type SqlVirtualClusters struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type SqlVirtualClustersHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -46730,10 +38286,11 @@ func (p SqlVirtualClustersPaginator) NextPage(ctx context.Context) ([]SqlVirtual } var listSqlVirtualClustersFilters = map[string]string{ - "id": "Description.VirtualClusters.ID", - "name": "Description.VirtualClusters.Name", - "tags": "Description.VirtualClusters.Tags", - "title": "Description.VirtualClusters.Name", + "id": "Description.VirtualClusters.ID", + "name": "Description.VirtualClusters.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.VirtualClusters.Tags", + "title": "Description.VirtualClusters.Name", } func ListSqlVirtualClusters(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -46754,7 +38311,7 @@ func ListSqlVirtualClusters(ctx context.Context, d *plugin.QueryData, _ *plugin. plugin.Logger(ctx).Error("ListSqlVirtualClusters NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListSqlVirtualClusters GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -46770,7 +38327,7 @@ func ListSqlVirtualClusters(ctx context.Context, d *plugin.QueryData, _ *plugin. return nil, err } - paginator, err := k.NewSqlVirtualClustersPaginator(essdk.BuildFilter(ctx, d.QueryContext, listSqlVirtualClustersFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewSqlVirtualClustersPaginator(essdk.BuildFilter(ctx, d.QueryContext, listSqlVirtualClustersFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListSqlVirtualClusters NewSqlVirtualClustersPaginator", "error", err) return nil, err @@ -46797,10 +38354,11 @@ func ListSqlVirtualClusters(ctx context.Context, d *plugin.QueryData, _ *plugin. } var getSqlVirtualClustersFilters = map[string]string{ - "id": "Description.VirtualClusters.ID", - "name": "Description.VirtualClusters.Name", - "tags": "Description.VirtualClusters.Tags", - "title": "Description.VirtualClusters.Name", + "id": "Description.VirtualClusters.ID", + "name": "Description.VirtualClusters.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.VirtualClusters.Tags", + "title": "Description.VirtualClusters.Name", } func GetSqlVirtualClusters(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -46818,7 +38376,7 @@ func GetSqlVirtualClusters(ctx context.Context, d *plugin.QueryData, _ *plugin.H if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -46832,7 +38390,7 @@ func GetSqlVirtualClusters(ctx context.Context, d *plugin.QueryData, _ *plugin.H } limit := int64(1) - paginator, err := k.NewSqlVirtualClustersPaginator(essdk.BuildFilter(ctx, d.QueryContext, getSqlVirtualClustersFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewSqlVirtualClustersPaginator(essdk.BuildFilter(ctx, d.QueryContext, getSqlVirtualClustersFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -46863,7 +38421,7 @@ func GetSqlVirtualClusters(ctx context.Context, d *plugin.QueryData, _ *plugin.H type SqlServerElasticPool struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.SqlServerElasticPoolDescription `json:"Description"` + Description azure.SqlServerElasticPoolDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -46871,59 +38429,6 @@ type SqlServerElasticPool struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type SqlServerElasticPoolHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -46992,22 +38497,23 @@ 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", - "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", + "platform_account_id": "metadata.IntegrationID", + "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) { @@ -47028,7 +38534,7 @@ func ListSqlServerElasticPool(ctx context.Context, d *plugin.QueryData, _ *plugi plugin.Logger(ctx).Error("ListSqlServerElasticPool NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListSqlServerElasticPool GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -47044,7 +38550,7 @@ func ListSqlServerElasticPool(ctx context.Context, d *plugin.QueryData, _ *plugi return nil, err } - paginator, err := k.NewSqlServerElasticPoolPaginator(essdk.BuildFilter(ctx, d.QueryContext, listSqlServerElasticPoolFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewSqlServerElasticPoolPaginator(essdk.BuildFilter(ctx, d.QueryContext, listSqlServerElasticPoolFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListSqlServerElasticPool NewSqlServerElasticPoolPaginator", "error", err) return nil, err @@ -47071,22 +38577,23 @@ 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", - "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", + "platform_account_id": "metadata.IntegrationID", + "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 GetSqlServerElasticPool(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -47104,7 +38611,7 @@ func GetSqlServerElasticPool(ctx context.Context, d *plugin.QueryData, _ *plugin if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -47118,7 +38625,7 @@ func GetSqlServerElasticPool(ctx context.Context, d *plugin.QueryData, _ *plugin } limit := int64(1) - paginator, err := k.NewSqlServerElasticPoolPaginator(essdk.BuildFilter(ctx, d.QueryContext, getSqlServerElasticPoolFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewSqlServerElasticPoolPaginator(essdk.BuildFilter(ctx, d.QueryContext, getSqlServerElasticPoolFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -47149,7 +38656,7 @@ func GetSqlServerElasticPool(ctx context.Context, d *plugin.QueryData, _ *plugin type SqlServerVirtualMachine struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.SqlServerVirtualMachineDescription `json:"Description"` + Description azure.SqlServerVirtualMachineDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -47157,59 +38664,6 @@ type SqlServerVirtualMachine struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type SqlServerVirtualMachineHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -47284,6 +38738,7 @@ var listSqlServerVirtualMachineFilters = map[string]string{ "identity": "Description.VirtualMachine.Identity", "key_vault_credential_settings": "Description.VirtualMachine.Properties.KeyVaultCredentialSettings", "name": "Description.VirtualMachine.Name", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.VirtualMachine.Properties.ProvisioningState", "resource_group": "Description.ResourceGroup", "server_configurations_management_settings": "Description.VirtualMachine.Properties.ServerConfigurationsManagementSettings", @@ -47318,7 +38773,7 @@ func ListSqlServerVirtualMachine(ctx context.Context, d *plugin.QueryData, _ *pl plugin.Logger(ctx).Error("ListSqlServerVirtualMachine NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListSqlServerVirtualMachine GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -47334,7 +38789,7 @@ func ListSqlServerVirtualMachine(ctx context.Context, d *plugin.QueryData, _ *pl return nil, err } - paginator, err := k.NewSqlServerVirtualMachinePaginator(essdk.BuildFilter(ctx, d.QueryContext, listSqlServerVirtualMachineFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewSqlServerVirtualMachinePaginator(essdk.BuildFilter(ctx, d.QueryContext, listSqlServerVirtualMachineFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListSqlServerVirtualMachine NewSqlServerVirtualMachinePaginator", "error", err) return nil, err @@ -47367,6 +38822,7 @@ var getSqlServerVirtualMachineFilters = map[string]string{ "identity": "Description.VirtualMachine.Identity", "key_vault_credential_settings": "Description.VirtualMachine.Properties.KeyVaultCredentialSettings", "name": "description.VirtualMachine.Name", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.VirtualMachine.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", "server_configurations_management_settings": "Description.VirtualMachine.Properties.ServerConfigurationsManagementSettings", @@ -47398,7 +38854,7 @@ func GetSqlServerVirtualMachine(ctx context.Context, d *plugin.QueryData, _ *plu if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -47412,7 +38868,7 @@ func GetSqlServerVirtualMachine(ctx context.Context, d *plugin.QueryData, _ *plu } limit := int64(1) - paginator, err := k.NewSqlServerVirtualMachinePaginator(essdk.BuildFilter(ctx, d.QueryContext, getSqlServerVirtualMachineFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewSqlServerVirtualMachinePaginator(essdk.BuildFilter(ctx, d.QueryContext, getSqlServerVirtualMachineFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -47443,7 +38899,7 @@ func GetSqlServerVirtualMachine(ctx context.Context, d *plugin.QueryData, _ *plu type SqlServerVirtualMachineGroup struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.SqlServerVirtualMachineGroupDescription `json:"Description"` + Description azure.SqlServerVirtualMachineGroupDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -47451,59 +38907,6 @@ type SqlServerVirtualMachineGroup struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type SqlServerVirtualMachineGroupHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -47572,10 +38975,11 @@ func (p SqlServerVirtualMachineGroupPaginator) NextPage(ctx context.Context) ([] } var listSqlServerVirtualMachineGroupFilters = map[string]string{ - "id": "Description.Group.ID", - "name": "Description.Group.Name", - "tags": "Description.Group.Tags", - "title": "Description.Group.Name", + "id": "Description.Group.ID", + "name": "Description.Group.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.Group.Tags", + "title": "Description.Group.Name", } func ListSqlServerVirtualMachineGroup(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -47596,7 +39000,7 @@ func ListSqlServerVirtualMachineGroup(ctx context.Context, d *plugin.QueryData, plugin.Logger(ctx).Error("ListSqlServerVirtualMachineGroup NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListSqlServerVirtualMachineGroup GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -47612,7 +39016,7 @@ func ListSqlServerVirtualMachineGroup(ctx context.Context, d *plugin.QueryData, return nil, err } - paginator, err := k.NewSqlServerVirtualMachineGroupPaginator(essdk.BuildFilter(ctx, d.QueryContext, listSqlServerVirtualMachineGroupFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewSqlServerVirtualMachineGroupPaginator(essdk.BuildFilter(ctx, d.QueryContext, listSqlServerVirtualMachineGroupFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListSqlServerVirtualMachineGroup NewSqlServerVirtualMachineGroupPaginator", "error", err) return nil, err @@ -47639,10 +39043,11 @@ func ListSqlServerVirtualMachineGroup(ctx context.Context, d *plugin.QueryData, } var getSqlServerVirtualMachineGroupFilters = map[string]string{ - "id": "Description.Group.ID", - "name": "Description.Group.Name", - "tags": "Description.Group.Tags", - "title": "Description.Group.Name", + "id": "Description.Group.ID", + "name": "Description.Group.Name", + "platform_account_id": "metadata.IntegrationID", + "tags": "Description.Group.Tags", + "title": "Description.Group.Name", } func GetSqlServerVirtualMachineGroup(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -47660,7 +39065,7 @@ func GetSqlServerVirtualMachineGroup(ctx context.Context, d *plugin.QueryData, _ if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -47674,7 +39079,7 @@ func GetSqlServerVirtualMachineGroup(ctx context.Context, d *plugin.QueryData, _ } limit := int64(1) - paginator, err := k.NewSqlServerVirtualMachineGroupPaginator(essdk.BuildFilter(ctx, d.QueryContext, getSqlServerVirtualMachineGroupFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewSqlServerVirtualMachineGroupPaginator(essdk.BuildFilter(ctx, d.QueryContext, getSqlServerVirtualMachineGroupFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -47705,7 +39110,7 @@ func GetSqlServerVirtualMachineGroup(ctx context.Context, d *plugin.QueryData, _ type SqlServerFlexibleServer struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.SqlServerFlexibleServerDescription `json:"Description"` + Description azure.SqlServerFlexibleServerDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -47713,59 +39118,6 @@ type SqlServerFlexibleServer struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type SqlServerFlexibleServerHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -47847,6 +39199,7 @@ var listSqlServerFlexibleServerFilters = map[string]string{ "maintenance_window": "Description.FlexibleServer.Properties.MaintenanceWindow", "name": "Description.FlexibleServer.Name", "network": "Description.FlexibleServer.Properties.Network", + "platform_account_id": "metadata.IntegrationID", "public_network_access": "Description.FlexibleServer.Properties.Network.PublicNetworkAccess", "replica_capacity": "Description.FlexibleServer.Properties.ReplicaCapacity", "replication_role": "Description.FlexibleServer.Properties.ReplicationRole", @@ -47885,7 +39238,7 @@ func ListSqlServerFlexibleServer(ctx context.Context, d *plugin.QueryData, _ *pl plugin.Logger(ctx).Error("ListSqlServerFlexibleServer NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListSqlServerFlexibleServer GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -47901,7 +39254,7 @@ func ListSqlServerFlexibleServer(ctx context.Context, d *plugin.QueryData, _ *pl return nil, err } - paginator, err := k.NewSqlServerFlexibleServerPaginator(essdk.BuildFilter(ctx, d.QueryContext, listSqlServerFlexibleServerFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewSqlServerFlexibleServerPaginator(essdk.BuildFilter(ctx, d.QueryContext, listSqlServerFlexibleServerFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListSqlServerFlexibleServer NewSqlServerFlexibleServerPaginator", "error", err) return nil, err @@ -47941,6 +39294,7 @@ var getSqlServerFlexibleServerFilters = map[string]string{ "maintenance_window": "Description.FlexibleServer.Properties.MaintenanceWindow", "name": "description.FlexibleServer.Name", "network": "Description.FlexibleServer.Properties.Network", + "platform_account_id": "metadata.IntegrationID", "public_network_access": "Description.FlexibleServer.Properties.Network.PublicNetworkAccess", "replica_capacity": "Description.FlexibleServer.Properties.ReplicaCapacity", "replication_role": "Description.FlexibleServer.Properties.ReplicationRole", @@ -47976,7 +39330,7 @@ func GetSqlServerFlexibleServer(ctx context.Context, d *plugin.QueryData, _ *plu if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -47990,7 +39344,7 @@ func GetSqlServerFlexibleServer(ctx context.Context, d *plugin.QueryData, _ *plu } limit := int64(1) - paginator, err := k.NewSqlServerFlexibleServerPaginator(essdk.BuildFilter(ctx, d.QueryContext, getSqlServerFlexibleServerFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewSqlServerFlexibleServerPaginator(essdk.BuildFilter(ctx, d.QueryContext, getSqlServerFlexibleServerFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -48021,7 +39375,7 @@ func GetSqlServerFlexibleServer(ctx context.Context, d *plugin.QueryData, _ *plu type StorageAccount struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.StorageAccountDescription `json:"Description"` + Description azure.StorageAccountDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -48029,59 +39383,6 @@ type StorageAccount struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type StorageAccountHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -48180,6 +39481,7 @@ var listStorageAccountFilters = map[string]string{ "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", + "platform_account_id": "metadata.IntegrationID", "primary_blob_endpoint": "Description.Account.Properties.PrimaryEndpoints.Blob", "primary_dfs_endpoint": "Description.Account.Properties.PrimaryEndpoints.Dfs", "primary_file_endpoint": "Description.Account.Properties.PrimaryEndpoints.File", @@ -48233,7 +39535,7 @@ func ListStorageAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr plugin.Logger(ctx).Error("ListStorageAccount NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListStorageAccount GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -48249,7 +39551,7 @@ func ListStorageAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr return nil, err } - paginator, err := k.NewStorageAccountPaginator(essdk.BuildFilter(ctx, d.QueryContext, listStorageAccountFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewStorageAccountPaginator(essdk.BuildFilter(ctx, d.QueryContext, listStorageAccountFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListStorageAccount NewStorageAccountPaginator", "error", err) return nil, err @@ -48306,6 +39608,7 @@ var getStorageAccountFilters = map[string]string{ "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", + "platform_account_id": "metadata.IntegrationID", "primary_blob_endpoint": "Description.Account.Properties.PrimaryEndpoints.Blob", "primary_dfs_endpoint": "Description.Account.Properties.PrimaryEndpoints.Dfs", "primary_file_endpoint": "Description.Account.Properties.PrimaryEndpoints.File", @@ -48357,7 +39660,7 @@ func GetStorageAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -48371,7 +39674,7 @@ func GetStorageAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra } limit := int64(1) - paginator, err := k.NewStorageAccountPaginator(essdk.BuildFilter(ctx, d.QueryContext, getStorageAccountFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewStorageAccountPaginator(essdk.BuildFilter(ctx, d.QueryContext, getStorageAccountFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -48402,7 +39705,7 @@ func GetStorageAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra type RecoveryServicesVault struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.RecoveryServicesVaultDescription `json:"Description"` + Description azure.RecoveryServicesVaultDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -48410,59 +39713,6 @@ type RecoveryServicesVault struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type RecoveryServicesVaultHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -48536,6 +39786,7 @@ var listRecoveryServicesVaultFilters = map[string]string{ "id": "Description.Vault.ID", "identity": "Description.Vault.Identity", "name": "Description.Vault.Name", + "platform_account_id": "metadata.IntegrationID", "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", @@ -48566,7 +39817,7 @@ func ListRecoveryServicesVault(ctx context.Context, d *plugin.QueryData, _ *plug plugin.Logger(ctx).Error("ListRecoveryServicesVault NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListRecoveryServicesVault GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -48582,7 +39833,7 @@ func ListRecoveryServicesVault(ctx context.Context, d *plugin.QueryData, _ *plug return nil, err } - paginator, err := k.NewRecoveryServicesVaultPaginator(essdk.BuildFilter(ctx, d.QueryContext, listRecoveryServicesVaultFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewRecoveryServicesVaultPaginator(essdk.BuildFilter(ctx, d.QueryContext, listRecoveryServicesVaultFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListRecoveryServicesVault NewRecoveryServicesVaultPaginator", "error", err) return nil, err @@ -48614,6 +39865,7 @@ var getRecoveryServicesVaultFilters = map[string]string{ "id": "Description.Vault.ID", "identity": "Description.Vault.Identity", "name": "description.Vault.Name", + "platform_account_id": "metadata.IntegrationID", "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", @@ -48641,7 +39893,7 @@ func GetRecoveryServicesVault(ctx context.Context, d *plugin.QueryData, _ *plugi if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -48655,7 +39907,7 @@ func GetRecoveryServicesVault(ctx context.Context, d *plugin.QueryData, _ *plugi } limit := int64(1) - paginator, err := k.NewRecoveryServicesVaultPaginator(essdk.BuildFilter(ctx, d.QueryContext, getRecoveryServicesVaultFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewRecoveryServicesVaultPaginator(essdk.BuildFilter(ctx, d.QueryContext, getRecoveryServicesVaultFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -48686,7 +39938,7 @@ func GetRecoveryServicesVault(ctx context.Context, d *plugin.QueryData, _ *plugi type RecoveryServicesBackupJob struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.RecoveryServicesBackupJobDescription `json:"Description"` + Description azure.RecoveryServicesBackupJobDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -48694,59 +39946,6 @@ type RecoveryServicesBackupJob struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type RecoveryServicesBackupJobHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -48815,15 +40014,16 @@ func (p RecoveryServicesBackupJobPaginator) NextPage(ctx context.Context) ([]Rec } var listRecoveryServicesBackupJobFilters = map[string]string{ - "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", + "etag": "Description.Job.ETag", + "id": "Description.Job.ID", + "name": "Description.Job.Name", + "platform_account_id": "metadata.IntegrationID", + "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) { @@ -48844,7 +40044,7 @@ func ListRecoveryServicesBackupJob(ctx context.Context, d *plugin.QueryData, _ * plugin.Logger(ctx).Error("ListRecoveryServicesBackupJob NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListRecoveryServicesBackupJob GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -48860,7 +40060,7 @@ func ListRecoveryServicesBackupJob(ctx context.Context, d *plugin.QueryData, _ * return nil, err } - paginator, err := k.NewRecoveryServicesBackupJobPaginator(essdk.BuildFilter(ctx, d.QueryContext, listRecoveryServicesBackupJobFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewRecoveryServicesBackupJobPaginator(essdk.BuildFilter(ctx, d.QueryContext, listRecoveryServicesBackupJobFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListRecoveryServicesBackupJob NewRecoveryServicesBackupJobPaginator", "error", err) return nil, err @@ -48887,15 +40087,16 @@ func ListRecoveryServicesBackupJob(ctx context.Context, d *plugin.QueryData, _ * } var getRecoveryServicesBackupJobFilters = map[string]string{ - "etag": "Description.Job.ETag", - "id": "Description.Job.ID", - "name": "description.Vault.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.Vault.Name", + "platform_account_id": "metadata.IntegrationID", + "properties": "Description.Properties", + "resource_group": "description.ResourceGroup", + "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) { @@ -48913,7 +40114,7 @@ func GetRecoveryServicesBackupJob(ctx context.Context, d *plugin.QueryData, _ *p if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -48927,7 +40128,7 @@ func GetRecoveryServicesBackupJob(ctx context.Context, d *plugin.QueryData, _ *p } limit := int64(1) - paginator, err := k.NewRecoveryServicesBackupJobPaginator(essdk.BuildFilter(ctx, d.QueryContext, getRecoveryServicesBackupJobFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewRecoveryServicesBackupJobPaginator(essdk.BuildFilter(ctx, d.QueryContext, getRecoveryServicesBackupJobFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -48958,7 +40159,7 @@ func GetRecoveryServicesBackupJob(ctx context.Context, d *plugin.QueryData, _ *p type RecoveryServicesBackupPolicy struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.RecoveryServicesBackupPolicyDescription `json:"Description"` + Description azure.RecoveryServicesBackupPolicyDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -48966,59 +40167,6 @@ type RecoveryServicesBackupPolicy struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type RecoveryServicesBackupPolicyHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -49087,12 +40235,13 @@ func (p RecoveryServicesBackupPolicyPaginator) NextPage(ctx context.Context) ([] } var listRecoveryServicesBackupPolicyFilters = map[string]string{ - "id": "Description.Policy.ID", - "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", + "platform_account_id": "metadata.IntegrationID", + "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) { @@ -49113,7 +40262,7 @@ func ListRecoveryServicesBackupPolicy(ctx context.Context, d *plugin.QueryData, plugin.Logger(ctx).Error("ListRecoveryServicesBackupPolicy NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListRecoveryServicesBackupPolicy GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -49129,7 +40278,7 @@ func ListRecoveryServicesBackupPolicy(ctx context.Context, d *plugin.QueryData, return nil, err } - paginator, err := k.NewRecoveryServicesBackupPolicyPaginator(essdk.BuildFilter(ctx, d.QueryContext, listRecoveryServicesBackupPolicyFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewRecoveryServicesBackupPolicyPaginator(essdk.BuildFilter(ctx, d.QueryContext, listRecoveryServicesBackupPolicyFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListRecoveryServicesBackupPolicy NewRecoveryServicesBackupPolicyPaginator", "error", err) return nil, err @@ -49156,12 +40305,13 @@ func ListRecoveryServicesBackupPolicy(ctx context.Context, d *plugin.QueryData, } var getRecoveryServicesBackupPolicyFilters = map[string]string{ - "id": "Description.Policy.ID", - "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", + "platform_account_id": "metadata.IntegrationID", + "properties": "Description.Properties", + "resource_group": "description.ResourceGroup", + "title": "Description.Policy.Name", + "vault_name": "Description.VaultName", } func GetRecoveryServicesBackupPolicy(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -49179,7 +40329,7 @@ func GetRecoveryServicesBackupPolicy(ctx context.Context, d *plugin.QueryData, _ if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -49193,7 +40343,7 @@ func GetRecoveryServicesBackupPolicy(ctx context.Context, d *plugin.QueryData, _ } limit := int64(1) - paginator, err := k.NewRecoveryServicesBackupPolicyPaginator(essdk.BuildFilter(ctx, d.QueryContext, getRecoveryServicesBackupPolicyFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewRecoveryServicesBackupPolicyPaginator(essdk.BuildFilter(ctx, d.QueryContext, getRecoveryServicesBackupPolicyFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -49224,7 +40374,7 @@ func GetRecoveryServicesBackupPolicy(ctx context.Context, d *plugin.QueryData, _ type RecoveryServicesBackupItem struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.RecoveryServicesBackupItemDescription `json:"Description"` + Description azure.RecoveryServicesBackupItemDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -49232,59 +40382,6 @@ type RecoveryServicesBackupItem struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type RecoveryServicesBackupItemHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -49353,12 +40450,13 @@ func (p RecoveryServicesBackupItemPaginator) NextPage(ctx context.Context) ([]Re } var listRecoveryServicesBackupItemFilters = map[string]string{ - "id": "Description.Item.ID", - "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", + "platform_account_id": "metadata.IntegrationID", + "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) { @@ -49379,7 +40477,7 @@ func ListRecoveryServicesBackupItem(ctx context.Context, d *plugin.QueryData, _ plugin.Logger(ctx).Error("ListRecoveryServicesBackupItem NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListRecoveryServicesBackupItem GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -49395,7 +40493,7 @@ func ListRecoveryServicesBackupItem(ctx context.Context, d *plugin.QueryData, _ return nil, err } - paginator, err := k.NewRecoveryServicesBackupItemPaginator(essdk.BuildFilter(ctx, d.QueryContext, listRecoveryServicesBackupItemFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewRecoveryServicesBackupItemPaginator(essdk.BuildFilter(ctx, d.QueryContext, listRecoveryServicesBackupItemFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListRecoveryServicesBackupItem NewRecoveryServicesBackupItemPaginator", "error", err) return nil, err @@ -49422,12 +40520,13 @@ func ListRecoveryServicesBackupItem(ctx context.Context, d *plugin.QueryData, _ } var getRecoveryServicesBackupItemFilters = map[string]string{ - "id": "Description.Item.ID", - "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", + "platform_account_id": "metadata.IntegrationID", + "properties": "Description.Properties", + "resource_group": "description.ResourceGroup", + "title": "Description.Item.Name", + "vault_name": "Description.VaultName", } func GetRecoveryServicesBackupItem(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -49445,7 +40544,7 @@ func GetRecoveryServicesBackupItem(ctx context.Context, d *plugin.QueryData, _ * if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -49459,7 +40558,7 @@ func GetRecoveryServicesBackupItem(ctx context.Context, d *plugin.QueryData, _ * } limit := int64(1) - paginator, err := k.NewRecoveryServicesBackupItemPaginator(essdk.BuildFilter(ctx, d.QueryContext, getRecoveryServicesBackupItemFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewRecoveryServicesBackupItemPaginator(essdk.BuildFilter(ctx, d.QueryContext, getRecoveryServicesBackupItemFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -49490,7 +40589,7 @@ func GetRecoveryServicesBackupItem(ctx context.Context, d *plugin.QueryData, _ * type HybridKubernetesConnectedCluster struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.HybridKubernetesConnectedClusterDescription `json:"Description"` + Description azure.HybridKubernetesConnectedClusterDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -49498,59 +40597,6 @@ type HybridKubernetesConnectedCluster struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type HybridKubernetesConnectedClusterHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -49634,6 +40680,7 @@ var listHybridKubernetesConnectedClusterFilters = map[string]string{ "location": "Description.ConnectedCluster.Location", "name": "Description.ConnectedCluster.Name", "offering": "Description.ConnectedCluster.Properties.Offering", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.ConnectedCluster.Properties.ProvisioningState", "resource_group": "Description.ResourceGroup", "tags": "Description.ConnectedCluster.Tags", @@ -49661,7 +40708,7 @@ func ListHybridKubernetesConnectedCluster(ctx context.Context, d *plugin.QueryDa plugin.Logger(ctx).Error("ListHybridKubernetesConnectedCluster NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListHybridKubernetesConnectedCluster GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -49677,7 +40724,7 @@ func ListHybridKubernetesConnectedCluster(ctx context.Context, d *plugin.QueryDa return nil, err } - paginator, err := k.NewHybridKubernetesConnectedClusterPaginator(essdk.BuildFilter(ctx, d.QueryContext, listHybridKubernetesConnectedClusterFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewHybridKubernetesConnectedClusterPaginator(essdk.BuildFilter(ctx, d.QueryContext, listHybridKubernetesConnectedClusterFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListHybridKubernetesConnectedCluster NewHybridKubernetesConnectedClusterPaginator", "error", err) return nil, err @@ -49719,6 +40766,7 @@ var getHybridKubernetesConnectedClusterFilters = map[string]string{ "location": "Description.ConnectedCluster.Location", "name": "description.ConnectedCluster.Name", "offering": "Description.ConnectedCluster.Properties.Offering", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.ConnectedCluster.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", "tags": "Description.ConnectedCluster.Tags", @@ -49743,7 +40791,7 @@ func GetHybridKubernetesConnectedCluster(ctx context.Context, d *plugin.QueryDat if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -49757,7 +40805,7 @@ func GetHybridKubernetesConnectedCluster(ctx context.Context, d *plugin.QueryDat } limit := int64(1) - paginator, err := k.NewHybridKubernetesConnectedClusterPaginator(essdk.BuildFilter(ctx, d.QueryContext, getHybridKubernetesConnectedClusterFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewHybridKubernetesConnectedClusterPaginator(essdk.BuildFilter(ctx, d.QueryContext, getHybridKubernetesConnectedClusterFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -49788,7 +40836,7 @@ func GetHybridKubernetesConnectedCluster(ctx context.Context, d *plugin.QueryDat type CostManagementCostByResourceType struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.CostManagementCostByResourceTypeDescription `json:"Description"` + Description azure.CostManagementCostByResourceTypeDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -49796,59 +40844,6 @@ type CostManagementCostByResourceType struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type CostManagementCostByResourceTypeHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -49917,12 +40912,13 @@ func (p CostManagementCostByResourceTypePaginator) NextPage(ctx context.Context) } var listCostManagementCostByResourceTypeFilters = map[string]string{ - "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", + "cost": "Description.CostManagementCostByResourceType.Cost", + "id": "ResourceID", + "platform_account_id": "metadata.IntegrationID", + "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) { @@ -49943,7 +40939,7 @@ func ListCostManagementCostByResourceType(ctx context.Context, d *plugin.QueryDa plugin.Logger(ctx).Error("ListCostManagementCostByResourceType NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListCostManagementCostByResourceType GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -49959,7 +40955,7 @@ func ListCostManagementCostByResourceType(ctx context.Context, d *plugin.QueryDa return nil, err } - paginator, err := k.NewCostManagementCostByResourceTypePaginator(essdk.BuildFilter(ctx, d.QueryContext, listCostManagementCostByResourceTypeFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewCostManagementCostByResourceTypePaginator(essdk.BuildFilter(ctx, d.QueryContext, listCostManagementCostByResourceTypeFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListCostManagementCostByResourceType NewCostManagementCostByResourceTypePaginator", "error", err) return nil, err @@ -49986,12 +40982,13 @@ func ListCostManagementCostByResourceType(ctx context.Context, d *plugin.QueryDa } var getCostManagementCostByResourceTypeFilters = map[string]string{ - "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", + "cost": "Description.CostManagementCostByResourceType.Cost", + "id": "ResourceID", + "platform_account_id": "metadata.IntegrationID", + "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) { @@ -50009,7 +41006,7 @@ func GetCostManagementCostByResourceType(ctx context.Context, d *plugin.QueryDat if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -50023,7 +41020,7 @@ func GetCostManagementCostByResourceType(ctx context.Context, d *plugin.QueryDat } limit := int64(1) - paginator, err := k.NewCostManagementCostByResourceTypePaginator(essdk.BuildFilter(ctx, d.QueryContext, getCostManagementCostByResourceTypeFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewCostManagementCostByResourceTypePaginator(essdk.BuildFilter(ctx, d.QueryContext, getCostManagementCostByResourceTypeFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -50054,7 +41051,7 @@ func GetCostManagementCostByResourceType(ctx context.Context, d *plugin.QueryDat type CostManagementCostBySubscription struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.CostManagementCostBySubscriptionDescription `json:"Description"` + Description azure.CostManagementCostBySubscriptionDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -50062,59 +41059,6 @@ type CostManagementCostBySubscription struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type CostManagementCostBySubscriptionHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -50183,8 +41127,9 @@ func (p CostManagementCostBySubscriptionPaginator) NextPage(ctx context.Context) } var listCostManagementCostBySubscriptionFilters = map[string]string{ - "id": "ResourceID", - "name": "Description.CostManagementCostBySubscription", + "id": "ResourceID", + "name": "Description.CostManagementCostBySubscription", + "platform_account_id": "metadata.IntegrationID", } func ListCostManagementCostBySubscription(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -50205,7 +41150,7 @@ func ListCostManagementCostBySubscription(ctx context.Context, d *plugin.QueryDa plugin.Logger(ctx).Error("ListCostManagementCostBySubscription NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListCostManagementCostBySubscription GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -50221,7 +41166,7 @@ func ListCostManagementCostBySubscription(ctx context.Context, d *plugin.QueryDa return nil, err } - paginator, err := k.NewCostManagementCostBySubscriptionPaginator(essdk.BuildFilter(ctx, d.QueryContext, listCostManagementCostBySubscriptionFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewCostManagementCostBySubscriptionPaginator(essdk.BuildFilter(ctx, d.QueryContext, listCostManagementCostBySubscriptionFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListCostManagementCostBySubscription NewCostManagementCostBySubscriptionPaginator", "error", err) return nil, err @@ -50248,8 +41193,9 @@ func ListCostManagementCostBySubscription(ctx context.Context, d *plugin.QueryDa } var getCostManagementCostBySubscriptionFilters = map[string]string{ - "id": "ResourceID", - "name": "Description.CostManagementCostBySubscription", + "id": "ResourceID", + "name": "Description.CostManagementCostBySubscription", + "platform_account_id": "metadata.IntegrationID", } func GetCostManagementCostBySubscription(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -50267,7 +41213,7 @@ func GetCostManagementCostBySubscription(ctx context.Context, d *plugin.QueryDat if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -50281,7 +41227,7 @@ func GetCostManagementCostBySubscription(ctx context.Context, d *plugin.QueryDat } limit := int64(1) - paginator, err := k.NewCostManagementCostBySubscriptionPaginator(essdk.BuildFilter(ctx, d.QueryContext, getCostManagementCostBySubscriptionFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewCostManagementCostBySubscriptionPaginator(essdk.BuildFilter(ctx, d.QueryContext, getCostManagementCostBySubscriptionFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -50312,7 +41258,7 @@ func GetCostManagementCostBySubscription(ctx context.Context, d *plugin.QueryDat type LoadBalancer struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.LoadBalancerDescription `json:"Description"` + Description azure.LoadBalancerDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -50320,59 +41266,6 @@ type LoadBalancer struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type LoadBalancerHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -50453,6 +41346,7 @@ var listLoadBalancerFilters = map[string]string{ "load_balancing_rules": "Description.LoadBalancer.Properties.LoadBalancingRules", "name": "Description.LoadBalancer.Name", "outbound_rules": "Description.LoadBalancer.Properties.OutboundRules", + "platform_account_id": "metadata.IntegrationID", "probes": "Description.LoadBalancer.Properties.Probes", "provisioning_state": "Description.LoadBalancer.Properties.ProvisioningState", "resource_group": "Description.ResourceGroup", @@ -50482,7 +41376,7 @@ func ListLoadBalancer(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat plugin.Logger(ctx).Error("ListLoadBalancer NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListLoadBalancer GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -50498,7 +41392,7 @@ func ListLoadBalancer(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat return nil, err } - paginator, err := k.NewLoadBalancerPaginator(essdk.BuildFilter(ctx, d.QueryContext, listLoadBalancerFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewLoadBalancerPaginator(essdk.BuildFilter(ctx, d.QueryContext, listLoadBalancerFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListLoadBalancer NewLoadBalancerPaginator", "error", err) return nil, err @@ -50537,6 +41431,7 @@ var getLoadBalancerFilters = map[string]string{ "load_balancing_rules": "Description.LoadBalancer.Properties.LoadBalancingRules", "name": "description.LoadBalancer.Name", "outbound_rules": "Description.LoadBalancer.Properties.OutboundRules", + "platform_account_id": "metadata.IntegrationID", "probes": "Description.LoadBalancer.Properties.Probes", "provisioning_state": "Description.LoadBalancer.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", @@ -50563,7 +41458,7 @@ func GetLoadBalancer(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -50577,7 +41472,7 @@ func GetLoadBalancer(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate } limit := int64(1) - paginator, err := k.NewLoadBalancerPaginator(essdk.BuildFilter(ctx, d.QueryContext, getLoadBalancerFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewLoadBalancerPaginator(essdk.BuildFilter(ctx, d.QueryContext, getLoadBalancerFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -50608,7 +41503,7 @@ func GetLoadBalancer(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate type LoadBalancerBackendAddressPool struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.LoadBalancerBackendAddressPoolDescription `json:"Description"` + Description azure.LoadBalancerBackendAddressPoolDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -50616,59 +41511,6 @@ type LoadBalancerBackendAddressPool struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type LoadBalancerBackendAddressPoolHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -50747,6 +41589,7 @@ var listLoadBalancerBackendAddressPoolFilters = map[string]string{ "name": "Description.Pool.Name", "outbound_rule_id": "Description.Pool.Properties.OutboundRule.ID", "outbound_rules": "Description.LoadBalancer.Properties.OutboundRules", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.LoadBalancer.Properties.ProvisioningState", "resource_group": "Description.ResourceGroup", "title": "Description.Pool.Name", @@ -50771,7 +41614,7 @@ func ListLoadBalancerBackendAddressPool(ctx context.Context, d *plugin.QueryData plugin.Logger(ctx).Error("ListLoadBalancerBackendAddressPool NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListLoadBalancerBackendAddressPool GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -50787,7 +41630,7 @@ func ListLoadBalancerBackendAddressPool(ctx context.Context, d *plugin.QueryData return nil, err } - paginator, err := k.NewLoadBalancerBackendAddressPoolPaginator(essdk.BuildFilter(ctx, d.QueryContext, listLoadBalancerBackendAddressPoolFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewLoadBalancerBackendAddressPoolPaginator(essdk.BuildFilter(ctx, d.QueryContext, listLoadBalancerBackendAddressPoolFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListLoadBalancerBackendAddressPool NewLoadBalancerBackendAddressPoolPaginator", "error", err) return nil, err @@ -50824,6 +41667,7 @@ var getLoadBalancerBackendAddressPoolFilters = map[string]string{ "name": "description.Pool.Name", "outbound_rule_id": "Description.Pool.Properties.OutboundRule.ID", "outbound_rules": "Description.LoadBalancer.Properties.OutboundRules", + "platform_account_id": "metadata.IntegrationID", "provisioning_state": "Description.LoadBalancer.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", "title": "Description.Pool.Name", @@ -50845,7 +41689,7 @@ func GetLoadBalancerBackendAddressPool(ctx context.Context, d *plugin.QueryData, if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -50859,7 +41703,7 @@ func GetLoadBalancerBackendAddressPool(ctx context.Context, d *plugin.QueryData, } limit := int64(1) - paginator, err := k.NewLoadBalancerBackendAddressPoolPaginator(essdk.BuildFilter(ctx, d.QueryContext, getLoadBalancerBackendAddressPoolFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewLoadBalancerBackendAddressPoolPaginator(essdk.BuildFilter(ctx, d.QueryContext, getLoadBalancerBackendAddressPoolFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -50890,7 +41734,7 @@ func GetLoadBalancerBackendAddressPool(ctx context.Context, d *plugin.QueryData, type LoadBalancerNatRule struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.LoadBalancerNatRuleDescription `json:"Description"` + Description azure.LoadBalancerNatRuleDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -50898,59 +41742,6 @@ type LoadBalancerNatRule struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type LoadBalancerNatRuleHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -51030,6 +41821,7 @@ var listLoadBalancerNatRuleFilters = map[string]string{ "idle_timeout_in_minutes": "Description.Rule.Properties.IdleTimeoutInMinutes", "load_balancer_name": "Description.LoadBalancerName", "name": "Description.Rule.Name", + "platform_account_id": "metadata.IntegrationID", "protocol": "Description.Rule.Properties.Protocol", "provisioning_state": "Description.Rule.Properties.ProvisioningState", "resource_group": "Description.ResourceGroup", @@ -51055,7 +41847,7 @@ func ListLoadBalancerNatRule(ctx context.Context, d *plugin.QueryData, _ *plugin plugin.Logger(ctx).Error("ListLoadBalancerNatRule NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListLoadBalancerNatRule GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -51071,7 +41863,7 @@ func ListLoadBalancerNatRule(ctx context.Context, d *plugin.QueryData, _ *plugin return nil, err } - paginator, err := k.NewLoadBalancerNatRulePaginator(essdk.BuildFilter(ctx, d.QueryContext, listLoadBalancerNatRuleFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewLoadBalancerNatRulePaginator(essdk.BuildFilter(ctx, d.QueryContext, listLoadBalancerNatRuleFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListLoadBalancerNatRule NewLoadBalancerNatRulePaginator", "error", err) return nil, err @@ -51109,6 +41901,7 @@ var getLoadBalancerNatRuleFilters = map[string]string{ "idle_timeout_in_minutes": "Description.Rule.Properties.IdleTimeoutInMinutes", "load_balancer_name": "description.LoadBalancerName", "name": "description.Rule.Name", + "platform_account_id": "metadata.IntegrationID", "protocol": "Description.Rule.Properties.Protocol", "provisioning_state": "Description.Rule.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", @@ -51131,7 +41924,7 @@ func GetLoadBalancerNatRule(ctx context.Context, d *plugin.QueryData, _ *plugin. if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -51145,7 +41938,7 @@ func GetLoadBalancerNatRule(ctx context.Context, d *plugin.QueryData, _ *plugin. } limit := int64(1) - paginator, err := k.NewLoadBalancerNatRulePaginator(essdk.BuildFilter(ctx, d.QueryContext, getLoadBalancerNatRuleFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewLoadBalancerNatRulePaginator(essdk.BuildFilter(ctx, d.QueryContext, getLoadBalancerNatRuleFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -51176,7 +41969,7 @@ func GetLoadBalancerNatRule(ctx context.Context, d *plugin.QueryData, _ *plugin. type LoadBalancerOutboundRule struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.LoadBalancerOutboundRuleDescription `json:"Description"` + Description azure.LoadBalancerOutboundRuleDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -51184,59 +41977,6 @@ type LoadBalancerOutboundRule struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type LoadBalancerOutboundRuleHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -51314,6 +42054,7 @@ var listLoadBalancerOutboundRuleFilters = map[string]string{ "idle_timeout_in_minutes": "Description.Rule.Properties.IdleTimeoutInMinutes", "load_balancer_name": "Description.LoadBalancerName", "name": "Description.Rule.Name", + "platform_account_id": "metadata.IntegrationID", "protocol": "Description.Rule.Properties.Protocol", "provisioning_state": "Description.Rule.Properties.ProvisioningState", "resource_group": "Description.ResourceGroup", @@ -51339,7 +42080,7 @@ func ListLoadBalancerOutboundRule(ctx context.Context, d *plugin.QueryData, _ *p plugin.Logger(ctx).Error("ListLoadBalancerOutboundRule NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListLoadBalancerOutboundRule GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -51355,7 +42096,7 @@ func ListLoadBalancerOutboundRule(ctx context.Context, d *plugin.QueryData, _ *p return nil, err } - paginator, err := k.NewLoadBalancerOutboundRulePaginator(essdk.BuildFilter(ctx, d.QueryContext, listLoadBalancerOutboundRuleFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewLoadBalancerOutboundRulePaginator(essdk.BuildFilter(ctx, d.QueryContext, listLoadBalancerOutboundRuleFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListLoadBalancerOutboundRule NewLoadBalancerOutboundRulePaginator", "error", err) return nil, err @@ -51391,6 +42132,7 @@ var getLoadBalancerOutboundRuleFilters = map[string]string{ "idle_timeout_in_minutes": "Description.Rule.Properties.IdleTimeoutInMinutes", "load_balancer_name": "description.LoadBalancerName", "name": "description.Rule.Name", + "platform_account_id": "metadata.IntegrationID", "protocol": "Description.Rule.Properties.Protocol", "provisioning_state": "Description.Rule.Properties.ProvisioningState", "resource_group": "description.ResourceGroup", @@ -51413,7 +42155,7 @@ func GetLoadBalancerOutboundRule(ctx context.Context, d *plugin.QueryData, _ *pl if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -51427,7 +42169,7 @@ func GetLoadBalancerOutboundRule(ctx context.Context, d *plugin.QueryData, _ *pl } limit := int64(1) - paginator, err := k.NewLoadBalancerOutboundRulePaginator(essdk.BuildFilter(ctx, d.QueryContext, getLoadBalancerOutboundRuleFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewLoadBalancerOutboundRulePaginator(essdk.BuildFilter(ctx, d.QueryContext, getLoadBalancerOutboundRuleFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -51458,7 +42200,7 @@ func GetLoadBalancerOutboundRule(ctx context.Context, d *plugin.QueryData, _ *pl type LoadBalancerProbe struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.LoadBalancerProbeDescription `json:"Description"` + Description azure.LoadBalancerProbeDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -51466,59 +42208,6 @@ type LoadBalancerProbe struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type LoadBalancerProbeHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -51594,6 +42283,7 @@ var listLoadBalancerProbeFilters = map[string]string{ "load_balancing_rules": "Description.Probe.Properties.LoadBalancingRules", "name": "Description.Probe.Name", "number_of_probes": "Description.Probe.Properties.NumberOfProbes", + "platform_account_id": "metadata.IntegrationID", "port": "Description.Probe.Properties.Port", "protocol": "Description.Probe.Properties.Protocol", "provisioning_state": "Description.Probe.Properties.ProvisioningState", @@ -51621,7 +42311,7 @@ func ListLoadBalancerProbe(ctx context.Context, d *plugin.QueryData, _ *plugin.H plugin.Logger(ctx).Error("ListLoadBalancerProbe NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListLoadBalancerProbe GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -51637,7 +42327,7 @@ func ListLoadBalancerProbe(ctx context.Context, d *plugin.QueryData, _ *plugin.H return nil, err } - paginator, err := k.NewLoadBalancerProbePaginator(essdk.BuildFilter(ctx, d.QueryContext, listLoadBalancerProbeFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewLoadBalancerProbePaginator(essdk.BuildFilter(ctx, d.QueryContext, listLoadBalancerProbeFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListLoadBalancerProbe NewLoadBalancerProbePaginator", "error", err) return nil, err @@ -51671,6 +42361,7 @@ var getLoadBalancerProbeFilters = map[string]string{ "load_balancing_rules": "Description.Probe.Properties.LoadBalancingRules", "name": "description.Probe.Name", "number_of_probes": "Description.Probe.Properties.NumberOfProbes", + "platform_account_id": "metadata.IntegrationID", "port": "Description.Probe.Properties.Port", "protocol": "Description.Probe.Properties.Protocol", "provisioning_state": "Description.Probe.Properties.ProvisioningState", @@ -51695,7 +42386,7 @@ func GetLoadBalancerProbe(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -51709,7 +42400,7 @@ func GetLoadBalancerProbe(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy } limit := int64(1) - paginator, err := k.NewLoadBalancerProbePaginator(essdk.BuildFilter(ctx, d.QueryContext, getLoadBalancerProbeFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewLoadBalancerProbePaginator(essdk.BuildFilter(ctx, d.QueryContext, getLoadBalancerProbeFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -51740,7 +42431,7 @@ func GetLoadBalancerProbe(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy type LoadBalancerRule struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.LoadBalancerRuleDescription `json:"Description"` + Description azure.LoadBalancerRuleDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -51748,59 +42439,6 @@ type LoadBalancerRule struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type LoadBalancerRuleHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -51883,6 +42521,7 @@ var listLoadBalancerRuleFilters = map[string]string{ "load_balancer_name": "Description.LoadBalancerName", "load_distribution": "Description.Rule.Properties.LoadDistribution", "name": "Description.Rule.Name", + "platform_account_id": "metadata.IntegrationID", "probe_id": "Description.Rule.Properties.Probe.ID", "protocol": "Description.Rule.Properties.Protocol", "provisioning_state": "Description.Rule.Properties.ProvisioningState", @@ -51909,7 +42548,7 @@ func ListLoadBalancerRule(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy plugin.Logger(ctx).Error("ListLoadBalancerRule NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListLoadBalancerRule GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -51925,7 +42564,7 @@ func ListLoadBalancerRule(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy return nil, err } - paginator, err := k.NewLoadBalancerRulePaginator(essdk.BuildFilter(ctx, d.QueryContext, listLoadBalancerRuleFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewLoadBalancerRulePaginator(essdk.BuildFilter(ctx, d.QueryContext, listLoadBalancerRuleFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListLoadBalancerRule NewLoadBalancerRulePaginator", "error", err) return nil, err @@ -51966,6 +42605,7 @@ var getLoadBalancerRuleFilters = map[string]string{ "load_balancer_name": "description.LoadBalancerName", "load_distribution": "Description.Rule.Properties.LoadDistribution", "name": "description.Rule.Name", + "platform_account_id": "metadata.IntegrationID", "probe_id": "Description.Rule.Properties.Probe.ID", "protocol": "Description.Rule.Properties.Protocol", "provisioning_state": "Description.Rule.Properties.ProvisioningState", @@ -51989,7 +42629,7 @@ func GetLoadBalancerRule(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -52003,7 +42643,7 @@ func GetLoadBalancerRule(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd } limit := int64(1) - paginator, err := k.NewLoadBalancerRulePaginator(essdk.BuildFilter(ctx, d.QueryContext, getLoadBalancerRuleFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewLoadBalancerRulePaginator(essdk.BuildFilter(ctx, d.QueryContext, getLoadBalancerRuleFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -52034,7 +42674,7 @@ func GetLoadBalancerRule(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd type ManagementGroup struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.ManagementGroupDescription `json:"Description"` + Description azure.ManagementGroupDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -52042,59 +42682,6 @@ type ManagementGroup struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type ManagementGroupHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -52163,17 +42750,18 @@ 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", - "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", + "platform_account_id": "metadata.IntegrationID", + "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) { @@ -52194,7 +42782,7 @@ func ListManagementGroup(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd plugin.Logger(ctx).Error("ListManagementGroup NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListManagementGroup GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -52210,7 +42798,7 @@ func ListManagementGroup(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd return nil, err } - paginator, err := k.NewManagementGroupPaginator(essdk.BuildFilter(ctx, d.QueryContext, listManagementGroupFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewManagementGroupPaginator(essdk.BuildFilter(ctx, d.QueryContext, listManagementGroupFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListManagementGroup NewManagementGroupPaginator", "error", err) return nil, err @@ -52237,17 +42825,18 @@ 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", - "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", + "platform_account_id": "metadata.IntegrationID", + "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) { @@ -52265,7 +42854,7 @@ func GetManagementGroup(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -52279,7 +42868,7 @@ func GetManagementGroup(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr } limit := int64(1) - paginator, err := k.NewManagementGroupPaginator(essdk.BuildFilter(ctx, d.QueryContext, getManagementGroupFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewManagementGroupPaginator(essdk.BuildFilter(ctx, d.QueryContext, getManagementGroupFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -52310,7 +42899,7 @@ func GetManagementGroup(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr type ManagementLock struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.ManagementLockDescription `json:"Description"` + Description azure.ManagementLockDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -52318,59 +42907,6 @@ type ManagementLock struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type ManagementLockHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -52439,13 +42975,14 @@ func (p ManagementLockPaginator) NextPage(ctx context.Context) ([]ManagementLock } var listManagementLockFilters = map[string]string{ - "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", + "id": "Description.Lock.ID", + "lock_level": "Description.Lock.Properties.Level", + "name": "Description.Lock.Name", + "notes": "Description.Lock.Properties.Notes", + "owners": "Description.Lock.Properties.Owners", + "platform_account_id": "metadata.IntegrationID", + "title": "Description.Lock.Name", + "type": "Description.Lock.Type", } func ListManagementLock(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -52466,7 +43003,7 @@ func ListManagementLock(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr plugin.Logger(ctx).Error("ListManagementLock NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListManagementLock GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -52482,7 +43019,7 @@ func ListManagementLock(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr return nil, err } - paginator, err := k.NewManagementLockPaginator(essdk.BuildFilter(ctx, d.QueryContext, listManagementLockFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewManagementLockPaginator(essdk.BuildFilter(ctx, d.QueryContext, listManagementLockFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListManagementLock NewManagementLockPaginator", "error", err) return nil, err @@ -52509,14 +43046,15 @@ func ListManagementLock(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr } var getManagementLockFilters = map[string]string{ - "id": "Description.Lock.ID", - "lock_level": "Description.Lock.Properties.Level", - "name": "description.Lock.Name", - "notes": "Description.Lock.Properties.Notes", - "owners": "Description.Lock.Properties.Owners", - "resource_group": "description.ResourceGroup", - "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", + "platform_account_id": "metadata.IntegrationID", + "resource_group": "description.ResourceGroup", + "title": "Description.Lock.Name", + "type": "Description.Lock.Type", } func GetManagementLock(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -52534,7 +43072,7 @@ func GetManagementLock(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -52548,7 +43086,7 @@ func GetManagementLock(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra } limit := int64(1) - paginator, err := k.NewManagementLockPaginator(essdk.BuildFilter(ctx, d.QueryContext, getManagementLockFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewManagementLockPaginator(essdk.BuildFilter(ctx, d.QueryContext, getManagementLockFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -52579,7 +43117,7 @@ func GetManagementLock(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra type ResourceProvider struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.ResourceProviderDescription `json:"Description"` + Description azure.ResourceProviderDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -52587,59 +43125,6 @@ type ResourceProvider struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type ResourceProviderHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -52708,11 +43193,12 @@ func (p ResourceProviderPaginator) NextPage(ctx context.Context) ([]ResourceProv } var listResourceProviderFilters = map[string]string{ - "id": "Description.Provider.ID", - "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", + "platform_account_id": "metadata.IntegrationID", + "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) { @@ -52733,7 +43219,7 @@ func ListResourceProvider(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy plugin.Logger(ctx).Error("ListResourceProvider NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListResourceProvider GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -52749,7 +43235,7 @@ func ListResourceProvider(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy return nil, err } - paginator, err := k.NewResourceProviderPaginator(essdk.BuildFilter(ctx, d.QueryContext, listResourceProviderFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewResourceProviderPaginator(essdk.BuildFilter(ctx, d.QueryContext, listResourceProviderFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListResourceProvider NewResourceProviderPaginator", "error", err) return nil, err @@ -52776,11 +43262,12 @@ func ListResourceProvider(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy } var getResourceProviderFilters = map[string]string{ - "id": "Description.Provider.ID", - "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", + "platform_account_id": "metadata.IntegrationID", + "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) { @@ -52798,7 +43285,7 @@ func GetResourceProvider(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -52812,7 +43299,7 @@ func GetResourceProvider(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd } limit := int64(1) - paginator, err := k.NewResourceProviderPaginator(essdk.BuildFilter(ctx, d.QueryContext, getResourceProviderFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewResourceProviderPaginator(essdk.BuildFilter(ctx, d.QueryContext, getResourceProviderFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -52843,7 +43330,7 @@ func GetResourceProvider(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd type ResourceGroup struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.ResourceGroupDescription `json:"Description"` + Description azure.ResourceGroupDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -52851,59 +43338,6 @@ type ResourceGroup struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type ResourceGroupHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -52972,13 +43406,14 @@ func (p ResourceGroupPaginator) NextPage(ctx context.Context) ([]ResourceGroup, } var listResourceGroupFilters = map[string]string{ - "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", + "id": "Description.Group.ID", + "managed_by": "Description.Group.ManagedBy", + "name": "Description.Group.Name", + "platform_account_id": "metadata.IntegrationID", + "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) { @@ -52999,7 +43434,7 @@ func ListResourceGroup(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra plugin.Logger(ctx).Error("ListResourceGroup NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListResourceGroup GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -53015,7 +43450,7 @@ func ListResourceGroup(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra return nil, err } - paginator, err := k.NewResourceGroupPaginator(essdk.BuildFilter(ctx, d.QueryContext, listResourceGroupFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewResourceGroupPaginator(essdk.BuildFilter(ctx, d.QueryContext, listResourceGroupFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListResourceGroup NewResourceGroupPaginator", "error", err) return nil, err @@ -53042,13 +43477,14 @@ func ListResourceGroup(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra } var getResourceGroupFilters = map[string]string{ - "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", + "id": "Description.Group.ID", + "managed_by": "Description.Group.ManagedBy", + "name": "description.Group.Name", + "platform_account_id": "metadata.IntegrationID", + "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) { @@ -53066,7 +43502,7 @@ func GetResourceGroup(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -53080,7 +43516,7 @@ func GetResourceGroup(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat } limit := int64(1) - paginator, err := k.NewResourceGroupPaginator(essdk.BuildFilter(ctx, d.QueryContext, getResourceGroupFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewResourceGroupPaginator(essdk.BuildFilter(ctx, d.QueryContext, getResourceGroupFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -53111,7 +43547,7 @@ func GetResourceGroup(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat type GenericResource struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.GenericResourceDescription `json:"Description"` + Description azure.GenericResourceDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -53119,59 +43555,6 @@ type GenericResource struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type GenericResourceHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -53280,7 +43663,7 @@ func ListGenericResource(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd plugin.Logger(ctx).Error("ListGenericResource NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListGenericResource GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -53296,7 +43679,7 @@ func ListGenericResource(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd return nil, err } - paginator, err := k.NewGenericResourcePaginator(essdk.BuildFilter(ctx, d.QueryContext, listGenericResourceFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewGenericResourcePaginator(essdk.BuildFilter(ctx, d.QueryContext, listGenericResourceFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListGenericResource NewGenericResourcePaginator", "error", err) return nil, err @@ -53360,7 +43743,7 @@ func GetGenericResource(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -53374,7 +43757,7 @@ func GetGenericResource(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr } limit := int64(1) - paginator, err := k.NewGenericResourcePaginator(essdk.BuildFilter(ctx, d.QueryContext, getGenericResourceFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewGenericResourcePaginator(essdk.BuildFilter(ctx, d.QueryContext, getGenericResourceFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -53405,7 +43788,7 @@ func GetGenericResource(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr type BotServiceBot struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.BotServiceBotDescription `json:"Description"` + Description azure.BotServiceBotDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -53413,59 +43796,6 @@ type BotServiceBot struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type BotServiceBotHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -53558,7 +43888,7 @@ func ListBotServiceBot(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra plugin.Logger(ctx).Error("ListBotServiceBot NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListBotServiceBot GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -53574,7 +43904,7 @@ func ListBotServiceBot(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra return nil, err } - paginator, err := k.NewBotServiceBotPaginator(essdk.BuildFilter(ctx, d.QueryContext, listBotServiceBotFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewBotServiceBotPaginator(essdk.BuildFilter(ctx, d.QueryContext, listBotServiceBotFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListBotServiceBot NewBotServiceBotPaginator", "error", err) return nil, err @@ -53622,7 +43952,7 @@ func GetBotServiceBot(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -53636,7 +43966,7 @@ func GetBotServiceBot(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat } limit := int64(1) - paginator, err := k.NewBotServiceBotPaginator(essdk.BuildFilter(ctx, d.QueryContext, getBotServiceBotFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewBotServiceBotPaginator(essdk.BuildFilter(ctx, d.QueryContext, getBotServiceBotFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -53667,7 +43997,7 @@ func GetBotServiceBot(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat type NetAppAccount struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.NetAppAccountDescription `json:"Description"` + Description azure.NetAppAccountDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -53675,59 +44005,6 @@ type NetAppAccount struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type NetAppAccountHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -53820,7 +44097,7 @@ func ListNetAppAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra plugin.Logger(ctx).Error("ListNetAppAccount NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListNetAppAccount GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -53836,7 +44113,7 @@ func ListNetAppAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra return nil, err } - paginator, err := k.NewNetAppAccountPaginator(essdk.BuildFilter(ctx, d.QueryContext, listNetAppAccountFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewNetAppAccountPaginator(essdk.BuildFilter(ctx, d.QueryContext, listNetAppAccountFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListNetAppAccount NewNetAppAccountPaginator", "error", err) return nil, err @@ -53884,7 +44161,7 @@ func GetNetAppAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -53898,7 +44175,7 @@ func GetNetAppAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat } limit := int64(1) - paginator, err := k.NewNetAppAccountPaginator(essdk.BuildFilter(ctx, d.QueryContext, getNetAppAccountFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewNetAppAccountPaginator(essdk.BuildFilter(ctx, d.QueryContext, getNetAppAccountFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -53929,7 +44206,7 @@ func GetNetAppAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat type NetAppCapacityPool struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.NetAppCapacityPoolDescription `json:"Description"` + Description azure.NetAppCapacityPoolDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -53937,59 +44214,6 @@ type NetAppCapacityPool struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type NetAppCapacityPoolHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -54082,7 +44306,7 @@ func ListNetAppCapacityPool(ctx context.Context, d *plugin.QueryData, _ *plugin. plugin.Logger(ctx).Error("ListNetAppCapacityPool NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListNetAppCapacityPool GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -54098,7 +44322,7 @@ func ListNetAppCapacityPool(ctx context.Context, d *plugin.QueryData, _ *plugin. return nil, err } - paginator, err := k.NewNetAppCapacityPoolPaginator(essdk.BuildFilter(ctx, d.QueryContext, listNetAppCapacityPoolFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewNetAppCapacityPoolPaginator(essdk.BuildFilter(ctx, d.QueryContext, listNetAppCapacityPoolFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListNetAppCapacityPool NewNetAppCapacityPoolPaginator", "error", err) return nil, err @@ -54146,7 +44370,7 @@ func GetNetAppCapacityPool(ctx context.Context, d *plugin.QueryData, _ *plugin.H if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -54160,7 +44384,7 @@ func GetNetAppCapacityPool(ctx context.Context, d *plugin.QueryData, _ *plugin.H } limit := int64(1) - paginator, err := k.NewNetAppCapacityPoolPaginator(essdk.BuildFilter(ctx, d.QueryContext, getNetAppCapacityPoolFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewNetAppCapacityPoolPaginator(essdk.BuildFilter(ctx, d.QueryContext, getNetAppCapacityPoolFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -54191,7 +44415,7 @@ func GetNetAppCapacityPool(ctx context.Context, d *plugin.QueryData, _ *plugin.H type DashboardGrafana struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.DashboardGrafanaDescription `json:"Description"` + Description azure.DashboardGrafanaDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -54199,59 +44423,6 @@ type DashboardGrafana struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type DashboardGrafanaHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -54343,7 +44514,7 @@ func ListDashboardGrafana(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy plugin.Logger(ctx).Error("ListDashboardGrafana NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListDashboardGrafana GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -54359,7 +44530,7 @@ func ListDashboardGrafana(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy return nil, err } - paginator, err := k.NewDashboardGrafanaPaginator(essdk.BuildFilter(ctx, d.QueryContext, listDashboardGrafanaFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewDashboardGrafanaPaginator(essdk.BuildFilter(ctx, d.QueryContext, listDashboardGrafanaFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListDashboardGrafana NewDashboardGrafanaPaginator", "error", err) return nil, err @@ -54406,7 +44577,7 @@ func GetDashboardGrafana(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -54420,7 +44591,7 @@ func GetDashboardGrafana(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd } limit := int64(1) - paginator, err := k.NewDashboardGrafanaPaginator(essdk.BuildFilter(ctx, d.QueryContext, getDashboardGrafanaFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewDashboardGrafanaPaginator(essdk.BuildFilter(ctx, d.QueryContext, getDashboardGrafanaFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -54451,7 +44622,7 @@ func GetDashboardGrafana(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd type DesktopVirtualizationHostPool struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.DesktopVirtualizationHostPoolDescription `json:"Description"` + Description azure.DesktopVirtualizationHostPoolDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -54459,59 +44630,6 @@ type DesktopVirtualizationHostPool struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type DesktopVirtualizationHostPoolHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -54604,7 +44722,7 @@ func ListDesktopVirtualizationHostPool(ctx context.Context, d *plugin.QueryData, plugin.Logger(ctx).Error("ListDesktopVirtualizationHostPool NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListDesktopVirtualizationHostPool GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -54620,7 +44738,7 @@ func ListDesktopVirtualizationHostPool(ctx context.Context, d *plugin.QueryData, return nil, err } - paginator, err := k.NewDesktopVirtualizationHostPoolPaginator(essdk.BuildFilter(ctx, d.QueryContext, listDesktopVirtualizationHostPoolFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewDesktopVirtualizationHostPoolPaginator(essdk.BuildFilter(ctx, d.QueryContext, listDesktopVirtualizationHostPoolFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListDesktopVirtualizationHostPool NewDesktopVirtualizationHostPoolPaginator", "error", err) return nil, err @@ -54668,7 +44786,7 @@ func GetDesktopVirtualizationHostPool(ctx context.Context, d *plugin.QueryData, if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -54682,7 +44800,7 @@ func GetDesktopVirtualizationHostPool(ctx context.Context, d *plugin.QueryData, } limit := int64(1) - paginator, err := k.NewDesktopVirtualizationHostPoolPaginator(essdk.BuildFilter(ctx, d.QueryContext, getDesktopVirtualizationHostPoolFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewDesktopVirtualizationHostPoolPaginator(essdk.BuildFilter(ctx, d.QueryContext, getDesktopVirtualizationHostPoolFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -54713,7 +44831,7 @@ func GetDesktopVirtualizationHostPool(ctx context.Context, d *plugin.QueryData, type DesktopVirtualizationWorkspace struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.DesktopVirtualizationWorkspaceDescription `json:"Description"` + Description azure.DesktopVirtualizationWorkspaceDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -54721,59 +44839,6 @@ type DesktopVirtualizationWorkspace struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type DesktopVirtualizationWorkspaceHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -54866,7 +44931,7 @@ func ListDesktopVirtualizationWorkspace(ctx context.Context, d *plugin.QueryData plugin.Logger(ctx).Error("ListDesktopVirtualizationWorkspace NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListDesktopVirtualizationWorkspace GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -54882,7 +44947,7 @@ func ListDesktopVirtualizationWorkspace(ctx context.Context, d *plugin.QueryData return nil, err } - paginator, err := k.NewDesktopVirtualizationWorkspacePaginator(essdk.BuildFilter(ctx, d.QueryContext, listDesktopVirtualizationWorkspaceFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewDesktopVirtualizationWorkspacePaginator(essdk.BuildFilter(ctx, d.QueryContext, listDesktopVirtualizationWorkspaceFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListDesktopVirtualizationWorkspace NewDesktopVirtualizationWorkspacePaginator", "error", err) return nil, err @@ -54930,7 +44995,7 @@ func GetDesktopVirtualizationWorkspace(ctx context.Context, d *plugin.QueryData, if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -54944,7 +45009,7 @@ func GetDesktopVirtualizationWorkspace(ctx context.Context, d *plugin.QueryData, } limit := int64(1) - paginator, err := k.NewDesktopVirtualizationWorkspacePaginator(essdk.BuildFilter(ctx, d.QueryContext, getDesktopVirtualizationWorkspaceFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewDesktopVirtualizationWorkspacePaginator(essdk.BuildFilter(ctx, d.QueryContext, getDesktopVirtualizationWorkspaceFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -54975,7 +45040,7 @@ func GetDesktopVirtualizationWorkspace(ctx context.Context, d *plugin.QueryData, type DevTestLabLab struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.DevTestLabLabDescription `json:"Description"` + Description azure.DevTestLabLabDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -54983,59 +45048,6 @@ type DevTestLabLab struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type DevTestLabLabHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -55128,7 +45140,7 @@ func ListDevTestLabLab(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra plugin.Logger(ctx).Error("ListDevTestLabLab NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListDevTestLabLab GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -55144,7 +45156,7 @@ func ListDevTestLabLab(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra return nil, err } - paginator, err := k.NewDevTestLabLabPaginator(essdk.BuildFilter(ctx, d.QueryContext, listDevTestLabLabFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewDevTestLabLabPaginator(essdk.BuildFilter(ctx, d.QueryContext, listDevTestLabLabFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListDevTestLabLab NewDevTestLabLabPaginator", "error", err) return nil, err @@ -55192,7 +45204,7 @@ func GetDevTestLabLab(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -55206,7 +45218,7 @@ func GetDevTestLabLab(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat } limit := int64(1) - paginator, err := k.NewDevTestLabLabPaginator(essdk.BuildFilter(ctx, d.QueryContext, getDevTestLabLabFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewDevTestLabLabPaginator(essdk.BuildFilter(ctx, d.QueryContext, getDevTestLabLabFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -55237,7 +45249,7 @@ func GetDevTestLabLab(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrat type PurviewAccount struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.PurviewAccountDescription `json:"Description"` + Description azure.PurviewAccountDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -55245,59 +45257,6 @@ type PurviewAccount struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type PurviewAccountHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -55390,7 +45349,7 @@ func ListPurviewAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr plugin.Logger(ctx).Error("ListPurviewAccount NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListPurviewAccount GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -55406,7 +45365,7 @@ func ListPurviewAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydr return nil, err } - paginator, err := k.NewPurviewAccountPaginator(essdk.BuildFilter(ctx, d.QueryContext, listPurviewAccountFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewPurviewAccountPaginator(essdk.BuildFilter(ctx, d.QueryContext, listPurviewAccountFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListPurviewAccount NewPurviewAccountPaginator", "error", err) return nil, err @@ -55454,7 +45413,7 @@ func GetPurviewAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -55468,7 +45427,7 @@ func GetPurviewAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra } limit := int64(1) - paginator, err := k.NewPurviewAccountPaginator(essdk.BuildFilter(ctx, d.QueryContext, getPurviewAccountFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewPurviewAccountPaginator(essdk.BuildFilter(ctx, d.QueryContext, getPurviewAccountFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -55499,7 +45458,7 @@ func GetPurviewAccount(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydra type PowerBIDedicatedCapacity struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.PowerBIDedicatedCapacityDescription `json:"Description"` + Description azure.PowerBIDedicatedCapacityDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -55507,59 +45466,6 @@ type PowerBIDedicatedCapacity struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type PowerBIDedicatedCapacityHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -55652,7 +45558,7 @@ func ListPowerBIDedicatedCapacity(ctx context.Context, d *plugin.QueryData, _ *p plugin.Logger(ctx).Error("ListPowerBIDedicatedCapacity NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListPowerBIDedicatedCapacity GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -55668,7 +45574,7 @@ func ListPowerBIDedicatedCapacity(ctx context.Context, d *plugin.QueryData, _ *p return nil, err } - paginator, err := k.NewPowerBIDedicatedCapacityPaginator(essdk.BuildFilter(ctx, d.QueryContext, listPowerBIDedicatedCapacityFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewPowerBIDedicatedCapacityPaginator(essdk.BuildFilter(ctx, d.QueryContext, listPowerBIDedicatedCapacityFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListPowerBIDedicatedCapacity NewPowerBIDedicatedCapacityPaginator", "error", err) return nil, err @@ -55716,7 +45622,7 @@ func GetPowerBIDedicatedCapacity(ctx context.Context, d *plugin.QueryData, _ *pl if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -55730,7 +45636,7 @@ func GetPowerBIDedicatedCapacity(ctx context.Context, d *plugin.QueryData, _ *pl } limit := int64(1) - paginator, err := k.NewPowerBIDedicatedCapacityPaginator(essdk.BuildFilter(ctx, d.QueryContext, getPowerBIDedicatedCapacityFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewPowerBIDedicatedCapacityPaginator(essdk.BuildFilter(ctx, d.QueryContext, getPowerBIDedicatedCapacityFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -55761,7 +45667,7 @@ func GetPowerBIDedicatedCapacity(ctx context.Context, d *plugin.QueryData, _ *pl type ApplicationInsightsComponent struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.ApplicationInsightsComponentDescription `json:"Description"` + Description azure.ApplicationInsightsComponentDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -55769,59 +45675,6 @@ type ApplicationInsightsComponent struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type ApplicationInsightsComponentHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -55938,7 +45791,7 @@ func ListApplicationInsightsComponent(ctx context.Context, d *plugin.QueryData, plugin.Logger(ctx).Error("ListApplicationInsightsComponent NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListApplicationInsightsComponent GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -55954,7 +45807,7 @@ func ListApplicationInsightsComponent(ctx context.Context, d *plugin.QueryData, return nil, err } - paginator, err := k.NewApplicationInsightsComponentPaginator(essdk.BuildFilter(ctx, d.QueryContext, listApplicationInsightsComponentFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewApplicationInsightsComponentPaginator(essdk.BuildFilter(ctx, d.QueryContext, listApplicationInsightsComponentFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListApplicationInsightsComponent NewApplicationInsightsComponentPaginator", "error", err) return nil, err @@ -56026,7 +45879,7 @@ func GetApplicationInsightsComponent(ctx context.Context, d *plugin.QueryData, _ if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -56040,7 +45893,7 @@ func GetApplicationInsightsComponent(ctx context.Context, d *plugin.QueryData, _ } limit := int64(1) - paginator, err := k.NewApplicationInsightsComponentPaginator(essdk.BuildFilter(ctx, d.QueryContext, getApplicationInsightsComponentFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewApplicationInsightsComponentPaginator(essdk.BuildFilter(ctx, d.QueryContext, getApplicationInsightsComponentFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -56071,7 +45924,7 @@ func GetApplicationInsightsComponent(ctx context.Context, d *plugin.QueryData, _ type LighthouseDefinition struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.LighthouseDefinitionDescription `json:"Description"` + Description azure.LighthouseDefinitionDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -56079,59 +45932,6 @@ type LighthouseDefinition struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type LighthouseDefinitionHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -56233,7 +46033,7 @@ func ListLighthouseDefinition(ctx context.Context, d *plugin.QueryData, _ *plugi plugin.Logger(ctx).Error("ListLighthouseDefinition NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListLighthouseDefinition GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -56249,7 +46049,7 @@ func ListLighthouseDefinition(ctx context.Context, d *plugin.QueryData, _ *plugi return nil, err } - paginator, err := k.NewLighthouseDefinitionPaginator(essdk.BuildFilter(ctx, d.QueryContext, listLighthouseDefinitionFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewLighthouseDefinitionPaginator(essdk.BuildFilter(ctx, d.QueryContext, listLighthouseDefinitionFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListLighthouseDefinition NewLighthouseDefinitionPaginator", "error", err) return nil, err @@ -56306,7 +46106,7 @@ func GetLighthouseDefinition(ctx context.Context, d *plugin.QueryData, _ *plugin if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -56320,7 +46120,7 @@ func GetLighthouseDefinition(ctx context.Context, d *plugin.QueryData, _ *plugin } limit := int64(1) - paginator, err := k.NewLighthouseDefinitionPaginator(essdk.BuildFilter(ctx, d.QueryContext, getLighthouseDefinitionFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewLighthouseDefinitionPaginator(essdk.BuildFilter(ctx, d.QueryContext, getLighthouseDefinitionFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -56351,7 +46151,7 @@ func GetLighthouseDefinition(ctx context.Context, d *plugin.QueryData, _ *plugin type LighthouseAssignment struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.LighthouseAssignmentDescription `json:"Description"` + Description azure.LighthouseAssignmentDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -56359,59 +46159,6 @@ type LighthouseAssignment struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type LighthouseAssignmentHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -56508,7 +46255,7 @@ func ListLighthouseAssignment(ctx context.Context, d *plugin.QueryData, _ *plugi plugin.Logger(ctx).Error("ListLighthouseAssignment NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListLighthouseAssignment GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -56524,7 +46271,7 @@ func ListLighthouseAssignment(ctx context.Context, d *plugin.QueryData, _ *plugi return nil, err } - paginator, err := k.NewLighthouseAssignmentPaginator(essdk.BuildFilter(ctx, d.QueryContext, listLighthouseAssignmentFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewLighthouseAssignmentPaginator(essdk.BuildFilter(ctx, d.QueryContext, listLighthouseAssignmentFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListLighthouseAssignment NewLighthouseAssignmentPaginator", "error", err) return nil, err @@ -56576,7 +46323,7 @@ func GetLighthouseAssignment(ctx context.Context, d *plugin.QueryData, _ *plugin if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -56590,7 +46337,7 @@ func GetLighthouseAssignment(ctx context.Context, d *plugin.QueryData, _ *plugin } limit := int64(1) - paginator, err := k.NewLighthouseAssignmentPaginator(essdk.BuildFilter(ctx, d.QueryContext, getLighthouseAssignmentFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewLighthouseAssignmentPaginator(essdk.BuildFilter(ctx, d.QueryContext, getLighthouseAssignmentFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -56621,7 +46368,7 @@ func GetLighthouseAssignment(ctx context.Context, d *plugin.QueryData, _ *plugin type MaintenanceConfiguration struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.MaintenanceConfigurationDescription `json:"Description"` + Description azure.MaintenanceConfigurationDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -56629,59 +46376,6 @@ type MaintenanceConfiguration struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type MaintenanceConfigurationHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -56786,7 +46480,7 @@ func ListMaintenanceConfiguration(ctx context.Context, d *plugin.QueryData, _ *p plugin.Logger(ctx).Error("ListMaintenanceConfiguration NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListMaintenanceConfiguration GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -56802,7 +46496,7 @@ func ListMaintenanceConfiguration(ctx context.Context, d *plugin.QueryData, _ *p return nil, err } - paginator, err := k.NewMaintenanceConfigurationPaginator(essdk.BuildFilter(ctx, d.QueryContext, listMaintenanceConfigurationFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewMaintenanceConfigurationPaginator(essdk.BuildFilter(ctx, d.QueryContext, listMaintenanceConfigurationFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListMaintenanceConfiguration NewMaintenanceConfigurationPaginator", "error", err) return nil, err @@ -56862,7 +46556,7 @@ func GetMaintenanceConfiguration(ctx context.Context, d *plugin.QueryData, _ *pl if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -56876,7 +46570,7 @@ func GetMaintenanceConfiguration(ctx context.Context, d *plugin.QueryData, _ *pl } limit := int64(1) - paginator, err := k.NewMaintenanceConfigurationPaginator(essdk.BuildFilter(ctx, d.QueryContext, getMaintenanceConfigurationFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewMaintenanceConfigurationPaginator(essdk.BuildFilter(ctx, d.QueryContext, getMaintenanceConfigurationFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -56907,7 +46601,7 @@ func GetMaintenanceConfiguration(ctx context.Context, d *plugin.QueryData, _ *pl type MonitorLogProfile struct { ResourceID string `json:"resource_id"` PlatformID string `json:"platform_id"` - Description azure.MonitorLogProfileDescription `json:"Description"` + Description azure.MonitorLogProfileDescription `json:"description"` Metadata azure.Metadata `json:"metadata"` DescribedBy string `json:"described_by"` ResourceType string `json:"resource_type"` @@ -56915,59 +46609,6 @@ type MonitorLogProfile struct { IntegrationID string `json:"integration_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 "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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - default: - } - } - return nil -} - type MonitorLogProfileHit struct { ID string `json:"_id"` Score float64 `json:"_score"` @@ -57067,7 +46708,7 @@ func ListMonitorLogProfile(ctx context.Context, d *plugin.QueryData, _ *plugin.H plugin.Logger(ctx).Error("ListMonitorLogProfile NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("ListMonitorLogProfile GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -57083,7 +46724,7 @@ func ListMonitorLogProfile(ctx context.Context, d *plugin.QueryData, _ *plugin.H return nil, err } - paginator, err := k.NewMonitorLogProfilePaginator(essdk.BuildFilter(ctx, d.QueryContext, listMonitorLogProfileFilters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.NewMonitorLogProfilePaginator(essdk.BuildFilter(ctx, d.QueryContext, listMonitorLogProfileFilters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("ListMonitorLogProfile NewMonitorLogProfilePaginator", "error", err) return nil, err @@ -57138,7 +46779,7 @@ func GetMonitorLogProfile(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -57152,7 +46793,7 @@ func GetMonitorLogProfile(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy } limit := int64(1) - paginator, err := k.NewMonitorLogProfilePaginator(essdk.BuildFilter(ctx, d.QueryContext, getMonitorLogProfileFilters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.NewMonitorLogProfilePaginator(essdk.BuildFilter(ctx, d.QueryContext, getMonitorLogProfileFilters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } diff --git a/pkg/sdk/runable/steampipe_es_client_generator/main.go b/pkg/sdk/runable/steampipe_es_client_generator/main.go index c6db7b10..92f09e39 100755 --- a/pkg/sdk/runable/steampipe_es_client_generator/main.go +++ b/pkg/sdk/runable/steampipe_es_client_generator/main.go @@ -16,6 +16,13 @@ import ( "strings" ) +var ( + file = flag.String("file", "", "Location of the model file") + output = flag.String("output", "", "Location of the output file") + resourceTypesFile = flag.String("resourceTypesFile", "", "Location of the resource types json file file") + pluginPath = flag.String("pluginPath", "", "Location of the steampipe plugin") +) + const PluginPath = "../../../../steampipe-plugin-azure/azure" // TODO: change to steampipe plugin type IntegrationType struct { @@ -35,12 +42,6 @@ type ResourceType struct { } func main() { - file := flag.String("file", "", "Location of the model file") - output := flag.String("output", "", "Location of the output file") - resourceTypesFile := flag.String("resourceTypesFile", "", "Location of the resource types json file file") - pluginPath := flag.String("pluginPath", "", "Location of the steampipe plugin") - flag.Parse() - if output == nil || len(*output) == 0 { v := "../../es/resources_clients.go" output = &v @@ -80,67 +81,14 @@ func main() { type {{ .Name }} struct { ResourceID string ` + "`json:\"resource_id\"`" + ` PlatformID string ` + "`json:\"platform_id\"`" + ` - Description {{ .IntegrationType }}.{{ .Name }}Description ` + "`json:\"Description\"`" + ` + Description {{ .IntegrationType }}.{{ .Name }}Description ` + "`json:\"description\"`" + ` Metadata {{ .IntegrationType }}.Metadata ` + "`json:\"metadata\"`" + ` DescribedBy string ` + "`json:\"described_by\"`" + ` - ResourceType string ` + "`json:\"resource_type\"`" + ` + 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) - } - case "metadata": - if err := json.Unmarshal(v, &r.Metadata); 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\"`" + ` @@ -231,7 +179,7 @@ func List{{ .Name }}(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate plugin.Logger(ctx).Error("List{{ .Name }} NewSelfClientCached", "error", err) return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { plugin.Logger(ctx).Error("List{{ .Name }} GetConfigTableValueOrNil for OpenGovernanceConfigKeyIntegrationID", "error", err) return nil, err @@ -247,7 +195,7 @@ func List{{ .Name }}(ctx context.Context, d *plugin.QueryData, _ *plugin.Hydrate return nil, err } - paginator, err := k.New{{ .Name }}Paginator(essdk.BuildFilter(ctx, d.QueryContext, list{{ .Name }}Filters, integrationID, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) + paginator, err := k.New{{ .Name }}Paginator(essdk.BuildFilter(ctx, d.QueryContext, list{{ .Name }}Filters, integrationId, encodedResourceCollectionFilters, clientType), d.QueryContext.Limit) if err != nil { plugin.Logger(ctx).Error("List{{ .Name }} New{{ .Name }}Paginator", "error", err) return nil, err @@ -294,7 +242,7 @@ func Get{{ .Name }}(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD if err != nil { return nil, err } - integrationID, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) + integrationId, err := sc.GetConfigTableValueOrNil(ctx, steampipesdk.OpenGovernanceConfigKeyIntegrationID) if err != nil { return nil, err } @@ -308,7 +256,7 @@ func Get{{ .Name }}(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD } limit := int64(1) - paginator, err := k.New{{ .Name }}Paginator(essdk.BuildFilter(ctx, d.QueryContext, get{{ .Name }}Filters, integrationID, encodedResourceCollectionFilters, clientType), &limit) + paginator, err := k.New{{ .Name }}Paginator(essdk.BuildFilter(ctx, d.QueryContext, get{{ .Name }}Filters, integrationId, encodedResourceCollectionFilters, clientType), &limit) if err != nil { return nil, err } @@ -436,6 +384,8 @@ func Get{{ .Name }}(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD s.ListFilters[fparts[0]] = fparts[1] } } + s.GetFilters["platform_account_id"] = "metadata.IntegrationID" + s.ListFilters["platform_account_id"] = "metadata.IntegrationID" } if s.Index != "" { @@ -451,12 +401,9 @@ func Get{{ .Name }}(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD fmt.Fprintln(&buf, ` import ( "context" - "encoding/json" - "fmt" essdk "github.com/opengovern/og-util/pkg/opengovernance-es-sdk" steampipesdk "github.com/opengovern/og-util/pkg/steampipe" "github.com/turbot/steampipe-plugin-sdk/v5/plugin" - `+configs.IntegrationTypeLower+`Describer "`+configs.OGPluginRepoURL+`/provider/describer" `+configs.IntegrationTypeLower+` "`+configs.OGPluginRepoURL+`/provider/model" "runtime" ) diff --git a/provider/describer/security.go b/provider/describer/security.go index 46bf31b7..34f43a1a 100644 --- a/provider/describer/security.go +++ b/provider/describer/security.go @@ -176,11 +176,9 @@ func GetSecurityCenterSetting(ctx context.Context, v armsecurity.SettingClassifi ID: *v.GetSetting().ID, Name: *v.GetSetting().Name, Location: "global", - Description: JSONAllFieldsMarshaller{ - Value: model.SecurityCenterSettingDescription{ - Setting: *v.GetSetting(), - ExportSettingStatus: settingStatus, - }, + Description: model.SecurityCenterSettingDescription{ + Setting: *v.GetSetting(), + ExportSettingStatus: settingStatus, }, } return &resource