diff --git a/resource-manager/datamigration/2018-04-19/client.go b/resource-manager/datamigration/2018-04-19/client.go index b3b53e5c7be..2768699077f 100644 --- a/resource-manager/datamigration/2018-04-19/client.go +++ b/resource-manager/datamigration/2018-04-19/client.go @@ -6,29 +6,9 @@ package v2018_04_19 import ( "fmt" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/commands" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/commons" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/connecttosourcemysqltasks" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/connecttosourcepostgresqlsynctasks" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/connecttosourcesqlservertasks" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/connecttotargetazuredbformysqltasks" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/connecttotargetazuredbforpostgresqlsynctasks" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/connecttotargetsqldbtasks" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/connecttotargetsqlmisynctasks" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/connecttotargetsqlmitasks" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/connecttotargetsqlsqldbsynctasks" "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/customoperation" "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/delete" "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/get" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/gettdecertificatessqltasks" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/getusertablessqlsynctasks" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/getusertablessqltasks" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/migratemysqlazuredbformysqlsynctasks" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/migratepostgresqlazuredbforpostgresqlsynctasks" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/migratesqlserversqldbsynctasks" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/migratesqlserversqlmisynctasks" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/migratesqlserversqlmitasks" "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/patch" "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/post" "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/projectresource" @@ -36,120 +16,24 @@ import ( "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/serviceresource" "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/standardoperation" "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/taskresource" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/tasks" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/taskscommons" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/validatemigrationinputsqlserversqlmisynctasks" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/validatemigrationinputsqlserversqlmitasks" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/validatesyncmigrationinputsqlservertasks" "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" ) type Client struct { - Commands *commands.CommandsClient - Commons *commons.CommonsClient - ConnectToSourceMySqlTasks *connecttosourcemysqltasks.ConnectToSourceMySqlTasksClient - ConnectToSourcePostgreSqlSyncTasks *connecttosourcepostgresqlsynctasks.ConnectToSourcePostgreSqlSyncTasksClient - ConnectToSourceSqlServerTasks *connecttosourcesqlservertasks.ConnectToSourceSqlServerTasksClient - ConnectToTargetAzureDbForMySqlTasks *connecttotargetazuredbformysqltasks.ConnectToTargetAzureDbForMySqlTasksClient - ConnectToTargetAzureDbForPostgreSqlSyncTasks *connecttotargetazuredbforpostgresqlsynctasks.ConnectToTargetAzureDbForPostgreSqlSyncTasksClient - ConnectToTargetSqlDbTasks *connecttotargetsqldbtasks.ConnectToTargetSqlDbTasksClient - ConnectToTargetSqlMITasks *connecttotargetsqlmitasks.ConnectToTargetSqlMITasksClient - ConnectToTargetSqlMiSyncTasks *connecttotargetsqlmisynctasks.ConnectToTargetSqlMiSyncTasksClient - ConnectToTargetSqlSqlDbSyncTasks *connecttotargetsqlsqldbsynctasks.ConnectToTargetSqlSqlDbSyncTasksClient - CustomOperation *customoperation.CustomOperationClient - DELETE *delete.DELETEClient - GET *get.GETClient - GetTdeCertificatesSqlTasks *gettdecertificatessqltasks.GetTdeCertificatesSqlTasksClient - GetUserTablesSqlSyncTasks *getusertablessqlsynctasks.GetUserTablesSqlSyncTasksClient - GetUserTablesSqlTasks *getusertablessqltasks.GetUserTablesSqlTasksClient - MigrateMySqlAzureDbForMySqlSyncTasks *migratemysqlazuredbformysqlsynctasks.MigrateMySqlAzureDbForMySqlSyncTasksClient - MigratePostgreSqlAzureDbForPostgreSqlSyncTasks *migratepostgresqlazuredbforpostgresqlsynctasks.MigratePostgreSqlAzureDbForPostgreSqlSyncTasksClient - MigrateSqlServerSqlDbSyncTasks *migratesqlserversqldbsynctasks.MigrateSqlServerSqlDbSyncTasksClient - MigrateSqlServerSqlDbTasks *migratesqlserversqldbtasks.MigrateSqlServerSqlDbTasksClient - MigrateSqlServerSqlMITasks *migratesqlserversqlmitasks.MigrateSqlServerSqlMITasksClient - MigrateSqlServerSqlMiSyncTasks *migratesqlserversqlmisynctasks.MigrateSqlServerSqlMiSyncTasksClient - PATCH *patch.PATCHClient - POST *post.POSTClient - PUT *put.PUTClient - ProjectResource *projectresource.ProjectResourceClient - ServiceResource *serviceresource.ServiceResourceClient - StandardOperation *standardoperation.StandardOperationClient - TaskResource *taskresource.TaskResourceClient - Tasks *tasks.TasksClient - TasksCommons *taskscommons.TasksCommonsClient - ValidateMigrationInputSqlServerSqlMITasks *validatemigrationinputsqlserversqlmitasks.ValidateMigrationInputSqlServerSqlMITasksClient - ValidateMigrationInputSqlServerSqlMiSyncTasks *validatemigrationinputsqlserversqlmisynctasks.ValidateMigrationInputSqlServerSqlMiSyncTasksClient - ValidateSyncMigrationInputSqlServerTasks *validatesyncmigrationinputsqlservertasks.ValidateSyncMigrationInputSqlServerTasksClient + CustomOperation *customoperation.CustomOperationClient + DELETE *delete.DELETEClient + GET *get.GETClient + PATCH *patch.PATCHClient + POST *post.POSTClient + PUT *put.PUTClient + ProjectResource *projectresource.ProjectResourceClient + ServiceResource *serviceresource.ServiceResourceClient + StandardOperation *standardoperation.StandardOperationClient + TaskResource *taskresource.TaskResourceClient } func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanager.Client)) (*Client, error) { - commandsClient, err := commands.NewCommandsClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building Commands client: %+v", err) - } - configureFunc(commandsClient.Client) - - commonsClient, err := commons.NewCommonsClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building Commons client: %+v", err) - } - configureFunc(commonsClient.Client) - - connectToSourceMySqlTasksClient, err := connecttosourcemysqltasks.NewConnectToSourceMySqlTasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building ConnectToSourceMySqlTasks client: %+v", err) - } - configureFunc(connectToSourceMySqlTasksClient.Client) - - connectToSourcePostgreSqlSyncTasksClient, err := connecttosourcepostgresqlsynctasks.NewConnectToSourcePostgreSqlSyncTasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building ConnectToSourcePostgreSqlSyncTasks client: %+v", err) - } - configureFunc(connectToSourcePostgreSqlSyncTasksClient.Client) - - connectToSourceSqlServerTasksClient, err := connecttosourcesqlservertasks.NewConnectToSourceSqlServerTasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building ConnectToSourceSqlServerTasks client: %+v", err) - } - configureFunc(connectToSourceSqlServerTasksClient.Client) - - connectToTargetAzureDbForMySqlTasksClient, err := connecttotargetazuredbformysqltasks.NewConnectToTargetAzureDbForMySqlTasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building ConnectToTargetAzureDbForMySqlTasks client: %+v", err) - } - configureFunc(connectToTargetAzureDbForMySqlTasksClient.Client) - - connectToTargetAzureDbForPostgreSqlSyncTasksClient, err := connecttotargetazuredbforpostgresqlsynctasks.NewConnectToTargetAzureDbForPostgreSqlSyncTasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building ConnectToTargetAzureDbForPostgreSqlSyncTasks client: %+v", err) - } - configureFunc(connectToTargetAzureDbForPostgreSqlSyncTasksClient.Client) - - connectToTargetSqlDbTasksClient, err := connecttotargetsqldbtasks.NewConnectToTargetSqlDbTasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building ConnectToTargetSqlDbTasks client: %+v", err) - } - configureFunc(connectToTargetSqlDbTasksClient.Client) - - connectToTargetSqlMITasksClient, err := connecttotargetsqlmitasks.NewConnectToTargetSqlMITasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building ConnectToTargetSqlMITasks client: %+v", err) - } - configureFunc(connectToTargetSqlMITasksClient.Client) - - connectToTargetSqlMiSyncTasksClient, err := connecttotargetsqlmisynctasks.NewConnectToTargetSqlMiSyncTasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building ConnectToTargetSqlMiSyncTasks client: %+v", err) - } - configureFunc(connectToTargetSqlMiSyncTasksClient.Client) - - connectToTargetSqlSqlDbSyncTasksClient, err := connecttotargetsqlsqldbsynctasks.NewConnectToTargetSqlSqlDbSyncTasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building ConnectToTargetSqlSqlDbSyncTasks client: %+v", err) - } - configureFunc(connectToTargetSqlSqlDbSyncTasksClient.Client) - customOperationClient, err := customoperation.NewCustomOperationClientWithBaseURI(sdkApi) if err != nil { return nil, fmt.Errorf("building CustomOperation client: %+v", err) @@ -168,60 +52,6 @@ func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanag } configureFunc(gETClient.Client) - getTdeCertificatesSqlTasksClient, err := gettdecertificatessqltasks.NewGetTdeCertificatesSqlTasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building GetTdeCertificatesSqlTasks client: %+v", err) - } - configureFunc(getTdeCertificatesSqlTasksClient.Client) - - getUserTablesSqlSyncTasksClient, err := getusertablessqlsynctasks.NewGetUserTablesSqlSyncTasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building GetUserTablesSqlSyncTasks client: %+v", err) - } - configureFunc(getUserTablesSqlSyncTasksClient.Client) - - getUserTablesSqlTasksClient, err := getusertablessqltasks.NewGetUserTablesSqlTasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building GetUserTablesSqlTasks client: %+v", err) - } - configureFunc(getUserTablesSqlTasksClient.Client) - - migrateMySqlAzureDbForMySqlSyncTasksClient, err := migratemysqlazuredbformysqlsynctasks.NewMigrateMySqlAzureDbForMySqlSyncTasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building MigrateMySqlAzureDbForMySqlSyncTasks client: %+v", err) - } - configureFunc(migrateMySqlAzureDbForMySqlSyncTasksClient.Client) - - migratePostgreSqlAzureDbForPostgreSqlSyncTasksClient, err := migratepostgresqlazuredbforpostgresqlsynctasks.NewMigratePostgreSqlAzureDbForPostgreSqlSyncTasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building MigratePostgreSqlAzureDbForPostgreSqlSyncTasks client: %+v", err) - } - configureFunc(migratePostgreSqlAzureDbForPostgreSqlSyncTasksClient.Client) - - migrateSqlServerSqlDbSyncTasksClient, err := migratesqlserversqldbsynctasks.NewMigrateSqlServerSqlDbSyncTasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building MigrateSqlServerSqlDbSyncTasks client: %+v", err) - } - configureFunc(migrateSqlServerSqlDbSyncTasksClient.Client) - - migrateSqlServerSqlDbTasksClient, err := migratesqlserversqldbtasks.NewMigrateSqlServerSqlDbTasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building MigrateSqlServerSqlDbTasks client: %+v", err) - } - configureFunc(migrateSqlServerSqlDbTasksClient.Client) - - migrateSqlServerSqlMITasksClient, err := migratesqlserversqlmitasks.NewMigrateSqlServerSqlMITasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building MigrateSqlServerSqlMITasks client: %+v", err) - } - configureFunc(migrateSqlServerSqlMITasksClient.Client) - - migrateSqlServerSqlMiSyncTasksClient, err := migratesqlserversqlmisynctasks.NewMigrateSqlServerSqlMiSyncTasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building MigrateSqlServerSqlMiSyncTasks client: %+v", err) - } - configureFunc(migrateSqlServerSqlMiSyncTasksClient.Client) - pATCHClient, err := patch.NewPATCHClientWithBaseURI(sdkApi) if err != nil { return nil, fmt.Errorf("building PATCH client: %+v", err) @@ -264,71 +94,16 @@ func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanag } configureFunc(taskResourceClient.Client) - tasksClient, err := tasks.NewTasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building Tasks client: %+v", err) - } - configureFunc(tasksClient.Client) - - tasksCommonsClient, err := taskscommons.NewTasksCommonsClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building TasksCommons client: %+v", err) - } - configureFunc(tasksCommonsClient.Client) - - validateMigrationInputSqlServerSqlMITasksClient, err := validatemigrationinputsqlserversqlmitasks.NewValidateMigrationInputSqlServerSqlMITasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building ValidateMigrationInputSqlServerSqlMITasks client: %+v", err) - } - configureFunc(validateMigrationInputSqlServerSqlMITasksClient.Client) - - validateMigrationInputSqlServerSqlMiSyncTasksClient, err := validatemigrationinputsqlserversqlmisynctasks.NewValidateMigrationInputSqlServerSqlMiSyncTasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building ValidateMigrationInputSqlServerSqlMiSyncTasks client: %+v", err) - } - configureFunc(validateMigrationInputSqlServerSqlMiSyncTasksClient.Client) - - validateSyncMigrationInputSqlServerTasksClient, err := validatesyncmigrationinputsqlservertasks.NewValidateSyncMigrationInputSqlServerTasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building ValidateSyncMigrationInputSqlServerTasks client: %+v", err) - } - configureFunc(validateSyncMigrationInputSqlServerTasksClient.Client) - return &Client{ - Commands: commandsClient, - Commons: commonsClient, - ConnectToSourceMySqlTasks: connectToSourceMySqlTasksClient, - ConnectToSourcePostgreSqlSyncTasks: connectToSourcePostgreSqlSyncTasksClient, - ConnectToSourceSqlServerTasks: connectToSourceSqlServerTasksClient, - ConnectToTargetAzureDbForMySqlTasks: connectToTargetAzureDbForMySqlTasksClient, - ConnectToTargetAzureDbForPostgreSqlSyncTasks: connectToTargetAzureDbForPostgreSqlSyncTasksClient, - ConnectToTargetSqlDbTasks: connectToTargetSqlDbTasksClient, - ConnectToTargetSqlMITasks: connectToTargetSqlMITasksClient, - ConnectToTargetSqlMiSyncTasks: connectToTargetSqlMiSyncTasksClient, - ConnectToTargetSqlSqlDbSyncTasks: connectToTargetSqlSqlDbSyncTasksClient, - CustomOperation: customOperationClient, - DELETE: dELETEClient, - GET: gETClient, - GetTdeCertificatesSqlTasks: getTdeCertificatesSqlTasksClient, - GetUserTablesSqlSyncTasks: getUserTablesSqlSyncTasksClient, - GetUserTablesSqlTasks: getUserTablesSqlTasksClient, - MigrateMySqlAzureDbForMySqlSyncTasks: migrateMySqlAzureDbForMySqlSyncTasksClient, - MigratePostgreSqlAzureDbForPostgreSqlSyncTasks: migratePostgreSqlAzureDbForPostgreSqlSyncTasksClient, - MigrateSqlServerSqlDbSyncTasks: migrateSqlServerSqlDbSyncTasksClient, - MigrateSqlServerSqlDbTasks: migrateSqlServerSqlDbTasksClient, - MigrateSqlServerSqlMITasks: migrateSqlServerSqlMITasksClient, - MigrateSqlServerSqlMiSyncTasks: migrateSqlServerSqlMiSyncTasksClient, - PATCH: pATCHClient, - POST: pOSTClient, - PUT: pUTClient, - ProjectResource: projectResourceClient, - ServiceResource: serviceResourceClient, - StandardOperation: standardOperationClient, - TaskResource: taskResourceClient, - Tasks: tasksClient, - TasksCommons: tasksCommonsClient, - ValidateMigrationInputSqlServerSqlMITasks: validateMigrationInputSqlServerSqlMITasksClient, - ValidateMigrationInputSqlServerSqlMiSyncTasks: validateMigrationInputSqlServerSqlMiSyncTasksClient, - ValidateSyncMigrationInputSqlServerTasks: validateSyncMigrationInputSqlServerTasksClient, + CustomOperation: customOperationClient, + DELETE: dELETEClient, + GET: gETClient, + PATCH: pATCHClient, + POST: pOSTClient, + PUT: pUTClient, + ProjectResource: projectResourceClient, + ServiceResource: serviceResourceClient, + StandardOperation: standardOperationClient, + TaskResource: taskResourceClient, }, nil } diff --git a/resource-manager/datamigration/2018-04-19/commands/README.md b/resource-manager/datamigration/2018-04-19/commands/README.md deleted file mode 100644 index 72ebf20ad20..00000000000 --- a/resource-manager/datamigration/2018-04-19/commands/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/commands` Documentation - -The `commands` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2018-04-19`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/commands" -``` - - -### Client Initialization - -```go -client := commands.NewCommandsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2018-04-19/commands/client.go b/resource-manager/datamigration/2018-04-19/commands/client.go deleted file mode 100644 index dc12a110a1a..00000000000 --- a/resource-manager/datamigration/2018-04-19/commands/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package commands - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CommandsClient struct { - Client *resourcemanager.Client -} - -func NewCommandsClientWithBaseURI(sdkApi sdkEnv.Api) (*CommandsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "commands", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating CommandsClient: %+v", err) - } - - return &CommandsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2018-04-19/commands/constants.go b/resource-manager/datamigration/2018-04-19/commands/constants.go deleted file mode 100644 index ef4bbb756f9..00000000000 --- a/resource-manager/datamigration/2018-04-19/commands/constants.go +++ /dev/null @@ -1,60 +0,0 @@ -package commands - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CommandState string - -const ( - CommandStateAccepted CommandState = "Accepted" - CommandStateFailed CommandState = "Failed" - CommandStateRunning CommandState = "Running" - CommandStateSucceeded CommandState = "Succeeded" - CommandStateUnknown CommandState = "Unknown" -) - -func PossibleValuesForCommandState() []string { - return []string{ - string(CommandStateAccepted), - string(CommandStateFailed), - string(CommandStateRunning), - string(CommandStateSucceeded), - string(CommandStateUnknown), - } -} - -func (s *CommandState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseCommandState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseCommandState(input string) (*CommandState, error) { - vals := map[string]CommandState{ - "accepted": CommandStateAccepted, - "failed": CommandStateFailed, - "running": CommandStateRunning, - "succeeded": CommandStateSucceeded, - "unknown": CommandStateUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := CommandState(input) - return &out, nil -} diff --git a/resource-manager/datamigration/2018-04-19/commands/model_commandproperties.go b/resource-manager/datamigration/2018-04-19/commands/model_commandproperties.go deleted file mode 100644 index 83e09a6ff6a..00000000000 --- a/resource-manager/datamigration/2018-04-19/commands/model_commandproperties.go +++ /dev/null @@ -1,61 +0,0 @@ -package commands - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CommandProperties interface { -} - -// RawCommandPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawCommandPropertiesImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalCommandPropertiesImplementation(input []byte) (CommandProperties, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling CommandProperties into map[string]interface: %+v", err) - } - - value, ok := temp["commandType"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "Migrate.SqlServer.AzureDbSqlMi.Complete") { - var out MigrateMISyncCompleteCommandProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateMISyncCompleteCommandProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Migrate.Sync.Complete.Database") { - var out MigrateSyncCompleteCommandProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSyncCompleteCommandProperties: %+v", err) - } - return out, nil - } - - out := RawCommandPropertiesImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2018-04-19/commands/model_migratemisynccompletecommandinput.go b/resource-manager/datamigration/2018-04-19/commands/model_migratemisynccompletecommandinput.go deleted file mode 100644 index ed13e1b75e6..00000000000 --- a/resource-manager/datamigration/2018-04-19/commands/model_migratemisynccompletecommandinput.go +++ /dev/null @@ -1,8 +0,0 @@ -package commands - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateMISyncCompleteCommandInput struct { - SourceDatabaseName string `json:"sourceDatabaseName"` -} diff --git a/resource-manager/datamigration/2018-04-19/commands/model_migratemisynccompletecommandoutput.go b/resource-manager/datamigration/2018-04-19/commands/model_migratemisynccompletecommandoutput.go deleted file mode 100644 index 5d155689746..00000000000 --- a/resource-manager/datamigration/2018-04-19/commands/model_migratemisynccompletecommandoutput.go +++ /dev/null @@ -1,8 +0,0 @@ -package commands - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateMISyncCompleteCommandOutput struct { - Errors *[]ReportableException `json:"errors,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/commands/model_migratemisynccompletecommandproperties.go b/resource-manager/datamigration/2018-04-19/commands/model_migratemisynccompletecommandproperties.go deleted file mode 100644 index bb7ad743c37..00000000000 --- a/resource-manager/datamigration/2018-04-19/commands/model_migratemisynccompletecommandproperties.go +++ /dev/null @@ -1,44 +0,0 @@ -package commands - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ CommandProperties = MigrateMISyncCompleteCommandProperties{} - -type MigrateMISyncCompleteCommandProperties struct { - Input *MigrateMISyncCompleteCommandInput `json:"input,omitempty"` - Output *MigrateMISyncCompleteCommandOutput `json:"output,omitempty"` - - // Fields inherited from CommandProperties - Errors *[]ODataError `json:"errors,omitempty"` - State *CommandState `json:"state,omitempty"` -} - -var _ json.Marshaler = MigrateMISyncCompleteCommandProperties{} - -func (s MigrateMISyncCompleteCommandProperties) MarshalJSON() ([]byte, error) { - type wrapper MigrateMISyncCompleteCommandProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateMISyncCompleteCommandProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateMISyncCompleteCommandProperties: %+v", err) - } - decoded["commandType"] = "Migrate.SqlServer.AzureDbSqlMi.Complete" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateMISyncCompleteCommandProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/commands/model_migratesynccompletecommandinput.go b/resource-manager/datamigration/2018-04-19/commands/model_migratesynccompletecommandinput.go deleted file mode 100644 index 1f08a834f7b..00000000000 --- a/resource-manager/datamigration/2018-04-19/commands/model_migratesynccompletecommandinput.go +++ /dev/null @@ -1,27 +0,0 @@ -package commands - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateSyncCompleteCommandInput struct { - CommitTimeStamp *string `json:"commitTimeStamp,omitempty"` - DatabaseName string `json:"databaseName"` -} - -func (o *MigrateSyncCompleteCommandInput) GetCommitTimeStampAsTime() (*time.Time, error) { - if o.CommitTimeStamp == nil { - return nil, nil - } - return dates.ParseAsFormat(o.CommitTimeStamp, "2006-01-02T15:04:05Z07:00") -} - -func (o *MigrateSyncCompleteCommandInput) SetCommitTimeStampAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.CommitTimeStamp = &formatted -} diff --git a/resource-manager/datamigration/2018-04-19/commands/model_migratesynccompletecommandoutput.go b/resource-manager/datamigration/2018-04-19/commands/model_migratesynccompletecommandoutput.go deleted file mode 100644 index d292a30ec26..00000000000 --- a/resource-manager/datamigration/2018-04-19/commands/model_migratesynccompletecommandoutput.go +++ /dev/null @@ -1,9 +0,0 @@ -package commands - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateSyncCompleteCommandOutput struct { - Errors *[]ReportableException `json:"errors,omitempty"` - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/commands/model_migratesynccompletecommandproperties.go b/resource-manager/datamigration/2018-04-19/commands/model_migratesynccompletecommandproperties.go deleted file mode 100644 index 6e05ff8bcba..00000000000 --- a/resource-manager/datamigration/2018-04-19/commands/model_migratesynccompletecommandproperties.go +++ /dev/null @@ -1,44 +0,0 @@ -package commands - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ CommandProperties = MigrateSyncCompleteCommandProperties{} - -type MigrateSyncCompleteCommandProperties struct { - Input *MigrateSyncCompleteCommandInput `json:"input,omitempty"` - Output *MigrateSyncCompleteCommandOutput `json:"output,omitempty"` - - // Fields inherited from CommandProperties - Errors *[]ODataError `json:"errors,omitempty"` - State *CommandState `json:"state,omitempty"` -} - -var _ json.Marshaler = MigrateSyncCompleteCommandProperties{} - -func (s MigrateSyncCompleteCommandProperties) MarshalJSON() ([]byte, error) { - type wrapper MigrateSyncCompleteCommandProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSyncCompleteCommandProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSyncCompleteCommandProperties: %+v", err) - } - decoded["commandType"] = "Migrate.Sync.Complete.Database" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSyncCompleteCommandProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/commands/model_odataerror.go b/resource-manager/datamigration/2018-04-19/commands/model_odataerror.go deleted file mode 100644 index 283b8bb13b9..00000000000 --- a/resource-manager/datamigration/2018-04-19/commands/model_odataerror.go +++ /dev/null @@ -1,10 +0,0 @@ -package commands - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ODataError struct { - Code *string `json:"code,omitempty"` - Details *[]ODataError `json:"details,omitempty"` - Message *string `json:"message,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/commands/model_reportableexception.go b/resource-manager/datamigration/2018-04-19/commands/model_reportableexception.go deleted file mode 100644 index 6efc3158889..00000000000 --- a/resource-manager/datamigration/2018-04-19/commands/model_reportableexception.go +++ /dev/null @@ -1,13 +0,0 @@ -package commands - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ReportableException struct { - ActionableMessage *string `json:"actionableMessage,omitempty"` - FilePath *string `json:"filePath,omitempty"` - HResult *int64 `json:"hResult,omitempty"` - LineNumber *string `json:"lineNumber,omitempty"` - Message *string `json:"message,omitempty"` - StackTrace *string `json:"stackTrace,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/commands/version.go b/resource-manager/datamigration/2018-04-19/commands/version.go deleted file mode 100644 index 40b4afda8bf..00000000000 --- a/resource-manager/datamigration/2018-04-19/commands/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package commands - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2018-04-19" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/commands/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2018-04-19/commons/README.md b/resource-manager/datamigration/2018-04-19/commons/README.md deleted file mode 100644 index 99f40a24a82..00000000000 --- a/resource-manager/datamigration/2018-04-19/commons/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/commons` Documentation - -The `commons` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2018-04-19`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/commons" -``` - - -### Client Initialization - -```go -client := commons.NewCommonsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2018-04-19/commons/client.go b/resource-manager/datamigration/2018-04-19/commons/client.go deleted file mode 100644 index 8677c2147d1..00000000000 --- a/resource-manager/datamigration/2018-04-19/commons/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package commons - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CommonsClient struct { - Client *resourcemanager.Client -} - -func NewCommonsClientWithBaseURI(sdkApi sdkEnv.Api) (*CommonsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "commons", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating CommonsClient: %+v", err) - } - - return &CommonsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2018-04-19/commons/constants.go b/resource-manager/datamigration/2018-04-19/commons/constants.go deleted file mode 100644 index dbab7838249..00000000000 --- a/resource-manager/datamigration/2018-04-19/commons/constants.go +++ /dev/null @@ -1,98 +0,0 @@ -package commons - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthenticationType string - -const ( - AuthenticationTypeActiveDirectoryIntegrated AuthenticationType = "ActiveDirectoryIntegrated" - AuthenticationTypeActiveDirectoryPassword AuthenticationType = "ActiveDirectoryPassword" - AuthenticationTypeNone AuthenticationType = "None" - AuthenticationTypeSqlAuthentication AuthenticationType = "SqlAuthentication" - AuthenticationTypeWindowsAuthentication AuthenticationType = "WindowsAuthentication" -) - -func PossibleValuesForAuthenticationType() []string { - return []string{ - string(AuthenticationTypeActiveDirectoryIntegrated), - string(AuthenticationTypeActiveDirectoryPassword), - string(AuthenticationTypeNone), - string(AuthenticationTypeSqlAuthentication), - string(AuthenticationTypeWindowsAuthentication), - } -} - -func (s *AuthenticationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAuthenticationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAuthenticationType(input string) (*AuthenticationType, error) { - vals := map[string]AuthenticationType{ - "activedirectoryintegrated": AuthenticationTypeActiveDirectoryIntegrated, - "activedirectorypassword": AuthenticationTypeActiveDirectoryPassword, - "none": AuthenticationTypeNone, - "sqlauthentication": AuthenticationTypeSqlAuthentication, - "windowsauthentication": AuthenticationTypeWindowsAuthentication, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AuthenticationType(input) - return &out, nil -} - -type SqlSourcePlatform string - -const ( - SqlSourcePlatformSqlOnPrem SqlSourcePlatform = "SqlOnPrem" -) - -func PossibleValuesForSqlSourcePlatform() []string { - return []string{ - string(SqlSourcePlatformSqlOnPrem), - } -} - -func (s *SqlSourcePlatform) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSqlSourcePlatform(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSqlSourcePlatform(input string) (*SqlSourcePlatform, error) { - vals := map[string]SqlSourcePlatform{ - "sqlonprem": SqlSourcePlatformSqlOnPrem, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SqlSourcePlatform(input) - return &out, nil -} diff --git a/resource-manager/datamigration/2018-04-19/commons/model_connectioninfo.go b/resource-manager/datamigration/2018-04-19/commons/model_connectioninfo.go deleted file mode 100644 index ed5e22160fc..00000000000 --- a/resource-manager/datamigration/2018-04-19/commons/model_connectioninfo.go +++ /dev/null @@ -1,77 +0,0 @@ -package commons - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "MiSqlConnectionInfo") { - var out MiSqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MiSqlConnectionInfo: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "MySqlConnectionInfo") { - var out MySqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MySqlConnectionInfo: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "PostgreSqlConnectionInfo") { - var out PostgreSqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into PostgreSqlConnectionInfo: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "SqlConnectionInfo") { - var out SqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2018-04-19/commons/model_misqlconnectioninfo.go b/resource-manager/datamigration/2018-04-19/commons/model_misqlconnectioninfo.go deleted file mode 100644 index cb04fac2b14..00000000000 --- a/resource-manager/datamigration/2018-04-19/commons/model_misqlconnectioninfo.go +++ /dev/null @@ -1,43 +0,0 @@ -package commons - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = MiSqlConnectionInfo{} - -type MiSqlConnectionInfo struct { - ManagedInstanceResourceId string `json:"managedInstanceResourceId"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = MiSqlConnectionInfo{} - -func (s MiSqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper MiSqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MiSqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MiSqlConnectionInfo: %+v", err) - } - decoded["type"] = "MiSqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MiSqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/commons/model_mysqlconnectioninfo.go b/resource-manager/datamigration/2018-04-19/commons/model_mysqlconnectioninfo.go deleted file mode 100644 index be53a384d1e..00000000000 --- a/resource-manager/datamigration/2018-04-19/commons/model_mysqlconnectioninfo.go +++ /dev/null @@ -1,44 +0,0 @@ -package commons - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = MySqlConnectionInfo{} - -type MySqlConnectionInfo struct { - Port int64 `json:"port"` - ServerName string `json:"serverName"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = MySqlConnectionInfo{} - -func (s MySqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper MySqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MySqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MySqlConnectionInfo: %+v", err) - } - decoded["type"] = "MySqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MySqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/commons/model_postgresqlconnectioninfo.go b/resource-manager/datamigration/2018-04-19/commons/model_postgresqlconnectioninfo.go deleted file mode 100644 index a66856d35aa..00000000000 --- a/resource-manager/datamigration/2018-04-19/commons/model_postgresqlconnectioninfo.go +++ /dev/null @@ -1,45 +0,0 @@ -package commons - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = PostgreSqlConnectionInfo{} - -type PostgreSqlConnectionInfo struct { - DatabaseName *string `json:"databaseName,omitempty"` - Port int64 `json:"port"` - ServerName string `json:"serverName"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = PostgreSqlConnectionInfo{} - -func (s PostgreSqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper PostgreSqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling PostgreSqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling PostgreSqlConnectionInfo: %+v", err) - } - decoded["type"] = "PostgreSqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling PostgreSqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/commons/model_sqlconnectioninfo.go b/resource-manager/datamigration/2018-04-19/commons/model_sqlconnectioninfo.go deleted file mode 100644 index f4edb2a1696..00000000000 --- a/resource-manager/datamigration/2018-04-19/commons/model_sqlconnectioninfo.go +++ /dev/null @@ -1,48 +0,0 @@ -package commons - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = SqlConnectionInfo{} - -type SqlConnectionInfo struct { - AdditionalSettings *string `json:"additionalSettings,omitempty"` - Authentication *AuthenticationType `json:"authentication,omitempty"` - DataSource string `json:"dataSource"` - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Platform *SqlSourcePlatform `json:"platform,omitempty"` - TrustServerCertificate *bool `json:"trustServerCertificate,omitempty"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = SqlConnectionInfo{} - -func (s SqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper SqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SqlConnectionInfo: %+v", err) - } - decoded["type"] = "SqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/commons/version.go b/resource-manager/datamigration/2018-04-19/commons/version.go deleted file mode 100644 index 03daeda29ca..00000000000 --- a/resource-manager/datamigration/2018-04-19/commons/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package commons - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2018-04-19" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/commons/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2018-04-19/connecttosourcemysqltasks/README.md b/resource-manager/datamigration/2018-04-19/connecttosourcemysqltasks/README.md deleted file mode 100644 index 7a041c43afc..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttosourcemysqltasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/connecttosourcemysqltasks` Documentation - -The `connecttosourcemysqltasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2018-04-19`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/connecttosourcemysqltasks" -``` - - -### Client Initialization - -```go -client := connecttosourcemysqltasks.NewConnectToSourceMySqlTasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2018-04-19/connecttosourcemysqltasks/client.go b/resource-manager/datamigration/2018-04-19/connecttosourcemysqltasks/client.go deleted file mode 100644 index 54889404544..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttosourcemysqltasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package connecttosourcemysqltasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToSourceMySqlTasksClient struct { - Client *resourcemanager.Client -} - -func NewConnectToSourceMySqlTasksClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectToSourceMySqlTasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connecttosourcemysqltasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ConnectToSourceMySqlTasksClient: %+v", err) - } - - return &ConnectToSourceMySqlTasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2018-04-19/connecttosourcemysqltasks/constants.go b/resource-manager/datamigration/2018-04-19/connecttosourcemysqltasks/constants.go deleted file mode 100644 index ad3b002fbb9..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttosourcemysqltasks/constants.go +++ /dev/null @@ -1,207 +0,0 @@ -package connecttosourcemysqltasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CommandState string - -const ( - CommandStateAccepted CommandState = "Accepted" - CommandStateFailed CommandState = "Failed" - CommandStateRunning CommandState = "Running" - CommandStateSucceeded CommandState = "Succeeded" - CommandStateUnknown CommandState = "Unknown" -) - -func PossibleValuesForCommandState() []string { - return []string{ - string(CommandStateAccepted), - string(CommandStateFailed), - string(CommandStateRunning), - string(CommandStateSucceeded), - string(CommandStateUnknown), - } -} - -func (s *CommandState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseCommandState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseCommandState(input string) (*CommandState, error) { - vals := map[string]CommandState{ - "accepted": CommandStateAccepted, - "failed": CommandStateFailed, - "running": CommandStateRunning, - "succeeded": CommandStateSucceeded, - "unknown": CommandStateUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := CommandState(input) - return &out, nil -} - -type MySqlTargetPlatformType string - -const ( - MySqlTargetPlatformTypeAzureDbForMySQL MySqlTargetPlatformType = "AzureDbForMySQL" - MySqlTargetPlatformTypeSqlServer MySqlTargetPlatformType = "SqlServer" -) - -func PossibleValuesForMySqlTargetPlatformType() []string { - return []string{ - string(MySqlTargetPlatformTypeAzureDbForMySQL), - string(MySqlTargetPlatformTypeSqlServer), - } -} - -func (s *MySqlTargetPlatformType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseMySqlTargetPlatformType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseMySqlTargetPlatformType(input string) (*MySqlTargetPlatformType, error) { - vals := map[string]MySqlTargetPlatformType{ - "azuredbformysql": MySqlTargetPlatformTypeAzureDbForMySQL, - "sqlserver": MySqlTargetPlatformTypeSqlServer, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := MySqlTargetPlatformType(input) - return &out, nil -} - -type ServerLevelPermissionsGroup string - -const ( - ServerLevelPermissionsGroupDefault ServerLevelPermissionsGroup = "Default" - ServerLevelPermissionsGroupMigrationFromMySQLToAzureDBForMySQL ServerLevelPermissionsGroup = "MigrationFromMySQLToAzureDBForMySQL" - ServerLevelPermissionsGroupMigrationFromSqlServerToAzureDB ServerLevelPermissionsGroup = "MigrationFromSqlServerToAzureDB" - ServerLevelPermissionsGroupMigrationFromSqlServerToAzureMI ServerLevelPermissionsGroup = "MigrationFromSqlServerToAzureMI" -) - -func PossibleValuesForServerLevelPermissionsGroup() []string { - return []string{ - string(ServerLevelPermissionsGroupDefault), - string(ServerLevelPermissionsGroupMigrationFromMySQLToAzureDBForMySQL), - string(ServerLevelPermissionsGroupMigrationFromSqlServerToAzureDB), - string(ServerLevelPermissionsGroupMigrationFromSqlServerToAzureMI), - } -} - -func (s *ServerLevelPermissionsGroup) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseServerLevelPermissionsGroup(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseServerLevelPermissionsGroup(input string) (*ServerLevelPermissionsGroup, error) { - vals := map[string]ServerLevelPermissionsGroup{ - "default": ServerLevelPermissionsGroupDefault, - "migrationfrommysqltoazuredbformysql": ServerLevelPermissionsGroupMigrationFromMySQLToAzureDBForMySQL, - "migrationfromsqlservertoazuredb": ServerLevelPermissionsGroupMigrationFromSqlServerToAzureDB, - "migrationfromsqlservertoazuremi": ServerLevelPermissionsGroupMigrationFromSqlServerToAzureMI, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ServerLevelPermissionsGroup(input) - return &out, nil -} - -type TaskState string - -const ( - TaskStateCanceled TaskState = "Canceled" - TaskStateFailed TaskState = "Failed" - TaskStateFailedInputValidation TaskState = "FailedInputValidation" - TaskStateFaulted TaskState = "Faulted" - TaskStateQueued TaskState = "Queued" - TaskStateRunning TaskState = "Running" - TaskStateSucceeded TaskState = "Succeeded" - TaskStateUnknown TaskState = "Unknown" -) - -func PossibleValuesForTaskState() []string { - return []string{ - string(TaskStateCanceled), - string(TaskStateFailed), - string(TaskStateFailedInputValidation), - string(TaskStateFaulted), - string(TaskStateQueued), - string(TaskStateRunning), - string(TaskStateSucceeded), - string(TaskStateUnknown), - } -} - -func (s *TaskState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTaskState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTaskState(input string) (*TaskState, error) { - vals := map[string]TaskState{ - "canceled": TaskStateCanceled, - "failed": TaskStateFailed, - "failedinputvalidation": TaskStateFailedInputValidation, - "faulted": TaskStateFaulted, - "queued": TaskStateQueued, - "running": TaskStateRunning, - "succeeded": TaskStateSucceeded, - "unknown": TaskStateUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TaskState(input) - return &out, nil -} diff --git a/resource-manager/datamigration/2018-04-19/connecttosourcemysqltasks/model_commandproperties.go b/resource-manager/datamigration/2018-04-19/connecttosourcemysqltasks/model_commandproperties.go deleted file mode 100644 index 854bc41bd32..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttosourcemysqltasks/model_commandproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package connecttosourcemysqltasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CommandProperties struct { - CommandType string `json:"commandType"` - Errors *[]ODataError `json:"errors,omitempty"` - State *CommandState `json:"state,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/connecttosourcemysqltasks/model_connectioninfo.go b/resource-manager/datamigration/2018-04-19/connecttosourcemysqltasks/model_connectioninfo.go deleted file mode 100644 index b2ac98e6424..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttosourcemysqltasks/model_connectioninfo.go +++ /dev/null @@ -1,53 +0,0 @@ -package connecttosourcemysqltasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "MySqlConnectionInfo") { - var out MySqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MySqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2018-04-19/connecttosourcemysqltasks/model_connecttosourcemysqltaskinput.go b/resource-manager/datamigration/2018-04-19/connecttosourcemysqltasks/model_connecttosourcemysqltaskinput.go deleted file mode 100644 index 0f48d7a06dc..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttosourcemysqltasks/model_connecttosourcemysqltaskinput.go +++ /dev/null @@ -1,10 +0,0 @@ -package connecttosourcemysqltasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToSourceMySqlTaskInput struct { - CheckPermissionsGroup *ServerLevelPermissionsGroup `json:"checkPermissionsGroup,omitempty"` - SourceConnectionInfo MySqlConnectionInfo `json:"sourceConnectionInfo"` - TargetPlatform *MySqlTargetPlatformType `json:"targetPlatform,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/connecttosourcemysqltasks/model_connecttosourcemysqltaskproperties.go b/resource-manager/datamigration/2018-04-19/connecttosourcemysqltasks/model_connecttosourcemysqltaskproperties.go deleted file mode 100644 index e2a6a3161df..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttosourcemysqltasks/model_connecttosourcemysqltaskproperties.go +++ /dev/null @@ -1,45 +0,0 @@ -package connecttosourcemysqltasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = ConnectToSourceMySqlTaskProperties{} - -type ConnectToSourceMySqlTaskProperties struct { - Input *ConnectToSourceMySqlTaskInput `json:"input,omitempty"` - Output *[]ConnectToSourceNonSqlTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = ConnectToSourceMySqlTaskProperties{} - -func (s ConnectToSourceMySqlTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper ConnectToSourceMySqlTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ConnectToSourceMySqlTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectToSourceMySqlTaskProperties: %+v", err) - } - decoded["taskType"] = "ConnectToSource.MySql" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ConnectToSourceMySqlTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/connecttosourcemysqltasks/model_connecttosourcenonsqltaskoutput.go b/resource-manager/datamigration/2018-04-19/connecttosourcemysqltasks/model_connecttosourcenonsqltaskoutput.go deleted file mode 100644 index 71e20936f95..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttosourcemysqltasks/model_connecttosourcenonsqltaskoutput.go +++ /dev/null @@ -1,12 +0,0 @@ -package connecttosourcemysqltasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToSourceNonSqlTaskOutput struct { - Databases *[]string `json:"databases,omitempty"` - Id *string `json:"id,omitempty"` - ServerProperties *ServerProperties `json:"serverProperties,omitempty"` - SourceServerBrandVersion *string `json:"sourceServerBrandVersion,omitempty"` - ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/connecttosourcemysqltasks/model_mysqlconnectioninfo.go b/resource-manager/datamigration/2018-04-19/connecttosourcemysqltasks/model_mysqlconnectioninfo.go deleted file mode 100644 index 256da2aaabe..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttosourcemysqltasks/model_mysqlconnectioninfo.go +++ /dev/null @@ -1,44 +0,0 @@ -package connecttosourcemysqltasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = MySqlConnectionInfo{} - -type MySqlConnectionInfo struct { - Port int64 `json:"port"` - ServerName string `json:"serverName"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = MySqlConnectionInfo{} - -func (s MySqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper MySqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MySqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MySqlConnectionInfo: %+v", err) - } - decoded["type"] = "MySqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MySqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/connecttosourcemysqltasks/model_odataerror.go b/resource-manager/datamigration/2018-04-19/connecttosourcemysqltasks/model_odataerror.go deleted file mode 100644 index 15cd27f72cd..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttosourcemysqltasks/model_odataerror.go +++ /dev/null @@ -1,10 +0,0 @@ -package connecttosourcemysqltasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ODataError struct { - Code *string `json:"code,omitempty"` - Details *[]ODataError `json:"details,omitempty"` - Message *string `json:"message,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/connecttosourcemysqltasks/model_projecttaskproperties.go b/resource-manager/datamigration/2018-04-19/connecttosourcemysqltasks/model_projecttaskproperties.go deleted file mode 100644 index a9a123ede10..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttosourcemysqltasks/model_projecttaskproperties.go +++ /dev/null @@ -1,53 +0,0 @@ -package connecttosourcemysqltasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProjectTaskProperties interface { -} - -// RawProjectTaskPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawProjectTaskPropertiesImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalProjectTaskPropertiesImplementation(input []byte) (ProjectTaskProperties, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ProjectTaskProperties into map[string]interface: %+v", err) - } - - value, ok := temp["taskType"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "ConnectToSource.MySql") { - var out ConnectToSourceMySqlTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ConnectToSourceMySqlTaskProperties: %+v", err) - } - return out, nil - } - - out := RawProjectTaskPropertiesImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2018-04-19/connecttosourcemysqltasks/model_reportableexception.go b/resource-manager/datamigration/2018-04-19/connecttosourcemysqltasks/model_reportableexception.go deleted file mode 100644 index 7bf4bb9c1e8..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttosourcemysqltasks/model_reportableexception.go +++ /dev/null @@ -1,13 +0,0 @@ -package connecttosourcemysqltasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ReportableException struct { - ActionableMessage *string `json:"actionableMessage,omitempty"` - FilePath *string `json:"filePath,omitempty"` - HResult *int64 `json:"hResult,omitempty"` - LineNumber *string `json:"lineNumber,omitempty"` - Message *string `json:"message,omitempty"` - StackTrace *string `json:"stackTrace,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/connecttosourcemysqltasks/model_serverproperties.go b/resource-manager/datamigration/2018-04-19/connecttosourcemysqltasks/model_serverproperties.go deleted file mode 100644 index 449bce40af4..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttosourcemysqltasks/model_serverproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package connecttosourcemysqltasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServerProperties struct { - ServerDatabaseCount *int64 `json:"serverDatabaseCount,omitempty"` - ServerEdition *string `json:"serverEdition,omitempty"` - ServerName *string `json:"serverName,omitempty"` - ServerOperatingSystemVersion *string `json:"serverOperatingSystemVersion,omitempty"` - ServerPlatform *string `json:"serverPlatform,omitempty"` - ServerVersion *string `json:"serverVersion,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/connecttosourcemysqltasks/version.go b/resource-manager/datamigration/2018-04-19/connecttosourcemysqltasks/version.go deleted file mode 100644 index 3667b17d7c9..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttosourcemysqltasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package connecttosourcemysqltasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2018-04-19" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connecttosourcemysqltasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2018-04-19/connecttosourcepostgresqlsynctasks/README.md b/resource-manager/datamigration/2018-04-19/connecttosourcepostgresqlsynctasks/README.md deleted file mode 100644 index 28411ada329..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttosourcepostgresqlsynctasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/connecttosourcepostgresqlsynctasks` Documentation - -The `connecttosourcepostgresqlsynctasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2018-04-19`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/connecttosourcepostgresqlsynctasks" -``` - - -### Client Initialization - -```go -client := connecttosourcepostgresqlsynctasks.NewConnectToSourcePostgreSqlSyncTasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2018-04-19/connecttosourcepostgresqlsynctasks/client.go b/resource-manager/datamigration/2018-04-19/connecttosourcepostgresqlsynctasks/client.go deleted file mode 100644 index b113bc728e9..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttosourcepostgresqlsynctasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package connecttosourcepostgresqlsynctasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToSourcePostgreSqlSyncTasksClient struct { - Client *resourcemanager.Client -} - -func NewConnectToSourcePostgreSqlSyncTasksClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectToSourcePostgreSqlSyncTasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connecttosourcepostgresqlsynctasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ConnectToSourcePostgreSqlSyncTasksClient: %+v", err) - } - - return &ConnectToSourcePostgreSqlSyncTasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2018-04-19/connecttosourcepostgresqlsynctasks/model_connectioninfo.go b/resource-manager/datamigration/2018-04-19/connecttosourcepostgresqlsynctasks/model_connectioninfo.go deleted file mode 100644 index 11a519f0942..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttosourcepostgresqlsynctasks/model_connectioninfo.go +++ /dev/null @@ -1,53 +0,0 @@ -package connecttosourcepostgresqlsynctasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "PostgreSqlConnectionInfo") { - var out PostgreSqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into PostgreSqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2018-04-19/connecttosourcepostgresqlsynctasks/model_postgresqlconnectioninfo.go b/resource-manager/datamigration/2018-04-19/connecttosourcepostgresqlsynctasks/model_postgresqlconnectioninfo.go deleted file mode 100644 index 636f33bcaf0..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttosourcepostgresqlsynctasks/model_postgresqlconnectioninfo.go +++ /dev/null @@ -1,45 +0,0 @@ -package connecttosourcepostgresqlsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = PostgreSqlConnectionInfo{} - -type PostgreSqlConnectionInfo struct { - DatabaseName *string `json:"databaseName,omitempty"` - Port int64 `json:"port"` - ServerName string `json:"serverName"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = PostgreSqlConnectionInfo{} - -func (s PostgreSqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper PostgreSqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling PostgreSqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling PostgreSqlConnectionInfo: %+v", err) - } - decoded["type"] = "PostgreSqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling PostgreSqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/connecttosourcepostgresqlsynctasks/version.go b/resource-manager/datamigration/2018-04-19/connecttosourcepostgresqlsynctasks/version.go deleted file mode 100644 index 740a7cb9869..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttosourcepostgresqlsynctasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package connecttosourcepostgresqlsynctasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2018-04-19" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connecttosourcepostgresqlsynctasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2018-04-19/connecttosourcesqlservertasks/README.md b/resource-manager/datamigration/2018-04-19/connecttosourcesqlservertasks/README.md deleted file mode 100644 index f68e25f5ad0..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttosourcesqlservertasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/connecttosourcesqlservertasks` Documentation - -The `connecttosourcesqlservertasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2018-04-19`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/connecttosourcesqlservertasks" -``` - - -### Client Initialization - -```go -client := connecttosourcesqlservertasks.NewConnectToSourceSqlServerTasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2018-04-19/connecttosourcesqlservertasks/client.go b/resource-manager/datamigration/2018-04-19/connecttosourcesqlservertasks/client.go deleted file mode 100644 index 983b5049c55..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttosourcesqlservertasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package connecttosourcesqlservertasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToSourceSqlServerTasksClient struct { - Client *resourcemanager.Client -} - -func NewConnectToSourceSqlServerTasksClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectToSourceSqlServerTasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connecttosourcesqlservertasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ConnectToSourceSqlServerTasksClient: %+v", err) - } - - return &ConnectToSourceSqlServerTasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2018-04-19/connecttosourcesqlservertasks/constants.go b/resource-manager/datamigration/2018-04-19/connecttosourcesqlservertasks/constants.go deleted file mode 100644 index 511cb8d0efb..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttosourcesqlservertasks/constants.go +++ /dev/null @@ -1,322 +0,0 @@ -package connecttosourcesqlservertasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthenticationType string - -const ( - AuthenticationTypeActiveDirectoryIntegrated AuthenticationType = "ActiveDirectoryIntegrated" - AuthenticationTypeActiveDirectoryPassword AuthenticationType = "ActiveDirectoryPassword" - AuthenticationTypeNone AuthenticationType = "None" - AuthenticationTypeSqlAuthentication AuthenticationType = "SqlAuthentication" - AuthenticationTypeWindowsAuthentication AuthenticationType = "WindowsAuthentication" -) - -func PossibleValuesForAuthenticationType() []string { - return []string{ - string(AuthenticationTypeActiveDirectoryIntegrated), - string(AuthenticationTypeActiveDirectoryPassword), - string(AuthenticationTypeNone), - string(AuthenticationTypeSqlAuthentication), - string(AuthenticationTypeWindowsAuthentication), - } -} - -func (s *AuthenticationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAuthenticationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAuthenticationType(input string) (*AuthenticationType, error) { - vals := map[string]AuthenticationType{ - "activedirectoryintegrated": AuthenticationTypeActiveDirectoryIntegrated, - "activedirectorypassword": AuthenticationTypeActiveDirectoryPassword, - "none": AuthenticationTypeNone, - "sqlauthentication": AuthenticationTypeSqlAuthentication, - "windowsauthentication": AuthenticationTypeWindowsAuthentication, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AuthenticationType(input) - return &out, nil -} - -type DatabaseCompatLevel string - -const ( - DatabaseCompatLevelCompatLevelEightZero DatabaseCompatLevel = "CompatLevel80" - DatabaseCompatLevelCompatLevelNineZero DatabaseCompatLevel = "CompatLevel90" - DatabaseCompatLevelCompatLevelOneFourZero DatabaseCompatLevel = "CompatLevel140" - DatabaseCompatLevelCompatLevelOneHundred DatabaseCompatLevel = "CompatLevel100" - DatabaseCompatLevelCompatLevelOneOneZero DatabaseCompatLevel = "CompatLevel110" - DatabaseCompatLevelCompatLevelOneThreeZero DatabaseCompatLevel = "CompatLevel130" - DatabaseCompatLevelCompatLevelOneTwoZero DatabaseCompatLevel = "CompatLevel120" -) - -func PossibleValuesForDatabaseCompatLevel() []string { - return []string{ - string(DatabaseCompatLevelCompatLevelEightZero), - string(DatabaseCompatLevelCompatLevelNineZero), - string(DatabaseCompatLevelCompatLevelOneFourZero), - string(DatabaseCompatLevelCompatLevelOneHundred), - string(DatabaseCompatLevelCompatLevelOneOneZero), - string(DatabaseCompatLevelCompatLevelOneThreeZero), - string(DatabaseCompatLevelCompatLevelOneTwoZero), - } -} - -func (s *DatabaseCompatLevel) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDatabaseCompatLevel(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDatabaseCompatLevel(input string) (*DatabaseCompatLevel, error) { - vals := map[string]DatabaseCompatLevel{ - "compatlevel80": DatabaseCompatLevelCompatLevelEightZero, - "compatlevel90": DatabaseCompatLevelCompatLevelNineZero, - "compatlevel140": DatabaseCompatLevelCompatLevelOneFourZero, - "compatlevel100": DatabaseCompatLevelCompatLevelOneHundred, - "compatlevel110": DatabaseCompatLevelCompatLevelOneOneZero, - "compatlevel130": DatabaseCompatLevelCompatLevelOneThreeZero, - "compatlevel120": DatabaseCompatLevelCompatLevelOneTwoZero, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DatabaseCompatLevel(input) - return &out, nil -} - -type DatabaseFileType string - -const ( - DatabaseFileTypeFilestream DatabaseFileType = "Filestream" - DatabaseFileTypeFulltext DatabaseFileType = "Fulltext" - DatabaseFileTypeLog DatabaseFileType = "Log" - DatabaseFileTypeNotSupported DatabaseFileType = "NotSupported" - DatabaseFileTypeRows DatabaseFileType = "Rows" -) - -func PossibleValuesForDatabaseFileType() []string { - return []string{ - string(DatabaseFileTypeFilestream), - string(DatabaseFileTypeFulltext), - string(DatabaseFileTypeLog), - string(DatabaseFileTypeNotSupported), - string(DatabaseFileTypeRows), - } -} - -func (s *DatabaseFileType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDatabaseFileType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDatabaseFileType(input string) (*DatabaseFileType, error) { - vals := map[string]DatabaseFileType{ - "filestream": DatabaseFileTypeFilestream, - "fulltext": DatabaseFileTypeFulltext, - "log": DatabaseFileTypeLog, - "notsupported": DatabaseFileTypeNotSupported, - "rows": DatabaseFileTypeRows, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DatabaseFileType(input) - return &out, nil -} - -type DatabaseState string - -const ( - DatabaseStateCopying DatabaseState = "Copying" - DatabaseStateEmergency DatabaseState = "Emergency" - DatabaseStateOffline DatabaseState = "Offline" - DatabaseStateOfflineSecondary DatabaseState = "OfflineSecondary" - DatabaseStateOnline DatabaseState = "Online" - DatabaseStateRecovering DatabaseState = "Recovering" - DatabaseStateRecoveryPending DatabaseState = "RecoveryPending" - DatabaseStateRestoring DatabaseState = "Restoring" - DatabaseStateSuspect DatabaseState = "Suspect" -) - -func PossibleValuesForDatabaseState() []string { - return []string{ - string(DatabaseStateCopying), - string(DatabaseStateEmergency), - string(DatabaseStateOffline), - string(DatabaseStateOfflineSecondary), - string(DatabaseStateOnline), - string(DatabaseStateRecovering), - string(DatabaseStateRecoveryPending), - string(DatabaseStateRestoring), - string(DatabaseStateSuspect), - } -} - -func (s *DatabaseState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDatabaseState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDatabaseState(input string) (*DatabaseState, error) { - vals := map[string]DatabaseState{ - "copying": DatabaseStateCopying, - "emergency": DatabaseStateEmergency, - "offline": DatabaseStateOffline, - "offlinesecondary": DatabaseStateOfflineSecondary, - "online": DatabaseStateOnline, - "recovering": DatabaseStateRecovering, - "recoverypending": DatabaseStateRecoveryPending, - "restoring": DatabaseStateRestoring, - "suspect": DatabaseStateSuspect, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DatabaseState(input) - return &out, nil -} - -type LoginType string - -const ( - LoginTypeAsymmetricKey LoginType = "AsymmetricKey" - LoginTypeCertificate LoginType = "Certificate" - LoginTypeExternalGroup LoginType = "ExternalGroup" - LoginTypeExternalUser LoginType = "ExternalUser" - LoginTypeSqlLogin LoginType = "SqlLogin" - LoginTypeWindowsGroup LoginType = "WindowsGroup" - LoginTypeWindowsUser LoginType = "WindowsUser" -) - -func PossibleValuesForLoginType() []string { - return []string{ - string(LoginTypeAsymmetricKey), - string(LoginTypeCertificate), - string(LoginTypeExternalGroup), - string(LoginTypeExternalUser), - string(LoginTypeSqlLogin), - string(LoginTypeWindowsGroup), - string(LoginTypeWindowsUser), - } -} - -func (s *LoginType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoginType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoginType(input string) (*LoginType, error) { - vals := map[string]LoginType{ - "asymmetrickey": LoginTypeAsymmetricKey, - "certificate": LoginTypeCertificate, - "externalgroup": LoginTypeExternalGroup, - "externaluser": LoginTypeExternalUser, - "sqllogin": LoginTypeSqlLogin, - "windowsgroup": LoginTypeWindowsGroup, - "windowsuser": LoginTypeWindowsUser, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoginType(input) - return &out, nil -} - -type SqlSourcePlatform string - -const ( - SqlSourcePlatformSqlOnPrem SqlSourcePlatform = "SqlOnPrem" -) - -func PossibleValuesForSqlSourcePlatform() []string { - return []string{ - string(SqlSourcePlatformSqlOnPrem), - } -} - -func (s *SqlSourcePlatform) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSqlSourcePlatform(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSqlSourcePlatform(input string) (*SqlSourcePlatform, error) { - vals := map[string]SqlSourcePlatform{ - "sqlonprem": SqlSourcePlatformSqlOnPrem, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SqlSourcePlatform(input) - return &out, nil -} diff --git a/resource-manager/datamigration/2018-04-19/connecttosourcesqlservertasks/model_connectioninfo.go b/resource-manager/datamigration/2018-04-19/connecttosourcesqlservertasks/model_connectioninfo.go deleted file mode 100644 index 918db03733d..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttosourcesqlservertasks/model_connectioninfo.go +++ /dev/null @@ -1,53 +0,0 @@ -package connecttosourcesqlservertasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "SqlConnectionInfo") { - var out SqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2018-04-19/connecttosourcesqlservertasks/model_connecttosourcesqlservertaskoutput.go b/resource-manager/datamigration/2018-04-19/connecttosourcesqlservertasks/model_connecttosourcesqlservertaskoutput.go deleted file mode 100644 index 07f534a81ac..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttosourcesqlservertasks/model_connecttosourcesqlservertaskoutput.go +++ /dev/null @@ -1,77 +0,0 @@ -package connecttosourcesqlservertasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToSourceSqlServerTaskOutput interface { -} - -// RawConnectToSourceSqlServerTaskOutputImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectToSourceSqlServerTaskOutputImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectToSourceSqlServerTaskOutputImplementation(input []byte) (ConnectToSourceSqlServerTaskOutput, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectToSourceSqlServerTaskOutput into map[string]interface: %+v", err) - } - - value, ok := temp["resultType"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "AgentJobLevelOutput") { - var out ConnectToSourceSqlServerTaskOutputAgentJobLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ConnectToSourceSqlServerTaskOutputAgentJobLevel: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "DatabaseLevelOutput") { - var out ConnectToSourceSqlServerTaskOutputDatabaseLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ConnectToSourceSqlServerTaskOutputDatabaseLevel: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "LoginLevelOutput") { - var out ConnectToSourceSqlServerTaskOutputLoginLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ConnectToSourceSqlServerTaskOutputLoginLevel: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "TaskLevelOutput") { - var out ConnectToSourceSqlServerTaskOutputTaskLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ConnectToSourceSqlServerTaskOutputTaskLevel: %+v", err) - } - return out, nil - } - - out := RawConnectToSourceSqlServerTaskOutputImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2018-04-19/connecttosourcesqlservertasks/model_connecttosourcesqlservertaskoutputagentjoblevel.go b/resource-manager/datamigration/2018-04-19/connecttosourcesqlservertasks/model_connecttosourcesqlservertaskoutputagentjoblevel.go deleted file mode 100644 index 1b4f08613b0..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttosourcesqlservertasks/model_connecttosourcesqlservertaskoutputagentjoblevel.go +++ /dev/null @@ -1,47 +0,0 @@ -package connecttosourcesqlservertasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectToSourceSqlServerTaskOutput = ConnectToSourceSqlServerTaskOutputAgentJobLevel{} - -type ConnectToSourceSqlServerTaskOutputAgentJobLevel struct { - IsEnabled *bool `json:"isEnabled,omitempty"` - JobCategory *string `json:"jobCategory,omitempty"` - JobOwner *string `json:"jobOwner,omitempty"` - LastExecutedOn *string `json:"lastExecutedOn,omitempty"` - MigrationEligibility *MigrationEligibilityInfo `json:"migrationEligibility,omitempty"` - Name *string `json:"name,omitempty"` - - // Fields inherited from ConnectToSourceSqlServerTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = ConnectToSourceSqlServerTaskOutputAgentJobLevel{} - -func (s ConnectToSourceSqlServerTaskOutputAgentJobLevel) MarshalJSON() ([]byte, error) { - type wrapper ConnectToSourceSqlServerTaskOutputAgentJobLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ConnectToSourceSqlServerTaskOutputAgentJobLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectToSourceSqlServerTaskOutputAgentJobLevel: %+v", err) - } - decoded["resultType"] = "AgentJobLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ConnectToSourceSqlServerTaskOutputAgentJobLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/connecttosourcesqlservertasks/model_connecttosourcesqlservertaskoutputdatabaselevel.go b/resource-manager/datamigration/2018-04-19/connecttosourcesqlservertasks/model_connecttosourcesqlservertaskoutputdatabaselevel.go deleted file mode 100644 index 08bc2785a3a..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttosourcesqlservertasks/model_connecttosourcesqlservertaskoutputdatabaselevel.go +++ /dev/null @@ -1,46 +0,0 @@ -package connecttosourcesqlservertasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectToSourceSqlServerTaskOutput = ConnectToSourceSqlServerTaskOutputDatabaseLevel{} - -type ConnectToSourceSqlServerTaskOutputDatabaseLevel struct { - CompatibilityLevel *DatabaseCompatLevel `json:"compatibilityLevel,omitempty"` - DatabaseFiles *[]DatabaseFileInfo `json:"databaseFiles,omitempty"` - DatabaseState *DatabaseState `json:"databaseState,omitempty"` - Name *string `json:"name,omitempty"` - SizeMB *float64 `json:"sizeMB,omitempty"` - - // Fields inherited from ConnectToSourceSqlServerTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = ConnectToSourceSqlServerTaskOutputDatabaseLevel{} - -func (s ConnectToSourceSqlServerTaskOutputDatabaseLevel) MarshalJSON() ([]byte, error) { - type wrapper ConnectToSourceSqlServerTaskOutputDatabaseLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ConnectToSourceSqlServerTaskOutputDatabaseLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectToSourceSqlServerTaskOutputDatabaseLevel: %+v", err) - } - decoded["resultType"] = "DatabaseLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ConnectToSourceSqlServerTaskOutputDatabaseLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/connecttosourcesqlservertasks/model_connecttosourcesqlservertaskoutputloginlevel.go b/resource-manager/datamigration/2018-04-19/connecttosourcesqlservertasks/model_connecttosourcesqlservertaskoutputloginlevel.go deleted file mode 100644 index 0044f24c32e..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttosourcesqlservertasks/model_connecttosourcesqlservertaskoutputloginlevel.go +++ /dev/null @@ -1,46 +0,0 @@ -package connecttosourcesqlservertasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectToSourceSqlServerTaskOutput = ConnectToSourceSqlServerTaskOutputLoginLevel{} - -type ConnectToSourceSqlServerTaskOutputLoginLevel struct { - DefaultDatabase *string `json:"defaultDatabase,omitempty"` - IsEnabled *bool `json:"isEnabled,omitempty"` - LoginType *LoginType `json:"loginType,omitempty"` - MigrationEligibility *MigrationEligibilityInfo `json:"migrationEligibility,omitempty"` - Name *string `json:"name,omitempty"` - - // Fields inherited from ConnectToSourceSqlServerTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = ConnectToSourceSqlServerTaskOutputLoginLevel{} - -func (s ConnectToSourceSqlServerTaskOutputLoginLevel) MarshalJSON() ([]byte, error) { - type wrapper ConnectToSourceSqlServerTaskOutputLoginLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ConnectToSourceSqlServerTaskOutputLoginLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectToSourceSqlServerTaskOutputLoginLevel: %+v", err) - } - decoded["resultType"] = "LoginLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ConnectToSourceSqlServerTaskOutputLoginLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/connecttosourcesqlservertasks/model_connecttosourcesqlservertaskoutputtasklevel.go b/resource-manager/datamigration/2018-04-19/connecttosourcesqlservertasks/model_connecttosourcesqlservertaskoutputtasklevel.go deleted file mode 100644 index 5f236264bb9..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttosourcesqlservertasks/model_connecttosourcesqlservertaskoutputtasklevel.go +++ /dev/null @@ -1,47 +0,0 @@ -package connecttosourcesqlservertasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectToSourceSqlServerTaskOutput = ConnectToSourceSqlServerTaskOutputTaskLevel{} - -type ConnectToSourceSqlServerTaskOutputTaskLevel struct { - AgentJobs *map[string]string `json:"agentJobs,omitempty"` - Databases *map[string]string `json:"databases,omitempty"` - Logins *map[string]string `json:"logins,omitempty"` - SourceServerBrandVersion *string `json:"sourceServerBrandVersion,omitempty"` - SourceServerVersion *string `json:"sourceServerVersion,omitempty"` - ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` - - // Fields inherited from ConnectToSourceSqlServerTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = ConnectToSourceSqlServerTaskOutputTaskLevel{} - -func (s ConnectToSourceSqlServerTaskOutputTaskLevel) MarshalJSON() ([]byte, error) { - type wrapper ConnectToSourceSqlServerTaskOutputTaskLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ConnectToSourceSqlServerTaskOutputTaskLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectToSourceSqlServerTaskOutputTaskLevel: %+v", err) - } - decoded["resultType"] = "TaskLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ConnectToSourceSqlServerTaskOutputTaskLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/connecttosourcesqlservertasks/model_databasefileinfo.go b/resource-manager/datamigration/2018-04-19/connecttosourcesqlservertasks/model_databasefileinfo.go deleted file mode 100644 index 6581df5cb61..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttosourcesqlservertasks/model_databasefileinfo.go +++ /dev/null @@ -1,14 +0,0 @@ -package connecttosourcesqlservertasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DatabaseFileInfo struct { - DatabaseName *string `json:"databaseName,omitempty"` - FileType *DatabaseFileType `json:"fileType,omitempty"` - Id *string `json:"id,omitempty"` - LogicalName *string `json:"logicalName,omitempty"` - PhysicalFullName *string `json:"physicalFullName,omitempty"` - RestoreFullName *string `json:"restoreFullName,omitempty"` - SizeMB *float64 `json:"sizeMB,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/connecttosourcesqlservertasks/model_migrationeligibilityinfo.go b/resource-manager/datamigration/2018-04-19/connecttosourcesqlservertasks/model_migrationeligibilityinfo.go deleted file mode 100644 index f637608773b..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttosourcesqlservertasks/model_migrationeligibilityinfo.go +++ /dev/null @@ -1,9 +0,0 @@ -package connecttosourcesqlservertasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrationEligibilityInfo struct { - IsEligibleForMigration *bool `json:"isEligibleForMigration,omitempty"` - ValidationMessages *[]string `json:"validationMessages,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/connecttosourcesqlservertasks/model_reportableexception.go b/resource-manager/datamigration/2018-04-19/connecttosourcesqlservertasks/model_reportableexception.go deleted file mode 100644 index 854fa6cf2e2..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttosourcesqlservertasks/model_reportableexception.go +++ /dev/null @@ -1,13 +0,0 @@ -package connecttosourcesqlservertasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ReportableException struct { - ActionableMessage *string `json:"actionableMessage,omitempty"` - FilePath *string `json:"filePath,omitempty"` - HResult *int64 `json:"hResult,omitempty"` - LineNumber *string `json:"lineNumber,omitempty"` - Message *string `json:"message,omitempty"` - StackTrace *string `json:"stackTrace,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/connecttosourcesqlservertasks/model_sqlconnectioninfo.go b/resource-manager/datamigration/2018-04-19/connecttosourcesqlservertasks/model_sqlconnectioninfo.go deleted file mode 100644 index 1368eaf152d..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttosourcesqlservertasks/model_sqlconnectioninfo.go +++ /dev/null @@ -1,48 +0,0 @@ -package connecttosourcesqlservertasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = SqlConnectionInfo{} - -type SqlConnectionInfo struct { - AdditionalSettings *string `json:"additionalSettings,omitempty"` - Authentication *AuthenticationType `json:"authentication,omitempty"` - DataSource string `json:"dataSource"` - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Platform *SqlSourcePlatform `json:"platform,omitempty"` - TrustServerCertificate *bool `json:"trustServerCertificate,omitempty"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = SqlConnectionInfo{} - -func (s SqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper SqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SqlConnectionInfo: %+v", err) - } - decoded["type"] = "SqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/connecttosourcesqlservertasks/version.go b/resource-manager/datamigration/2018-04-19/connecttosourcesqlservertasks/version.go deleted file mode 100644 index 675ada14153..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttosourcesqlservertasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package connecttosourcesqlservertasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2018-04-19" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connecttosourcesqlservertasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2018-04-19/connecttotargetazuredbformysqltasks/README.md b/resource-manager/datamigration/2018-04-19/connecttotargetazuredbformysqltasks/README.md deleted file mode 100644 index 7476ae765dd..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttotargetazuredbformysqltasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/connecttotargetazuredbformysqltasks` Documentation - -The `connecttotargetazuredbformysqltasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2018-04-19`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/connecttotargetazuredbformysqltasks" -``` - - -### Client Initialization - -```go -client := connecttotargetazuredbformysqltasks.NewConnectToTargetAzureDbForMySqlTasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2018-04-19/connecttotargetazuredbformysqltasks/client.go b/resource-manager/datamigration/2018-04-19/connecttotargetazuredbformysqltasks/client.go deleted file mode 100644 index 8d8253afb49..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttotargetazuredbformysqltasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package connecttotargetazuredbformysqltasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToTargetAzureDbForMySqlTasksClient struct { - Client *resourcemanager.Client -} - -func NewConnectToTargetAzureDbForMySqlTasksClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectToTargetAzureDbForMySqlTasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connecttotargetazuredbformysqltasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ConnectToTargetAzureDbForMySqlTasksClient: %+v", err) - } - - return &ConnectToTargetAzureDbForMySqlTasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2018-04-19/connecttotargetazuredbformysqltasks/model_connectioninfo.go b/resource-manager/datamigration/2018-04-19/connecttotargetazuredbformysqltasks/model_connectioninfo.go deleted file mode 100644 index 419d2ca18a3..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttotargetazuredbformysqltasks/model_connectioninfo.go +++ /dev/null @@ -1,53 +0,0 @@ -package connecttotargetazuredbformysqltasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "MySqlConnectionInfo") { - var out MySqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MySqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2018-04-19/connecttotargetazuredbformysqltasks/model_mysqlconnectioninfo.go b/resource-manager/datamigration/2018-04-19/connecttotargetazuredbformysqltasks/model_mysqlconnectioninfo.go deleted file mode 100644 index 495bb09054e..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttotargetazuredbformysqltasks/model_mysqlconnectioninfo.go +++ /dev/null @@ -1,44 +0,0 @@ -package connecttotargetazuredbformysqltasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = MySqlConnectionInfo{} - -type MySqlConnectionInfo struct { - Port int64 `json:"port"` - ServerName string `json:"serverName"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = MySqlConnectionInfo{} - -func (s MySqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper MySqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MySqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MySqlConnectionInfo: %+v", err) - } - decoded["type"] = "MySqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MySqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/connecttotargetazuredbformysqltasks/version.go b/resource-manager/datamigration/2018-04-19/connecttotargetazuredbformysqltasks/version.go deleted file mode 100644 index c57153ab34c..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttotargetazuredbformysqltasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package connecttotargetazuredbformysqltasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2018-04-19" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connecttotargetazuredbformysqltasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2018-04-19/connecttotargetazuredbforpostgresqlsynctasks/README.md b/resource-manager/datamigration/2018-04-19/connecttotargetazuredbforpostgresqlsynctasks/README.md deleted file mode 100644 index 1f67a6fd6e7..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttotargetazuredbforpostgresqlsynctasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/connecttotargetazuredbforpostgresqlsynctasks` Documentation - -The `connecttotargetazuredbforpostgresqlsynctasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2018-04-19`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/connecttotargetazuredbforpostgresqlsynctasks" -``` - - -### Client Initialization - -```go -client := connecttotargetazuredbforpostgresqlsynctasks.NewConnectToTargetAzureDbForPostgreSqlSyncTasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2018-04-19/connecttotargetazuredbforpostgresqlsynctasks/client.go b/resource-manager/datamigration/2018-04-19/connecttotargetazuredbforpostgresqlsynctasks/client.go deleted file mode 100644 index be12275e0dc..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttotargetazuredbforpostgresqlsynctasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package connecttotargetazuredbforpostgresqlsynctasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToTargetAzureDbForPostgreSqlSyncTasksClient struct { - Client *resourcemanager.Client -} - -func NewConnectToTargetAzureDbForPostgreSqlSyncTasksClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectToTargetAzureDbForPostgreSqlSyncTasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connecttotargetazuredbforpostgresqlsynctasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ConnectToTargetAzureDbForPostgreSqlSyncTasksClient: %+v", err) - } - - return &ConnectToTargetAzureDbForPostgreSqlSyncTasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2018-04-19/connecttotargetazuredbforpostgresqlsynctasks/model_connectioninfo.go b/resource-manager/datamigration/2018-04-19/connecttotargetazuredbforpostgresqlsynctasks/model_connectioninfo.go deleted file mode 100644 index fac9f4eb6f1..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttotargetazuredbforpostgresqlsynctasks/model_connectioninfo.go +++ /dev/null @@ -1,53 +0,0 @@ -package connecttotargetazuredbforpostgresqlsynctasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "PostgreSqlConnectionInfo") { - var out PostgreSqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into PostgreSqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2018-04-19/connecttotargetazuredbforpostgresqlsynctasks/model_postgresqlconnectioninfo.go b/resource-manager/datamigration/2018-04-19/connecttotargetazuredbforpostgresqlsynctasks/model_postgresqlconnectioninfo.go deleted file mode 100644 index 00ce0955d00..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttotargetazuredbforpostgresqlsynctasks/model_postgresqlconnectioninfo.go +++ /dev/null @@ -1,45 +0,0 @@ -package connecttotargetazuredbforpostgresqlsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = PostgreSqlConnectionInfo{} - -type PostgreSqlConnectionInfo struct { - DatabaseName *string `json:"databaseName,omitempty"` - Port int64 `json:"port"` - ServerName string `json:"serverName"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = PostgreSqlConnectionInfo{} - -func (s PostgreSqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper PostgreSqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling PostgreSqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling PostgreSqlConnectionInfo: %+v", err) - } - decoded["type"] = "PostgreSqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling PostgreSqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/connecttotargetazuredbforpostgresqlsynctasks/version.go b/resource-manager/datamigration/2018-04-19/connecttotargetazuredbforpostgresqlsynctasks/version.go deleted file mode 100644 index 808ab3c7d8e..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttotargetazuredbforpostgresqlsynctasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package connecttotargetazuredbforpostgresqlsynctasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2018-04-19" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connecttotargetazuredbforpostgresqlsynctasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2018-04-19/connecttotargetsqldbtasks/README.md b/resource-manager/datamigration/2018-04-19/connecttotargetsqldbtasks/README.md deleted file mode 100644 index 637863921cc..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttotargetsqldbtasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/connecttotargetsqldbtasks` Documentation - -The `connecttotargetsqldbtasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2018-04-19`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/connecttotargetsqldbtasks" -``` - - -### Client Initialization - -```go -client := connecttotargetsqldbtasks.NewConnectToTargetSqlDbTasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2018-04-19/connecttotargetsqldbtasks/client.go b/resource-manager/datamigration/2018-04-19/connecttotargetsqldbtasks/client.go deleted file mode 100644 index 333d7f2c9e7..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttotargetsqldbtasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package connecttotargetsqldbtasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToTargetSqlDbTasksClient struct { - Client *resourcemanager.Client -} - -func NewConnectToTargetSqlDbTasksClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectToTargetSqlDbTasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connecttotargetsqldbtasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ConnectToTargetSqlDbTasksClient: %+v", err) - } - - return &ConnectToTargetSqlDbTasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2018-04-19/connecttotargetsqldbtasks/constants.go b/resource-manager/datamigration/2018-04-19/connecttotargetsqldbtasks/constants.go deleted file mode 100644 index f6784cf6b8d..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttotargetsqldbtasks/constants.go +++ /dev/null @@ -1,98 +0,0 @@ -package connecttotargetsqldbtasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthenticationType string - -const ( - AuthenticationTypeActiveDirectoryIntegrated AuthenticationType = "ActiveDirectoryIntegrated" - AuthenticationTypeActiveDirectoryPassword AuthenticationType = "ActiveDirectoryPassword" - AuthenticationTypeNone AuthenticationType = "None" - AuthenticationTypeSqlAuthentication AuthenticationType = "SqlAuthentication" - AuthenticationTypeWindowsAuthentication AuthenticationType = "WindowsAuthentication" -) - -func PossibleValuesForAuthenticationType() []string { - return []string{ - string(AuthenticationTypeActiveDirectoryIntegrated), - string(AuthenticationTypeActiveDirectoryPassword), - string(AuthenticationTypeNone), - string(AuthenticationTypeSqlAuthentication), - string(AuthenticationTypeWindowsAuthentication), - } -} - -func (s *AuthenticationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAuthenticationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAuthenticationType(input string) (*AuthenticationType, error) { - vals := map[string]AuthenticationType{ - "activedirectoryintegrated": AuthenticationTypeActiveDirectoryIntegrated, - "activedirectorypassword": AuthenticationTypeActiveDirectoryPassword, - "none": AuthenticationTypeNone, - "sqlauthentication": AuthenticationTypeSqlAuthentication, - "windowsauthentication": AuthenticationTypeWindowsAuthentication, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AuthenticationType(input) - return &out, nil -} - -type SqlSourcePlatform string - -const ( - SqlSourcePlatformSqlOnPrem SqlSourcePlatform = "SqlOnPrem" -) - -func PossibleValuesForSqlSourcePlatform() []string { - return []string{ - string(SqlSourcePlatformSqlOnPrem), - } -} - -func (s *SqlSourcePlatform) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSqlSourcePlatform(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSqlSourcePlatform(input string) (*SqlSourcePlatform, error) { - vals := map[string]SqlSourcePlatform{ - "sqlonprem": SqlSourcePlatformSqlOnPrem, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SqlSourcePlatform(input) - return &out, nil -} diff --git a/resource-manager/datamigration/2018-04-19/connecttotargetsqldbtasks/model_connectioninfo.go b/resource-manager/datamigration/2018-04-19/connecttotargetsqldbtasks/model_connectioninfo.go deleted file mode 100644 index 0147083a634..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttotargetsqldbtasks/model_connectioninfo.go +++ /dev/null @@ -1,53 +0,0 @@ -package connecttotargetsqldbtasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "SqlConnectionInfo") { - var out SqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2018-04-19/connecttotargetsqldbtasks/model_sqlconnectioninfo.go b/resource-manager/datamigration/2018-04-19/connecttotargetsqldbtasks/model_sqlconnectioninfo.go deleted file mode 100644 index b43793ed27a..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttotargetsqldbtasks/model_sqlconnectioninfo.go +++ /dev/null @@ -1,48 +0,0 @@ -package connecttotargetsqldbtasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = SqlConnectionInfo{} - -type SqlConnectionInfo struct { - AdditionalSettings *string `json:"additionalSettings,omitempty"` - Authentication *AuthenticationType `json:"authentication,omitempty"` - DataSource string `json:"dataSource"` - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Platform *SqlSourcePlatform `json:"platform,omitempty"` - TrustServerCertificate *bool `json:"trustServerCertificate,omitempty"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = SqlConnectionInfo{} - -func (s SqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper SqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SqlConnectionInfo: %+v", err) - } - decoded["type"] = "SqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/connecttotargetsqldbtasks/version.go b/resource-manager/datamigration/2018-04-19/connecttotargetsqldbtasks/version.go deleted file mode 100644 index 1b13fd89bcf..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttotargetsqldbtasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package connecttotargetsqldbtasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2018-04-19" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connecttotargetsqldbtasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2018-04-19/connecttotargetsqlmisynctasks/README.md b/resource-manager/datamigration/2018-04-19/connecttotargetsqlmisynctasks/README.md deleted file mode 100644 index 8b6ad896675..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttotargetsqlmisynctasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/connecttotargetsqlmisynctasks` Documentation - -The `connecttotargetsqlmisynctasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2018-04-19`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/connecttotargetsqlmisynctasks" -``` - - -### Client Initialization - -```go -client := connecttotargetsqlmisynctasks.NewConnectToTargetSqlMiSyncTasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2018-04-19/connecttotargetsqlmisynctasks/client.go b/resource-manager/datamigration/2018-04-19/connecttotargetsqlmisynctasks/client.go deleted file mode 100644 index a2b756a5713..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttotargetsqlmisynctasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package connecttotargetsqlmisynctasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToTargetSqlMiSyncTasksClient struct { - Client *resourcemanager.Client -} - -func NewConnectToTargetSqlMiSyncTasksClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectToTargetSqlMiSyncTasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connecttotargetsqlmisynctasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ConnectToTargetSqlMiSyncTasksClient: %+v", err) - } - - return &ConnectToTargetSqlMiSyncTasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2018-04-19/connecttotargetsqlmisynctasks/model_connectioninfo.go b/resource-manager/datamigration/2018-04-19/connecttotargetsqlmisynctasks/model_connectioninfo.go deleted file mode 100644 index 7214d74ef9e..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttotargetsqlmisynctasks/model_connectioninfo.go +++ /dev/null @@ -1,53 +0,0 @@ -package connecttotargetsqlmisynctasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "MiSqlConnectionInfo") { - var out MiSqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MiSqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2018-04-19/connecttotargetsqlmisynctasks/model_misqlconnectioninfo.go b/resource-manager/datamigration/2018-04-19/connecttotargetsqlmisynctasks/model_misqlconnectioninfo.go deleted file mode 100644 index e127d7bbc12..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttotargetsqlmisynctasks/model_misqlconnectioninfo.go +++ /dev/null @@ -1,43 +0,0 @@ -package connecttotargetsqlmisynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = MiSqlConnectionInfo{} - -type MiSqlConnectionInfo struct { - ManagedInstanceResourceId string `json:"managedInstanceResourceId"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = MiSqlConnectionInfo{} - -func (s MiSqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper MiSqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MiSqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MiSqlConnectionInfo: %+v", err) - } - decoded["type"] = "MiSqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MiSqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/connecttotargetsqlmisynctasks/version.go b/resource-manager/datamigration/2018-04-19/connecttotargetsqlmisynctasks/version.go deleted file mode 100644 index 21aab81b829..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttotargetsqlmisynctasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package connecttotargetsqlmisynctasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2018-04-19" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connecttotargetsqlmisynctasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2018-04-19/connecttotargetsqlmitasks/README.md b/resource-manager/datamigration/2018-04-19/connecttotargetsqlmitasks/README.md deleted file mode 100644 index 0b92b5570d3..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttotargetsqlmitasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/connecttotargetsqlmitasks` Documentation - -The `connecttotargetsqlmitasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2018-04-19`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/connecttotargetsqlmitasks" -``` - - -### Client Initialization - -```go -client := connecttotargetsqlmitasks.NewConnectToTargetSqlMITasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2018-04-19/connecttotargetsqlmitasks/client.go b/resource-manager/datamigration/2018-04-19/connecttotargetsqlmitasks/client.go deleted file mode 100644 index 756e7c05cc9..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttotargetsqlmitasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package connecttotargetsqlmitasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToTargetSqlMITasksClient struct { - Client *resourcemanager.Client -} - -func NewConnectToTargetSqlMITasksClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectToTargetSqlMITasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connecttotargetsqlmitasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ConnectToTargetSqlMITasksClient: %+v", err) - } - - return &ConnectToTargetSqlMITasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2018-04-19/connecttotargetsqlmitasks/constants.go b/resource-manager/datamigration/2018-04-19/connecttotargetsqlmitasks/constants.go deleted file mode 100644 index add10a759b4..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttotargetsqlmitasks/constants.go +++ /dev/null @@ -1,98 +0,0 @@ -package connecttotargetsqlmitasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthenticationType string - -const ( - AuthenticationTypeActiveDirectoryIntegrated AuthenticationType = "ActiveDirectoryIntegrated" - AuthenticationTypeActiveDirectoryPassword AuthenticationType = "ActiveDirectoryPassword" - AuthenticationTypeNone AuthenticationType = "None" - AuthenticationTypeSqlAuthentication AuthenticationType = "SqlAuthentication" - AuthenticationTypeWindowsAuthentication AuthenticationType = "WindowsAuthentication" -) - -func PossibleValuesForAuthenticationType() []string { - return []string{ - string(AuthenticationTypeActiveDirectoryIntegrated), - string(AuthenticationTypeActiveDirectoryPassword), - string(AuthenticationTypeNone), - string(AuthenticationTypeSqlAuthentication), - string(AuthenticationTypeWindowsAuthentication), - } -} - -func (s *AuthenticationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAuthenticationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAuthenticationType(input string) (*AuthenticationType, error) { - vals := map[string]AuthenticationType{ - "activedirectoryintegrated": AuthenticationTypeActiveDirectoryIntegrated, - "activedirectorypassword": AuthenticationTypeActiveDirectoryPassword, - "none": AuthenticationTypeNone, - "sqlauthentication": AuthenticationTypeSqlAuthentication, - "windowsauthentication": AuthenticationTypeWindowsAuthentication, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AuthenticationType(input) - return &out, nil -} - -type SqlSourcePlatform string - -const ( - SqlSourcePlatformSqlOnPrem SqlSourcePlatform = "SqlOnPrem" -) - -func PossibleValuesForSqlSourcePlatform() []string { - return []string{ - string(SqlSourcePlatformSqlOnPrem), - } -} - -func (s *SqlSourcePlatform) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSqlSourcePlatform(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSqlSourcePlatform(input string) (*SqlSourcePlatform, error) { - vals := map[string]SqlSourcePlatform{ - "sqlonprem": SqlSourcePlatformSqlOnPrem, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SqlSourcePlatform(input) - return &out, nil -} diff --git a/resource-manager/datamigration/2018-04-19/connecttotargetsqlmitasks/model_connectioninfo.go b/resource-manager/datamigration/2018-04-19/connecttotargetsqlmitasks/model_connectioninfo.go deleted file mode 100644 index a8531f68fc9..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttotargetsqlmitasks/model_connectioninfo.go +++ /dev/null @@ -1,53 +0,0 @@ -package connecttotargetsqlmitasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "SqlConnectionInfo") { - var out SqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2018-04-19/connecttotargetsqlmitasks/model_sqlconnectioninfo.go b/resource-manager/datamigration/2018-04-19/connecttotargetsqlmitasks/model_sqlconnectioninfo.go deleted file mode 100644 index b743f11cb0a..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttotargetsqlmitasks/model_sqlconnectioninfo.go +++ /dev/null @@ -1,48 +0,0 @@ -package connecttotargetsqlmitasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = SqlConnectionInfo{} - -type SqlConnectionInfo struct { - AdditionalSettings *string `json:"additionalSettings,omitempty"` - Authentication *AuthenticationType `json:"authentication,omitempty"` - DataSource string `json:"dataSource"` - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Platform *SqlSourcePlatform `json:"platform,omitempty"` - TrustServerCertificate *bool `json:"trustServerCertificate,omitempty"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = SqlConnectionInfo{} - -func (s SqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper SqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SqlConnectionInfo: %+v", err) - } - decoded["type"] = "SqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/connecttotargetsqlmitasks/version.go b/resource-manager/datamigration/2018-04-19/connecttotargetsqlmitasks/version.go deleted file mode 100644 index f9505507eb6..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttotargetsqlmitasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package connecttotargetsqlmitasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2018-04-19" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connecttotargetsqlmitasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2018-04-19/connecttotargetsqlsqldbsynctasks/README.md b/resource-manager/datamigration/2018-04-19/connecttotargetsqlsqldbsynctasks/README.md deleted file mode 100644 index 8a5d57e495a..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttotargetsqlsqldbsynctasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/connecttotargetsqlsqldbsynctasks` Documentation - -The `connecttotargetsqlsqldbsynctasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2018-04-19`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/connecttotargetsqlsqldbsynctasks" -``` - - -### Client Initialization - -```go -client := connecttotargetsqlsqldbsynctasks.NewConnectToTargetSqlSqlDbSyncTasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2018-04-19/connecttotargetsqlsqldbsynctasks/client.go b/resource-manager/datamigration/2018-04-19/connecttotargetsqlsqldbsynctasks/client.go deleted file mode 100644 index c80116405b3..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttotargetsqlsqldbsynctasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package connecttotargetsqlsqldbsynctasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToTargetSqlSqlDbSyncTasksClient struct { - Client *resourcemanager.Client -} - -func NewConnectToTargetSqlSqlDbSyncTasksClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectToTargetSqlSqlDbSyncTasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connecttotargetsqlsqldbsynctasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ConnectToTargetSqlSqlDbSyncTasksClient: %+v", err) - } - - return &ConnectToTargetSqlSqlDbSyncTasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2018-04-19/connecttotargetsqlsqldbsynctasks/constants.go b/resource-manager/datamigration/2018-04-19/connecttotargetsqlsqldbsynctasks/constants.go deleted file mode 100644 index 829e0059903..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttotargetsqlsqldbsynctasks/constants.go +++ /dev/null @@ -1,98 +0,0 @@ -package connecttotargetsqlsqldbsynctasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthenticationType string - -const ( - AuthenticationTypeActiveDirectoryIntegrated AuthenticationType = "ActiveDirectoryIntegrated" - AuthenticationTypeActiveDirectoryPassword AuthenticationType = "ActiveDirectoryPassword" - AuthenticationTypeNone AuthenticationType = "None" - AuthenticationTypeSqlAuthentication AuthenticationType = "SqlAuthentication" - AuthenticationTypeWindowsAuthentication AuthenticationType = "WindowsAuthentication" -) - -func PossibleValuesForAuthenticationType() []string { - return []string{ - string(AuthenticationTypeActiveDirectoryIntegrated), - string(AuthenticationTypeActiveDirectoryPassword), - string(AuthenticationTypeNone), - string(AuthenticationTypeSqlAuthentication), - string(AuthenticationTypeWindowsAuthentication), - } -} - -func (s *AuthenticationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAuthenticationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAuthenticationType(input string) (*AuthenticationType, error) { - vals := map[string]AuthenticationType{ - "activedirectoryintegrated": AuthenticationTypeActiveDirectoryIntegrated, - "activedirectorypassword": AuthenticationTypeActiveDirectoryPassword, - "none": AuthenticationTypeNone, - "sqlauthentication": AuthenticationTypeSqlAuthentication, - "windowsauthentication": AuthenticationTypeWindowsAuthentication, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AuthenticationType(input) - return &out, nil -} - -type SqlSourcePlatform string - -const ( - SqlSourcePlatformSqlOnPrem SqlSourcePlatform = "SqlOnPrem" -) - -func PossibleValuesForSqlSourcePlatform() []string { - return []string{ - string(SqlSourcePlatformSqlOnPrem), - } -} - -func (s *SqlSourcePlatform) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSqlSourcePlatform(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSqlSourcePlatform(input string) (*SqlSourcePlatform, error) { - vals := map[string]SqlSourcePlatform{ - "sqlonprem": SqlSourcePlatformSqlOnPrem, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SqlSourcePlatform(input) - return &out, nil -} diff --git a/resource-manager/datamigration/2018-04-19/connecttotargetsqlsqldbsynctasks/model_connectioninfo.go b/resource-manager/datamigration/2018-04-19/connecttotargetsqlsqldbsynctasks/model_connectioninfo.go deleted file mode 100644 index 208fe95ab65..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttotargetsqlsqldbsynctasks/model_connectioninfo.go +++ /dev/null @@ -1,53 +0,0 @@ -package connecttotargetsqlsqldbsynctasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "SqlConnectionInfo") { - var out SqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2018-04-19/connecttotargetsqlsqldbsynctasks/model_sqlconnectioninfo.go b/resource-manager/datamigration/2018-04-19/connecttotargetsqlsqldbsynctasks/model_sqlconnectioninfo.go deleted file mode 100644 index 843ddf23344..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttotargetsqlsqldbsynctasks/model_sqlconnectioninfo.go +++ /dev/null @@ -1,48 +0,0 @@ -package connecttotargetsqlsqldbsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = SqlConnectionInfo{} - -type SqlConnectionInfo struct { - AdditionalSettings *string `json:"additionalSettings,omitempty"` - Authentication *AuthenticationType `json:"authentication,omitempty"` - DataSource string `json:"dataSource"` - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Platform *SqlSourcePlatform `json:"platform,omitempty"` - TrustServerCertificate *bool `json:"trustServerCertificate,omitempty"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = SqlConnectionInfo{} - -func (s SqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper SqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SqlConnectionInfo: %+v", err) - } - decoded["type"] = "SqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/connecttotargetsqlsqldbsynctasks/version.go b/resource-manager/datamigration/2018-04-19/connecttotargetsqlsqldbsynctasks/version.go deleted file mode 100644 index 4717def7b44..00000000000 --- a/resource-manager/datamigration/2018-04-19/connecttotargetsqlsqldbsynctasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package connecttotargetsqlsqldbsynctasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2018-04-19" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connecttotargetsqlsqldbsynctasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2018-04-19/gettdecertificatessqltasks/README.md b/resource-manager/datamigration/2018-04-19/gettdecertificatessqltasks/README.md deleted file mode 100644 index d69884f3cef..00000000000 --- a/resource-manager/datamigration/2018-04-19/gettdecertificatessqltasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/gettdecertificatessqltasks` Documentation - -The `gettdecertificatessqltasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2018-04-19`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/gettdecertificatessqltasks" -``` - - -### Client Initialization - -```go -client := gettdecertificatessqltasks.NewGetTdeCertificatesSqlTasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2018-04-19/gettdecertificatessqltasks/client.go b/resource-manager/datamigration/2018-04-19/gettdecertificatessqltasks/client.go deleted file mode 100644 index 8e3c7f595c2..00000000000 --- a/resource-manager/datamigration/2018-04-19/gettdecertificatessqltasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package gettdecertificatessqltasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetTdeCertificatesSqlTasksClient struct { - Client *resourcemanager.Client -} - -func NewGetTdeCertificatesSqlTasksClientWithBaseURI(sdkApi sdkEnv.Api) (*GetTdeCertificatesSqlTasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "gettdecertificatessqltasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating GetTdeCertificatesSqlTasksClient: %+v", err) - } - - return &GetTdeCertificatesSqlTasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2018-04-19/gettdecertificatessqltasks/constants.go b/resource-manager/datamigration/2018-04-19/gettdecertificatessqltasks/constants.go deleted file mode 100644 index b7c7d7d13b4..00000000000 --- a/resource-manager/datamigration/2018-04-19/gettdecertificatessqltasks/constants.go +++ /dev/null @@ -1,98 +0,0 @@ -package gettdecertificatessqltasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthenticationType string - -const ( - AuthenticationTypeActiveDirectoryIntegrated AuthenticationType = "ActiveDirectoryIntegrated" - AuthenticationTypeActiveDirectoryPassword AuthenticationType = "ActiveDirectoryPassword" - AuthenticationTypeNone AuthenticationType = "None" - AuthenticationTypeSqlAuthentication AuthenticationType = "SqlAuthentication" - AuthenticationTypeWindowsAuthentication AuthenticationType = "WindowsAuthentication" -) - -func PossibleValuesForAuthenticationType() []string { - return []string{ - string(AuthenticationTypeActiveDirectoryIntegrated), - string(AuthenticationTypeActiveDirectoryPassword), - string(AuthenticationTypeNone), - string(AuthenticationTypeSqlAuthentication), - string(AuthenticationTypeWindowsAuthentication), - } -} - -func (s *AuthenticationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAuthenticationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAuthenticationType(input string) (*AuthenticationType, error) { - vals := map[string]AuthenticationType{ - "activedirectoryintegrated": AuthenticationTypeActiveDirectoryIntegrated, - "activedirectorypassword": AuthenticationTypeActiveDirectoryPassword, - "none": AuthenticationTypeNone, - "sqlauthentication": AuthenticationTypeSqlAuthentication, - "windowsauthentication": AuthenticationTypeWindowsAuthentication, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AuthenticationType(input) - return &out, nil -} - -type SqlSourcePlatform string - -const ( - SqlSourcePlatformSqlOnPrem SqlSourcePlatform = "SqlOnPrem" -) - -func PossibleValuesForSqlSourcePlatform() []string { - return []string{ - string(SqlSourcePlatformSqlOnPrem), - } -} - -func (s *SqlSourcePlatform) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSqlSourcePlatform(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSqlSourcePlatform(input string) (*SqlSourcePlatform, error) { - vals := map[string]SqlSourcePlatform{ - "sqlonprem": SqlSourcePlatformSqlOnPrem, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SqlSourcePlatform(input) - return &out, nil -} diff --git a/resource-manager/datamigration/2018-04-19/gettdecertificatessqltasks/model_connectioninfo.go b/resource-manager/datamigration/2018-04-19/gettdecertificatessqltasks/model_connectioninfo.go deleted file mode 100644 index 211b29a826e..00000000000 --- a/resource-manager/datamigration/2018-04-19/gettdecertificatessqltasks/model_connectioninfo.go +++ /dev/null @@ -1,53 +0,0 @@ -package gettdecertificatessqltasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "SqlConnectionInfo") { - var out SqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2018-04-19/gettdecertificatessqltasks/model_sqlconnectioninfo.go b/resource-manager/datamigration/2018-04-19/gettdecertificatessqltasks/model_sqlconnectioninfo.go deleted file mode 100644 index e404d04e0ee..00000000000 --- a/resource-manager/datamigration/2018-04-19/gettdecertificatessqltasks/model_sqlconnectioninfo.go +++ /dev/null @@ -1,48 +0,0 @@ -package gettdecertificatessqltasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = SqlConnectionInfo{} - -type SqlConnectionInfo struct { - AdditionalSettings *string `json:"additionalSettings,omitempty"` - Authentication *AuthenticationType `json:"authentication,omitempty"` - DataSource string `json:"dataSource"` - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Platform *SqlSourcePlatform `json:"platform,omitempty"` - TrustServerCertificate *bool `json:"trustServerCertificate,omitempty"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = SqlConnectionInfo{} - -func (s SqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper SqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SqlConnectionInfo: %+v", err) - } - decoded["type"] = "SqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/gettdecertificatessqltasks/version.go b/resource-manager/datamigration/2018-04-19/gettdecertificatessqltasks/version.go deleted file mode 100644 index 1002c104c03..00000000000 --- a/resource-manager/datamigration/2018-04-19/gettdecertificatessqltasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package gettdecertificatessqltasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2018-04-19" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/gettdecertificatessqltasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2018-04-19/getusertablessqlsynctasks/README.md b/resource-manager/datamigration/2018-04-19/getusertablessqlsynctasks/README.md deleted file mode 100644 index d86655109d1..00000000000 --- a/resource-manager/datamigration/2018-04-19/getusertablessqlsynctasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/getusertablessqlsynctasks` Documentation - -The `getusertablessqlsynctasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2018-04-19`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/getusertablessqlsynctasks" -``` - - -### Client Initialization - -```go -client := getusertablessqlsynctasks.NewGetUserTablesSqlSyncTasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2018-04-19/getusertablessqlsynctasks/client.go b/resource-manager/datamigration/2018-04-19/getusertablessqlsynctasks/client.go deleted file mode 100644 index 79a37c2f398..00000000000 --- a/resource-manager/datamigration/2018-04-19/getusertablessqlsynctasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package getusertablessqlsynctasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetUserTablesSqlSyncTasksClient struct { - Client *resourcemanager.Client -} - -func NewGetUserTablesSqlSyncTasksClientWithBaseURI(sdkApi sdkEnv.Api) (*GetUserTablesSqlSyncTasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "getusertablessqlsynctasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating GetUserTablesSqlSyncTasksClient: %+v", err) - } - - return &GetUserTablesSqlSyncTasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2018-04-19/getusertablessqlsynctasks/constants.go b/resource-manager/datamigration/2018-04-19/getusertablessqlsynctasks/constants.go deleted file mode 100644 index 87e3d20c6e5..00000000000 --- a/resource-manager/datamigration/2018-04-19/getusertablessqlsynctasks/constants.go +++ /dev/null @@ -1,98 +0,0 @@ -package getusertablessqlsynctasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthenticationType string - -const ( - AuthenticationTypeActiveDirectoryIntegrated AuthenticationType = "ActiveDirectoryIntegrated" - AuthenticationTypeActiveDirectoryPassword AuthenticationType = "ActiveDirectoryPassword" - AuthenticationTypeNone AuthenticationType = "None" - AuthenticationTypeSqlAuthentication AuthenticationType = "SqlAuthentication" - AuthenticationTypeWindowsAuthentication AuthenticationType = "WindowsAuthentication" -) - -func PossibleValuesForAuthenticationType() []string { - return []string{ - string(AuthenticationTypeActiveDirectoryIntegrated), - string(AuthenticationTypeActiveDirectoryPassword), - string(AuthenticationTypeNone), - string(AuthenticationTypeSqlAuthentication), - string(AuthenticationTypeWindowsAuthentication), - } -} - -func (s *AuthenticationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAuthenticationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAuthenticationType(input string) (*AuthenticationType, error) { - vals := map[string]AuthenticationType{ - "activedirectoryintegrated": AuthenticationTypeActiveDirectoryIntegrated, - "activedirectorypassword": AuthenticationTypeActiveDirectoryPassword, - "none": AuthenticationTypeNone, - "sqlauthentication": AuthenticationTypeSqlAuthentication, - "windowsauthentication": AuthenticationTypeWindowsAuthentication, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AuthenticationType(input) - return &out, nil -} - -type SqlSourcePlatform string - -const ( - SqlSourcePlatformSqlOnPrem SqlSourcePlatform = "SqlOnPrem" -) - -func PossibleValuesForSqlSourcePlatform() []string { - return []string{ - string(SqlSourcePlatformSqlOnPrem), - } -} - -func (s *SqlSourcePlatform) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSqlSourcePlatform(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSqlSourcePlatform(input string) (*SqlSourcePlatform, error) { - vals := map[string]SqlSourcePlatform{ - "sqlonprem": SqlSourcePlatformSqlOnPrem, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SqlSourcePlatform(input) - return &out, nil -} diff --git a/resource-manager/datamigration/2018-04-19/getusertablessqlsynctasks/model_connectioninfo.go b/resource-manager/datamigration/2018-04-19/getusertablessqlsynctasks/model_connectioninfo.go deleted file mode 100644 index e299a0e3edd..00000000000 --- a/resource-manager/datamigration/2018-04-19/getusertablessqlsynctasks/model_connectioninfo.go +++ /dev/null @@ -1,53 +0,0 @@ -package getusertablessqlsynctasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "SqlConnectionInfo") { - var out SqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2018-04-19/getusertablessqlsynctasks/model_sqlconnectioninfo.go b/resource-manager/datamigration/2018-04-19/getusertablessqlsynctasks/model_sqlconnectioninfo.go deleted file mode 100644 index f36ec901917..00000000000 --- a/resource-manager/datamigration/2018-04-19/getusertablessqlsynctasks/model_sqlconnectioninfo.go +++ /dev/null @@ -1,48 +0,0 @@ -package getusertablessqlsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = SqlConnectionInfo{} - -type SqlConnectionInfo struct { - AdditionalSettings *string `json:"additionalSettings,omitempty"` - Authentication *AuthenticationType `json:"authentication,omitempty"` - DataSource string `json:"dataSource"` - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Platform *SqlSourcePlatform `json:"platform,omitempty"` - TrustServerCertificate *bool `json:"trustServerCertificate,omitempty"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = SqlConnectionInfo{} - -func (s SqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper SqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SqlConnectionInfo: %+v", err) - } - decoded["type"] = "SqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/getusertablessqlsynctasks/version.go b/resource-manager/datamigration/2018-04-19/getusertablessqlsynctasks/version.go deleted file mode 100644 index 31474979352..00000000000 --- a/resource-manager/datamigration/2018-04-19/getusertablessqlsynctasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package getusertablessqlsynctasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2018-04-19" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/getusertablessqlsynctasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2018-04-19/getusertablessqltasks/README.md b/resource-manager/datamigration/2018-04-19/getusertablessqltasks/README.md deleted file mode 100644 index 2c4e3ca01fb..00000000000 --- a/resource-manager/datamigration/2018-04-19/getusertablessqltasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/getusertablessqltasks` Documentation - -The `getusertablessqltasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2018-04-19`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/getusertablessqltasks" -``` - - -### Client Initialization - -```go -client := getusertablessqltasks.NewGetUserTablesSqlTasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2018-04-19/getusertablessqltasks/client.go b/resource-manager/datamigration/2018-04-19/getusertablessqltasks/client.go deleted file mode 100644 index bda03c33f80..00000000000 --- a/resource-manager/datamigration/2018-04-19/getusertablessqltasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package getusertablessqltasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetUserTablesSqlTasksClient struct { - Client *resourcemanager.Client -} - -func NewGetUserTablesSqlTasksClientWithBaseURI(sdkApi sdkEnv.Api) (*GetUserTablesSqlTasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "getusertablessqltasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating GetUserTablesSqlTasksClient: %+v", err) - } - - return &GetUserTablesSqlTasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2018-04-19/getusertablessqltasks/constants.go b/resource-manager/datamigration/2018-04-19/getusertablessqltasks/constants.go deleted file mode 100644 index 4cd34347a70..00000000000 --- a/resource-manager/datamigration/2018-04-19/getusertablessqltasks/constants.go +++ /dev/null @@ -1,98 +0,0 @@ -package getusertablessqltasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthenticationType string - -const ( - AuthenticationTypeActiveDirectoryIntegrated AuthenticationType = "ActiveDirectoryIntegrated" - AuthenticationTypeActiveDirectoryPassword AuthenticationType = "ActiveDirectoryPassword" - AuthenticationTypeNone AuthenticationType = "None" - AuthenticationTypeSqlAuthentication AuthenticationType = "SqlAuthentication" - AuthenticationTypeWindowsAuthentication AuthenticationType = "WindowsAuthentication" -) - -func PossibleValuesForAuthenticationType() []string { - return []string{ - string(AuthenticationTypeActiveDirectoryIntegrated), - string(AuthenticationTypeActiveDirectoryPassword), - string(AuthenticationTypeNone), - string(AuthenticationTypeSqlAuthentication), - string(AuthenticationTypeWindowsAuthentication), - } -} - -func (s *AuthenticationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAuthenticationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAuthenticationType(input string) (*AuthenticationType, error) { - vals := map[string]AuthenticationType{ - "activedirectoryintegrated": AuthenticationTypeActiveDirectoryIntegrated, - "activedirectorypassword": AuthenticationTypeActiveDirectoryPassword, - "none": AuthenticationTypeNone, - "sqlauthentication": AuthenticationTypeSqlAuthentication, - "windowsauthentication": AuthenticationTypeWindowsAuthentication, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AuthenticationType(input) - return &out, nil -} - -type SqlSourcePlatform string - -const ( - SqlSourcePlatformSqlOnPrem SqlSourcePlatform = "SqlOnPrem" -) - -func PossibleValuesForSqlSourcePlatform() []string { - return []string{ - string(SqlSourcePlatformSqlOnPrem), - } -} - -func (s *SqlSourcePlatform) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSqlSourcePlatform(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSqlSourcePlatform(input string) (*SqlSourcePlatform, error) { - vals := map[string]SqlSourcePlatform{ - "sqlonprem": SqlSourcePlatformSqlOnPrem, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SqlSourcePlatform(input) - return &out, nil -} diff --git a/resource-manager/datamigration/2018-04-19/getusertablessqltasks/model_connectioninfo.go b/resource-manager/datamigration/2018-04-19/getusertablessqltasks/model_connectioninfo.go deleted file mode 100644 index 986e92df3e2..00000000000 --- a/resource-manager/datamigration/2018-04-19/getusertablessqltasks/model_connectioninfo.go +++ /dev/null @@ -1,53 +0,0 @@ -package getusertablessqltasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "SqlConnectionInfo") { - var out SqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2018-04-19/getusertablessqltasks/model_sqlconnectioninfo.go b/resource-manager/datamigration/2018-04-19/getusertablessqltasks/model_sqlconnectioninfo.go deleted file mode 100644 index f58bb4fdd03..00000000000 --- a/resource-manager/datamigration/2018-04-19/getusertablessqltasks/model_sqlconnectioninfo.go +++ /dev/null @@ -1,48 +0,0 @@ -package getusertablessqltasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = SqlConnectionInfo{} - -type SqlConnectionInfo struct { - AdditionalSettings *string `json:"additionalSettings,omitempty"` - Authentication *AuthenticationType `json:"authentication,omitempty"` - DataSource string `json:"dataSource"` - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Platform *SqlSourcePlatform `json:"platform,omitempty"` - TrustServerCertificate *bool `json:"trustServerCertificate,omitempty"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = SqlConnectionInfo{} - -func (s SqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper SqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SqlConnectionInfo: %+v", err) - } - decoded["type"] = "SqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/getusertablessqltasks/version.go b/resource-manager/datamigration/2018-04-19/getusertablessqltasks/version.go deleted file mode 100644 index bb7fbeb3f17..00000000000 --- a/resource-manager/datamigration/2018-04-19/getusertablessqltasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package getusertablessqltasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2018-04-19" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/getusertablessqltasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2018-04-19/migratemysqlazuredbformysqlsynctasks/README.md b/resource-manager/datamigration/2018-04-19/migratemysqlazuredbformysqlsynctasks/README.md deleted file mode 100644 index 9867b55eeb4..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratemysqlazuredbformysqlsynctasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/migratemysqlazuredbformysqlsynctasks` Documentation - -The `migratemysqlazuredbformysqlsynctasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2018-04-19`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/migratemysqlazuredbformysqlsynctasks" -``` - - -### Client Initialization - -```go -client := migratemysqlazuredbformysqlsynctasks.NewMigrateMySqlAzureDbForMySqlSyncTasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2018-04-19/migratemysqlazuredbformysqlsynctasks/client.go b/resource-manager/datamigration/2018-04-19/migratemysqlazuredbformysqlsynctasks/client.go deleted file mode 100644 index 3586c17c71a..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratemysqlazuredbformysqlsynctasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package migratemysqlazuredbformysqlsynctasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateMySqlAzureDbForMySqlSyncTasksClient struct { - Client *resourcemanager.Client -} - -func NewMigrateMySqlAzureDbForMySqlSyncTasksClientWithBaseURI(sdkApi sdkEnv.Api) (*MigrateMySqlAzureDbForMySqlSyncTasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "migratemysqlazuredbformysqlsynctasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating MigrateMySqlAzureDbForMySqlSyncTasksClient: %+v", err) - } - - return &MigrateMySqlAzureDbForMySqlSyncTasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2018-04-19/migratemysqlazuredbformysqlsynctasks/constants.go b/resource-manager/datamigration/2018-04-19/migratemysqlazuredbformysqlsynctasks/constants.go deleted file mode 100644 index 44cdb63bdd0..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratemysqlazuredbformysqlsynctasks/constants.go +++ /dev/null @@ -1,131 +0,0 @@ -package migratemysqlazuredbformysqlsynctasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SyncDatabaseMigrationReportingState string - -const ( - SyncDatabaseMigrationReportingStateCANCELLED SyncDatabaseMigrationReportingState = "CANCELLED" - SyncDatabaseMigrationReportingStateCANCELLING SyncDatabaseMigrationReportingState = "CANCELLING" - SyncDatabaseMigrationReportingStateCOMPLETE SyncDatabaseMigrationReportingState = "COMPLETE" - SyncDatabaseMigrationReportingStateCOMPLETING SyncDatabaseMigrationReportingState = "COMPLETING" - SyncDatabaseMigrationReportingStateCONFIGURING SyncDatabaseMigrationReportingState = "CONFIGURING" - SyncDatabaseMigrationReportingStateFAILED SyncDatabaseMigrationReportingState = "FAILED" - SyncDatabaseMigrationReportingStateINITIALIAZING SyncDatabaseMigrationReportingState = "INITIALIAZING" - SyncDatabaseMigrationReportingStateREADYTOCOMPLETE SyncDatabaseMigrationReportingState = "READY_TO_COMPLETE" - SyncDatabaseMigrationReportingStateRUNNING SyncDatabaseMigrationReportingState = "RUNNING" - SyncDatabaseMigrationReportingStateSTARTING SyncDatabaseMigrationReportingState = "STARTING" - SyncDatabaseMigrationReportingStateUNDEFINED SyncDatabaseMigrationReportingState = "UNDEFINED" -) - -func PossibleValuesForSyncDatabaseMigrationReportingState() []string { - return []string{ - string(SyncDatabaseMigrationReportingStateCANCELLED), - string(SyncDatabaseMigrationReportingStateCANCELLING), - string(SyncDatabaseMigrationReportingStateCOMPLETE), - string(SyncDatabaseMigrationReportingStateCOMPLETING), - string(SyncDatabaseMigrationReportingStateCONFIGURING), - string(SyncDatabaseMigrationReportingStateFAILED), - string(SyncDatabaseMigrationReportingStateINITIALIAZING), - string(SyncDatabaseMigrationReportingStateREADYTOCOMPLETE), - string(SyncDatabaseMigrationReportingStateRUNNING), - string(SyncDatabaseMigrationReportingStateSTARTING), - string(SyncDatabaseMigrationReportingStateUNDEFINED), - } -} - -func (s *SyncDatabaseMigrationReportingState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSyncDatabaseMigrationReportingState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSyncDatabaseMigrationReportingState(input string) (*SyncDatabaseMigrationReportingState, error) { - vals := map[string]SyncDatabaseMigrationReportingState{ - "cancelled": SyncDatabaseMigrationReportingStateCANCELLED, - "cancelling": SyncDatabaseMigrationReportingStateCANCELLING, - "complete": SyncDatabaseMigrationReportingStateCOMPLETE, - "completing": SyncDatabaseMigrationReportingStateCOMPLETING, - "configuring": SyncDatabaseMigrationReportingStateCONFIGURING, - "failed": SyncDatabaseMigrationReportingStateFAILED, - "initialiazing": SyncDatabaseMigrationReportingStateINITIALIAZING, - "ready_to_complete": SyncDatabaseMigrationReportingStateREADYTOCOMPLETE, - "running": SyncDatabaseMigrationReportingStateRUNNING, - "starting": SyncDatabaseMigrationReportingStateSTARTING, - "undefined": SyncDatabaseMigrationReportingStateUNDEFINED, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SyncDatabaseMigrationReportingState(input) - return &out, nil -} - -type SyncTableMigrationState string - -const ( - SyncTableMigrationStateBEFORELOAD SyncTableMigrationState = "BEFORE_LOAD" - SyncTableMigrationStateCANCELED SyncTableMigrationState = "CANCELED" - SyncTableMigrationStateCOMPLETED SyncTableMigrationState = "COMPLETED" - SyncTableMigrationStateERROR SyncTableMigrationState = "ERROR" - SyncTableMigrationStateFAILED SyncTableMigrationState = "FAILED" - SyncTableMigrationStateFULLLOAD SyncTableMigrationState = "FULL_LOAD" -) - -func PossibleValuesForSyncTableMigrationState() []string { - return []string{ - string(SyncTableMigrationStateBEFORELOAD), - string(SyncTableMigrationStateCANCELED), - string(SyncTableMigrationStateCOMPLETED), - string(SyncTableMigrationStateERROR), - string(SyncTableMigrationStateFAILED), - string(SyncTableMigrationStateFULLLOAD), - } -} - -func (s *SyncTableMigrationState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSyncTableMigrationState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSyncTableMigrationState(input string) (*SyncTableMigrationState, error) { - vals := map[string]SyncTableMigrationState{ - "before_load": SyncTableMigrationStateBEFORELOAD, - "canceled": SyncTableMigrationStateCANCELED, - "completed": SyncTableMigrationStateCOMPLETED, - "error": SyncTableMigrationStateERROR, - "failed": SyncTableMigrationStateFAILED, - "full_load": SyncTableMigrationStateFULLLOAD, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SyncTableMigrationState(input) - return &out, nil -} diff --git a/resource-manager/datamigration/2018-04-19/migratemysqlazuredbformysqlsynctasks/model_connectioninfo.go b/resource-manager/datamigration/2018-04-19/migratemysqlazuredbformysqlsynctasks/model_connectioninfo.go deleted file mode 100644 index a259461caf3..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratemysqlazuredbformysqlsynctasks/model_connectioninfo.go +++ /dev/null @@ -1,53 +0,0 @@ -package migratemysqlazuredbformysqlsynctasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "MySqlConnectionInfo") { - var out MySqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MySqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2018-04-19/migratemysqlazuredbformysqlsynctasks/model_migratemysqlazuredbformysqlsynctaskoutput.go b/resource-manager/datamigration/2018-04-19/migratemysqlazuredbformysqlsynctasks/model_migratemysqlazuredbformysqlsynctaskoutput.go deleted file mode 100644 index e1e8dff3491..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratemysqlazuredbformysqlsynctasks/model_migratemysqlazuredbformysqlsynctaskoutput.go +++ /dev/null @@ -1,85 +0,0 @@ -package migratemysqlazuredbformysqlsynctasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateMySqlAzureDbForMySqlSyncTaskOutput interface { -} - -// RawMigrateMySqlAzureDbForMySqlSyncTaskOutputImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawMigrateMySqlAzureDbForMySqlSyncTaskOutputImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalMigrateMySqlAzureDbForMySqlSyncTaskOutputImplementation(input []byte) (MigrateMySqlAzureDbForMySqlSyncTaskOutput, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateMySqlAzureDbForMySqlSyncTaskOutput into map[string]interface: %+v", err) - } - - value, ok := temp["resultType"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "DatabaseLevelErrorOutput") { - var out MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "DatabaseLevelOutput") { - var out MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "ErrorOutput") { - var out MigrateMySqlAzureDbForMySqlSyncTaskOutputError - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateMySqlAzureDbForMySqlSyncTaskOutputError: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "MigrationLevelOutput") { - var out MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "TableLevelOutput") { - var out MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel: %+v", err) - } - return out, nil - } - - out := RawMigrateMySqlAzureDbForMySqlSyncTaskOutputImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2018-04-19/migratemysqlazuredbformysqlsynctasks/model_migratemysqlazuredbformysqlsynctaskoutputdatabaseerror.go b/resource-manager/datamigration/2018-04-19/migratemysqlazuredbformysqlsynctasks/model_migratemysqlazuredbformysqlsynctaskoutputdatabaseerror.go deleted file mode 100644 index fa87332753d..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratemysqlazuredbformysqlsynctasks/model_migratemysqlazuredbformysqlsynctaskoutputdatabaseerror.go +++ /dev/null @@ -1,43 +0,0 @@ -package migratemysqlazuredbformysqlsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateMySqlAzureDbForMySqlSyncTaskOutput = MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError{} - -type MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError struct { - ErrorMessage *string `json:"errorMessage,omitempty"` - Events *[]SyncMigrationDatabaseErrorEvent `json:"events,omitempty"` - - // Fields inherited from MigrateMySqlAzureDbForMySqlSyncTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError{} - -func (s MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError) MarshalJSON() ([]byte, error) { - type wrapper MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError: %+v", err) - } - decoded["resultType"] = "DatabaseLevelErrorOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/migratemysqlazuredbformysqlsynctasks/model_migratemysqlazuredbformysqlsynctaskoutputdatabaselevel.go b/resource-manager/datamigration/2018-04-19/migratemysqlazuredbformysqlsynctasks/model_migratemysqlazuredbformysqlsynctaskoutputdatabaselevel.go deleted file mode 100644 index 0166cc5662e..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratemysqlazuredbformysqlsynctasks/model_migratemysqlazuredbformysqlsynctaskoutputdatabaselevel.go +++ /dev/null @@ -1,56 +0,0 @@ -package migratemysqlazuredbformysqlsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateMySqlAzureDbForMySqlSyncTaskOutput = MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel{} - -type MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel struct { - AppliedChanges *int64 `json:"appliedChanges,omitempty"` - CdcDeleteCounter *int64 `json:"cdcDeleteCounter,omitempty"` - CdcInsertCounter *int64 `json:"cdcInsertCounter,omitempty"` - CdcUpdateCounter *int64 `json:"cdcUpdateCounter,omitempty"` - DatabaseName *string `json:"databaseName,omitempty"` - EndedOn *string `json:"endedOn,omitempty"` - FullLoadCompletedTables *int64 `json:"fullLoadCompletedTables,omitempty"` - FullLoadErroredTables *int64 `json:"fullLoadErroredTables,omitempty"` - FullLoadLoadingTables *int64 `json:"fullLoadLoadingTables,omitempty"` - FullLoadQueuedTables *int64 `json:"fullLoadQueuedTables,omitempty"` - IncomingChanges *int64 `json:"incomingChanges,omitempty"` - InitializationCompleted *bool `json:"initializationCompleted,omitempty"` - Latency *int64 `json:"latency,omitempty"` - MigrationState *SyncDatabaseMigrationReportingState `json:"migrationState,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - - // Fields inherited from MigrateMySqlAzureDbForMySqlSyncTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel{} - -func (s MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel) MarshalJSON() ([]byte, error) { - type wrapper MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel: %+v", err) - } - decoded["resultType"] = "DatabaseLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/migratemysqlazuredbformysqlsynctasks/model_migratemysqlazuredbformysqlsynctaskoutputerror.go b/resource-manager/datamigration/2018-04-19/migratemysqlazuredbformysqlsynctasks/model_migratemysqlazuredbformysqlsynctaskoutputerror.go deleted file mode 100644 index f2ff3433d7b..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratemysqlazuredbformysqlsynctasks/model_migratemysqlazuredbformysqlsynctaskoutputerror.go +++ /dev/null @@ -1,42 +0,0 @@ -package migratemysqlazuredbformysqlsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateMySqlAzureDbForMySqlSyncTaskOutput = MigrateMySqlAzureDbForMySqlSyncTaskOutputError{} - -type MigrateMySqlAzureDbForMySqlSyncTaskOutputError struct { - Error *ReportableException `json:"error,omitempty"` - - // Fields inherited from MigrateMySqlAzureDbForMySqlSyncTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateMySqlAzureDbForMySqlSyncTaskOutputError{} - -func (s MigrateMySqlAzureDbForMySqlSyncTaskOutputError) MarshalJSON() ([]byte, error) { - type wrapper MigrateMySqlAzureDbForMySqlSyncTaskOutputError - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateMySqlAzureDbForMySqlSyncTaskOutputError: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateMySqlAzureDbForMySqlSyncTaskOutputError: %+v", err) - } - decoded["resultType"] = "ErrorOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateMySqlAzureDbForMySqlSyncTaskOutputError: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/migratemysqlazuredbformysqlsynctasks/model_migratemysqlazuredbformysqlsynctaskoutputmigrationlevel.go b/resource-manager/datamigration/2018-04-19/migratemysqlazuredbformysqlsynctasks/model_migratemysqlazuredbformysqlsynctaskoutputmigrationlevel.go deleted file mode 100644 index 808d334fcfe..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratemysqlazuredbformysqlsynctasks/model_migratemysqlazuredbformysqlsynctaskoutputmigrationlevel.go +++ /dev/null @@ -1,47 +0,0 @@ -package migratemysqlazuredbformysqlsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateMySqlAzureDbForMySqlSyncTaskOutput = MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel{} - -type MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel struct { - EndedOn *string `json:"endedOn,omitempty"` - SourceServer *string `json:"sourceServer,omitempty"` - SourceServerVersion *string `json:"sourceServerVersion,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - TargetServer *string `json:"targetServer,omitempty"` - TargetServerVersion *string `json:"targetServerVersion,omitempty"` - - // Fields inherited from MigrateMySqlAzureDbForMySqlSyncTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel{} - -func (s MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel) MarshalJSON() ([]byte, error) { - type wrapper MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel: %+v", err) - } - decoded["resultType"] = "MigrationLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/migratemysqlazuredbformysqlsynctasks/model_migratemysqlazuredbformysqlsynctaskoutputtablelevel.go b/resource-manager/datamigration/2018-04-19/migratemysqlazuredbformysqlsynctasks/model_migratemysqlazuredbformysqlsynctaskoutputtablelevel.go deleted file mode 100644 index 3fa8eef214f..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratemysqlazuredbformysqlsynctasks/model_migratemysqlazuredbformysqlsynctaskoutputtablelevel.go +++ /dev/null @@ -1,54 +0,0 @@ -package migratemysqlazuredbformysqlsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateMySqlAzureDbForMySqlSyncTaskOutput = MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel{} - -type MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel struct { - CdcDeleteCounter *string `json:"cdcDeleteCounter,omitempty"` - CdcInsertCounter *string `json:"cdcInsertCounter,omitempty"` - CdcUpdateCounter *string `json:"cdcUpdateCounter,omitempty"` - DataErrorsCounter *int64 `json:"dataErrorsCounter,omitempty"` - DatabaseName *string `json:"databaseName,omitempty"` - FullLoadEndedOn *string `json:"fullLoadEndedOn,omitempty"` - FullLoadEstFinishTime *string `json:"fullLoadEstFinishTime,omitempty"` - FullLoadStartedOn *string `json:"fullLoadStartedOn,omitempty"` - FullLoadTotalRows *int64 `json:"fullLoadTotalRows,omitempty"` - LastModifiedTime *string `json:"lastModifiedTime,omitempty"` - State *SyncTableMigrationState `json:"state,omitempty"` - TableName *string `json:"tableName,omitempty"` - TotalChangesApplied *int64 `json:"totalChangesApplied,omitempty"` - - // Fields inherited from MigrateMySqlAzureDbForMySqlSyncTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel{} - -func (s MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel) MarshalJSON() ([]byte, error) { - type wrapper MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel: %+v", err) - } - decoded["resultType"] = "TableLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/migratemysqlazuredbformysqlsynctasks/model_mysqlconnectioninfo.go b/resource-manager/datamigration/2018-04-19/migratemysqlazuredbformysqlsynctasks/model_mysqlconnectioninfo.go deleted file mode 100644 index 6cc3ee4b64c..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratemysqlazuredbformysqlsynctasks/model_mysqlconnectioninfo.go +++ /dev/null @@ -1,44 +0,0 @@ -package migratemysqlazuredbformysqlsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = MySqlConnectionInfo{} - -type MySqlConnectionInfo struct { - Port int64 `json:"port"` - ServerName string `json:"serverName"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = MySqlConnectionInfo{} - -func (s MySqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper MySqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MySqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MySqlConnectionInfo: %+v", err) - } - decoded["type"] = "MySqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MySqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/migratemysqlazuredbformysqlsynctasks/model_reportableexception.go b/resource-manager/datamigration/2018-04-19/migratemysqlazuredbformysqlsynctasks/model_reportableexception.go deleted file mode 100644 index bedbd776be0..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratemysqlazuredbformysqlsynctasks/model_reportableexception.go +++ /dev/null @@ -1,13 +0,0 @@ -package migratemysqlazuredbformysqlsynctasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ReportableException struct { - ActionableMessage *string `json:"actionableMessage,omitempty"` - FilePath *string `json:"filePath,omitempty"` - HResult *int64 `json:"hResult,omitempty"` - LineNumber *string `json:"lineNumber,omitempty"` - Message *string `json:"message,omitempty"` - StackTrace *string `json:"stackTrace,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/migratemysqlazuredbformysqlsynctasks/model_syncmigrationdatabaseerrorevent.go b/resource-manager/datamigration/2018-04-19/migratemysqlazuredbformysqlsynctasks/model_syncmigrationdatabaseerrorevent.go deleted file mode 100644 index 597272f34cc..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratemysqlazuredbformysqlsynctasks/model_syncmigrationdatabaseerrorevent.go +++ /dev/null @@ -1,10 +0,0 @@ -package migratemysqlazuredbformysqlsynctasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SyncMigrationDatabaseErrorEvent struct { - EventText *string `json:"eventText,omitempty"` - EventTypeString *string `json:"eventTypeString,omitempty"` - TimestampString *string `json:"timestampString,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/migratemysqlazuredbformysqlsynctasks/version.go b/resource-manager/datamigration/2018-04-19/migratemysqlazuredbformysqlsynctasks/version.go deleted file mode 100644 index b67e329080b..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratemysqlazuredbformysqlsynctasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package migratemysqlazuredbformysqlsynctasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2018-04-19" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/migratemysqlazuredbformysqlsynctasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2018-04-19/migratepostgresqlazuredbforpostgresqlsynctasks/README.md b/resource-manager/datamigration/2018-04-19/migratepostgresqlazuredbforpostgresqlsynctasks/README.md deleted file mode 100644 index 5a60289215d..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratepostgresqlazuredbforpostgresqlsynctasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/migratepostgresqlazuredbforpostgresqlsynctasks` Documentation - -The `migratepostgresqlazuredbforpostgresqlsynctasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2018-04-19`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/migratepostgresqlazuredbforpostgresqlsynctasks" -``` - - -### Client Initialization - -```go -client := migratepostgresqlazuredbforpostgresqlsynctasks.NewMigratePostgreSqlAzureDbForPostgreSqlSyncTasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2018-04-19/migratepostgresqlazuredbforpostgresqlsynctasks/client.go b/resource-manager/datamigration/2018-04-19/migratepostgresqlazuredbforpostgresqlsynctasks/client.go deleted file mode 100644 index 0724804434b..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratepostgresqlazuredbforpostgresqlsynctasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package migratepostgresqlazuredbforpostgresqlsynctasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigratePostgreSqlAzureDbForPostgreSqlSyncTasksClient struct { - Client *resourcemanager.Client -} - -func NewMigratePostgreSqlAzureDbForPostgreSqlSyncTasksClientWithBaseURI(sdkApi sdkEnv.Api) (*MigratePostgreSqlAzureDbForPostgreSqlSyncTasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "migratepostgresqlazuredbforpostgresqlsynctasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating MigratePostgreSqlAzureDbForPostgreSqlSyncTasksClient: %+v", err) - } - - return &MigratePostgreSqlAzureDbForPostgreSqlSyncTasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2018-04-19/migratepostgresqlazuredbforpostgresqlsynctasks/constants.go b/resource-manager/datamigration/2018-04-19/migratepostgresqlazuredbforpostgresqlsynctasks/constants.go deleted file mode 100644 index 83e3d16c420..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratepostgresqlazuredbforpostgresqlsynctasks/constants.go +++ /dev/null @@ -1,131 +0,0 @@ -package migratepostgresqlazuredbforpostgresqlsynctasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SyncDatabaseMigrationReportingState string - -const ( - SyncDatabaseMigrationReportingStateCANCELLED SyncDatabaseMigrationReportingState = "CANCELLED" - SyncDatabaseMigrationReportingStateCANCELLING SyncDatabaseMigrationReportingState = "CANCELLING" - SyncDatabaseMigrationReportingStateCOMPLETE SyncDatabaseMigrationReportingState = "COMPLETE" - SyncDatabaseMigrationReportingStateCOMPLETING SyncDatabaseMigrationReportingState = "COMPLETING" - SyncDatabaseMigrationReportingStateCONFIGURING SyncDatabaseMigrationReportingState = "CONFIGURING" - SyncDatabaseMigrationReportingStateFAILED SyncDatabaseMigrationReportingState = "FAILED" - SyncDatabaseMigrationReportingStateINITIALIAZING SyncDatabaseMigrationReportingState = "INITIALIAZING" - SyncDatabaseMigrationReportingStateREADYTOCOMPLETE SyncDatabaseMigrationReportingState = "READY_TO_COMPLETE" - SyncDatabaseMigrationReportingStateRUNNING SyncDatabaseMigrationReportingState = "RUNNING" - SyncDatabaseMigrationReportingStateSTARTING SyncDatabaseMigrationReportingState = "STARTING" - SyncDatabaseMigrationReportingStateUNDEFINED SyncDatabaseMigrationReportingState = "UNDEFINED" -) - -func PossibleValuesForSyncDatabaseMigrationReportingState() []string { - return []string{ - string(SyncDatabaseMigrationReportingStateCANCELLED), - string(SyncDatabaseMigrationReportingStateCANCELLING), - string(SyncDatabaseMigrationReportingStateCOMPLETE), - string(SyncDatabaseMigrationReportingStateCOMPLETING), - string(SyncDatabaseMigrationReportingStateCONFIGURING), - string(SyncDatabaseMigrationReportingStateFAILED), - string(SyncDatabaseMigrationReportingStateINITIALIAZING), - string(SyncDatabaseMigrationReportingStateREADYTOCOMPLETE), - string(SyncDatabaseMigrationReportingStateRUNNING), - string(SyncDatabaseMigrationReportingStateSTARTING), - string(SyncDatabaseMigrationReportingStateUNDEFINED), - } -} - -func (s *SyncDatabaseMigrationReportingState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSyncDatabaseMigrationReportingState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSyncDatabaseMigrationReportingState(input string) (*SyncDatabaseMigrationReportingState, error) { - vals := map[string]SyncDatabaseMigrationReportingState{ - "cancelled": SyncDatabaseMigrationReportingStateCANCELLED, - "cancelling": SyncDatabaseMigrationReportingStateCANCELLING, - "complete": SyncDatabaseMigrationReportingStateCOMPLETE, - "completing": SyncDatabaseMigrationReportingStateCOMPLETING, - "configuring": SyncDatabaseMigrationReportingStateCONFIGURING, - "failed": SyncDatabaseMigrationReportingStateFAILED, - "initialiazing": SyncDatabaseMigrationReportingStateINITIALIAZING, - "ready_to_complete": SyncDatabaseMigrationReportingStateREADYTOCOMPLETE, - "running": SyncDatabaseMigrationReportingStateRUNNING, - "starting": SyncDatabaseMigrationReportingStateSTARTING, - "undefined": SyncDatabaseMigrationReportingStateUNDEFINED, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SyncDatabaseMigrationReportingState(input) - return &out, nil -} - -type SyncTableMigrationState string - -const ( - SyncTableMigrationStateBEFORELOAD SyncTableMigrationState = "BEFORE_LOAD" - SyncTableMigrationStateCANCELED SyncTableMigrationState = "CANCELED" - SyncTableMigrationStateCOMPLETED SyncTableMigrationState = "COMPLETED" - SyncTableMigrationStateERROR SyncTableMigrationState = "ERROR" - SyncTableMigrationStateFAILED SyncTableMigrationState = "FAILED" - SyncTableMigrationStateFULLLOAD SyncTableMigrationState = "FULL_LOAD" -) - -func PossibleValuesForSyncTableMigrationState() []string { - return []string{ - string(SyncTableMigrationStateBEFORELOAD), - string(SyncTableMigrationStateCANCELED), - string(SyncTableMigrationStateCOMPLETED), - string(SyncTableMigrationStateERROR), - string(SyncTableMigrationStateFAILED), - string(SyncTableMigrationStateFULLLOAD), - } -} - -func (s *SyncTableMigrationState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSyncTableMigrationState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSyncTableMigrationState(input string) (*SyncTableMigrationState, error) { - vals := map[string]SyncTableMigrationState{ - "before_load": SyncTableMigrationStateBEFORELOAD, - "canceled": SyncTableMigrationStateCANCELED, - "completed": SyncTableMigrationStateCOMPLETED, - "error": SyncTableMigrationStateERROR, - "failed": SyncTableMigrationStateFAILED, - "full_load": SyncTableMigrationStateFULLLOAD, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SyncTableMigrationState(input) - return &out, nil -} diff --git a/resource-manager/datamigration/2018-04-19/migratepostgresqlazuredbforpostgresqlsynctasks/model_connectioninfo.go b/resource-manager/datamigration/2018-04-19/migratepostgresqlazuredbforpostgresqlsynctasks/model_connectioninfo.go deleted file mode 100644 index 5d5af97c2c7..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratepostgresqlazuredbforpostgresqlsynctasks/model_connectioninfo.go +++ /dev/null @@ -1,53 +0,0 @@ -package migratepostgresqlazuredbforpostgresqlsynctasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "PostgreSqlConnectionInfo") { - var out PostgreSqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into PostgreSqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2018-04-19/migratepostgresqlazuredbforpostgresqlsynctasks/model_migratepostgresqlazuredbforpostgresqlsynctaskoutput.go b/resource-manager/datamigration/2018-04-19/migratepostgresqlazuredbforpostgresqlsynctasks/model_migratepostgresqlazuredbforpostgresqlsynctaskoutput.go deleted file mode 100644 index 95715d44e3f..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratepostgresqlazuredbforpostgresqlsynctasks/model_migratepostgresqlazuredbforpostgresqlsynctaskoutput.go +++ /dev/null @@ -1,85 +0,0 @@ -package migratepostgresqlazuredbforpostgresqlsynctasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput interface { -} - -// RawMigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawMigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalMigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputImplementation(input []byte) (MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput into map[string]interface: %+v", err) - } - - value, ok := temp["resultType"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "DatabaseLevelErrorOutput") { - var out MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "DatabaseLevelOutput") { - var out MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "ErrorOutput") { - var out MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "MigrationLevelOutput") { - var out MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "TableLevelOutput") { - var out MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel: %+v", err) - } - return out, nil - } - - out := RawMigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2018-04-19/migratepostgresqlazuredbforpostgresqlsynctasks/model_migratepostgresqlazuredbforpostgresqlsynctaskoutputdatabaseerror.go b/resource-manager/datamigration/2018-04-19/migratepostgresqlazuredbforpostgresqlsynctasks/model_migratepostgresqlazuredbforpostgresqlsynctaskoutputdatabaseerror.go deleted file mode 100644 index 87383b60ee5..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratepostgresqlazuredbforpostgresqlsynctasks/model_migratepostgresqlazuredbforpostgresqlsynctaskoutputdatabaseerror.go +++ /dev/null @@ -1,43 +0,0 @@ -package migratepostgresqlazuredbforpostgresqlsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError{} - -type MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError struct { - ErrorMessage *string `json:"errorMessage,omitempty"` - Events *[]SyncMigrationDatabaseErrorEvent `json:"events,omitempty"` - - // Fields inherited from MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError{} - -func (s MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError) MarshalJSON() ([]byte, error) { - type wrapper MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError: %+v", err) - } - decoded["resultType"] = "DatabaseLevelErrorOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/migratepostgresqlazuredbforpostgresqlsynctasks/model_migratepostgresqlazuredbforpostgresqlsynctaskoutputdatabaselevel.go b/resource-manager/datamigration/2018-04-19/migratepostgresqlazuredbforpostgresqlsynctasks/model_migratepostgresqlazuredbforpostgresqlsynctaskoutputdatabaselevel.go deleted file mode 100644 index 373e032f81a..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratepostgresqlazuredbforpostgresqlsynctasks/model_migratepostgresqlazuredbforpostgresqlsynctaskoutputdatabaselevel.go +++ /dev/null @@ -1,56 +0,0 @@ -package migratepostgresqlazuredbforpostgresqlsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel{} - -type MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel struct { - AppliedChanges *int64 `json:"appliedChanges,omitempty"` - CdcDeleteCounter *int64 `json:"cdcDeleteCounter,omitempty"` - CdcInsertCounter *int64 `json:"cdcInsertCounter,omitempty"` - CdcUpdateCounter *int64 `json:"cdcUpdateCounter,omitempty"` - DatabaseName *string `json:"databaseName,omitempty"` - EndedOn *string `json:"endedOn,omitempty"` - FullLoadCompletedTables *int64 `json:"fullLoadCompletedTables,omitempty"` - FullLoadErroredTables *int64 `json:"fullLoadErroredTables,omitempty"` - FullLoadLoadingTables *int64 `json:"fullLoadLoadingTables,omitempty"` - FullLoadQueuedTables *int64 `json:"fullLoadQueuedTables,omitempty"` - IncomingChanges *int64 `json:"incomingChanges,omitempty"` - InitializationCompleted *bool `json:"initializationCompleted,omitempty"` - Latency *int64 `json:"latency,omitempty"` - MigrationState *SyncDatabaseMigrationReportingState `json:"migrationState,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - - // Fields inherited from MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel{} - -func (s MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel) MarshalJSON() ([]byte, error) { - type wrapper MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel: %+v", err) - } - decoded["resultType"] = "DatabaseLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/migratepostgresqlazuredbforpostgresqlsynctasks/model_migratepostgresqlazuredbforpostgresqlsynctaskoutputerror.go b/resource-manager/datamigration/2018-04-19/migratepostgresqlazuredbforpostgresqlsynctasks/model_migratepostgresqlazuredbforpostgresqlsynctaskoutputerror.go deleted file mode 100644 index d671c4d0ae4..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratepostgresqlazuredbforpostgresqlsynctasks/model_migratepostgresqlazuredbforpostgresqlsynctaskoutputerror.go +++ /dev/null @@ -1,42 +0,0 @@ -package migratepostgresqlazuredbforpostgresqlsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError{} - -type MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError struct { - Error *ReportableException `json:"error,omitempty"` - - // Fields inherited from MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError{} - -func (s MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError) MarshalJSON() ([]byte, error) { - type wrapper MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError: %+v", err) - } - decoded["resultType"] = "ErrorOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/migratepostgresqlazuredbforpostgresqlsynctasks/model_migratepostgresqlazuredbforpostgresqlsynctaskoutputmigrationlevel.go b/resource-manager/datamigration/2018-04-19/migratepostgresqlazuredbforpostgresqlsynctasks/model_migratepostgresqlazuredbforpostgresqlsynctaskoutputmigrationlevel.go deleted file mode 100644 index f45548ee295..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratepostgresqlazuredbforpostgresqlsynctasks/model_migratepostgresqlazuredbforpostgresqlsynctaskoutputmigrationlevel.go +++ /dev/null @@ -1,47 +0,0 @@ -package migratepostgresqlazuredbforpostgresqlsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel{} - -type MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel struct { - EndedOn *string `json:"endedOn,omitempty"` - SourceServer *string `json:"sourceServer,omitempty"` - SourceServerVersion *string `json:"sourceServerVersion,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - TargetServer *string `json:"targetServer,omitempty"` - TargetServerVersion *string `json:"targetServerVersion,omitempty"` - - // Fields inherited from MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel{} - -func (s MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel) MarshalJSON() ([]byte, error) { - type wrapper MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel: %+v", err) - } - decoded["resultType"] = "MigrationLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/migratepostgresqlazuredbforpostgresqlsynctasks/model_migratepostgresqlazuredbforpostgresqlsynctaskoutputtablelevel.go b/resource-manager/datamigration/2018-04-19/migratepostgresqlazuredbforpostgresqlsynctasks/model_migratepostgresqlazuredbforpostgresqlsynctaskoutputtablelevel.go deleted file mode 100644 index 4776dc25967..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratepostgresqlazuredbforpostgresqlsynctasks/model_migratepostgresqlazuredbforpostgresqlsynctaskoutputtablelevel.go +++ /dev/null @@ -1,54 +0,0 @@ -package migratepostgresqlazuredbforpostgresqlsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel{} - -type MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel struct { - CdcDeleteCounter *int64 `json:"cdcDeleteCounter,omitempty"` - CdcInsertCounter *int64 `json:"cdcInsertCounter,omitempty"` - CdcUpdateCounter *int64 `json:"cdcUpdateCounter,omitempty"` - DataErrorsCounter *int64 `json:"dataErrorsCounter,omitempty"` - DatabaseName *string `json:"databaseName,omitempty"` - FullLoadEndedOn *string `json:"fullLoadEndedOn,omitempty"` - FullLoadEstFinishTime *string `json:"fullLoadEstFinishTime,omitempty"` - FullLoadStartedOn *string `json:"fullLoadStartedOn,omitempty"` - FullLoadTotalRows *int64 `json:"fullLoadTotalRows,omitempty"` - LastModifiedTime *string `json:"lastModifiedTime,omitempty"` - State *SyncTableMigrationState `json:"state,omitempty"` - TableName *string `json:"tableName,omitempty"` - TotalChangesApplied *int64 `json:"totalChangesApplied,omitempty"` - - // Fields inherited from MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel{} - -func (s MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel) MarshalJSON() ([]byte, error) { - type wrapper MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel: %+v", err) - } - decoded["resultType"] = "TableLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/migratepostgresqlazuredbforpostgresqlsynctasks/model_postgresqlconnectioninfo.go b/resource-manager/datamigration/2018-04-19/migratepostgresqlazuredbforpostgresqlsynctasks/model_postgresqlconnectioninfo.go deleted file mode 100644 index 958301e01fb..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratepostgresqlazuredbforpostgresqlsynctasks/model_postgresqlconnectioninfo.go +++ /dev/null @@ -1,45 +0,0 @@ -package migratepostgresqlazuredbforpostgresqlsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = PostgreSqlConnectionInfo{} - -type PostgreSqlConnectionInfo struct { - DatabaseName *string `json:"databaseName,omitempty"` - Port int64 `json:"port"` - ServerName string `json:"serverName"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = PostgreSqlConnectionInfo{} - -func (s PostgreSqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper PostgreSqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling PostgreSqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling PostgreSqlConnectionInfo: %+v", err) - } - decoded["type"] = "PostgreSqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling PostgreSqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/migratepostgresqlazuredbforpostgresqlsynctasks/model_reportableexception.go b/resource-manager/datamigration/2018-04-19/migratepostgresqlazuredbforpostgresqlsynctasks/model_reportableexception.go deleted file mode 100644 index 3c7df449ddb..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratepostgresqlazuredbforpostgresqlsynctasks/model_reportableexception.go +++ /dev/null @@ -1,13 +0,0 @@ -package migratepostgresqlazuredbforpostgresqlsynctasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ReportableException struct { - ActionableMessage *string `json:"actionableMessage,omitempty"` - FilePath *string `json:"filePath,omitempty"` - HResult *int64 `json:"hResult,omitempty"` - LineNumber *string `json:"lineNumber,omitempty"` - Message *string `json:"message,omitempty"` - StackTrace *string `json:"stackTrace,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/migratepostgresqlazuredbforpostgresqlsynctasks/model_syncmigrationdatabaseerrorevent.go b/resource-manager/datamigration/2018-04-19/migratepostgresqlazuredbforpostgresqlsynctasks/model_syncmigrationdatabaseerrorevent.go deleted file mode 100644 index b58759da9be..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratepostgresqlazuredbforpostgresqlsynctasks/model_syncmigrationdatabaseerrorevent.go +++ /dev/null @@ -1,10 +0,0 @@ -package migratepostgresqlazuredbforpostgresqlsynctasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SyncMigrationDatabaseErrorEvent struct { - EventText *string `json:"eventText,omitempty"` - EventTypeString *string `json:"eventTypeString,omitempty"` - TimestampString *string `json:"timestampString,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/migratepostgresqlazuredbforpostgresqlsynctasks/version.go b/resource-manager/datamigration/2018-04-19/migratepostgresqlazuredbforpostgresqlsynctasks/version.go deleted file mode 100644 index 033bff52106..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratepostgresqlazuredbforpostgresqlsynctasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package migratepostgresqlazuredbforpostgresqlsynctasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2018-04-19" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/migratepostgresqlazuredbforpostgresqlsynctasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbsynctasks/README.md b/resource-manager/datamigration/2018-04-19/migratesqlserversqldbsynctasks/README.md deleted file mode 100644 index b9eb17a73f2..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbsynctasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/migratesqlserversqldbsynctasks` Documentation - -The `migratesqlserversqldbsynctasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2018-04-19`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/migratesqlserversqldbsynctasks" -``` - - -### Client Initialization - -```go -client := migratesqlserversqldbsynctasks.NewMigrateSqlServerSqlDbSyncTasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbsynctasks/client.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqldbsynctasks/client.go deleted file mode 100644 index e927056ca27..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbsynctasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package migratesqlserversqldbsynctasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateSqlServerSqlDbSyncTasksClient struct { - Client *resourcemanager.Client -} - -func NewMigrateSqlServerSqlDbSyncTasksClientWithBaseURI(sdkApi sdkEnv.Api) (*MigrateSqlServerSqlDbSyncTasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "migratesqlserversqldbsynctasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating MigrateSqlServerSqlDbSyncTasksClient: %+v", err) - } - - return &MigrateSqlServerSqlDbSyncTasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbsynctasks/constants.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqldbsynctasks/constants.go deleted file mode 100644 index a24f6bea715..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbsynctasks/constants.go +++ /dev/null @@ -1,219 +0,0 @@ -package migratesqlserversqldbsynctasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthenticationType string - -const ( - AuthenticationTypeActiveDirectoryIntegrated AuthenticationType = "ActiveDirectoryIntegrated" - AuthenticationTypeActiveDirectoryPassword AuthenticationType = "ActiveDirectoryPassword" - AuthenticationTypeNone AuthenticationType = "None" - AuthenticationTypeSqlAuthentication AuthenticationType = "SqlAuthentication" - AuthenticationTypeWindowsAuthentication AuthenticationType = "WindowsAuthentication" -) - -func PossibleValuesForAuthenticationType() []string { - return []string{ - string(AuthenticationTypeActiveDirectoryIntegrated), - string(AuthenticationTypeActiveDirectoryPassword), - string(AuthenticationTypeNone), - string(AuthenticationTypeSqlAuthentication), - string(AuthenticationTypeWindowsAuthentication), - } -} - -func (s *AuthenticationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAuthenticationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAuthenticationType(input string) (*AuthenticationType, error) { - vals := map[string]AuthenticationType{ - "activedirectoryintegrated": AuthenticationTypeActiveDirectoryIntegrated, - "activedirectorypassword": AuthenticationTypeActiveDirectoryPassword, - "none": AuthenticationTypeNone, - "sqlauthentication": AuthenticationTypeSqlAuthentication, - "windowsauthentication": AuthenticationTypeWindowsAuthentication, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AuthenticationType(input) - return &out, nil -} - -type SqlSourcePlatform string - -const ( - SqlSourcePlatformSqlOnPrem SqlSourcePlatform = "SqlOnPrem" -) - -func PossibleValuesForSqlSourcePlatform() []string { - return []string{ - string(SqlSourcePlatformSqlOnPrem), - } -} - -func (s *SqlSourcePlatform) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSqlSourcePlatform(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSqlSourcePlatform(input string) (*SqlSourcePlatform, error) { - vals := map[string]SqlSourcePlatform{ - "sqlonprem": SqlSourcePlatformSqlOnPrem, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SqlSourcePlatform(input) - return &out, nil -} - -type SyncDatabaseMigrationReportingState string - -const ( - SyncDatabaseMigrationReportingStateCANCELLED SyncDatabaseMigrationReportingState = "CANCELLED" - SyncDatabaseMigrationReportingStateCANCELLING SyncDatabaseMigrationReportingState = "CANCELLING" - SyncDatabaseMigrationReportingStateCOMPLETE SyncDatabaseMigrationReportingState = "COMPLETE" - SyncDatabaseMigrationReportingStateCOMPLETING SyncDatabaseMigrationReportingState = "COMPLETING" - SyncDatabaseMigrationReportingStateCONFIGURING SyncDatabaseMigrationReportingState = "CONFIGURING" - SyncDatabaseMigrationReportingStateFAILED SyncDatabaseMigrationReportingState = "FAILED" - SyncDatabaseMigrationReportingStateINITIALIAZING SyncDatabaseMigrationReportingState = "INITIALIAZING" - SyncDatabaseMigrationReportingStateREADYTOCOMPLETE SyncDatabaseMigrationReportingState = "READY_TO_COMPLETE" - SyncDatabaseMigrationReportingStateRUNNING SyncDatabaseMigrationReportingState = "RUNNING" - SyncDatabaseMigrationReportingStateSTARTING SyncDatabaseMigrationReportingState = "STARTING" - SyncDatabaseMigrationReportingStateUNDEFINED SyncDatabaseMigrationReportingState = "UNDEFINED" -) - -func PossibleValuesForSyncDatabaseMigrationReportingState() []string { - return []string{ - string(SyncDatabaseMigrationReportingStateCANCELLED), - string(SyncDatabaseMigrationReportingStateCANCELLING), - string(SyncDatabaseMigrationReportingStateCOMPLETE), - string(SyncDatabaseMigrationReportingStateCOMPLETING), - string(SyncDatabaseMigrationReportingStateCONFIGURING), - string(SyncDatabaseMigrationReportingStateFAILED), - string(SyncDatabaseMigrationReportingStateINITIALIAZING), - string(SyncDatabaseMigrationReportingStateREADYTOCOMPLETE), - string(SyncDatabaseMigrationReportingStateRUNNING), - string(SyncDatabaseMigrationReportingStateSTARTING), - string(SyncDatabaseMigrationReportingStateUNDEFINED), - } -} - -func (s *SyncDatabaseMigrationReportingState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSyncDatabaseMigrationReportingState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSyncDatabaseMigrationReportingState(input string) (*SyncDatabaseMigrationReportingState, error) { - vals := map[string]SyncDatabaseMigrationReportingState{ - "cancelled": SyncDatabaseMigrationReportingStateCANCELLED, - "cancelling": SyncDatabaseMigrationReportingStateCANCELLING, - "complete": SyncDatabaseMigrationReportingStateCOMPLETE, - "completing": SyncDatabaseMigrationReportingStateCOMPLETING, - "configuring": SyncDatabaseMigrationReportingStateCONFIGURING, - "failed": SyncDatabaseMigrationReportingStateFAILED, - "initialiazing": SyncDatabaseMigrationReportingStateINITIALIAZING, - "ready_to_complete": SyncDatabaseMigrationReportingStateREADYTOCOMPLETE, - "running": SyncDatabaseMigrationReportingStateRUNNING, - "starting": SyncDatabaseMigrationReportingStateSTARTING, - "undefined": SyncDatabaseMigrationReportingStateUNDEFINED, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SyncDatabaseMigrationReportingState(input) - return &out, nil -} - -type SyncTableMigrationState string - -const ( - SyncTableMigrationStateBEFORELOAD SyncTableMigrationState = "BEFORE_LOAD" - SyncTableMigrationStateCANCELED SyncTableMigrationState = "CANCELED" - SyncTableMigrationStateCOMPLETED SyncTableMigrationState = "COMPLETED" - SyncTableMigrationStateERROR SyncTableMigrationState = "ERROR" - SyncTableMigrationStateFAILED SyncTableMigrationState = "FAILED" - SyncTableMigrationStateFULLLOAD SyncTableMigrationState = "FULL_LOAD" -) - -func PossibleValuesForSyncTableMigrationState() []string { - return []string{ - string(SyncTableMigrationStateBEFORELOAD), - string(SyncTableMigrationStateCANCELED), - string(SyncTableMigrationStateCOMPLETED), - string(SyncTableMigrationStateERROR), - string(SyncTableMigrationStateFAILED), - string(SyncTableMigrationStateFULLLOAD), - } -} - -func (s *SyncTableMigrationState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSyncTableMigrationState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSyncTableMigrationState(input string) (*SyncTableMigrationState, error) { - vals := map[string]SyncTableMigrationState{ - "before_load": SyncTableMigrationStateBEFORELOAD, - "canceled": SyncTableMigrationStateCANCELED, - "completed": SyncTableMigrationStateCOMPLETED, - "error": SyncTableMigrationStateERROR, - "failed": SyncTableMigrationStateFAILED, - "full_load": SyncTableMigrationStateFULLLOAD, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SyncTableMigrationState(input) - return &out, nil -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbsynctasks/model_connectioninfo.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqldbsynctasks/model_connectioninfo.go deleted file mode 100644 index fafd83d6275..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbsynctasks/model_connectioninfo.go +++ /dev/null @@ -1,53 +0,0 @@ -package migratesqlserversqldbsynctasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "SqlConnectionInfo") { - var out SqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbsynctasks/model_migratesqlserversqldbsynctaskoutput.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqldbsynctasks/model_migratesqlserversqldbsynctaskoutput.go deleted file mode 100644 index ec9ed73fb2b..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbsynctasks/model_migratesqlserversqldbsynctaskoutput.go +++ /dev/null @@ -1,85 +0,0 @@ -package migratesqlserversqldbsynctasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateSqlServerSqlDbSyncTaskOutput interface { -} - -// RawMigrateSqlServerSqlDbSyncTaskOutputImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawMigrateSqlServerSqlDbSyncTaskOutputImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalMigrateSqlServerSqlDbSyncTaskOutputImplementation(input []byte) (MigrateSqlServerSqlDbSyncTaskOutput, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlDbSyncTaskOutput into map[string]interface: %+v", err) - } - - value, ok := temp["resultType"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "DatabaseLevelErrorOutput") { - var out MigrateSqlServerSqlDbSyncTaskOutputDatabaseError - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSqlServerSqlDbSyncTaskOutputDatabaseError: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "DatabaseLevelOutput") { - var out MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "ErrorOutput") { - var out MigrateSqlServerSqlDbSyncTaskOutputError - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSqlServerSqlDbSyncTaskOutputError: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "MigrationLevelOutput") { - var out MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "TableLevelOutput") { - var out MigrateSqlServerSqlDbSyncTaskOutputTableLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSqlServerSqlDbSyncTaskOutputTableLevel: %+v", err) - } - return out, nil - } - - out := RawMigrateSqlServerSqlDbSyncTaskOutputImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbsynctasks/model_migratesqlserversqldbsynctaskoutputdatabaseerror.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqldbsynctasks/model_migratesqlserversqldbsynctaskoutputdatabaseerror.go deleted file mode 100644 index 0ad3565de09..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbsynctasks/model_migratesqlserversqldbsynctaskoutputdatabaseerror.go +++ /dev/null @@ -1,43 +0,0 @@ -package migratesqlserversqldbsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateSqlServerSqlDbSyncTaskOutput = MigrateSqlServerSqlDbSyncTaskOutputDatabaseError{} - -type MigrateSqlServerSqlDbSyncTaskOutputDatabaseError struct { - ErrorMessage *string `json:"errorMessage,omitempty"` - Events *[]SyncMigrationDatabaseErrorEvent `json:"events,omitempty"` - - // Fields inherited from MigrateSqlServerSqlDbSyncTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateSqlServerSqlDbSyncTaskOutputDatabaseError{} - -func (s MigrateSqlServerSqlDbSyncTaskOutputDatabaseError) MarshalJSON() ([]byte, error) { - type wrapper MigrateSqlServerSqlDbSyncTaskOutputDatabaseError - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSqlServerSqlDbSyncTaskOutputDatabaseError: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlDbSyncTaskOutputDatabaseError: %+v", err) - } - decoded["resultType"] = "DatabaseLevelErrorOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSqlServerSqlDbSyncTaskOutputDatabaseError: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbsynctasks/model_migratesqlserversqldbsynctaskoutputdatabaselevel.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqldbsynctasks/model_migratesqlserversqldbsynctaskoutputdatabaselevel.go deleted file mode 100644 index b8685c38330..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbsynctasks/model_migratesqlserversqldbsynctaskoutputdatabaselevel.go +++ /dev/null @@ -1,56 +0,0 @@ -package migratesqlserversqldbsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateSqlServerSqlDbSyncTaskOutput = MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel{} - -type MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel struct { - AppliedChanges *int64 `json:"appliedChanges,omitempty"` - CdcDeleteCounter *int64 `json:"cdcDeleteCounter,omitempty"` - CdcInsertCounter *int64 `json:"cdcInsertCounter,omitempty"` - CdcUpdateCounter *int64 `json:"cdcUpdateCounter,omitempty"` - DatabaseName *string `json:"databaseName,omitempty"` - EndedOn *string `json:"endedOn,omitempty"` - FullLoadCompletedTables *int64 `json:"fullLoadCompletedTables,omitempty"` - FullLoadErroredTables *int64 `json:"fullLoadErroredTables,omitempty"` - FullLoadLoadingTables *int64 `json:"fullLoadLoadingTables,omitempty"` - FullLoadQueuedTables *int64 `json:"fullLoadQueuedTables,omitempty"` - IncomingChanges *int64 `json:"incomingChanges,omitempty"` - InitializationCompleted *bool `json:"initializationCompleted,omitempty"` - Latency *int64 `json:"latency,omitempty"` - MigrationState *SyncDatabaseMigrationReportingState `json:"migrationState,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - - // Fields inherited from MigrateSqlServerSqlDbSyncTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel{} - -func (s MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel) MarshalJSON() ([]byte, error) { - type wrapper MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel: %+v", err) - } - decoded["resultType"] = "DatabaseLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbsynctasks/model_migratesqlserversqldbsynctaskoutputerror.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqldbsynctasks/model_migratesqlserversqldbsynctaskoutputerror.go deleted file mode 100644 index 359b8cfce1b..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbsynctasks/model_migratesqlserversqldbsynctaskoutputerror.go +++ /dev/null @@ -1,42 +0,0 @@ -package migratesqlserversqldbsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateSqlServerSqlDbSyncTaskOutput = MigrateSqlServerSqlDbSyncTaskOutputError{} - -type MigrateSqlServerSqlDbSyncTaskOutputError struct { - Error *ReportableException `json:"error,omitempty"` - - // Fields inherited from MigrateSqlServerSqlDbSyncTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateSqlServerSqlDbSyncTaskOutputError{} - -func (s MigrateSqlServerSqlDbSyncTaskOutputError) MarshalJSON() ([]byte, error) { - type wrapper MigrateSqlServerSqlDbSyncTaskOutputError - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSqlServerSqlDbSyncTaskOutputError: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlDbSyncTaskOutputError: %+v", err) - } - decoded["resultType"] = "ErrorOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSqlServerSqlDbSyncTaskOutputError: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbsynctasks/model_migratesqlserversqldbsynctaskoutputmigrationlevel.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqldbsynctasks/model_migratesqlserversqldbsynctaskoutputmigrationlevel.go deleted file mode 100644 index 4d9bd48fc89..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbsynctasks/model_migratesqlserversqldbsynctaskoutputmigrationlevel.go +++ /dev/null @@ -1,48 +0,0 @@ -package migratesqlserversqldbsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateSqlServerSqlDbSyncTaskOutput = MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel{} - -type MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel struct { - DatabaseCount *int64 `json:"databaseCount,omitempty"` - EndedOn *string `json:"endedOn,omitempty"` - SourceServer *string `json:"sourceServer,omitempty"` - SourceServerVersion *string `json:"sourceServerVersion,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - TargetServer *string `json:"targetServer,omitempty"` - TargetServerVersion *string `json:"targetServerVersion,omitempty"` - - // Fields inherited from MigrateSqlServerSqlDbSyncTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel{} - -func (s MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel) MarshalJSON() ([]byte, error) { - type wrapper MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel: %+v", err) - } - decoded["resultType"] = "MigrationLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbsynctasks/model_migratesqlserversqldbsynctaskoutputtablelevel.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqldbsynctasks/model_migratesqlserversqldbsynctaskoutputtablelevel.go deleted file mode 100644 index 44d08b23ffa..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbsynctasks/model_migratesqlserversqldbsynctaskoutputtablelevel.go +++ /dev/null @@ -1,54 +0,0 @@ -package migratesqlserversqldbsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateSqlServerSqlDbSyncTaskOutput = MigrateSqlServerSqlDbSyncTaskOutputTableLevel{} - -type MigrateSqlServerSqlDbSyncTaskOutputTableLevel struct { - CdcDeleteCounter *int64 `json:"cdcDeleteCounter,omitempty"` - CdcInsertCounter *int64 `json:"cdcInsertCounter,omitempty"` - CdcUpdateCounter *int64 `json:"cdcUpdateCounter,omitempty"` - DataErrorsCounter *int64 `json:"dataErrorsCounter,omitempty"` - DatabaseName *string `json:"databaseName,omitempty"` - FullLoadEndedOn *string `json:"fullLoadEndedOn,omitempty"` - FullLoadEstFinishTime *string `json:"fullLoadEstFinishTime,omitempty"` - FullLoadStartedOn *string `json:"fullLoadStartedOn,omitempty"` - FullLoadTotalRows *int64 `json:"fullLoadTotalRows,omitempty"` - LastModifiedTime *string `json:"lastModifiedTime,omitempty"` - State *SyncTableMigrationState `json:"state,omitempty"` - TableName *string `json:"tableName,omitempty"` - TotalChangesApplied *int64 `json:"totalChangesApplied,omitempty"` - - // Fields inherited from MigrateSqlServerSqlDbSyncTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateSqlServerSqlDbSyncTaskOutputTableLevel{} - -func (s MigrateSqlServerSqlDbSyncTaskOutputTableLevel) MarshalJSON() ([]byte, error) { - type wrapper MigrateSqlServerSqlDbSyncTaskOutputTableLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSqlServerSqlDbSyncTaskOutputTableLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlDbSyncTaskOutputTableLevel: %+v", err) - } - decoded["resultType"] = "TableLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSqlServerSqlDbSyncTaskOutputTableLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbsynctasks/model_reportableexception.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqldbsynctasks/model_reportableexception.go deleted file mode 100644 index c219cb58e12..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbsynctasks/model_reportableexception.go +++ /dev/null @@ -1,13 +0,0 @@ -package migratesqlserversqldbsynctasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ReportableException struct { - ActionableMessage *string `json:"actionableMessage,omitempty"` - FilePath *string `json:"filePath,omitempty"` - HResult *int64 `json:"hResult,omitempty"` - LineNumber *string `json:"lineNumber,omitempty"` - Message *string `json:"message,omitempty"` - StackTrace *string `json:"stackTrace,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbsynctasks/model_sqlconnectioninfo.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqldbsynctasks/model_sqlconnectioninfo.go deleted file mode 100644 index 0f34ab8d4f1..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbsynctasks/model_sqlconnectioninfo.go +++ /dev/null @@ -1,48 +0,0 @@ -package migratesqlserversqldbsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = SqlConnectionInfo{} - -type SqlConnectionInfo struct { - AdditionalSettings *string `json:"additionalSettings,omitempty"` - Authentication *AuthenticationType `json:"authentication,omitempty"` - DataSource string `json:"dataSource"` - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Platform *SqlSourcePlatform `json:"platform,omitempty"` - TrustServerCertificate *bool `json:"trustServerCertificate,omitempty"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = SqlConnectionInfo{} - -func (s SqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper SqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SqlConnectionInfo: %+v", err) - } - decoded["type"] = "SqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbsynctasks/model_syncmigrationdatabaseerrorevent.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqldbsynctasks/model_syncmigrationdatabaseerrorevent.go deleted file mode 100644 index 4c69cef9faf..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbsynctasks/model_syncmigrationdatabaseerrorevent.go +++ /dev/null @@ -1,10 +0,0 @@ -package migratesqlserversqldbsynctasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SyncMigrationDatabaseErrorEvent struct { - EventText *string `json:"eventText,omitempty"` - EventTypeString *string `json:"eventTypeString,omitempty"` - TimestampString *string `json:"timestampString,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbsynctasks/version.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqldbsynctasks/version.go deleted file mode 100644 index b23a7724c90..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbsynctasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package migratesqlserversqldbsynctasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2018-04-19" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/migratesqlserversqldbsynctasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/README.md b/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/README.md deleted file mode 100644 index 162fdd0b3bc..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks` Documentation - -The `migratesqlserversqldbtasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2018-04-19`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks" -``` - - -### Client Initialization - -```go -client := migratesqlserversqldbtasks.NewMigrateSqlServerSqlDbTasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/client.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/client.go deleted file mode 100644 index ce54815dd7b..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package migratesqlserversqldbtasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateSqlServerSqlDbTasksClient struct { - Client *resourcemanager.Client -} - -func NewMigrateSqlServerSqlDbTasksClientWithBaseURI(sdkApi sdkEnv.Api) (*MigrateSqlServerSqlDbTasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "migratesqlserversqldbtasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating MigrateSqlServerSqlDbTasksClient: %+v", err) - } - - return &MigrateSqlServerSqlDbTasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/constants.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/constants.go deleted file mode 100644 index 99e6e160d1f..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/constants.go +++ /dev/null @@ -1,469 +0,0 @@ -package migratesqlserversqldbtasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthenticationType string - -const ( - AuthenticationTypeActiveDirectoryIntegrated AuthenticationType = "ActiveDirectoryIntegrated" - AuthenticationTypeActiveDirectoryPassword AuthenticationType = "ActiveDirectoryPassword" - AuthenticationTypeNone AuthenticationType = "None" - AuthenticationTypeSqlAuthentication AuthenticationType = "SqlAuthentication" - AuthenticationTypeWindowsAuthentication AuthenticationType = "WindowsAuthentication" -) - -func PossibleValuesForAuthenticationType() []string { - return []string{ - string(AuthenticationTypeActiveDirectoryIntegrated), - string(AuthenticationTypeActiveDirectoryPassword), - string(AuthenticationTypeNone), - string(AuthenticationTypeSqlAuthentication), - string(AuthenticationTypeWindowsAuthentication), - } -} - -func (s *AuthenticationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAuthenticationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAuthenticationType(input string) (*AuthenticationType, error) { - vals := map[string]AuthenticationType{ - "activedirectoryintegrated": AuthenticationTypeActiveDirectoryIntegrated, - "activedirectorypassword": AuthenticationTypeActiveDirectoryPassword, - "none": AuthenticationTypeNone, - "sqlauthentication": AuthenticationTypeSqlAuthentication, - "windowsauthentication": AuthenticationTypeWindowsAuthentication, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AuthenticationType(input) - return &out, nil -} - -type DatabaseMigrationStage string - -const ( - DatabaseMigrationStageBackup DatabaseMigrationStage = "Backup" - DatabaseMigrationStageCompleted DatabaseMigrationStage = "Completed" - DatabaseMigrationStageFileCopy DatabaseMigrationStage = "FileCopy" - DatabaseMigrationStageInitialize DatabaseMigrationStage = "Initialize" - DatabaseMigrationStageNone DatabaseMigrationStage = "None" - DatabaseMigrationStageRestore DatabaseMigrationStage = "Restore" -) - -func PossibleValuesForDatabaseMigrationStage() []string { - return []string{ - string(DatabaseMigrationStageBackup), - string(DatabaseMigrationStageCompleted), - string(DatabaseMigrationStageFileCopy), - string(DatabaseMigrationStageInitialize), - string(DatabaseMigrationStageNone), - string(DatabaseMigrationStageRestore), - } -} - -func (s *DatabaseMigrationStage) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDatabaseMigrationStage(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDatabaseMigrationStage(input string) (*DatabaseMigrationStage, error) { - vals := map[string]DatabaseMigrationStage{ - "backup": DatabaseMigrationStageBackup, - "completed": DatabaseMigrationStageCompleted, - "filecopy": DatabaseMigrationStageFileCopy, - "initialize": DatabaseMigrationStageInitialize, - "none": DatabaseMigrationStageNone, - "restore": DatabaseMigrationStageRestore, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DatabaseMigrationStage(input) - return &out, nil -} - -type MigrationState string - -const ( - MigrationStateCompleted MigrationState = "Completed" - MigrationStateFailed MigrationState = "Failed" - MigrationStateInProgress MigrationState = "InProgress" - MigrationStateNone MigrationState = "None" - MigrationStateSkipped MigrationState = "Skipped" - MigrationStateStopped MigrationState = "Stopped" - MigrationStateWarning MigrationState = "Warning" -) - -func PossibleValuesForMigrationState() []string { - return []string{ - string(MigrationStateCompleted), - string(MigrationStateFailed), - string(MigrationStateInProgress), - string(MigrationStateNone), - string(MigrationStateSkipped), - string(MigrationStateStopped), - string(MigrationStateWarning), - } -} - -func (s *MigrationState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseMigrationState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseMigrationState(input string) (*MigrationState, error) { - vals := map[string]MigrationState{ - "completed": MigrationStateCompleted, - "failed": MigrationStateFailed, - "inprogress": MigrationStateInProgress, - "none": MigrationStateNone, - "skipped": MigrationStateSkipped, - "stopped": MigrationStateStopped, - "warning": MigrationStateWarning, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := MigrationState(input) - return &out, nil -} - -type MigrationStatus string - -const ( - MigrationStatusCompleted MigrationStatus = "Completed" - MigrationStatusCompletedWithWarnings MigrationStatus = "CompletedWithWarnings" - MigrationStatusConfigured MigrationStatus = "Configured" - MigrationStatusConnecting MigrationStatus = "Connecting" - MigrationStatusDefault MigrationStatus = "Default" - MigrationStatusError MigrationStatus = "Error" - MigrationStatusRunning MigrationStatus = "Running" - MigrationStatusSelectLogins MigrationStatus = "SelectLogins" - MigrationStatusSourceAndTargetSelected MigrationStatus = "SourceAndTargetSelected" - MigrationStatusStopped MigrationStatus = "Stopped" -) - -func PossibleValuesForMigrationStatus() []string { - return []string{ - string(MigrationStatusCompleted), - string(MigrationStatusCompletedWithWarnings), - string(MigrationStatusConfigured), - string(MigrationStatusConnecting), - string(MigrationStatusDefault), - string(MigrationStatusError), - string(MigrationStatusRunning), - string(MigrationStatusSelectLogins), - string(MigrationStatusSourceAndTargetSelected), - string(MigrationStatusStopped), - } -} - -func (s *MigrationStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseMigrationStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseMigrationStatus(input string) (*MigrationStatus, error) { - vals := map[string]MigrationStatus{ - "completed": MigrationStatusCompleted, - "completedwithwarnings": MigrationStatusCompletedWithWarnings, - "configured": MigrationStatusConfigured, - "connecting": MigrationStatusConnecting, - "default": MigrationStatusDefault, - "error": MigrationStatusError, - "running": MigrationStatusRunning, - "selectlogins": MigrationStatusSelectLogins, - "sourceandtargetselected": MigrationStatusSourceAndTargetSelected, - "stopped": MigrationStatusStopped, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := MigrationStatus(input) - return &out, nil -} - -type ObjectType string - -const ( - ObjectTypeFunction ObjectType = "Function" - ObjectTypeStoredProcedures ObjectType = "StoredProcedures" - ObjectTypeTable ObjectType = "Table" - ObjectTypeUser ObjectType = "User" - ObjectTypeView ObjectType = "View" -) - -func PossibleValuesForObjectType() []string { - return []string{ - string(ObjectTypeFunction), - string(ObjectTypeStoredProcedures), - string(ObjectTypeTable), - string(ObjectTypeUser), - string(ObjectTypeView), - } -} - -func (s *ObjectType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseObjectType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseObjectType(input string) (*ObjectType, error) { - vals := map[string]ObjectType{ - "function": ObjectTypeFunction, - "storedprocedures": ObjectTypeStoredProcedures, - "table": ObjectTypeTable, - "user": ObjectTypeUser, - "view": ObjectTypeView, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ObjectType(input) - return &out, nil -} - -type Severity string - -const ( - SeverityError Severity = "Error" - SeverityMessage Severity = "Message" - SeverityWarning Severity = "Warning" -) - -func PossibleValuesForSeverity() []string { - return []string{ - string(SeverityError), - string(SeverityMessage), - string(SeverityWarning), - } -} - -func (s *Severity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSeverity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSeverity(input string) (*Severity, error) { - vals := map[string]Severity{ - "error": SeverityError, - "message": SeverityMessage, - "warning": SeverityWarning, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Severity(input) - return &out, nil -} - -type SqlSourcePlatform string - -const ( - SqlSourcePlatformSqlOnPrem SqlSourcePlatform = "SqlOnPrem" -) - -func PossibleValuesForSqlSourcePlatform() []string { - return []string{ - string(SqlSourcePlatformSqlOnPrem), - } -} - -func (s *SqlSourcePlatform) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSqlSourcePlatform(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSqlSourcePlatform(input string) (*SqlSourcePlatform, error) { - vals := map[string]SqlSourcePlatform{ - "sqlonprem": SqlSourcePlatformSqlOnPrem, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SqlSourcePlatform(input) - return &out, nil -} - -type UpdateActionType string - -const ( - UpdateActionTypeAddedOnTarget UpdateActionType = "AddedOnTarget" - UpdateActionTypeChangedOnTarget UpdateActionType = "ChangedOnTarget" - UpdateActionTypeDeletedOnTarget UpdateActionType = "DeletedOnTarget" -) - -func PossibleValuesForUpdateActionType() []string { - return []string{ - string(UpdateActionTypeAddedOnTarget), - string(UpdateActionTypeChangedOnTarget), - string(UpdateActionTypeDeletedOnTarget), - } -} - -func (s *UpdateActionType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseUpdateActionType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseUpdateActionType(input string) (*UpdateActionType, error) { - vals := map[string]UpdateActionType{ - "addedontarget": UpdateActionTypeAddedOnTarget, - "changedontarget": UpdateActionTypeChangedOnTarget, - "deletedontarget": UpdateActionTypeDeletedOnTarget, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := UpdateActionType(input) - return &out, nil -} - -type ValidationStatus string - -const ( - ValidationStatusCompleted ValidationStatus = "Completed" - ValidationStatusCompletedWithIssues ValidationStatus = "CompletedWithIssues" - ValidationStatusDefault ValidationStatus = "Default" - ValidationStatusFailed ValidationStatus = "Failed" - ValidationStatusInProgress ValidationStatus = "InProgress" - ValidationStatusInitialized ValidationStatus = "Initialized" - ValidationStatusNotStarted ValidationStatus = "NotStarted" - ValidationStatusStopped ValidationStatus = "Stopped" -) - -func PossibleValuesForValidationStatus() []string { - return []string{ - string(ValidationStatusCompleted), - string(ValidationStatusCompletedWithIssues), - string(ValidationStatusDefault), - string(ValidationStatusFailed), - string(ValidationStatusInProgress), - string(ValidationStatusInitialized), - string(ValidationStatusNotStarted), - string(ValidationStatusStopped), - } -} - -func (s *ValidationStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseValidationStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseValidationStatus(input string) (*ValidationStatus, error) { - vals := map[string]ValidationStatus{ - "completed": ValidationStatusCompleted, - "completedwithissues": ValidationStatusCompletedWithIssues, - "default": ValidationStatusDefault, - "failed": ValidationStatusFailed, - "inprogress": ValidationStatusInProgress, - "initialized": ValidationStatusInitialized, - "notstarted": ValidationStatusNotStarted, - "stopped": ValidationStatusStopped, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ValidationStatus(input) - return &out, nil -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_connectioninfo.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_connectioninfo.go deleted file mode 100644 index 7f7a1016853..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_connectioninfo.go +++ /dev/null @@ -1,53 +0,0 @@ -package migratesqlserversqldbtasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "SqlConnectionInfo") { - var out SqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_databasesummaryresult.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_databasesummaryresult.go deleted file mode 100644 index 00068f9c55c..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_databasesummaryresult.go +++ /dev/null @@ -1,47 +0,0 @@ -package migratesqlserversqldbtasks - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DatabaseSummaryResult struct { - EndedOn *string `json:"endedOn,omitempty"` - ErrorPrefix *string `json:"errorPrefix,omitempty"` - ItemsCompletedCount *int64 `json:"itemsCompletedCount,omitempty"` - ItemsCount *int64 `json:"itemsCount,omitempty"` - Name *string `json:"name,omitempty"` - ResultPrefix *string `json:"resultPrefix,omitempty"` - SizeMB *float64 `json:"sizeMB,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - State *MigrationState `json:"state,omitempty"` - StatusMessage *string `json:"statusMessage,omitempty"` -} - -func (o *DatabaseSummaryResult) GetEndedOnAsTime() (*time.Time, error) { - if o.EndedOn == nil { - return nil, nil - } - return dates.ParseAsFormat(o.EndedOn, "2006-01-02T15:04:05Z07:00") -} - -func (o *DatabaseSummaryResult) SetEndedOnAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.EndedOn = &formatted -} - -func (o *DatabaseSummaryResult) GetStartedOnAsTime() (*time.Time, error) { - if o.StartedOn == nil { - return nil, nil - } - return dates.ParseAsFormat(o.StartedOn, "2006-01-02T15:04:05Z07:00") -} - -func (o *DatabaseSummaryResult) SetStartedOnAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.StartedOn = &formatted -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_dataintegrityvalidationresult.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_dataintegrityvalidationresult.go deleted file mode 100644 index 2cca74b7258..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_dataintegrityvalidationresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package migratesqlserversqldbtasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DataIntegrityValidationResult struct { - FailedObjects *map[string]string `json:"failedObjects,omitempty"` - ValidationErrors *ValidationError `json:"validationErrors,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_dataitemmigrationsummaryresult.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_dataitemmigrationsummaryresult.go deleted file mode 100644 index 5d0abd02d94..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_dataitemmigrationsummaryresult.go +++ /dev/null @@ -1,46 +0,0 @@ -package migratesqlserversqldbtasks - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DataItemMigrationSummaryResult struct { - EndedOn *string `json:"endedOn,omitempty"` - ErrorPrefix *string `json:"errorPrefix,omitempty"` - ItemsCompletedCount *int64 `json:"itemsCompletedCount,omitempty"` - ItemsCount *int64 `json:"itemsCount,omitempty"` - Name *string `json:"name,omitempty"` - ResultPrefix *string `json:"resultPrefix,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - State *MigrationState `json:"state,omitempty"` - StatusMessage *string `json:"statusMessage,omitempty"` -} - -func (o *DataItemMigrationSummaryResult) GetEndedOnAsTime() (*time.Time, error) { - if o.EndedOn == nil { - return nil, nil - } - return dates.ParseAsFormat(o.EndedOn, "2006-01-02T15:04:05Z07:00") -} - -func (o *DataItemMigrationSummaryResult) SetEndedOnAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.EndedOn = &formatted -} - -func (o *DataItemMigrationSummaryResult) GetStartedOnAsTime() (*time.Time, error) { - if o.StartedOn == nil { - return nil, nil - } - return dates.ParseAsFormat(o.StartedOn, "2006-01-02T15:04:05Z07:00") -} - -func (o *DataItemMigrationSummaryResult) SetStartedOnAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.StartedOn = &formatted -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_executionstatistics.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_executionstatistics.go deleted file mode 100644 index 8fc6b746007..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_executionstatistics.go +++ /dev/null @@ -1,13 +0,0 @@ -package migratesqlserversqldbtasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExecutionStatistics struct { - CpuTimeMs *float64 `json:"cpuTimeMs,omitempty"` - ElapsedTimeMs *float64 `json:"elapsedTimeMs,omitempty"` - ExecutionCount *int64 `json:"executionCount,omitempty"` - HasErrors *bool `json:"hasErrors,omitempty"` - SqlErrors *[]string `json:"sqlErrors,omitempty"` - WaitStats *map[string]WaitStatistics `json:"waitStats,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_migratesqlserversqldbtaskoutput.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_migratesqlserversqldbtaskoutput.go deleted file mode 100644 index 5c00237272d..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_migratesqlserversqldbtaskoutput.go +++ /dev/null @@ -1,93 +0,0 @@ -package migratesqlserversqldbtasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateSqlServerSqlDbTaskOutput interface { -} - -// RawMigrateSqlServerSqlDbTaskOutputImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawMigrateSqlServerSqlDbTaskOutputImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalMigrateSqlServerSqlDbTaskOutputImplementation(input []byte) (MigrateSqlServerSqlDbTaskOutput, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlDbTaskOutput into map[string]interface: %+v", err) - } - - value, ok := temp["resultType"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "DatabaseLevelOutput") { - var out MigrateSqlServerSqlDbTaskOutputDatabaseLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSqlServerSqlDbTaskOutputDatabaseLevel: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "MigrationDatabaseLevelValidationOutput") { - var out MigrateSqlServerSqlDbTaskOutputDatabaseLevelValidationResult - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSqlServerSqlDbTaskOutputDatabaseLevelValidationResult: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "ErrorOutput") { - var out MigrateSqlServerSqlDbTaskOutputError - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSqlServerSqlDbTaskOutputError: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "MigrationLevelOutput") { - var out MigrateSqlServerSqlDbTaskOutputMigrationLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSqlServerSqlDbTaskOutputMigrationLevel: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "TableLevelOutput") { - var out MigrateSqlServerSqlDbTaskOutputTableLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSqlServerSqlDbTaskOutputTableLevel: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "MigrationValidationOutput") { - var out MigrateSqlServerSqlDbTaskOutputValidationResult - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSqlServerSqlDbTaskOutputValidationResult: %+v", err) - } - return out, nil - } - - out := RawMigrateSqlServerSqlDbTaskOutputImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_migratesqlserversqldbtaskoutputdatabaselevel.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_migratesqlserversqldbtaskoutputdatabaselevel.go deleted file mode 100644 index 3b2e2f48802..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_migratesqlserversqldbtaskoutputdatabaselevel.go +++ /dev/null @@ -1,55 +0,0 @@ -package migratesqlserversqldbtasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateSqlServerSqlDbTaskOutput = MigrateSqlServerSqlDbTaskOutputDatabaseLevel{} - -type MigrateSqlServerSqlDbTaskOutputDatabaseLevel struct { - DatabaseName *string `json:"databaseName,omitempty"` - EndedOn *string `json:"endedOn,omitempty"` - ErrorCount *int64 `json:"errorCount,omitempty"` - ErrorPrefix *string `json:"errorPrefix,omitempty"` - ExceptionsAndWarnings *[]ReportableException `json:"exceptionsAndWarnings,omitempty"` - Message *string `json:"message,omitempty"` - NumberOfObjects *int64 `json:"numberOfObjects,omitempty"` - NumberOfObjectsCompleted *int64 `json:"numberOfObjectsCompleted,omitempty"` - ObjectSummary *map[string]DataItemMigrationSummaryResult `json:"objectSummary,omitempty"` - ResultPrefix *string `json:"resultPrefix,omitempty"` - Stage *DatabaseMigrationStage `json:"stage,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - State *MigrationState `json:"state,omitempty"` - StatusMessage *string `json:"statusMessage,omitempty"` - - // Fields inherited from MigrateSqlServerSqlDbTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateSqlServerSqlDbTaskOutputDatabaseLevel{} - -func (s MigrateSqlServerSqlDbTaskOutputDatabaseLevel) MarshalJSON() ([]byte, error) { - type wrapper MigrateSqlServerSqlDbTaskOutputDatabaseLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSqlServerSqlDbTaskOutputDatabaseLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlDbTaskOutputDatabaseLevel: %+v", err) - } - decoded["resultType"] = "DatabaseLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSqlServerSqlDbTaskOutputDatabaseLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_migratesqlserversqldbtaskoutputdatabaselevelvalidationresult.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_migratesqlserversqldbtaskoutputdatabaselevelvalidationresult.go deleted file mode 100644 index 3f21157da7c..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_migratesqlserversqldbtaskoutputdatabaselevelvalidationresult.go +++ /dev/null @@ -1,50 +0,0 @@ -package migratesqlserversqldbtasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateSqlServerSqlDbTaskOutput = MigrateSqlServerSqlDbTaskOutputDatabaseLevelValidationResult{} - -type MigrateSqlServerSqlDbTaskOutputDatabaseLevelValidationResult struct { - DataIntegrityValidationResult *DataIntegrityValidationResult `json:"dataIntegrityValidationResult,omitempty"` - EndedOn *string `json:"endedOn,omitempty"` - MigrationId *string `json:"migrationId,omitempty"` - QueryAnalysisValidationResult *QueryAnalysisValidationResult `json:"queryAnalysisValidationResult,omitempty"` - SchemaValidationResult *SchemaComparisonValidationResult `json:"schemaValidationResult,omitempty"` - SourceDatabaseName *string `json:"sourceDatabaseName,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - Status *ValidationStatus `json:"status,omitempty"` - TargetDatabaseName *string `json:"targetDatabaseName,omitempty"` - - // Fields inherited from MigrateSqlServerSqlDbTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateSqlServerSqlDbTaskOutputDatabaseLevelValidationResult{} - -func (s MigrateSqlServerSqlDbTaskOutputDatabaseLevelValidationResult) MarshalJSON() ([]byte, error) { - type wrapper MigrateSqlServerSqlDbTaskOutputDatabaseLevelValidationResult - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSqlServerSqlDbTaskOutputDatabaseLevelValidationResult: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlDbTaskOutputDatabaseLevelValidationResult: %+v", err) - } - decoded["resultType"] = "MigrationDatabaseLevelValidationOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSqlServerSqlDbTaskOutputDatabaseLevelValidationResult: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_migratesqlserversqldbtaskoutputerror.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_migratesqlserversqldbtaskoutputerror.go deleted file mode 100644 index 31ef4ff5a1b..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_migratesqlserversqldbtaskoutputerror.go +++ /dev/null @@ -1,42 +0,0 @@ -package migratesqlserversqldbtasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateSqlServerSqlDbTaskOutput = MigrateSqlServerSqlDbTaskOutputError{} - -type MigrateSqlServerSqlDbTaskOutputError struct { - Error *ReportableException `json:"error,omitempty"` - - // Fields inherited from MigrateSqlServerSqlDbTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateSqlServerSqlDbTaskOutputError{} - -func (s MigrateSqlServerSqlDbTaskOutputError) MarshalJSON() ([]byte, error) { - type wrapper MigrateSqlServerSqlDbTaskOutputError - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSqlServerSqlDbTaskOutputError: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlDbTaskOutputError: %+v", err) - } - decoded["resultType"] = "ErrorOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSqlServerSqlDbTaskOutputError: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_migratesqlserversqldbtaskoutputmigrationlevel.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_migratesqlserversqldbtaskoutputmigrationlevel.go deleted file mode 100644 index f91e3213351..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_migratesqlserversqldbtaskoutputmigrationlevel.go +++ /dev/null @@ -1,55 +0,0 @@ -package migratesqlserversqldbtasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateSqlServerSqlDbTaskOutput = MigrateSqlServerSqlDbTaskOutputMigrationLevel{} - -type MigrateSqlServerSqlDbTaskOutputMigrationLevel struct { - DatabaseSummary *map[string]DatabaseSummaryResult `json:"databaseSummary,omitempty"` - Databases *map[string]string `json:"databases,omitempty"` - DurationInSeconds *int64 `json:"durationInSeconds,omitempty"` - EndedOn *string `json:"endedOn,omitempty"` - ExceptionsAndWarnings *[]ReportableException `json:"exceptionsAndWarnings,omitempty"` - Message *string `json:"message,omitempty"` - MigrationReport *MigrationReportResult `json:"migrationReport,omitempty"` - SourceServerBrandVersion *string `json:"sourceServerBrandVersion,omitempty"` - SourceServerVersion *string `json:"sourceServerVersion,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - Status *MigrationStatus `json:"status,omitempty"` - StatusMessage *string `json:"statusMessage,omitempty"` - TargetServerBrandVersion *string `json:"targetServerBrandVersion,omitempty"` - TargetServerVersion *string `json:"targetServerVersion,omitempty"` - - // Fields inherited from MigrateSqlServerSqlDbTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateSqlServerSqlDbTaskOutputMigrationLevel{} - -func (s MigrateSqlServerSqlDbTaskOutputMigrationLevel) MarshalJSON() ([]byte, error) { - type wrapper MigrateSqlServerSqlDbTaskOutputMigrationLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSqlServerSqlDbTaskOutputMigrationLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlDbTaskOutputMigrationLevel: %+v", err) - } - decoded["resultType"] = "MigrationLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSqlServerSqlDbTaskOutputMigrationLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_migratesqlserversqldbtaskoutputtablelevel.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_migratesqlserversqldbtaskoutputtablelevel.go deleted file mode 100644 index 1fb13cf34da..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_migratesqlserversqldbtaskoutputtablelevel.go +++ /dev/null @@ -1,50 +0,0 @@ -package migratesqlserversqldbtasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateSqlServerSqlDbTaskOutput = MigrateSqlServerSqlDbTaskOutputTableLevel{} - -type MigrateSqlServerSqlDbTaskOutputTableLevel struct { - EndedOn *string `json:"endedOn,omitempty"` - ErrorPrefix *string `json:"errorPrefix,omitempty"` - ItemsCompletedCount *int64 `json:"itemsCompletedCount,omitempty"` - ItemsCount *int64 `json:"itemsCount,omitempty"` - ObjectName *string `json:"objectName,omitempty"` - ResultPrefix *string `json:"resultPrefix,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - State *MigrationState `json:"state,omitempty"` - StatusMessage *string `json:"statusMessage,omitempty"` - - // Fields inherited from MigrateSqlServerSqlDbTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateSqlServerSqlDbTaskOutputTableLevel{} - -func (s MigrateSqlServerSqlDbTaskOutputTableLevel) MarshalJSON() ([]byte, error) { - type wrapper MigrateSqlServerSqlDbTaskOutputTableLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSqlServerSqlDbTaskOutputTableLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlDbTaskOutputTableLevel: %+v", err) - } - decoded["resultType"] = "TableLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSqlServerSqlDbTaskOutputTableLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_migratesqlserversqldbtaskoutputvalidationresult.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_migratesqlserversqldbtaskoutputvalidationresult.go deleted file mode 100644 index ec949cc523c..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_migratesqlserversqldbtaskoutputvalidationresult.go +++ /dev/null @@ -1,44 +0,0 @@ -package migratesqlserversqldbtasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateSqlServerSqlDbTaskOutput = MigrateSqlServerSqlDbTaskOutputValidationResult{} - -type MigrateSqlServerSqlDbTaskOutputValidationResult struct { - MigrationId *string `json:"migrationId,omitempty"` - Status *ValidationStatus `json:"status,omitempty"` - SummaryResults *map[string]MigrationValidationDatabaseSummaryResult `json:"summaryResults,omitempty"` - - // Fields inherited from MigrateSqlServerSqlDbTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateSqlServerSqlDbTaskOutputValidationResult{} - -func (s MigrateSqlServerSqlDbTaskOutputValidationResult) MarshalJSON() ([]byte, error) { - type wrapper MigrateSqlServerSqlDbTaskOutputValidationResult - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSqlServerSqlDbTaskOutputValidationResult: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlDbTaskOutputValidationResult: %+v", err) - } - decoded["resultType"] = "MigrationValidationOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSqlServerSqlDbTaskOutputValidationResult: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_migrationreportresult.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_migrationreportresult.go deleted file mode 100644 index 806f4dbd673..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_migrationreportresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package migratesqlserversqldbtasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrationReportResult struct { - Id *string `json:"id,omitempty"` - ReportUrl *string `json:"reportUrl,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_migrationvalidationdatabasesummaryresult.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_migrationvalidationdatabasesummaryresult.go deleted file mode 100644 index 9c17f408545..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_migrationvalidationdatabasesummaryresult.go +++ /dev/null @@ -1,44 +0,0 @@ -package migratesqlserversqldbtasks - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrationValidationDatabaseSummaryResult struct { - EndedOn *string `json:"endedOn,omitempty"` - Id *string `json:"id,omitempty"` - MigrationId *string `json:"migrationId,omitempty"` - SourceDatabaseName *string `json:"sourceDatabaseName,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - Status *ValidationStatus `json:"status,omitempty"` - TargetDatabaseName *string `json:"targetDatabaseName,omitempty"` -} - -func (o *MigrationValidationDatabaseSummaryResult) GetEndedOnAsTime() (*time.Time, error) { - if o.EndedOn == nil { - return nil, nil - } - return dates.ParseAsFormat(o.EndedOn, "2006-01-02T15:04:05Z07:00") -} - -func (o *MigrationValidationDatabaseSummaryResult) SetEndedOnAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.EndedOn = &formatted -} - -func (o *MigrationValidationDatabaseSummaryResult) GetStartedOnAsTime() (*time.Time, error) { - if o.StartedOn == nil { - return nil, nil - } - return dates.ParseAsFormat(o.StartedOn, "2006-01-02T15:04:05Z07:00") -} - -func (o *MigrationValidationDatabaseSummaryResult) SetStartedOnAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.StartedOn = &formatted -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_queryanalysisvalidationresult.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_queryanalysisvalidationresult.go deleted file mode 100644 index 93079a964c6..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_queryanalysisvalidationresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package migratesqlserversqldbtasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type QueryAnalysisValidationResult struct { - QueryResults *QueryExecutionResult `json:"queryResults,omitempty"` - ValidationErrors *ValidationError `json:"validationErrors,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_queryexecutionresult.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_queryexecutionresult.go deleted file mode 100644 index 66c7ae8113c..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_queryexecutionresult.go +++ /dev/null @@ -1,11 +0,0 @@ -package migratesqlserversqldbtasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type QueryExecutionResult struct { - QueryText *string `json:"queryText,omitempty"` - SourceResult *ExecutionStatistics `json:"sourceResult,omitempty"` - StatementsInBatch *int64 `json:"statementsInBatch,omitempty"` - TargetResult *ExecutionStatistics `json:"targetResult,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_reportableexception.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_reportableexception.go deleted file mode 100644 index f1b7d25d106..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_reportableexception.go +++ /dev/null @@ -1,13 +0,0 @@ -package migratesqlserversqldbtasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ReportableException struct { - ActionableMessage *string `json:"actionableMessage,omitempty"` - FilePath *string `json:"filePath,omitempty"` - HResult *int64 `json:"hResult,omitempty"` - LineNumber *string `json:"lineNumber,omitempty"` - Message *string `json:"message,omitempty"` - StackTrace *string `json:"stackTrace,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_schemacomparisonvalidationresult.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_schemacomparisonvalidationresult.go deleted file mode 100644 index 929dd7cdeef..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_schemacomparisonvalidationresult.go +++ /dev/null @@ -1,11 +0,0 @@ -package migratesqlserversqldbtasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SchemaComparisonValidationResult struct { - SchemaDifferences *SchemaComparisonValidationResultType `json:"schemaDifferences,omitempty"` - SourceDatabaseObjectCount *map[string]int64 `json:"sourceDatabaseObjectCount,omitempty"` - TargetDatabaseObjectCount *map[string]int64 `json:"targetDatabaseObjectCount,omitempty"` - ValidationErrors *ValidationError `json:"validationErrors,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_schemacomparisonvalidationresulttype.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_schemacomparisonvalidationresulttype.go deleted file mode 100644 index 830a75e629f..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_schemacomparisonvalidationresulttype.go +++ /dev/null @@ -1,10 +0,0 @@ -package migratesqlserversqldbtasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SchemaComparisonValidationResultType struct { - ObjectName *string `json:"objectName,omitempty"` - ObjectType *ObjectType `json:"objectType,omitempty"` - UpdateAction *UpdateActionType `json:"updateAction,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_sqlconnectioninfo.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_sqlconnectioninfo.go deleted file mode 100644 index aba22ab0597..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_sqlconnectioninfo.go +++ /dev/null @@ -1,48 +0,0 @@ -package migratesqlserversqldbtasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = SqlConnectionInfo{} - -type SqlConnectionInfo struct { - AdditionalSettings *string `json:"additionalSettings,omitempty"` - Authentication *AuthenticationType `json:"authentication,omitempty"` - DataSource string `json:"dataSource"` - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Platform *SqlSourcePlatform `json:"platform,omitempty"` - TrustServerCertificate *bool `json:"trustServerCertificate,omitempty"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = SqlConnectionInfo{} - -func (s SqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper SqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SqlConnectionInfo: %+v", err) - } - decoded["type"] = "SqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_validationerror.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_validationerror.go deleted file mode 100644 index dd15c1ae0a3..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_validationerror.go +++ /dev/null @@ -1,9 +0,0 @@ -package migratesqlserversqldbtasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ValidationError struct { - Severity *Severity `json:"severity,omitempty"` - Text *string `json:"text,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_waitstatistics.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_waitstatistics.go deleted file mode 100644 index 214b674614a..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/model_waitstatistics.go +++ /dev/null @@ -1,10 +0,0 @@ -package migratesqlserversqldbtasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type WaitStatistics struct { - WaitCount *int64 `json:"waitCount,omitempty"` - WaitTimeMs *float64 `json:"waitTimeMs,omitempty"` - WaitType *string `json:"waitType,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/version.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/version.go deleted file mode 100644 index e750f85b23f..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqldbtasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package migratesqlserversqldbtasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2018-04-19" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/migratesqlserversqldbtasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmisynctasks/README.md b/resource-manager/datamigration/2018-04-19/migratesqlserversqlmisynctasks/README.md deleted file mode 100644 index 19d5735932d..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmisynctasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/migratesqlserversqlmisynctasks` Documentation - -The `migratesqlserversqlmisynctasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2018-04-19`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/migratesqlserversqlmisynctasks" -``` - - -### Client Initialization - -```go -client := migratesqlserversqlmisynctasks.NewMigrateSqlServerSqlMiSyncTasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmisynctasks/client.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqlmisynctasks/client.go deleted file mode 100644 index f5be18628bf..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmisynctasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package migratesqlserversqlmisynctasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateSqlServerSqlMiSyncTasksClient struct { - Client *resourcemanager.Client -} - -func NewMigrateSqlServerSqlMiSyncTasksClientWithBaseURI(sdkApi sdkEnv.Api) (*MigrateSqlServerSqlMiSyncTasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "migratesqlserversqlmisynctasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating MigrateSqlServerSqlMiSyncTasksClient: %+v", err) - } - - return &MigrateSqlServerSqlMiSyncTasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmisynctasks/constants.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqlmisynctasks/constants.go deleted file mode 100644 index 575dcb8a70c..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmisynctasks/constants.go +++ /dev/null @@ -1,331 +0,0 @@ -package migratesqlserversqlmisynctasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthenticationType string - -const ( - AuthenticationTypeActiveDirectoryIntegrated AuthenticationType = "ActiveDirectoryIntegrated" - AuthenticationTypeActiveDirectoryPassword AuthenticationType = "ActiveDirectoryPassword" - AuthenticationTypeNone AuthenticationType = "None" - AuthenticationTypeSqlAuthentication AuthenticationType = "SqlAuthentication" - AuthenticationTypeWindowsAuthentication AuthenticationType = "WindowsAuthentication" -) - -func PossibleValuesForAuthenticationType() []string { - return []string{ - string(AuthenticationTypeActiveDirectoryIntegrated), - string(AuthenticationTypeActiveDirectoryPassword), - string(AuthenticationTypeNone), - string(AuthenticationTypeSqlAuthentication), - string(AuthenticationTypeWindowsAuthentication), - } -} - -func (s *AuthenticationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAuthenticationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAuthenticationType(input string) (*AuthenticationType, error) { - vals := map[string]AuthenticationType{ - "activedirectoryintegrated": AuthenticationTypeActiveDirectoryIntegrated, - "activedirectorypassword": AuthenticationTypeActiveDirectoryPassword, - "none": AuthenticationTypeNone, - "sqlauthentication": AuthenticationTypeSqlAuthentication, - "windowsauthentication": AuthenticationTypeWindowsAuthentication, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AuthenticationType(input) - return &out, nil -} - -type BackupFileStatus string - -const ( - BackupFileStatusArrived BackupFileStatus = "Arrived" - BackupFileStatusCancelled BackupFileStatus = "Cancelled" - BackupFileStatusQueued BackupFileStatus = "Queued" - BackupFileStatusRestored BackupFileStatus = "Restored" - BackupFileStatusRestoring BackupFileStatus = "Restoring" - BackupFileStatusUploaded BackupFileStatus = "Uploaded" - BackupFileStatusUploading BackupFileStatus = "Uploading" -) - -func PossibleValuesForBackupFileStatus() []string { - return []string{ - string(BackupFileStatusArrived), - string(BackupFileStatusCancelled), - string(BackupFileStatusQueued), - string(BackupFileStatusRestored), - string(BackupFileStatusRestoring), - string(BackupFileStatusUploaded), - string(BackupFileStatusUploading), - } -} - -func (s *BackupFileStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseBackupFileStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseBackupFileStatus(input string) (*BackupFileStatus, error) { - vals := map[string]BackupFileStatus{ - "arrived": BackupFileStatusArrived, - "cancelled": BackupFileStatusCancelled, - "queued": BackupFileStatusQueued, - "restored": BackupFileStatusRestored, - "restoring": BackupFileStatusRestoring, - "uploaded": BackupFileStatusUploaded, - "uploading": BackupFileStatusUploading, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := BackupFileStatus(input) - return &out, nil -} - -type BackupType string - -const ( - BackupTypeDatabase BackupType = "Database" - BackupTypeDifferentialDatabase BackupType = "DifferentialDatabase" - BackupTypeDifferentialFile BackupType = "DifferentialFile" - BackupTypeDifferentialPartial BackupType = "DifferentialPartial" - BackupTypeFile BackupType = "File" - BackupTypePartial BackupType = "Partial" - BackupTypeTransactionLog BackupType = "TransactionLog" -) - -func PossibleValuesForBackupType() []string { - return []string{ - string(BackupTypeDatabase), - string(BackupTypeDifferentialDatabase), - string(BackupTypeDifferentialFile), - string(BackupTypeDifferentialPartial), - string(BackupTypeFile), - string(BackupTypePartial), - string(BackupTypeTransactionLog), - } -} - -func (s *BackupType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseBackupType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseBackupType(input string) (*BackupType, error) { - vals := map[string]BackupType{ - "database": BackupTypeDatabase, - "differentialdatabase": BackupTypeDifferentialDatabase, - "differentialfile": BackupTypeDifferentialFile, - "differentialpartial": BackupTypeDifferentialPartial, - "file": BackupTypeFile, - "partial": BackupTypePartial, - "transactionlog": BackupTypeTransactionLog, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := BackupType(input) - return &out, nil -} - -type DatabaseMigrationState string - -const ( - DatabaseMigrationStateCANCELLED DatabaseMigrationState = "CANCELLED" - DatabaseMigrationStateCOMPLETED DatabaseMigrationState = "COMPLETED" - DatabaseMigrationStateCUTOVERSTART DatabaseMigrationState = "CUTOVER_START" - DatabaseMigrationStateFAILED DatabaseMigrationState = "FAILED" - DatabaseMigrationStateFULLBACKUPUPLOADSTART DatabaseMigrationState = "FULL_BACKUP_UPLOAD_START" - DatabaseMigrationStateINITIAL DatabaseMigrationState = "INITIAL" - DatabaseMigrationStateLOGSHIPPINGSTART DatabaseMigrationState = "LOG_SHIPPING_START" - DatabaseMigrationStatePOSTCUTOVERCOMPLETE DatabaseMigrationState = "POST_CUTOVER_COMPLETE" - DatabaseMigrationStateUNDEFINED DatabaseMigrationState = "UNDEFINED" - DatabaseMigrationStateUPLOADLOGFILESSTART DatabaseMigrationState = "UPLOAD_LOG_FILES_START" -) - -func PossibleValuesForDatabaseMigrationState() []string { - return []string{ - string(DatabaseMigrationStateCANCELLED), - string(DatabaseMigrationStateCOMPLETED), - string(DatabaseMigrationStateCUTOVERSTART), - string(DatabaseMigrationStateFAILED), - string(DatabaseMigrationStateFULLBACKUPUPLOADSTART), - string(DatabaseMigrationStateINITIAL), - string(DatabaseMigrationStateLOGSHIPPINGSTART), - string(DatabaseMigrationStatePOSTCUTOVERCOMPLETE), - string(DatabaseMigrationStateUNDEFINED), - string(DatabaseMigrationStateUPLOADLOGFILESSTART), - } -} - -func (s *DatabaseMigrationState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDatabaseMigrationState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDatabaseMigrationState(input string) (*DatabaseMigrationState, error) { - vals := map[string]DatabaseMigrationState{ - "cancelled": DatabaseMigrationStateCANCELLED, - "completed": DatabaseMigrationStateCOMPLETED, - "cutover_start": DatabaseMigrationStateCUTOVERSTART, - "failed": DatabaseMigrationStateFAILED, - "full_backup_upload_start": DatabaseMigrationStateFULLBACKUPUPLOADSTART, - "initial": DatabaseMigrationStateINITIAL, - "log_shipping_start": DatabaseMigrationStateLOGSHIPPINGSTART, - "post_cutover_complete": DatabaseMigrationStatePOSTCUTOVERCOMPLETE, - "undefined": DatabaseMigrationStateUNDEFINED, - "upload_log_files_start": DatabaseMigrationStateUPLOADLOGFILESSTART, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DatabaseMigrationState(input) - return &out, nil -} - -type MigrationState string - -const ( - MigrationStateCompleted MigrationState = "Completed" - MigrationStateFailed MigrationState = "Failed" - MigrationStateInProgress MigrationState = "InProgress" - MigrationStateNone MigrationState = "None" - MigrationStateSkipped MigrationState = "Skipped" - MigrationStateStopped MigrationState = "Stopped" - MigrationStateWarning MigrationState = "Warning" -) - -func PossibleValuesForMigrationState() []string { - return []string{ - string(MigrationStateCompleted), - string(MigrationStateFailed), - string(MigrationStateInProgress), - string(MigrationStateNone), - string(MigrationStateSkipped), - string(MigrationStateStopped), - string(MigrationStateWarning), - } -} - -func (s *MigrationState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseMigrationState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseMigrationState(input string) (*MigrationState, error) { - vals := map[string]MigrationState{ - "completed": MigrationStateCompleted, - "failed": MigrationStateFailed, - "inprogress": MigrationStateInProgress, - "none": MigrationStateNone, - "skipped": MigrationStateSkipped, - "stopped": MigrationStateStopped, - "warning": MigrationStateWarning, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := MigrationState(input) - return &out, nil -} - -type SqlSourcePlatform string - -const ( - SqlSourcePlatformSqlOnPrem SqlSourcePlatform = "SqlOnPrem" -) - -func PossibleValuesForSqlSourcePlatform() []string { - return []string{ - string(SqlSourcePlatformSqlOnPrem), - } -} - -func (s *SqlSourcePlatform) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSqlSourcePlatform(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSqlSourcePlatform(input string) (*SqlSourcePlatform, error) { - vals := map[string]SqlSourcePlatform{ - "sqlonprem": SqlSourcePlatformSqlOnPrem, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SqlSourcePlatform(input) - return &out, nil -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmisynctasks/model_backupfileinfo.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqlmisynctasks/model_backupfileinfo.go deleted file mode 100644 index 98958095a47..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmisynctasks/model_backupfileinfo.go +++ /dev/null @@ -1,10 +0,0 @@ -package migratesqlserversqlmisynctasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackupFileInfo struct { - FamilySequenceNumber *int64 `json:"familySequenceNumber,omitempty"` - FileLocation *string `json:"fileLocation,omitempty"` - Status *BackupFileStatus `json:"status,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmisynctasks/model_backupsetinfo.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqlmisynctasks/model_backupsetinfo.go deleted file mode 100644 index 2552343852a..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmisynctasks/model_backupsetinfo.go +++ /dev/null @@ -1,59 +0,0 @@ -package migratesqlserversqlmisynctasks - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackupSetInfo struct { - BackupFinishedDate *string `json:"backupFinishedDate,omitempty"` - BackupSetId *string `json:"backupSetId,omitempty"` - BackupStartDate *string `json:"backupStartDate,omitempty"` - BackupType *BackupType `json:"backupType,omitempty"` - DatabaseName *string `json:"databaseName,omitempty"` - FirstLsn *string `json:"firstLsn,omitempty"` - IsBackupRestored *bool `json:"isBackupRestored,omitempty"` - LastLsn *string `json:"lastLsn,omitempty"` - LastModifiedTime *string `json:"lastModifiedTime,omitempty"` - ListOfBackupFiles *[]BackupFileInfo `json:"listOfBackupFiles,omitempty"` -} - -func (o *BackupSetInfo) GetBackupFinishedDateAsTime() (*time.Time, error) { - if o.BackupFinishedDate == nil { - return nil, nil - } - return dates.ParseAsFormat(o.BackupFinishedDate, "2006-01-02T15:04:05Z07:00") -} - -func (o *BackupSetInfo) SetBackupFinishedDateAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.BackupFinishedDate = &formatted -} - -func (o *BackupSetInfo) GetBackupStartDateAsTime() (*time.Time, error) { - if o.BackupStartDate == nil { - return nil, nil - } - return dates.ParseAsFormat(o.BackupStartDate, "2006-01-02T15:04:05Z07:00") -} - -func (o *BackupSetInfo) SetBackupStartDateAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.BackupStartDate = &formatted -} - -func (o *BackupSetInfo) GetLastModifiedTimeAsTime() (*time.Time, error) { - if o.LastModifiedTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastModifiedTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *BackupSetInfo) SetLastModifiedTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastModifiedTime = &formatted -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmisynctasks/model_connectioninfo.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqlmisynctasks/model_connectioninfo.go deleted file mode 100644 index 7141ae5518c..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmisynctasks/model_connectioninfo.go +++ /dev/null @@ -1,61 +0,0 @@ -package migratesqlserversqlmisynctasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "MiSqlConnectionInfo") { - var out MiSqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MiSqlConnectionInfo: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "SqlConnectionInfo") { - var out SqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmisynctasks/model_migratesqlserversqlmisynctaskoutput.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqlmisynctasks/model_migratesqlserversqlmisynctaskoutput.go deleted file mode 100644 index 6576265e24c..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmisynctasks/model_migratesqlserversqlmisynctaskoutput.go +++ /dev/null @@ -1,69 +0,0 @@ -package migratesqlserversqlmisynctasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateSqlServerSqlMISyncTaskOutput interface { -} - -// RawMigrateSqlServerSqlMISyncTaskOutputImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawMigrateSqlServerSqlMISyncTaskOutputImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalMigrateSqlServerSqlMISyncTaskOutputImplementation(input []byte) (MigrateSqlServerSqlMISyncTaskOutput, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlMISyncTaskOutput into map[string]interface: %+v", err) - } - - value, ok := temp["resultType"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "DatabaseLevelOutput") { - var out MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "ErrorOutput") { - var out MigrateSqlServerSqlMISyncTaskOutputError - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSqlServerSqlMISyncTaskOutputError: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "MigrationLevelOutput") { - var out MigrateSqlServerSqlMISyncTaskOutputMigrationLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSqlServerSqlMISyncTaskOutputMigrationLevel: %+v", err) - } - return out, nil - } - - out := RawMigrateSqlServerSqlMISyncTaskOutputImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmisynctasks/model_migratesqlserversqlmisynctaskoutputdatabaselevel.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqlmisynctasks/model_migratesqlserversqlmisynctaskoutputdatabaselevel.go deleted file mode 100644 index 5375bb07685..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmisynctasks/model_migratesqlserversqlmisynctaskoutputdatabaselevel.go +++ /dev/null @@ -1,52 +0,0 @@ -package migratesqlserversqlmisynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateSqlServerSqlMISyncTaskOutput = MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel{} - -type MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel struct { - ActiveBackupSets *[]BackupSetInfo `json:"activeBackupSets,omitempty"` - ContainerName *string `json:"containerName,omitempty"` - EndedOn *string `json:"endedOn,omitempty"` - ErrorPrefix *string `json:"errorPrefix,omitempty"` - ExceptionsAndWarnings *[]ReportableException `json:"exceptionsAndWarnings,omitempty"` - FullBackupSetInfo *BackupSetInfo `json:"fullBackupSetInfo,omitempty"` - IsFullBackupRestored *bool `json:"isFullBackupRestored,omitempty"` - LastRestoredBackupSetInfo *BackupSetInfo `json:"lastRestoredBackupSetInfo,omitempty"` - MigrationState *DatabaseMigrationState `json:"migrationState,omitempty"` - SourceDatabaseName *string `json:"sourceDatabaseName,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - - // Fields inherited from MigrateSqlServerSqlMISyncTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel{} - -func (s MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel) MarshalJSON() ([]byte, error) { - type wrapper MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel: %+v", err) - } - decoded["resultType"] = "DatabaseLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmisynctasks/model_migratesqlserversqlmisynctaskoutputerror.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqlmisynctasks/model_migratesqlserversqlmisynctaskoutputerror.go deleted file mode 100644 index 7befdcf9fa7..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmisynctasks/model_migratesqlserversqlmisynctaskoutputerror.go +++ /dev/null @@ -1,42 +0,0 @@ -package migratesqlserversqlmisynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateSqlServerSqlMISyncTaskOutput = MigrateSqlServerSqlMISyncTaskOutputError{} - -type MigrateSqlServerSqlMISyncTaskOutputError struct { - Error *ReportableException `json:"error,omitempty"` - - // Fields inherited from MigrateSqlServerSqlMISyncTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateSqlServerSqlMISyncTaskOutputError{} - -func (s MigrateSqlServerSqlMISyncTaskOutputError) MarshalJSON() ([]byte, error) { - type wrapper MigrateSqlServerSqlMISyncTaskOutputError - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSqlServerSqlMISyncTaskOutputError: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlMISyncTaskOutputError: %+v", err) - } - decoded["resultType"] = "ErrorOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSqlServerSqlMISyncTaskOutputError: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmisynctasks/model_migratesqlserversqlmisynctaskoutputmigrationlevel.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqlmisynctasks/model_migratesqlserversqlmisynctaskoutputmigrationlevel.go deleted file mode 100644 index 967f5d72aac..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmisynctasks/model_migratesqlserversqlmisynctaskoutputmigrationlevel.go +++ /dev/null @@ -1,52 +0,0 @@ -package migratesqlserversqlmisynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateSqlServerSqlMISyncTaskOutput = MigrateSqlServerSqlMISyncTaskOutputMigrationLevel{} - -type MigrateSqlServerSqlMISyncTaskOutputMigrationLevel struct { - DatabaseCount *int64 `json:"databaseCount,omitempty"` - DatabaseErrorCount *int64 `json:"databaseErrorCount,omitempty"` - EndedOn *string `json:"endedOn,omitempty"` - SourceServerBrandVersion *string `json:"sourceServerBrandVersion,omitempty"` - SourceServerName *string `json:"sourceServerName,omitempty"` - SourceServerVersion *string `json:"sourceServerVersion,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - State *MigrationState `json:"state,omitempty"` - TargetServerBrandVersion *string `json:"targetServerBrandVersion,omitempty"` - TargetServerName *string `json:"targetServerName,omitempty"` - TargetServerVersion *string `json:"targetServerVersion,omitempty"` - - // Fields inherited from MigrateSqlServerSqlMISyncTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateSqlServerSqlMISyncTaskOutputMigrationLevel{} - -func (s MigrateSqlServerSqlMISyncTaskOutputMigrationLevel) MarshalJSON() ([]byte, error) { - type wrapper MigrateSqlServerSqlMISyncTaskOutputMigrationLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSqlServerSqlMISyncTaskOutputMigrationLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlMISyncTaskOutputMigrationLevel: %+v", err) - } - decoded["resultType"] = "MigrationLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSqlServerSqlMISyncTaskOutputMigrationLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmisynctasks/model_misqlconnectioninfo.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqlmisynctasks/model_misqlconnectioninfo.go deleted file mode 100644 index ce69fdfc6d3..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmisynctasks/model_misqlconnectioninfo.go +++ /dev/null @@ -1,43 +0,0 @@ -package migratesqlserversqlmisynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = MiSqlConnectionInfo{} - -type MiSqlConnectionInfo struct { - ManagedInstanceResourceId string `json:"managedInstanceResourceId"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = MiSqlConnectionInfo{} - -func (s MiSqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper MiSqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MiSqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MiSqlConnectionInfo: %+v", err) - } - decoded["type"] = "MiSqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MiSqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmisynctasks/model_reportableexception.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqlmisynctasks/model_reportableexception.go deleted file mode 100644 index 6bb7af355d2..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmisynctasks/model_reportableexception.go +++ /dev/null @@ -1,13 +0,0 @@ -package migratesqlserversqlmisynctasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ReportableException struct { - ActionableMessage *string `json:"actionableMessage,omitempty"` - FilePath *string `json:"filePath,omitempty"` - HResult *int64 `json:"hResult,omitempty"` - LineNumber *string `json:"lineNumber,omitempty"` - Message *string `json:"message,omitempty"` - StackTrace *string `json:"stackTrace,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmisynctasks/model_sqlconnectioninfo.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqlmisynctasks/model_sqlconnectioninfo.go deleted file mode 100644 index 9aba59dccc8..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmisynctasks/model_sqlconnectioninfo.go +++ /dev/null @@ -1,48 +0,0 @@ -package migratesqlserversqlmisynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = SqlConnectionInfo{} - -type SqlConnectionInfo struct { - AdditionalSettings *string `json:"additionalSettings,omitempty"` - Authentication *AuthenticationType `json:"authentication,omitempty"` - DataSource string `json:"dataSource"` - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Platform *SqlSourcePlatform `json:"platform,omitempty"` - TrustServerCertificate *bool `json:"trustServerCertificate,omitempty"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = SqlConnectionInfo{} - -func (s SqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper SqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SqlConnectionInfo: %+v", err) - } - decoded["type"] = "SqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmisynctasks/version.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqlmisynctasks/version.go deleted file mode 100644 index 38b760f2967..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmisynctasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package migratesqlserversqlmisynctasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2018-04-19" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/migratesqlserversqlmisynctasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmitasks/README.md b/resource-manager/datamigration/2018-04-19/migratesqlserversqlmitasks/README.md deleted file mode 100644 index 1a811189a88..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmitasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/migratesqlserversqlmitasks` Documentation - -The `migratesqlserversqlmitasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2018-04-19`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/migratesqlserversqlmitasks" -``` - - -### Client Initialization - -```go -client := migratesqlserversqlmitasks.NewMigrateSqlServerSqlMITasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmitasks/client.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqlmitasks/client.go deleted file mode 100644 index af18cc02001..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmitasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package migratesqlserversqlmitasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateSqlServerSqlMITasksClient struct { - Client *resourcemanager.Client -} - -func NewMigrateSqlServerSqlMITasksClientWithBaseURI(sdkApi sdkEnv.Api) (*MigrateSqlServerSqlMITasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "migratesqlserversqlmitasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating MigrateSqlServerSqlMITasksClient: %+v", err) - } - - return &MigrateSqlServerSqlMITasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmitasks/constants.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqlmitasks/constants.go deleted file mode 100644 index 4eec65a272b..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmitasks/constants.go +++ /dev/null @@ -1,334 +0,0 @@ -package migratesqlserversqlmitasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthenticationType string - -const ( - AuthenticationTypeActiveDirectoryIntegrated AuthenticationType = "ActiveDirectoryIntegrated" - AuthenticationTypeActiveDirectoryPassword AuthenticationType = "ActiveDirectoryPassword" - AuthenticationTypeNone AuthenticationType = "None" - AuthenticationTypeSqlAuthentication AuthenticationType = "SqlAuthentication" - AuthenticationTypeWindowsAuthentication AuthenticationType = "WindowsAuthentication" -) - -func PossibleValuesForAuthenticationType() []string { - return []string{ - string(AuthenticationTypeActiveDirectoryIntegrated), - string(AuthenticationTypeActiveDirectoryPassword), - string(AuthenticationTypeNone), - string(AuthenticationTypeSqlAuthentication), - string(AuthenticationTypeWindowsAuthentication), - } -} - -func (s *AuthenticationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAuthenticationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAuthenticationType(input string) (*AuthenticationType, error) { - vals := map[string]AuthenticationType{ - "activedirectoryintegrated": AuthenticationTypeActiveDirectoryIntegrated, - "activedirectorypassword": AuthenticationTypeActiveDirectoryPassword, - "none": AuthenticationTypeNone, - "sqlauthentication": AuthenticationTypeSqlAuthentication, - "windowsauthentication": AuthenticationTypeWindowsAuthentication, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AuthenticationType(input) - return &out, nil -} - -type DatabaseMigrationStage string - -const ( - DatabaseMigrationStageBackup DatabaseMigrationStage = "Backup" - DatabaseMigrationStageCompleted DatabaseMigrationStage = "Completed" - DatabaseMigrationStageFileCopy DatabaseMigrationStage = "FileCopy" - DatabaseMigrationStageInitialize DatabaseMigrationStage = "Initialize" - DatabaseMigrationStageNone DatabaseMigrationStage = "None" - DatabaseMigrationStageRestore DatabaseMigrationStage = "Restore" -) - -func PossibleValuesForDatabaseMigrationStage() []string { - return []string{ - string(DatabaseMigrationStageBackup), - string(DatabaseMigrationStageCompleted), - string(DatabaseMigrationStageFileCopy), - string(DatabaseMigrationStageInitialize), - string(DatabaseMigrationStageNone), - string(DatabaseMigrationStageRestore), - } -} - -func (s *DatabaseMigrationStage) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDatabaseMigrationStage(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDatabaseMigrationStage(input string) (*DatabaseMigrationStage, error) { - vals := map[string]DatabaseMigrationStage{ - "backup": DatabaseMigrationStageBackup, - "completed": DatabaseMigrationStageCompleted, - "filecopy": DatabaseMigrationStageFileCopy, - "initialize": DatabaseMigrationStageInitialize, - "none": DatabaseMigrationStageNone, - "restore": DatabaseMigrationStageRestore, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DatabaseMigrationStage(input) - return &out, nil -} - -type LoginMigrationStage string - -const ( - LoginMigrationStageAssignRoleMembership LoginMigrationStage = "AssignRoleMembership" - LoginMigrationStageAssignRoleOwnership LoginMigrationStage = "AssignRoleOwnership" - LoginMigrationStageCompleted LoginMigrationStage = "Completed" - LoginMigrationStageEstablishObjectPermissions LoginMigrationStage = "EstablishObjectPermissions" - LoginMigrationStageEstablishServerPermissions LoginMigrationStage = "EstablishServerPermissions" - LoginMigrationStageEstablishUserMapping LoginMigrationStage = "EstablishUserMapping" - LoginMigrationStageInitialize LoginMigrationStage = "Initialize" - LoginMigrationStageLoginMigration LoginMigrationStage = "LoginMigration" - LoginMigrationStageNone LoginMigrationStage = "None" -) - -func PossibleValuesForLoginMigrationStage() []string { - return []string{ - string(LoginMigrationStageAssignRoleMembership), - string(LoginMigrationStageAssignRoleOwnership), - string(LoginMigrationStageCompleted), - string(LoginMigrationStageEstablishObjectPermissions), - string(LoginMigrationStageEstablishServerPermissions), - string(LoginMigrationStageEstablishUserMapping), - string(LoginMigrationStageInitialize), - string(LoginMigrationStageLoginMigration), - string(LoginMigrationStageNone), - } -} - -func (s *LoginMigrationStage) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoginMigrationStage(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoginMigrationStage(input string) (*LoginMigrationStage, error) { - vals := map[string]LoginMigrationStage{ - "assignrolemembership": LoginMigrationStageAssignRoleMembership, - "assignroleownership": LoginMigrationStageAssignRoleOwnership, - "completed": LoginMigrationStageCompleted, - "establishobjectpermissions": LoginMigrationStageEstablishObjectPermissions, - "establishserverpermissions": LoginMigrationStageEstablishServerPermissions, - "establishusermapping": LoginMigrationStageEstablishUserMapping, - "initialize": LoginMigrationStageInitialize, - "loginmigration": LoginMigrationStageLoginMigration, - "none": LoginMigrationStageNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoginMigrationStage(input) - return &out, nil -} - -type MigrationState string - -const ( - MigrationStateCompleted MigrationState = "Completed" - MigrationStateFailed MigrationState = "Failed" - MigrationStateInProgress MigrationState = "InProgress" - MigrationStateNone MigrationState = "None" - MigrationStateSkipped MigrationState = "Skipped" - MigrationStateStopped MigrationState = "Stopped" - MigrationStateWarning MigrationState = "Warning" -) - -func PossibleValuesForMigrationState() []string { - return []string{ - string(MigrationStateCompleted), - string(MigrationStateFailed), - string(MigrationStateInProgress), - string(MigrationStateNone), - string(MigrationStateSkipped), - string(MigrationStateStopped), - string(MigrationStateWarning), - } -} - -func (s *MigrationState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseMigrationState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseMigrationState(input string) (*MigrationState, error) { - vals := map[string]MigrationState{ - "completed": MigrationStateCompleted, - "failed": MigrationStateFailed, - "inprogress": MigrationStateInProgress, - "none": MigrationStateNone, - "skipped": MigrationStateSkipped, - "stopped": MigrationStateStopped, - "warning": MigrationStateWarning, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := MigrationState(input) - return &out, nil -} - -type MigrationStatus string - -const ( - MigrationStatusCompleted MigrationStatus = "Completed" - MigrationStatusCompletedWithWarnings MigrationStatus = "CompletedWithWarnings" - MigrationStatusConfigured MigrationStatus = "Configured" - MigrationStatusConnecting MigrationStatus = "Connecting" - MigrationStatusDefault MigrationStatus = "Default" - MigrationStatusError MigrationStatus = "Error" - MigrationStatusRunning MigrationStatus = "Running" - MigrationStatusSelectLogins MigrationStatus = "SelectLogins" - MigrationStatusSourceAndTargetSelected MigrationStatus = "SourceAndTargetSelected" - MigrationStatusStopped MigrationStatus = "Stopped" -) - -func PossibleValuesForMigrationStatus() []string { - return []string{ - string(MigrationStatusCompleted), - string(MigrationStatusCompletedWithWarnings), - string(MigrationStatusConfigured), - string(MigrationStatusConnecting), - string(MigrationStatusDefault), - string(MigrationStatusError), - string(MigrationStatusRunning), - string(MigrationStatusSelectLogins), - string(MigrationStatusSourceAndTargetSelected), - string(MigrationStatusStopped), - } -} - -func (s *MigrationStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseMigrationStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseMigrationStatus(input string) (*MigrationStatus, error) { - vals := map[string]MigrationStatus{ - "completed": MigrationStatusCompleted, - "completedwithwarnings": MigrationStatusCompletedWithWarnings, - "configured": MigrationStatusConfigured, - "connecting": MigrationStatusConnecting, - "default": MigrationStatusDefault, - "error": MigrationStatusError, - "running": MigrationStatusRunning, - "selectlogins": MigrationStatusSelectLogins, - "sourceandtargetselected": MigrationStatusSourceAndTargetSelected, - "stopped": MigrationStatusStopped, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := MigrationStatus(input) - return &out, nil -} - -type SqlSourcePlatform string - -const ( - SqlSourcePlatformSqlOnPrem SqlSourcePlatform = "SqlOnPrem" -) - -func PossibleValuesForSqlSourcePlatform() []string { - return []string{ - string(SqlSourcePlatformSqlOnPrem), - } -} - -func (s *SqlSourcePlatform) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSqlSourcePlatform(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSqlSourcePlatform(input string) (*SqlSourcePlatform, error) { - vals := map[string]SqlSourcePlatform{ - "sqlonprem": SqlSourcePlatformSqlOnPrem, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SqlSourcePlatform(input) - return &out, nil -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmitasks/model_connectioninfo.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqlmitasks/model_connectioninfo.go deleted file mode 100644 index d693572bb12..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmitasks/model_connectioninfo.go +++ /dev/null @@ -1,53 +0,0 @@ -package migratesqlserversqlmitasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "SqlConnectionInfo") { - var out SqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmitasks/model_migratesqlserversqlmitaskoutput.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqlmitasks/model_migratesqlserversqlmitaskoutput.go deleted file mode 100644 index 0adc1adfe40..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmitasks/model_migratesqlserversqlmitaskoutput.go +++ /dev/null @@ -1,85 +0,0 @@ -package migratesqlserversqlmitasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateSqlServerSqlMITaskOutput interface { -} - -// RawMigrateSqlServerSqlMITaskOutputImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawMigrateSqlServerSqlMITaskOutputImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalMigrateSqlServerSqlMITaskOutputImplementation(input []byte) (MigrateSqlServerSqlMITaskOutput, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlMITaskOutput into map[string]interface: %+v", err) - } - - value, ok := temp["resultType"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "AgentJobLevelOutput") { - var out MigrateSqlServerSqlMITaskOutputAgentJobLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSqlServerSqlMITaskOutputAgentJobLevel: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "DatabaseLevelOutput") { - var out MigrateSqlServerSqlMITaskOutputDatabaseLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSqlServerSqlMITaskOutputDatabaseLevel: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "ErrorOutput") { - var out MigrateSqlServerSqlMITaskOutputError - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSqlServerSqlMITaskOutputError: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "LoginLevelOutput") { - var out MigrateSqlServerSqlMITaskOutputLoginLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSqlServerSqlMITaskOutputLoginLevel: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "MigrationLevelOutput") { - var out MigrateSqlServerSqlMITaskOutputMigrationLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSqlServerSqlMITaskOutputMigrationLevel: %+v", err) - } - return out, nil - } - - out := RawMigrateSqlServerSqlMITaskOutputImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmitasks/model_migratesqlserversqlmitaskoutputagentjoblevel.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqlmitasks/model_migratesqlserversqlmitaskoutputagentjoblevel.go deleted file mode 100644 index 0a5d615e2c9..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmitasks/model_migratesqlserversqlmitaskoutputagentjoblevel.go +++ /dev/null @@ -1,48 +0,0 @@ -package migratesqlserversqlmitasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateSqlServerSqlMITaskOutput = MigrateSqlServerSqlMITaskOutputAgentJobLevel{} - -type MigrateSqlServerSqlMITaskOutputAgentJobLevel struct { - EndedOn *string `json:"endedOn,omitempty"` - ExceptionsAndWarnings *[]ReportableException `json:"exceptionsAndWarnings,omitempty"` - IsEnabled *bool `json:"isEnabled,omitempty"` - Message *string `json:"message,omitempty"` - Name *string `json:"name,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - State *MigrationState `json:"state,omitempty"` - - // Fields inherited from MigrateSqlServerSqlMITaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateSqlServerSqlMITaskOutputAgentJobLevel{} - -func (s MigrateSqlServerSqlMITaskOutputAgentJobLevel) MarshalJSON() ([]byte, error) { - type wrapper MigrateSqlServerSqlMITaskOutputAgentJobLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSqlServerSqlMITaskOutputAgentJobLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlMITaskOutputAgentJobLevel: %+v", err) - } - decoded["resultType"] = "AgentJobLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSqlServerSqlMITaskOutputAgentJobLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmitasks/model_migratesqlserversqlmitaskoutputdatabaselevel.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqlmitasks/model_migratesqlserversqlmitaskoutputdatabaselevel.go deleted file mode 100644 index 7bcc7dc4dfd..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmitasks/model_migratesqlserversqlmitaskoutputdatabaselevel.go +++ /dev/null @@ -1,49 +0,0 @@ -package migratesqlserversqlmitasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateSqlServerSqlMITaskOutput = MigrateSqlServerSqlMITaskOutputDatabaseLevel{} - -type MigrateSqlServerSqlMITaskOutputDatabaseLevel struct { - DatabaseName *string `json:"databaseName,omitempty"` - EndedOn *string `json:"endedOn,omitempty"` - ExceptionsAndWarnings *[]ReportableException `json:"exceptionsAndWarnings,omitempty"` - Message *string `json:"message,omitempty"` - SizeMB *float64 `json:"sizeMB,omitempty"` - Stage *DatabaseMigrationStage `json:"stage,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - State *MigrationState `json:"state,omitempty"` - - // Fields inherited from MigrateSqlServerSqlMITaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateSqlServerSqlMITaskOutputDatabaseLevel{} - -func (s MigrateSqlServerSqlMITaskOutputDatabaseLevel) MarshalJSON() ([]byte, error) { - type wrapper MigrateSqlServerSqlMITaskOutputDatabaseLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSqlServerSqlMITaskOutputDatabaseLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlMITaskOutputDatabaseLevel: %+v", err) - } - decoded["resultType"] = "DatabaseLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSqlServerSqlMITaskOutputDatabaseLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmitasks/model_migratesqlserversqlmitaskoutputerror.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqlmitasks/model_migratesqlserversqlmitaskoutputerror.go deleted file mode 100644 index 30d34369fb1..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmitasks/model_migratesqlserversqlmitaskoutputerror.go +++ /dev/null @@ -1,42 +0,0 @@ -package migratesqlserversqlmitasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateSqlServerSqlMITaskOutput = MigrateSqlServerSqlMITaskOutputError{} - -type MigrateSqlServerSqlMITaskOutputError struct { - Error *ReportableException `json:"error,omitempty"` - - // Fields inherited from MigrateSqlServerSqlMITaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateSqlServerSqlMITaskOutputError{} - -func (s MigrateSqlServerSqlMITaskOutputError) MarshalJSON() ([]byte, error) { - type wrapper MigrateSqlServerSqlMITaskOutputError - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSqlServerSqlMITaskOutputError: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlMITaskOutputError: %+v", err) - } - decoded["resultType"] = "ErrorOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSqlServerSqlMITaskOutputError: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmitasks/model_migratesqlserversqlmitaskoutputloginlevel.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqlmitasks/model_migratesqlserversqlmitaskoutputloginlevel.go deleted file mode 100644 index bfcba90ac11..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmitasks/model_migratesqlserversqlmitaskoutputloginlevel.go +++ /dev/null @@ -1,48 +0,0 @@ -package migratesqlserversqlmitasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateSqlServerSqlMITaskOutput = MigrateSqlServerSqlMITaskOutputLoginLevel{} - -type MigrateSqlServerSqlMITaskOutputLoginLevel struct { - EndedOn *string `json:"endedOn,omitempty"` - ExceptionsAndWarnings *[]ReportableException `json:"exceptionsAndWarnings,omitempty"` - LoginName *string `json:"loginName,omitempty"` - Message *string `json:"message,omitempty"` - Stage *LoginMigrationStage `json:"stage,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - State *MigrationState `json:"state,omitempty"` - - // Fields inherited from MigrateSqlServerSqlMITaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateSqlServerSqlMITaskOutputLoginLevel{} - -func (s MigrateSqlServerSqlMITaskOutputLoginLevel) MarshalJSON() ([]byte, error) { - type wrapper MigrateSqlServerSqlMITaskOutputLoginLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSqlServerSqlMITaskOutputLoginLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlMITaskOutputLoginLevel: %+v", err) - } - decoded["resultType"] = "LoginLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSqlServerSqlMITaskOutputLoginLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmitasks/model_migratesqlserversqlmitaskoutputmigrationlevel.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqlmitasks/model_migratesqlserversqlmitaskoutputmigrationlevel.go deleted file mode 100644 index bc37235d71d..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmitasks/model_migratesqlserversqlmitaskoutputmigrationlevel.go +++ /dev/null @@ -1,56 +0,0 @@ -package migratesqlserversqlmitasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateSqlServerSqlMITaskOutput = MigrateSqlServerSqlMITaskOutputMigrationLevel{} - -type MigrateSqlServerSqlMITaskOutputMigrationLevel struct { - AgentJobs *map[string]string `json:"agentJobs,omitempty"` - Databases *map[string]string `json:"databases,omitempty"` - EndedOn *string `json:"endedOn,omitempty"` - ExceptionsAndWarnings *[]ReportableException `json:"exceptionsAndWarnings,omitempty"` - Logins *map[string]string `json:"logins,omitempty"` - Message *string `json:"message,omitempty"` - OrphanedUsersInfo *[]OrphanedUserInfo `json:"orphanedUsersInfo,omitempty"` - ServerRoleResults *map[string]StartMigrationScenarioServerRoleResult `json:"serverRoleResults,omitempty"` - SourceServerBrandVersion *string `json:"sourceServerBrandVersion,omitempty"` - SourceServerVersion *string `json:"sourceServerVersion,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - State *MigrationState `json:"state,omitempty"` - Status *MigrationStatus `json:"status,omitempty"` - TargetServerBrandVersion *string `json:"targetServerBrandVersion,omitempty"` - TargetServerVersion *string `json:"targetServerVersion,omitempty"` - - // Fields inherited from MigrateSqlServerSqlMITaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateSqlServerSqlMITaskOutputMigrationLevel{} - -func (s MigrateSqlServerSqlMITaskOutputMigrationLevel) MarshalJSON() ([]byte, error) { - type wrapper MigrateSqlServerSqlMITaskOutputMigrationLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSqlServerSqlMITaskOutputMigrationLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlMITaskOutputMigrationLevel: %+v", err) - } - decoded["resultType"] = "MigrationLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSqlServerSqlMITaskOutputMigrationLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmitasks/model_orphaneduserinfo.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqlmitasks/model_orphaneduserinfo.go deleted file mode 100644 index bee0c71717d..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmitasks/model_orphaneduserinfo.go +++ /dev/null @@ -1,9 +0,0 @@ -package migratesqlserversqlmitasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type OrphanedUserInfo struct { - DatabaseName *string `json:"databaseName,omitempty"` - Name *string `json:"name,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmitasks/model_reportableexception.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqlmitasks/model_reportableexception.go deleted file mode 100644 index 4f506e7f5e8..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmitasks/model_reportableexception.go +++ /dev/null @@ -1,13 +0,0 @@ -package migratesqlserversqlmitasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ReportableException struct { - ActionableMessage *string `json:"actionableMessage,omitempty"` - FilePath *string `json:"filePath,omitempty"` - HResult *int64 `json:"hResult,omitempty"` - LineNumber *string `json:"lineNumber,omitempty"` - Message *string `json:"message,omitempty"` - StackTrace *string `json:"stackTrace,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmitasks/model_sqlconnectioninfo.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqlmitasks/model_sqlconnectioninfo.go deleted file mode 100644 index fb3394c9a92..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmitasks/model_sqlconnectioninfo.go +++ /dev/null @@ -1,48 +0,0 @@ -package migratesqlserversqlmitasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = SqlConnectionInfo{} - -type SqlConnectionInfo struct { - AdditionalSettings *string `json:"additionalSettings,omitempty"` - Authentication *AuthenticationType `json:"authentication,omitempty"` - DataSource string `json:"dataSource"` - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Platform *SqlSourcePlatform `json:"platform,omitempty"` - TrustServerCertificate *bool `json:"trustServerCertificate,omitempty"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = SqlConnectionInfo{} - -func (s SqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper SqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SqlConnectionInfo: %+v", err) - } - decoded["type"] = "SqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmitasks/model_startmigrationscenarioserverroleresult.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqlmitasks/model_startmigrationscenarioserverroleresult.go deleted file mode 100644 index 8b5b2427863..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmitasks/model_startmigrationscenarioserverroleresult.go +++ /dev/null @@ -1,10 +0,0 @@ -package migratesqlserversqlmitasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StartMigrationScenarioServerRoleResult struct { - ExceptionsAndWarnings *[]ReportableException `json:"exceptionsAndWarnings,omitempty"` - Name *string `json:"name,omitempty"` - State *MigrationState `json:"state,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmitasks/version.go b/resource-manager/datamigration/2018-04-19/migratesqlserversqlmitasks/version.go deleted file mode 100644 index 4760b842e41..00000000000 --- a/resource-manager/datamigration/2018-04-19/migratesqlserversqlmitasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package migratesqlserversqlmitasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2018-04-19" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/migratesqlserversqlmitasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/README.md b/resource-manager/datamigration/2018-04-19/tasks/README.md deleted file mode 100644 index 8394dde7a4f..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/tasks` Documentation - -The `tasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2018-04-19`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/tasks" -``` - - -### Client Initialization - -```go -client := tasks.NewTasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2018-04-19/tasks/client.go b/resource-manager/datamigration/2018-04-19/tasks/client.go deleted file mode 100644 index 8e365f36b1a..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package tasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TasksClient struct { - Client *resourcemanager.Client -} - -func NewTasksClientWithBaseURI(sdkApi sdkEnv.Api) (*TasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating TasksClient: %+v", err) - } - - return &TasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/constants.go b/resource-manager/datamigration/2018-04-19/tasks/constants.go deleted file mode 100644 index e51dcfa3e1e..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/constants.go +++ /dev/null @@ -1,351 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthenticationType string - -const ( - AuthenticationTypeActiveDirectoryIntegrated AuthenticationType = "ActiveDirectoryIntegrated" - AuthenticationTypeActiveDirectoryPassword AuthenticationType = "ActiveDirectoryPassword" - AuthenticationTypeNone AuthenticationType = "None" - AuthenticationTypeSqlAuthentication AuthenticationType = "SqlAuthentication" - AuthenticationTypeWindowsAuthentication AuthenticationType = "WindowsAuthentication" -) - -func PossibleValuesForAuthenticationType() []string { - return []string{ - string(AuthenticationTypeActiveDirectoryIntegrated), - string(AuthenticationTypeActiveDirectoryPassword), - string(AuthenticationTypeNone), - string(AuthenticationTypeSqlAuthentication), - string(AuthenticationTypeWindowsAuthentication), - } -} - -func (s *AuthenticationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAuthenticationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAuthenticationType(input string) (*AuthenticationType, error) { - vals := map[string]AuthenticationType{ - "activedirectoryintegrated": AuthenticationTypeActiveDirectoryIntegrated, - "activedirectorypassword": AuthenticationTypeActiveDirectoryPassword, - "none": AuthenticationTypeNone, - "sqlauthentication": AuthenticationTypeSqlAuthentication, - "windowsauthentication": AuthenticationTypeWindowsAuthentication, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AuthenticationType(input) - return &out, nil -} - -type BackupMode string - -const ( - BackupModeCreateBackup BackupMode = "CreateBackup" - BackupModeExistingBackup BackupMode = "ExistingBackup" -) - -func PossibleValuesForBackupMode() []string { - return []string{ - string(BackupModeCreateBackup), - string(BackupModeExistingBackup), - } -} - -func (s *BackupMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseBackupMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseBackupMode(input string) (*BackupMode, error) { - vals := map[string]BackupMode{ - "createbackup": BackupModeCreateBackup, - "existingbackup": BackupModeExistingBackup, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := BackupMode(input) - return &out, nil -} - -type BackupType string - -const ( - BackupTypeDatabase BackupType = "Database" - BackupTypeDifferentialDatabase BackupType = "DifferentialDatabase" - BackupTypeDifferentialFile BackupType = "DifferentialFile" - BackupTypeDifferentialPartial BackupType = "DifferentialPartial" - BackupTypeFile BackupType = "File" - BackupTypePartial BackupType = "Partial" - BackupTypeTransactionLog BackupType = "TransactionLog" -) - -func PossibleValuesForBackupType() []string { - return []string{ - string(BackupTypeDatabase), - string(BackupTypeDifferentialDatabase), - string(BackupTypeDifferentialFile), - string(BackupTypeDifferentialPartial), - string(BackupTypeFile), - string(BackupTypePartial), - string(BackupTypeTransactionLog), - } -} - -func (s *BackupType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseBackupType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseBackupType(input string) (*BackupType, error) { - vals := map[string]BackupType{ - "database": BackupTypeDatabase, - "differentialdatabase": BackupTypeDifferentialDatabase, - "differentialfile": BackupTypeDifferentialFile, - "differentialpartial": BackupTypeDifferentialPartial, - "file": BackupTypeFile, - "partial": BackupTypePartial, - "transactionlog": BackupTypeTransactionLog, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := BackupType(input) - return &out, nil -} - -type CommandState string - -const ( - CommandStateAccepted CommandState = "Accepted" - CommandStateFailed CommandState = "Failed" - CommandStateRunning CommandState = "Running" - CommandStateSucceeded CommandState = "Succeeded" - CommandStateUnknown CommandState = "Unknown" -) - -func PossibleValuesForCommandState() []string { - return []string{ - string(CommandStateAccepted), - string(CommandStateFailed), - string(CommandStateRunning), - string(CommandStateSucceeded), - string(CommandStateUnknown), - } -} - -func (s *CommandState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseCommandState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseCommandState(input string) (*CommandState, error) { - vals := map[string]CommandState{ - "accepted": CommandStateAccepted, - "failed": CommandStateFailed, - "running": CommandStateRunning, - "succeeded": CommandStateSucceeded, - "unknown": CommandStateUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := CommandState(input) - return &out, nil -} - -type ServerLevelPermissionsGroup string - -const ( - ServerLevelPermissionsGroupDefault ServerLevelPermissionsGroup = "Default" - ServerLevelPermissionsGroupMigrationFromMySQLToAzureDBForMySQL ServerLevelPermissionsGroup = "MigrationFromMySQLToAzureDBForMySQL" - ServerLevelPermissionsGroupMigrationFromSqlServerToAzureDB ServerLevelPermissionsGroup = "MigrationFromSqlServerToAzureDB" - ServerLevelPermissionsGroupMigrationFromSqlServerToAzureMI ServerLevelPermissionsGroup = "MigrationFromSqlServerToAzureMI" -) - -func PossibleValuesForServerLevelPermissionsGroup() []string { - return []string{ - string(ServerLevelPermissionsGroupDefault), - string(ServerLevelPermissionsGroupMigrationFromMySQLToAzureDBForMySQL), - string(ServerLevelPermissionsGroupMigrationFromSqlServerToAzureDB), - string(ServerLevelPermissionsGroupMigrationFromSqlServerToAzureMI), - } -} - -func (s *ServerLevelPermissionsGroup) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseServerLevelPermissionsGroup(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseServerLevelPermissionsGroup(input string) (*ServerLevelPermissionsGroup, error) { - vals := map[string]ServerLevelPermissionsGroup{ - "default": ServerLevelPermissionsGroupDefault, - "migrationfrommysqltoazuredbformysql": ServerLevelPermissionsGroupMigrationFromMySQLToAzureDBForMySQL, - "migrationfromsqlservertoazuredb": ServerLevelPermissionsGroupMigrationFromSqlServerToAzureDB, - "migrationfromsqlservertoazuremi": ServerLevelPermissionsGroupMigrationFromSqlServerToAzureMI, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ServerLevelPermissionsGroup(input) - return &out, nil -} - -type SqlSourcePlatform string - -const ( - SqlSourcePlatformSqlOnPrem SqlSourcePlatform = "SqlOnPrem" -) - -func PossibleValuesForSqlSourcePlatform() []string { - return []string{ - string(SqlSourcePlatformSqlOnPrem), - } -} - -func (s *SqlSourcePlatform) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSqlSourcePlatform(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSqlSourcePlatform(input string) (*SqlSourcePlatform, error) { - vals := map[string]SqlSourcePlatform{ - "sqlonprem": SqlSourcePlatformSqlOnPrem, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SqlSourcePlatform(input) - return &out, nil -} - -type TaskState string - -const ( - TaskStateCanceled TaskState = "Canceled" - TaskStateFailed TaskState = "Failed" - TaskStateFailedInputValidation TaskState = "FailedInputValidation" - TaskStateFaulted TaskState = "Faulted" - TaskStateQueued TaskState = "Queued" - TaskStateRunning TaskState = "Running" - TaskStateSucceeded TaskState = "Succeeded" - TaskStateUnknown TaskState = "Unknown" -) - -func PossibleValuesForTaskState() []string { - return []string{ - string(TaskStateCanceled), - string(TaskStateFailed), - string(TaskStateFailedInputValidation), - string(TaskStateFaulted), - string(TaskStateQueued), - string(TaskStateRunning), - string(TaskStateSucceeded), - string(TaskStateUnknown), - } -} - -func (s *TaskState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTaskState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTaskState(input string) (*TaskState, error) { - vals := map[string]TaskState{ - "canceled": TaskStateCanceled, - "failed": TaskStateFailed, - "failedinputvalidation": TaskStateFailedInputValidation, - "faulted": TaskStateFaulted, - "queued": TaskStateQueued, - "running": TaskStateRunning, - "succeeded": TaskStateSucceeded, - "unknown": TaskStateUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TaskState(input) - return &out, nil -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_azureactivedirectoryapp.go b/resource-manager/datamigration/2018-04-19/tasks/model_azureactivedirectoryapp.go deleted file mode 100644 index f196d14046f..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_azureactivedirectoryapp.go +++ /dev/null @@ -1,10 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureActiveDirectoryApp struct { - AppKey string `json:"appKey"` - ApplicationId string `json:"applicationId"` - TenantId string `json:"tenantId"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_blobshare.go b/resource-manager/datamigration/2018-04-19/tasks/model_blobshare.go deleted file mode 100644 index a75509b425c..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_blobshare.go +++ /dev/null @@ -1,8 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BlobShare struct { - SasUri string `json:"sasUri"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_commandproperties.go b/resource-manager/datamigration/2018-04-19/tasks/model_commandproperties.go deleted file mode 100644 index f50210ba776..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_commandproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CommandProperties struct { - CommandType string `json:"commandType"` - Errors *[]ODataError `json:"errors,omitempty"` - State *CommandState `json:"state,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_connectioninfo.go b/resource-manager/datamigration/2018-04-19/tasks/model_connectioninfo.go deleted file mode 100644 index 282f31e6f77..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_connectioninfo.go +++ /dev/null @@ -1,77 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "MiSqlConnectionInfo") { - var out MiSqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MiSqlConnectionInfo: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "MySqlConnectionInfo") { - var out MySqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MySqlConnectionInfo: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "PostgreSqlConnectionInfo") { - var out PostgreSqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into PostgreSqlConnectionInfo: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "SqlConnectionInfo") { - var out SqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_connecttosourcepostgresqlsynctaskinput.go b/resource-manager/datamigration/2018-04-19/tasks/model_connecttosourcepostgresqlsynctaskinput.go deleted file mode 100644 index 99a4f14a71c..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_connecttosourcepostgresqlsynctaskinput.go +++ /dev/null @@ -1,8 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToSourcePostgreSqlSyncTaskInput struct { - SourceConnectionInfo PostgreSqlConnectionInfo `json:"sourceConnectionInfo"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_connecttosourcepostgresqlsynctaskoutput.go b/resource-manager/datamigration/2018-04-19/tasks/model_connecttosourcepostgresqlsynctaskoutput.go deleted file mode 100644 index 63361b475e4..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_connecttosourcepostgresqlsynctaskoutput.go +++ /dev/null @@ -1,12 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToSourcePostgreSqlSyncTaskOutput struct { - Databases *[]string `json:"databases,omitempty"` - Id *string `json:"id,omitempty"` - SourceServerBrandVersion *string `json:"sourceServerBrandVersion,omitempty"` - SourceServerVersion *string `json:"sourceServerVersion,omitempty"` - ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_connecttosourcepostgresqlsynctaskproperties.go b/resource-manager/datamigration/2018-04-19/tasks/model_connecttosourcepostgresqlsynctaskproperties.go deleted file mode 100644 index 3cda7a14162..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_connecttosourcepostgresqlsynctaskproperties.go +++ /dev/null @@ -1,45 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = ConnectToSourcePostgreSqlSyncTaskProperties{} - -type ConnectToSourcePostgreSqlSyncTaskProperties struct { - Input *ConnectToSourcePostgreSqlSyncTaskInput `json:"input,omitempty"` - Output *[]ConnectToSourcePostgreSqlSyncTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = ConnectToSourcePostgreSqlSyncTaskProperties{} - -func (s ConnectToSourcePostgreSqlSyncTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper ConnectToSourcePostgreSqlSyncTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ConnectToSourcePostgreSqlSyncTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectToSourcePostgreSqlSyncTaskProperties: %+v", err) - } - decoded["taskType"] = "ConnectToSource.PostgreSql.Sync" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ConnectToSourcePostgreSqlSyncTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_connecttosourcesqlserversynctaskproperties.go b/resource-manager/datamigration/2018-04-19/tasks/model_connecttosourcesqlserversynctaskproperties.go deleted file mode 100644 index 94c05525ed4..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_connecttosourcesqlserversynctaskproperties.go +++ /dev/null @@ -1,45 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = ConnectToSourceSqlServerSyncTaskProperties{} - -type ConnectToSourceSqlServerSyncTaskProperties struct { - Input *ConnectToSourceSqlServerTaskInput `json:"input,omitempty"` - Output *[]ConnectToSourceSqlServerTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = ConnectToSourceSqlServerSyncTaskProperties{} - -func (s ConnectToSourceSqlServerSyncTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper ConnectToSourceSqlServerSyncTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ConnectToSourceSqlServerSyncTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectToSourceSqlServerSyncTaskProperties: %+v", err) - } - decoded["taskType"] = "ConnectToSource.SqlServer.Sync" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ConnectToSourceSqlServerSyncTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_connecttosourcesqlservertaskinput.go b/resource-manager/datamigration/2018-04-19/tasks/model_connecttosourcesqlservertaskinput.go deleted file mode 100644 index a15ba446c9b..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_connecttosourcesqlservertaskinput.go +++ /dev/null @@ -1,11 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToSourceSqlServerTaskInput struct { - CheckPermissionsGroup *ServerLevelPermissionsGroup `json:"checkPermissionsGroup,omitempty"` - CollectAgentJobs *bool `json:"collectAgentJobs,omitempty"` - CollectLogins *bool `json:"collectLogins,omitempty"` - SourceConnectionInfo SqlConnectionInfo `json:"sourceConnectionInfo"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_connecttosourcesqlservertaskoutput.go b/resource-manager/datamigration/2018-04-19/tasks/model_connecttosourcesqlservertaskoutput.go deleted file mode 100644 index 666fe288389..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_connecttosourcesqlservertaskoutput.go +++ /dev/null @@ -1,9 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToSourceSqlServerTaskOutput struct { - Id *string `json:"id,omitempty"` - ResultType string `json:"resultType"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_connecttosourcesqlservertaskproperties.go b/resource-manager/datamigration/2018-04-19/tasks/model_connecttosourcesqlservertaskproperties.go deleted file mode 100644 index d2dd6813462..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_connecttosourcesqlservertaskproperties.go +++ /dev/null @@ -1,45 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = ConnectToSourceSqlServerTaskProperties{} - -type ConnectToSourceSqlServerTaskProperties struct { - Input *ConnectToSourceSqlServerTaskInput `json:"input,omitempty"` - Output *[]ConnectToSourceSqlServerTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = ConnectToSourceSqlServerTaskProperties{} - -func (s ConnectToSourceSqlServerTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper ConnectToSourceSqlServerTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ConnectToSourceSqlServerTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectToSourceSqlServerTaskProperties: %+v", err) - } - decoded["taskType"] = "ConnectToSource.SqlServer" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ConnectToSourceSqlServerTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetazuredbformysqltaskinput.go b/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetazuredbformysqltaskinput.go deleted file mode 100644 index 41ba8364a93..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetazuredbformysqltaskinput.go +++ /dev/null @@ -1,9 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToTargetAzureDbForMySqlTaskInput struct { - SourceConnectionInfo MySqlConnectionInfo `json:"sourceConnectionInfo"` - TargetConnectionInfo MySqlConnectionInfo `json:"targetConnectionInfo"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetazuredbformysqltaskoutput.go b/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetazuredbformysqltaskoutput.go deleted file mode 100644 index 0c5557b5791..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetazuredbformysqltaskoutput.go +++ /dev/null @@ -1,12 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToTargetAzureDbForMySqlTaskOutput struct { - Databases *[]string `json:"databases,omitempty"` - Id *string `json:"id,omitempty"` - ServerVersion *string `json:"serverVersion,omitempty"` - TargetServerBrandVersion *string `json:"targetServerBrandVersion,omitempty"` - ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetazuredbformysqltaskproperties.go b/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetazuredbformysqltaskproperties.go deleted file mode 100644 index 40fb3574bee..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetazuredbformysqltaskproperties.go +++ /dev/null @@ -1,45 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = ConnectToTargetAzureDbForMySqlTaskProperties{} - -type ConnectToTargetAzureDbForMySqlTaskProperties struct { - Input *ConnectToTargetAzureDbForMySqlTaskInput `json:"input,omitempty"` - Output *[]ConnectToTargetAzureDbForMySqlTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = ConnectToTargetAzureDbForMySqlTaskProperties{} - -func (s ConnectToTargetAzureDbForMySqlTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper ConnectToTargetAzureDbForMySqlTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ConnectToTargetAzureDbForMySqlTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectToTargetAzureDbForMySqlTaskProperties: %+v", err) - } - decoded["taskType"] = "ConnectToTarget.AzureDbForMySql" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ConnectToTargetAzureDbForMySqlTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetazuredbforpostgresqlsynctaskinput.go b/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetazuredbforpostgresqlsynctaskinput.go deleted file mode 100644 index 6cd64736d9c..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetazuredbforpostgresqlsynctaskinput.go +++ /dev/null @@ -1,9 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToTargetAzureDbForPostgreSqlSyncTaskInput struct { - SourceConnectionInfo PostgreSqlConnectionInfo `json:"sourceConnectionInfo"` - TargetConnectionInfo PostgreSqlConnectionInfo `json:"targetConnectionInfo"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetazuredbforpostgresqlsynctaskoutput.go b/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetazuredbforpostgresqlsynctaskoutput.go deleted file mode 100644 index 8c8f92cd67f..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetazuredbforpostgresqlsynctaskoutput.go +++ /dev/null @@ -1,12 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToTargetAzureDbForPostgreSqlSyncTaskOutput struct { - Databases *[]string `json:"databases,omitempty"` - Id *string `json:"id,omitempty"` - TargetServerBrandVersion *string `json:"targetServerBrandVersion,omitempty"` - TargetServerVersion *string `json:"targetServerVersion,omitempty"` - ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetazuredbforpostgresqlsynctaskproperties.go b/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetazuredbforpostgresqlsynctaskproperties.go deleted file mode 100644 index 5a2aedfcc42..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetazuredbforpostgresqlsynctaskproperties.go +++ /dev/null @@ -1,45 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties{} - -type ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties struct { - Input *ConnectToTargetAzureDbForPostgreSqlSyncTaskInput `json:"input,omitempty"` - Output *[]ConnectToTargetAzureDbForPostgreSqlSyncTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties{} - -func (s ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties: %+v", err) - } - decoded["taskType"] = "ConnectToTarget.AzureDbForPostgreSql.Sync" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetsqldbtaskinput.go b/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetsqldbtaskinput.go deleted file mode 100644 index 0fc73fcd682..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetsqldbtaskinput.go +++ /dev/null @@ -1,8 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToTargetSqlDbTaskInput struct { - TargetConnectionInfo SqlConnectionInfo `json:"targetConnectionInfo"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetsqldbtaskoutput.go b/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetsqldbtaskoutput.go deleted file mode 100644 index 7e46e237e5d..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetsqldbtaskoutput.go +++ /dev/null @@ -1,11 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToTargetSqlDbTaskOutput struct { - Databases *map[string]string `json:"databases,omitempty"` - Id *string `json:"id,omitempty"` - TargetServerBrandVersion *string `json:"targetServerBrandVersion,omitempty"` - TargetServerVersion *string `json:"targetServerVersion,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetsqldbtaskproperties.go b/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetsqldbtaskproperties.go deleted file mode 100644 index 48b6afe6e64..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetsqldbtaskproperties.go +++ /dev/null @@ -1,45 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = ConnectToTargetSqlDbTaskProperties{} - -type ConnectToTargetSqlDbTaskProperties struct { - Input *ConnectToTargetSqlDbTaskInput `json:"input,omitempty"` - Output *[]ConnectToTargetSqlDbTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = ConnectToTargetSqlDbTaskProperties{} - -func (s ConnectToTargetSqlDbTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper ConnectToTargetSqlDbTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ConnectToTargetSqlDbTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectToTargetSqlDbTaskProperties: %+v", err) - } - decoded["taskType"] = "ConnectToTarget.SqlDb" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ConnectToTargetSqlDbTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetsqlmisynctaskinput.go b/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetsqlmisynctaskinput.go deleted file mode 100644 index 86bb118337b..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetsqlmisynctaskinput.go +++ /dev/null @@ -1,9 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToTargetSqlMISyncTaskInput struct { - AzureApp AzureActiveDirectoryApp `json:"azureApp"` - TargetConnectionInfo MiSqlConnectionInfo `json:"targetConnectionInfo"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetsqlmisynctaskoutput.go b/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetsqlmisynctaskoutput.go deleted file mode 100644 index e665b3d42c1..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetsqlmisynctaskoutput.go +++ /dev/null @@ -1,10 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToTargetSqlMISyncTaskOutput struct { - TargetServerBrandVersion *string `json:"targetServerBrandVersion,omitempty"` - TargetServerVersion *string `json:"targetServerVersion,omitempty"` - ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetsqlmisynctaskproperties.go b/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetsqlmisynctaskproperties.go deleted file mode 100644 index 9ed77cdff2d..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetsqlmisynctaskproperties.go +++ /dev/null @@ -1,45 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = ConnectToTargetSqlMISyncTaskProperties{} - -type ConnectToTargetSqlMISyncTaskProperties struct { - Input *ConnectToTargetSqlMISyncTaskInput `json:"input,omitempty"` - Output *[]ConnectToTargetSqlMISyncTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = ConnectToTargetSqlMISyncTaskProperties{} - -func (s ConnectToTargetSqlMISyncTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper ConnectToTargetSqlMISyncTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ConnectToTargetSqlMISyncTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectToTargetSqlMISyncTaskProperties: %+v", err) - } - decoded["taskType"] = "ConnectToTarget.AzureSqlDbMI.Sync.LRS" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ConnectToTargetSqlMISyncTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetsqlmitaskinput.go b/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetsqlmitaskinput.go deleted file mode 100644 index 1c3cc81e0b5..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetsqlmitaskinput.go +++ /dev/null @@ -1,8 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToTargetSqlMITaskInput struct { - TargetConnectionInfo SqlConnectionInfo `json:"targetConnectionInfo"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetsqlmitaskoutput.go b/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetsqlmitaskoutput.go deleted file mode 100644 index 894c9289fd6..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetsqlmitaskoutput.go +++ /dev/null @@ -1,13 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToTargetSqlMITaskOutput struct { - AgentJobs *[]string `json:"agentJobs,omitempty"` - Id *string `json:"id,omitempty"` - Logins *[]string `json:"logins,omitempty"` - TargetServerBrandVersion *string `json:"targetServerBrandVersion,omitempty"` - TargetServerVersion *string `json:"targetServerVersion,omitempty"` - ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetsqlmitaskproperties.go b/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetsqlmitaskproperties.go deleted file mode 100644 index 01f1e87d86b..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetsqlmitaskproperties.go +++ /dev/null @@ -1,45 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = ConnectToTargetSqlMITaskProperties{} - -type ConnectToTargetSqlMITaskProperties struct { - Input *ConnectToTargetSqlMITaskInput `json:"input,omitempty"` - Output *[]ConnectToTargetSqlMITaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = ConnectToTargetSqlMITaskProperties{} - -func (s ConnectToTargetSqlMITaskProperties) MarshalJSON() ([]byte, error) { - type wrapper ConnectToTargetSqlMITaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ConnectToTargetSqlMITaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectToTargetSqlMITaskProperties: %+v", err) - } - decoded["taskType"] = "ConnectToTarget.AzureSqlDbMI" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ConnectToTargetSqlMITaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetsqlsqldbsynctaskinput.go b/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetsqlsqldbsynctaskinput.go deleted file mode 100644 index 637c8086f37..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetsqlsqldbsynctaskinput.go +++ /dev/null @@ -1,9 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToTargetSqlSqlDbSyncTaskInput struct { - SourceConnectionInfo SqlConnectionInfo `json:"sourceConnectionInfo"` - TargetConnectionInfo SqlConnectionInfo `json:"targetConnectionInfo"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetsqlsqldbsynctaskproperties.go b/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetsqlsqldbsynctaskproperties.go deleted file mode 100644 index aba5860596a..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_connecttotargetsqlsqldbsynctaskproperties.go +++ /dev/null @@ -1,45 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = ConnectToTargetSqlSqlDbSyncTaskProperties{} - -type ConnectToTargetSqlSqlDbSyncTaskProperties struct { - Input *ConnectToTargetSqlSqlDbSyncTaskInput `json:"input,omitempty"` - Output *[]ConnectToTargetSqlDbTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = ConnectToTargetSqlSqlDbSyncTaskProperties{} - -func (s ConnectToTargetSqlSqlDbSyncTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper ConnectToTargetSqlSqlDbSyncTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ConnectToTargetSqlSqlDbSyncTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectToTargetSqlSqlDbSyncTaskProperties: %+v", err) - } - decoded["taskType"] = "ConnectToTarget.SqlDb.Sync" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ConnectToTargetSqlSqlDbSyncTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_databasebackupinfo.go b/resource-manager/datamigration/2018-04-19/tasks/model_databasebackupinfo.go deleted file mode 100644 index 37a9f645c21..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_databasebackupinfo.go +++ /dev/null @@ -1,33 +0,0 @@ -package tasks - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DatabaseBackupInfo struct { - BackupFiles *[]string `json:"backupFiles,omitempty"` - BackupFinishDate *string `json:"backupFinishDate,omitempty"` - BackupType *BackupType `json:"backupType,omitempty"` - DatabaseName *string `json:"databaseName,omitempty"` - FamilyCount *int64 `json:"familyCount,omitempty"` - IsCompressed *bool `json:"isCompressed,omitempty"` - IsDamaged *bool `json:"isDamaged,omitempty"` - Position *int64 `json:"position,omitempty"` -} - -func (o *DatabaseBackupInfo) GetBackupFinishDateAsTime() (*time.Time, error) { - if o.BackupFinishDate == nil { - return nil, nil - } - return dates.ParseAsFormat(o.BackupFinishDate, "2006-01-02T15:04:05Z07:00") -} - -func (o *DatabaseBackupInfo) SetBackupFinishDateAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.BackupFinishDate = &formatted -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_databasetable.go b/resource-manager/datamigration/2018-04-19/tasks/model_databasetable.go deleted file mode 100644 index 376f8dd076f..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_databasetable.go +++ /dev/null @@ -1,9 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DatabaseTable struct { - HasRows *bool `json:"hasRows,omitempty"` - Name *string `json:"name,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_fileshare.go b/resource-manager/datamigration/2018-04-19/tasks/model_fileshare.go deleted file mode 100644 index da67496582e..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_fileshare.go +++ /dev/null @@ -1,10 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FileShare struct { - Password *string `json:"password,omitempty"` - Path string `json:"path"` - UserName *string `json:"userName,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_gettdecertificatessqltaskinput.go b/resource-manager/datamigration/2018-04-19/tasks/model_gettdecertificatessqltaskinput.go deleted file mode 100644 index 7c175551282..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_gettdecertificatessqltaskinput.go +++ /dev/null @@ -1,10 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetTdeCertificatesSqlTaskInput struct { - BackupFileShare FileShare `json:"backupFileShare"` - ConnectionInfo SqlConnectionInfo `json:"connectionInfo"` - SelectedCertificates []SelectedCertificateInput `json:"selectedCertificates"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_gettdecertificatessqltaskoutput.go b/resource-manager/datamigration/2018-04-19/tasks/model_gettdecertificatessqltaskoutput.go deleted file mode 100644 index fa7b19f788a..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_gettdecertificatessqltaskoutput.go +++ /dev/null @@ -1,9 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetTdeCertificatesSqlTaskOutput struct { - Base64EncodedCertificates *map[string][]string `json:"base64EncodedCertificates,omitempty"` - ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_gettdecertificatessqltaskproperties.go b/resource-manager/datamigration/2018-04-19/tasks/model_gettdecertificatessqltaskproperties.go deleted file mode 100644 index 815da782f65..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_gettdecertificatessqltaskproperties.go +++ /dev/null @@ -1,45 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = GetTdeCertificatesSqlTaskProperties{} - -type GetTdeCertificatesSqlTaskProperties struct { - Input *GetTdeCertificatesSqlTaskInput `json:"input,omitempty"` - Output *[]GetTdeCertificatesSqlTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = GetTdeCertificatesSqlTaskProperties{} - -func (s GetTdeCertificatesSqlTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper GetTdeCertificatesSqlTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling GetTdeCertificatesSqlTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling GetTdeCertificatesSqlTaskProperties: %+v", err) - } - decoded["taskType"] = "GetTDECertificates.Sql" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling GetTdeCertificatesSqlTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_getusertablessqlsynctaskinput.go b/resource-manager/datamigration/2018-04-19/tasks/model_getusertablessqlsynctaskinput.go deleted file mode 100644 index 69d3b718205..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_getusertablessqlsynctaskinput.go +++ /dev/null @@ -1,11 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetUserTablesSqlSyncTaskInput struct { - SelectedSourceDatabases []string `json:"selectedSourceDatabases"` - SelectedTargetDatabases []string `json:"selectedTargetDatabases"` - SourceConnectionInfo SqlConnectionInfo `json:"sourceConnectionInfo"` - TargetConnectionInfo SqlConnectionInfo `json:"targetConnectionInfo"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_getusertablessqlsynctaskoutput.go b/resource-manager/datamigration/2018-04-19/tasks/model_getusertablessqlsynctaskoutput.go deleted file mode 100644 index 03355fb9da2..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_getusertablessqlsynctaskoutput.go +++ /dev/null @@ -1,11 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetUserTablesSqlSyncTaskOutput struct { - DatabasesToSourceTables *map[string][]DatabaseTable `json:"databasesToSourceTables,omitempty"` - DatabasesToTargetTables *map[string][]DatabaseTable `json:"databasesToTargetTables,omitempty"` - TableValidationErrors *map[string][]string `json:"tableValidationErrors,omitempty"` - ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_getusertablessqlsynctaskproperties.go b/resource-manager/datamigration/2018-04-19/tasks/model_getusertablessqlsynctaskproperties.go deleted file mode 100644 index 5f8d90829ba..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_getusertablessqlsynctaskproperties.go +++ /dev/null @@ -1,45 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = GetUserTablesSqlSyncTaskProperties{} - -type GetUserTablesSqlSyncTaskProperties struct { - Input *GetUserTablesSqlSyncTaskInput `json:"input,omitempty"` - Output *[]GetUserTablesSqlSyncTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = GetUserTablesSqlSyncTaskProperties{} - -func (s GetUserTablesSqlSyncTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper GetUserTablesSqlSyncTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling GetUserTablesSqlSyncTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling GetUserTablesSqlSyncTaskProperties: %+v", err) - } - decoded["taskType"] = "GetUserTables.AzureSqlDb.Sync" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling GetUserTablesSqlSyncTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_getusertablessqltaskinput.go b/resource-manager/datamigration/2018-04-19/tasks/model_getusertablessqltaskinput.go deleted file mode 100644 index 9ccaf0fcfff..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_getusertablessqltaskinput.go +++ /dev/null @@ -1,9 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetUserTablesSqlTaskInput struct { - ConnectionInfo SqlConnectionInfo `json:"connectionInfo"` - SelectedDatabases []string `json:"selectedDatabases"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_getusertablessqltaskoutput.go b/resource-manager/datamigration/2018-04-19/tasks/model_getusertablessqltaskoutput.go deleted file mode 100644 index 8935f098488..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_getusertablessqltaskoutput.go +++ /dev/null @@ -1,10 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetUserTablesSqlTaskOutput struct { - DatabasesToTables *map[string][]DatabaseTable `json:"databasesToTables,omitempty"` - Id *string `json:"id,omitempty"` - ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_getusertablessqltaskproperties.go b/resource-manager/datamigration/2018-04-19/tasks/model_getusertablessqltaskproperties.go deleted file mode 100644 index c5586e7c38d..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_getusertablessqltaskproperties.go +++ /dev/null @@ -1,45 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = GetUserTablesSqlTaskProperties{} - -type GetUserTablesSqlTaskProperties struct { - Input *GetUserTablesSqlTaskInput `json:"input,omitempty"` - Output *[]GetUserTablesSqlTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = GetUserTablesSqlTaskProperties{} - -func (s GetUserTablesSqlTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper GetUserTablesSqlTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling GetUserTablesSqlTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling GetUserTablesSqlTaskProperties: %+v", err) - } - decoded["taskType"] = "GetUserTables.Sql" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling GetUserTablesSqlTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_migratemysqlazuredbformysqlsyncdatabaseinput.go b/resource-manager/datamigration/2018-04-19/tasks/model_migratemysqlazuredbformysqlsyncdatabaseinput.go deleted file mode 100644 index 1ba37729528..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_migratemysqlazuredbformysqlsyncdatabaseinput.go +++ /dev/null @@ -1,12 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateMySqlAzureDbForMySqlSyncDatabaseInput struct { - MigrationSetting *map[string]string `json:"migrationSetting,omitempty"` - Name *string `json:"name,omitempty"` - SourceSetting *map[string]string `json:"sourceSetting,omitempty"` - TargetDatabaseName *string `json:"targetDatabaseName,omitempty"` - TargetSetting *map[string]string `json:"targetSetting,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_migratemysqlazuredbformysqlsynctaskinput.go b/resource-manager/datamigration/2018-04-19/tasks/model_migratemysqlazuredbformysqlsynctaskinput.go deleted file mode 100644 index 03e7cbb7354..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_migratemysqlazuredbformysqlsynctaskinput.go +++ /dev/null @@ -1,10 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateMySqlAzureDbForMySqlSyncTaskInput struct { - SelectedDatabases []MigrateMySqlAzureDbForMySqlSyncDatabaseInput `json:"selectedDatabases"` - SourceConnectionInfo MySqlConnectionInfo `json:"sourceConnectionInfo"` - TargetConnectionInfo MySqlConnectionInfo `json:"targetConnectionInfo"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_migratemysqlazuredbformysqlsynctaskoutput.go b/resource-manager/datamigration/2018-04-19/tasks/model_migratemysqlazuredbformysqlsynctaskoutput.go deleted file mode 100644 index fbd9e0927e0..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_migratemysqlazuredbformysqlsynctaskoutput.go +++ /dev/null @@ -1,9 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateMySqlAzureDbForMySqlSyncTaskOutput struct { - Id *string `json:"id,omitempty"` - ResultType *string `json:"resultType,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_migratemysqlazuredbformysqlsynctaskproperties.go b/resource-manager/datamigration/2018-04-19/tasks/model_migratemysqlazuredbformysqlsynctaskproperties.go deleted file mode 100644 index 54dce0ce4a0..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_migratemysqlazuredbformysqlsynctaskproperties.go +++ /dev/null @@ -1,45 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = MigrateMySqlAzureDbForMySqlSyncTaskProperties{} - -type MigrateMySqlAzureDbForMySqlSyncTaskProperties struct { - Input *MigrateMySqlAzureDbForMySqlSyncTaskInput `json:"input,omitempty"` - Output *[]MigrateMySqlAzureDbForMySqlSyncTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = MigrateMySqlAzureDbForMySqlSyncTaskProperties{} - -func (s MigrateMySqlAzureDbForMySqlSyncTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper MigrateMySqlAzureDbForMySqlSyncTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateMySqlAzureDbForMySqlSyncTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateMySqlAzureDbForMySqlSyncTaskProperties: %+v", err) - } - decoded["taskType"] = "Migrate.MySql.AzureDbForMySql.Sync" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateMySqlAzureDbForMySqlSyncTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_migratepostgresqlazuredbforpostgresqlsyncdatabaseinput.go b/resource-manager/datamigration/2018-04-19/tasks/model_migratepostgresqlazuredbforpostgresqlsyncdatabaseinput.go deleted file mode 100644 index bf325ad4785..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_migratepostgresqlazuredbforpostgresqlsyncdatabaseinput.go +++ /dev/null @@ -1,12 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput struct { - MigrationSetting *map[string]string `json:"migrationSetting,omitempty"` - Name *string `json:"name,omitempty"` - SourceSetting *map[string]string `json:"sourceSetting,omitempty"` - TargetDatabaseName *string `json:"targetDatabaseName,omitempty"` - TargetSetting *map[string]string `json:"targetSetting,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_migratepostgresqlazuredbforpostgresqlsynctaskinput.go b/resource-manager/datamigration/2018-04-19/tasks/model_migratepostgresqlazuredbforpostgresqlsynctaskinput.go deleted file mode 100644 index 444ba866696..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_migratepostgresqlazuredbforpostgresqlsynctaskinput.go +++ /dev/null @@ -1,10 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput struct { - SelectedDatabases []MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput `json:"selectedDatabases"` - SourceConnectionInfo PostgreSqlConnectionInfo `json:"sourceConnectionInfo"` - TargetConnectionInfo PostgreSqlConnectionInfo `json:"targetConnectionInfo"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_migratepostgresqlazuredbforpostgresqlsynctaskoutput.go b/resource-manager/datamigration/2018-04-19/tasks/model_migratepostgresqlazuredbforpostgresqlsynctaskoutput.go deleted file mode 100644 index 345b01a31e6..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_migratepostgresqlazuredbforpostgresqlsynctaskoutput.go +++ /dev/null @@ -1,9 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput struct { - Id *string `json:"id,omitempty"` - ResultType *string `json:"resultType,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_migratepostgresqlazuredbforpostgresqlsynctaskproperties.go b/resource-manager/datamigration/2018-04-19/tasks/model_migratepostgresqlazuredbforpostgresqlsynctaskproperties.go deleted file mode 100644 index 4785d772e82..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_migratepostgresqlazuredbforpostgresqlsynctaskproperties.go +++ /dev/null @@ -1,45 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties{} - -type MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties struct { - Input *MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput `json:"input,omitempty"` - Output *[]MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties{} - -func (s MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties: %+v", err) - } - decoded["taskType"] = "Migrate.PostgreSql.AzureDbForPostgreSql.Sync" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_migratesqlserversqldbdatabaseinput.go b/resource-manager/datamigration/2018-04-19/tasks/model_migratesqlserversqldbdatabaseinput.go deleted file mode 100644 index 01ce0dc4a5c..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_migratesqlserversqldbdatabaseinput.go +++ /dev/null @@ -1,11 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateSqlServerSqlDbDatabaseInput struct { - MakeSourceDbReadOnly *bool `json:"makeSourceDbReadOnly,omitempty"` - Name *string `json:"name,omitempty"` - TableMap *map[string]string `json:"tableMap,omitempty"` - TargetDatabaseName *string `json:"targetDatabaseName,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_migratesqlserversqldbsyncdatabaseinput.go b/resource-manager/datamigration/2018-04-19/tasks/model_migratesqlserversqldbsyncdatabaseinput.go deleted file mode 100644 index 98f5ca4bd52..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_migratesqlserversqldbsyncdatabaseinput.go +++ /dev/null @@ -1,15 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateSqlServerSqlDbSyncDatabaseInput struct { - Id *string `json:"id,omitempty"` - MigrationSetting *map[string]string `json:"migrationSetting,omitempty"` - Name *string `json:"name,omitempty"` - SchemaName *string `json:"schemaName,omitempty"` - SourceSetting *map[string]string `json:"sourceSetting,omitempty"` - TableMap *map[string]string `json:"tableMap,omitempty"` - TargetDatabaseName *string `json:"targetDatabaseName,omitempty"` - TargetSetting *map[string]string `json:"targetSetting,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_migratesqlserversqldbsynctaskinput.go b/resource-manager/datamigration/2018-04-19/tasks/model_migratesqlserversqldbsynctaskinput.go deleted file mode 100644 index ca6a23e3bd6..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_migratesqlserversqldbsynctaskinput.go +++ /dev/null @@ -1,11 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateSqlServerSqlDbSyncTaskInput struct { - SelectedDatabases []MigrateSqlServerSqlDbSyncDatabaseInput `json:"selectedDatabases"` - SourceConnectionInfo SqlConnectionInfo `json:"sourceConnectionInfo"` - TargetConnectionInfo SqlConnectionInfo `json:"targetConnectionInfo"` - ValidationOptions *MigrationValidationOptions `json:"validationOptions,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_migratesqlserversqldbsynctaskoutput.go b/resource-manager/datamigration/2018-04-19/tasks/model_migratesqlserversqldbsynctaskoutput.go deleted file mode 100644 index cbff63af934..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_migratesqlserversqldbsynctaskoutput.go +++ /dev/null @@ -1,9 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateSqlServerSqlDbSyncTaskOutput struct { - Id *string `json:"id,omitempty"` - ResultType *string `json:"resultType,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_migratesqlserversqldbsynctaskproperties.go b/resource-manager/datamigration/2018-04-19/tasks/model_migratesqlserversqldbsynctaskproperties.go deleted file mode 100644 index 5dd2766521d..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_migratesqlserversqldbsynctaskproperties.go +++ /dev/null @@ -1,45 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = MigrateSqlServerSqlDbSyncTaskProperties{} - -type MigrateSqlServerSqlDbSyncTaskProperties struct { - Input *MigrateSqlServerSqlDbSyncTaskInput `json:"input,omitempty"` - Output *[]MigrateSqlServerSqlDbSyncTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = MigrateSqlServerSqlDbSyncTaskProperties{} - -func (s MigrateSqlServerSqlDbSyncTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper MigrateSqlServerSqlDbSyncTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSqlServerSqlDbSyncTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlDbSyncTaskProperties: %+v", err) - } - decoded["taskType"] = "Migrate.SqlServer.AzureSqlDb.Sync" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSqlServerSqlDbSyncTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_migratesqlserversqldbtaskinput.go b/resource-manager/datamigration/2018-04-19/tasks/model_migratesqlserversqldbtaskinput.go deleted file mode 100644 index 49ebfe93536..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_migratesqlserversqldbtaskinput.go +++ /dev/null @@ -1,11 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateSqlServerSqlDbTaskInput struct { - SelectedDatabases []MigrateSqlServerSqlDbDatabaseInput `json:"selectedDatabases"` - SourceConnectionInfo SqlConnectionInfo `json:"sourceConnectionInfo"` - TargetConnectionInfo SqlConnectionInfo `json:"targetConnectionInfo"` - ValidationOptions *MigrationValidationOptions `json:"validationOptions,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_migratesqlserversqldbtaskoutput.go b/resource-manager/datamigration/2018-04-19/tasks/model_migratesqlserversqldbtaskoutput.go deleted file mode 100644 index 353515ba42d..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_migratesqlserversqldbtaskoutput.go +++ /dev/null @@ -1,9 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateSqlServerSqlDbTaskOutput struct { - Id *string `json:"id,omitempty"` - ResultType string `json:"resultType"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_migratesqlserversqldbtaskproperties.go b/resource-manager/datamigration/2018-04-19/tasks/model_migratesqlserversqldbtaskproperties.go deleted file mode 100644 index b1f950de335..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_migratesqlserversqldbtaskproperties.go +++ /dev/null @@ -1,45 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = MigrateSqlServerSqlDbTaskProperties{} - -type MigrateSqlServerSqlDbTaskProperties struct { - Input *MigrateSqlServerSqlDbTaskInput `json:"input,omitempty"` - Output *[]MigrateSqlServerSqlDbTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = MigrateSqlServerSqlDbTaskProperties{} - -func (s MigrateSqlServerSqlDbTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper MigrateSqlServerSqlDbTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSqlServerSqlDbTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlDbTaskProperties: %+v", err) - } - decoded["taskType"] = "Migrate.SqlServer.SqlDb" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSqlServerSqlDbTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_migratesqlserversqlmidatabaseinput.go b/resource-manager/datamigration/2018-04-19/tasks/model_migratesqlserversqlmidatabaseinput.go deleted file mode 100644 index 849382e3671..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_migratesqlserversqlmidatabaseinput.go +++ /dev/null @@ -1,11 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateSqlServerSqlMIDatabaseInput struct { - BackupFilePaths *[]string `json:"backupFilePaths,omitempty"` - BackupFileShare *FileShare `json:"backupFileShare,omitempty"` - Name string `json:"name"` - RestoreDatabaseName string `json:"restoreDatabaseName"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_migratesqlserversqlmisynctaskoutput.go b/resource-manager/datamigration/2018-04-19/tasks/model_migratesqlserversqlmisynctaskoutput.go deleted file mode 100644 index 14c8bf8063c..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_migratesqlserversqlmisynctaskoutput.go +++ /dev/null @@ -1,9 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateSqlServerSqlMISyncTaskOutput struct { - Id *string `json:"id,omitempty"` - ResultType *string `json:"resultType,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_migratesqlserversqlmisynctaskproperties.go b/resource-manager/datamigration/2018-04-19/tasks/model_migratesqlserversqlmisynctaskproperties.go deleted file mode 100644 index 83037f36010..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_migratesqlserversqlmisynctaskproperties.go +++ /dev/null @@ -1,45 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = MigrateSqlServerSqlMISyncTaskProperties{} - -type MigrateSqlServerSqlMISyncTaskProperties struct { - Input *SqlServerSqlMISyncTaskInput `json:"input,omitempty"` - Output *[]MigrateSqlServerSqlMISyncTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = MigrateSqlServerSqlMISyncTaskProperties{} - -func (s MigrateSqlServerSqlMISyncTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper MigrateSqlServerSqlMISyncTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSqlServerSqlMISyncTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlMISyncTaskProperties: %+v", err) - } - decoded["taskType"] = "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSqlServerSqlMISyncTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_migratesqlserversqlmitaskinput.go b/resource-manager/datamigration/2018-04-19/tasks/model_migratesqlserversqlmitaskinput.go deleted file mode 100644 index efa83bb7db4..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_migratesqlserversqlmitaskinput.go +++ /dev/null @@ -1,15 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateSqlServerSqlMITaskInput struct { - BackupBlobShare BlobShare `json:"backupBlobShare"` - BackupFileShare *FileShare `json:"backupFileShare,omitempty"` - BackupMode *BackupMode `json:"backupMode,omitempty"` - SelectedAgentJobs *[]string `json:"selectedAgentJobs,omitempty"` - SelectedDatabases []MigrateSqlServerSqlMIDatabaseInput `json:"selectedDatabases"` - SelectedLogins *[]string `json:"selectedLogins,omitempty"` - SourceConnectionInfo SqlConnectionInfo `json:"sourceConnectionInfo"` - TargetConnectionInfo SqlConnectionInfo `json:"targetConnectionInfo"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_migratesqlserversqlmitaskoutput.go b/resource-manager/datamigration/2018-04-19/tasks/model_migratesqlserversqlmitaskoutput.go deleted file mode 100644 index a2fe816ea62..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_migratesqlserversqlmitaskoutput.go +++ /dev/null @@ -1,9 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateSqlServerSqlMITaskOutput struct { - Id *string `json:"id,omitempty"` - ResultType *string `json:"resultType,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_migratesqlserversqlmitaskproperties.go b/resource-manager/datamigration/2018-04-19/tasks/model_migratesqlserversqlmitaskproperties.go deleted file mode 100644 index 1faf75d3c54..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_migratesqlserversqlmitaskproperties.go +++ /dev/null @@ -1,45 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = MigrateSqlServerSqlMITaskProperties{} - -type MigrateSqlServerSqlMITaskProperties struct { - Input *MigrateSqlServerSqlMITaskInput `json:"input,omitempty"` - Output *[]MigrateSqlServerSqlMITaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = MigrateSqlServerSqlMITaskProperties{} - -func (s MigrateSqlServerSqlMITaskProperties) MarshalJSON() ([]byte, error) { - type wrapper MigrateSqlServerSqlMITaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSqlServerSqlMITaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlMITaskProperties: %+v", err) - } - decoded["taskType"] = "Migrate.SqlServer.AzureSqlDbMI" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSqlServerSqlMITaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_migrationvalidationoptions.go b/resource-manager/datamigration/2018-04-19/tasks/model_migrationvalidationoptions.go deleted file mode 100644 index b980854b09c..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_migrationvalidationoptions.go +++ /dev/null @@ -1,10 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrationValidationOptions struct { - EnableDataIntegrityValidation *bool `json:"enableDataIntegrityValidation,omitempty"` - EnableQueryAnalysisValidation *bool `json:"enableQueryAnalysisValidation,omitempty"` - EnableSchemaValidation *bool `json:"enableSchemaValidation,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_misqlconnectioninfo.go b/resource-manager/datamigration/2018-04-19/tasks/model_misqlconnectioninfo.go deleted file mode 100644 index c586fcfe4ea..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_misqlconnectioninfo.go +++ /dev/null @@ -1,43 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = MiSqlConnectionInfo{} - -type MiSqlConnectionInfo struct { - ManagedInstanceResourceId string `json:"managedInstanceResourceId"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = MiSqlConnectionInfo{} - -func (s MiSqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper MiSqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MiSqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MiSqlConnectionInfo: %+v", err) - } - decoded["type"] = "MiSqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MiSqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_mysqlconnectioninfo.go b/resource-manager/datamigration/2018-04-19/tasks/model_mysqlconnectioninfo.go deleted file mode 100644 index 203919f5ffd..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_mysqlconnectioninfo.go +++ /dev/null @@ -1,44 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = MySqlConnectionInfo{} - -type MySqlConnectionInfo struct { - Port int64 `json:"port"` - ServerName string `json:"serverName"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = MySqlConnectionInfo{} - -func (s MySqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper MySqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MySqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MySqlConnectionInfo: %+v", err) - } - decoded["type"] = "MySqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MySqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_odataerror.go b/resource-manager/datamigration/2018-04-19/tasks/model_odataerror.go deleted file mode 100644 index 2f8011acd66..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_odataerror.go +++ /dev/null @@ -1,10 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ODataError struct { - Code *string `json:"code,omitempty"` - Details *[]ODataError `json:"details,omitempty"` - Message *string `json:"message,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_postgresqlconnectioninfo.go b/resource-manager/datamigration/2018-04-19/tasks/model_postgresqlconnectioninfo.go deleted file mode 100644 index c7095e5dca8..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_postgresqlconnectioninfo.go +++ /dev/null @@ -1,45 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = PostgreSqlConnectionInfo{} - -type PostgreSqlConnectionInfo struct { - DatabaseName *string `json:"databaseName,omitempty"` - Port int64 `json:"port"` - ServerName string `json:"serverName"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = PostgreSqlConnectionInfo{} - -func (s PostgreSqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper PostgreSqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling PostgreSqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling PostgreSqlConnectionInfo: %+v", err) - } - decoded["type"] = "PostgreSqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling PostgreSqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_projecttaskproperties.go b/resource-manager/datamigration/2018-04-19/tasks/model_projecttaskproperties.go deleted file mode 100644 index fb229347eae..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_projecttaskproperties.go +++ /dev/null @@ -1,213 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProjectTaskProperties interface { -} - -// RawProjectTaskPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawProjectTaskPropertiesImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalProjectTaskPropertiesImplementation(input []byte) (ProjectTaskProperties, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ProjectTaskProperties into map[string]interface: %+v", err) - } - - value, ok := temp["taskType"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "ConnectToSource.PostgreSql.Sync") { - var out ConnectToSourcePostgreSqlSyncTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ConnectToSourcePostgreSqlSyncTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "ConnectToSource.SqlServer.Sync") { - var out ConnectToSourceSqlServerSyncTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ConnectToSourceSqlServerSyncTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "ConnectToSource.SqlServer") { - var out ConnectToSourceSqlServerTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ConnectToSourceSqlServerTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "ConnectToTarget.AzureDbForMySql") { - var out ConnectToTargetAzureDbForMySqlTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ConnectToTargetAzureDbForMySqlTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "ConnectToTarget.AzureDbForPostgreSql.Sync") { - var out ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "ConnectToTarget.SqlDb") { - var out ConnectToTargetSqlDbTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ConnectToTargetSqlDbTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "ConnectToTarget.AzureSqlDbMI.Sync.LRS") { - var out ConnectToTargetSqlMISyncTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ConnectToTargetSqlMISyncTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "ConnectToTarget.AzureSqlDbMI") { - var out ConnectToTargetSqlMITaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ConnectToTargetSqlMITaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "ConnectToTarget.SqlDb.Sync") { - var out ConnectToTargetSqlSqlDbSyncTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ConnectToTargetSqlSqlDbSyncTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "GetTDECertificates.Sql") { - var out GetTdeCertificatesSqlTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into GetTdeCertificatesSqlTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "GetUserTables.AzureSqlDb.Sync") { - var out GetUserTablesSqlSyncTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into GetUserTablesSqlSyncTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "GetUserTables.Sql") { - var out GetUserTablesSqlTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into GetUserTablesSqlTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Migrate.MySql.AzureDbForMySql.Sync") { - var out MigrateMySqlAzureDbForMySqlSyncTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateMySqlAzureDbForMySqlSyncTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Migrate.PostgreSql.AzureDbForPostgreSql.Sync") { - var out MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Migrate.SqlServer.AzureSqlDb.Sync") { - var out MigrateSqlServerSqlDbSyncTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSqlServerSqlDbSyncTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Migrate.SqlServer.SqlDb") { - var out MigrateSqlServerSqlDbTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSqlServerSqlDbTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS") { - var out MigrateSqlServerSqlMISyncTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSqlServerSqlMISyncTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Migrate.SqlServer.AzureSqlDbMI") { - var out MigrateSqlServerSqlMITaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSqlServerSqlMITaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "ValidateMigrationInput.SqlServer.SqlDb.Sync") { - var out ValidateMigrationInputSqlServerSqlDbSyncTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ValidateMigrationInputSqlServerSqlDbSyncTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS") { - var out ValidateMigrationInputSqlServerSqlMISyncTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ValidateMigrationInputSqlServerSqlMISyncTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "ValidateMigrationInput.SqlServer.AzureSqlDbMI") { - var out ValidateMigrationInputSqlServerSqlMITaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ValidateMigrationInputSqlServerSqlMITaskProperties: %+v", err) - } - return out, nil - } - - out := RawProjectTaskPropertiesImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_reportableexception.go b/resource-manager/datamigration/2018-04-19/tasks/model_reportableexception.go deleted file mode 100644 index af7199acb7c..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_reportableexception.go +++ /dev/null @@ -1,13 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ReportableException struct { - ActionableMessage *string `json:"actionableMessage,omitempty"` - FilePath *string `json:"filePath,omitempty"` - HResult *int64 `json:"hResult,omitempty"` - LineNumber *string `json:"lineNumber,omitempty"` - Message *string `json:"message,omitempty"` - StackTrace *string `json:"stackTrace,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_selectedcertificateinput.go b/resource-manager/datamigration/2018-04-19/tasks/model_selectedcertificateinput.go deleted file mode 100644 index 22a4a9a8296..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_selectedcertificateinput.go +++ /dev/null @@ -1,9 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SelectedCertificateInput struct { - CertificateName string `json:"certificateName"` - Password string `json:"password"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_sqlconnectioninfo.go b/resource-manager/datamigration/2018-04-19/tasks/model_sqlconnectioninfo.go deleted file mode 100644 index b0666fec396..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_sqlconnectioninfo.go +++ /dev/null @@ -1,48 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = SqlConnectionInfo{} - -type SqlConnectionInfo struct { - AdditionalSettings *string `json:"additionalSettings,omitempty"` - Authentication *AuthenticationType `json:"authentication,omitempty"` - DataSource string `json:"dataSource"` - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Platform *SqlSourcePlatform `json:"platform,omitempty"` - TrustServerCertificate *bool `json:"trustServerCertificate,omitempty"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = SqlConnectionInfo{} - -func (s SqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper SqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SqlConnectionInfo: %+v", err) - } - decoded["type"] = "SqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_sqlserversqlmisynctaskinput.go b/resource-manager/datamigration/2018-04-19/tasks/model_sqlserversqlmisynctaskinput.go deleted file mode 100644 index 516f879e3b9..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_sqlserversqlmisynctaskinput.go +++ /dev/null @@ -1,13 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SqlServerSqlMISyncTaskInput struct { - AzureApp AzureActiveDirectoryApp `json:"azureApp"` - BackupFileShare *FileShare `json:"backupFileShare,omitempty"` - SelectedDatabases []MigrateSqlServerSqlMIDatabaseInput `json:"selectedDatabases"` - SourceConnectionInfo SqlConnectionInfo `json:"sourceConnectionInfo"` - StorageResourceId string `json:"storageResourceId"` - TargetConnectionInfo MiSqlConnectionInfo `json:"targetConnectionInfo"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_validatemigrationinputsqlserversqldbsynctaskproperties.go b/resource-manager/datamigration/2018-04-19/tasks/model_validatemigrationinputsqlserversqldbsynctaskproperties.go deleted file mode 100644 index f3b27cb0363..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_validatemigrationinputsqlserversqldbsynctaskproperties.go +++ /dev/null @@ -1,45 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = ValidateMigrationInputSqlServerSqlDbSyncTaskProperties{} - -type ValidateMigrationInputSqlServerSqlDbSyncTaskProperties struct { - Input *ValidateSyncMigrationInputSqlServerTaskInput `json:"input,omitempty"` - Output *[]ValidateSyncMigrationInputSqlServerTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = ValidateMigrationInputSqlServerSqlDbSyncTaskProperties{} - -func (s ValidateMigrationInputSqlServerSqlDbSyncTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper ValidateMigrationInputSqlServerSqlDbSyncTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ValidateMigrationInputSqlServerSqlDbSyncTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ValidateMigrationInputSqlServerSqlDbSyncTaskProperties: %+v", err) - } - decoded["taskType"] = "ValidateMigrationInput.SqlServer.SqlDb.Sync" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ValidateMigrationInputSqlServerSqlDbSyncTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_validatemigrationinputsqlserversqlmisynctaskoutput.go b/resource-manager/datamigration/2018-04-19/tasks/model_validatemigrationinputsqlserversqlmisynctaskoutput.go deleted file mode 100644 index 7bac34b7470..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_validatemigrationinputsqlserversqlmisynctaskoutput.go +++ /dev/null @@ -1,10 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ValidateMigrationInputSqlServerSqlMISyncTaskOutput struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_validatemigrationinputsqlserversqlmisynctaskproperties.go b/resource-manager/datamigration/2018-04-19/tasks/model_validatemigrationinputsqlserversqlmisynctaskproperties.go deleted file mode 100644 index 9392ff418f7..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_validatemigrationinputsqlserversqlmisynctaskproperties.go +++ /dev/null @@ -1,45 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = ValidateMigrationInputSqlServerSqlMISyncTaskProperties{} - -type ValidateMigrationInputSqlServerSqlMISyncTaskProperties struct { - Input *SqlServerSqlMISyncTaskInput `json:"input,omitempty"` - Output *[]ValidateMigrationInputSqlServerSqlMISyncTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = ValidateMigrationInputSqlServerSqlMISyncTaskProperties{} - -func (s ValidateMigrationInputSqlServerSqlMISyncTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper ValidateMigrationInputSqlServerSqlMISyncTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ValidateMigrationInputSqlServerSqlMISyncTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ValidateMigrationInputSqlServerSqlMISyncTaskProperties: %+v", err) - } - decoded["taskType"] = "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ValidateMigrationInputSqlServerSqlMISyncTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_validatemigrationinputsqlserversqlmitaskinput.go b/resource-manager/datamigration/2018-04-19/tasks/model_validatemigrationinputsqlserversqlmitaskinput.go deleted file mode 100644 index 55e06bd2eea..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_validatemigrationinputsqlserversqlmitaskinput.go +++ /dev/null @@ -1,14 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ValidateMigrationInputSqlServerSqlMITaskInput struct { - BackupBlobShare BlobShare `json:"backupBlobShare"` - BackupFileShare *FileShare `json:"backupFileShare,omitempty"` - BackupMode *BackupMode `json:"backupMode,omitempty"` - SelectedDatabases []MigrateSqlServerSqlMIDatabaseInput `json:"selectedDatabases"` - SelectedLogins *[]string `json:"selectedLogins,omitempty"` - SourceConnectionInfo SqlConnectionInfo `json:"sourceConnectionInfo"` - TargetConnectionInfo SqlConnectionInfo `json:"targetConnectionInfo"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_validatemigrationinputsqlserversqlmitaskoutput.go b/resource-manager/datamigration/2018-04-19/tasks/model_validatemigrationinputsqlserversqlmitaskoutput.go deleted file mode 100644 index 79fa5454c8e..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_validatemigrationinputsqlserversqlmitaskoutput.go +++ /dev/null @@ -1,15 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ValidateMigrationInputSqlServerSqlMITaskOutput struct { - BackupFolderErrors *[]ReportableException `json:"backupFolderErrors,omitempty"` - BackupShareCredentialsErrors *[]ReportableException `json:"backupShareCredentialsErrors,omitempty"` - BackupStorageAccountErrors *[]ReportableException `json:"backupStorageAccountErrors,omitempty"` - DatabaseBackupInfo *DatabaseBackupInfo `json:"databaseBackupInfo,omitempty"` - ExistingBackupErrors *[]ReportableException `json:"existingBackupErrors,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - RestoreDatabaseNameErrors *[]ReportableException `json:"restoreDatabaseNameErrors,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_validatemigrationinputsqlserversqlmitaskproperties.go b/resource-manager/datamigration/2018-04-19/tasks/model_validatemigrationinputsqlserversqlmitaskproperties.go deleted file mode 100644 index 7f05d6dc4e5..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_validatemigrationinputsqlserversqlmitaskproperties.go +++ /dev/null @@ -1,45 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = ValidateMigrationInputSqlServerSqlMITaskProperties{} - -type ValidateMigrationInputSqlServerSqlMITaskProperties struct { - Input *ValidateMigrationInputSqlServerSqlMITaskInput `json:"input,omitempty"` - Output *[]ValidateMigrationInputSqlServerSqlMITaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = ValidateMigrationInputSqlServerSqlMITaskProperties{} - -func (s ValidateMigrationInputSqlServerSqlMITaskProperties) MarshalJSON() ([]byte, error) { - type wrapper ValidateMigrationInputSqlServerSqlMITaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ValidateMigrationInputSqlServerSqlMITaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ValidateMigrationInputSqlServerSqlMITaskProperties: %+v", err) - } - decoded["taskType"] = "ValidateMigrationInput.SqlServer.AzureSqlDbMI" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ValidateMigrationInputSqlServerSqlMITaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_validatesyncmigrationinputsqlservertaskinput.go b/resource-manager/datamigration/2018-04-19/tasks/model_validatesyncmigrationinputsqlservertaskinput.go deleted file mode 100644 index 1455cc820af..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_validatesyncmigrationinputsqlservertaskinput.go +++ /dev/null @@ -1,10 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ValidateSyncMigrationInputSqlServerTaskInput struct { - SelectedDatabases []MigrateSqlServerSqlDbSyncDatabaseInput `json:"selectedDatabases"` - SourceConnectionInfo SqlConnectionInfo `json:"sourceConnectionInfo"` - TargetConnectionInfo SqlConnectionInfo `json:"targetConnectionInfo"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/model_validatesyncmigrationinputsqlservertaskoutput.go b/resource-manager/datamigration/2018-04-19/tasks/model_validatesyncmigrationinputsqlservertaskoutput.go deleted file mode 100644 index a0b2fa6e508..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/model_validatesyncmigrationinputsqlservertaskoutput.go +++ /dev/null @@ -1,10 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ValidateSyncMigrationInputSqlServerTaskOutput struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` -} diff --git a/resource-manager/datamigration/2018-04-19/tasks/version.go b/resource-manager/datamigration/2018-04-19/tasks/version.go deleted file mode 100644 index 0b96e6763a6..00000000000 --- a/resource-manager/datamigration/2018-04-19/tasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package tasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2018-04-19" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2018-04-19/taskscommons/README.md b/resource-manager/datamigration/2018-04-19/taskscommons/README.md deleted file mode 100644 index 1060663053a..00000000000 --- a/resource-manager/datamigration/2018-04-19/taskscommons/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/taskscommons` Documentation - -The `taskscommons` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2018-04-19`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/taskscommons" -``` - - -### Client Initialization - -```go -client := taskscommons.NewTasksCommonsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2018-04-19/taskscommons/client.go b/resource-manager/datamigration/2018-04-19/taskscommons/client.go deleted file mode 100644 index cb4dd522708..00000000000 --- a/resource-manager/datamigration/2018-04-19/taskscommons/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package taskscommons - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TasksCommonsClient struct { - Client *resourcemanager.Client -} - -func NewTasksCommonsClientWithBaseURI(sdkApi sdkEnv.Api) (*TasksCommonsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "taskscommons", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating TasksCommonsClient: %+v", err) - } - - return &TasksCommonsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2018-04-19/taskscommons/constants.go b/resource-manager/datamigration/2018-04-19/taskscommons/constants.go deleted file mode 100644 index 0e216c13f29..00000000000 --- a/resource-manager/datamigration/2018-04-19/taskscommons/constants.go +++ /dev/null @@ -1,98 +0,0 @@ -package taskscommons - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthenticationType string - -const ( - AuthenticationTypeActiveDirectoryIntegrated AuthenticationType = "ActiveDirectoryIntegrated" - AuthenticationTypeActiveDirectoryPassword AuthenticationType = "ActiveDirectoryPassword" - AuthenticationTypeNone AuthenticationType = "None" - AuthenticationTypeSqlAuthentication AuthenticationType = "SqlAuthentication" - AuthenticationTypeWindowsAuthentication AuthenticationType = "WindowsAuthentication" -) - -func PossibleValuesForAuthenticationType() []string { - return []string{ - string(AuthenticationTypeActiveDirectoryIntegrated), - string(AuthenticationTypeActiveDirectoryPassword), - string(AuthenticationTypeNone), - string(AuthenticationTypeSqlAuthentication), - string(AuthenticationTypeWindowsAuthentication), - } -} - -func (s *AuthenticationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAuthenticationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAuthenticationType(input string) (*AuthenticationType, error) { - vals := map[string]AuthenticationType{ - "activedirectoryintegrated": AuthenticationTypeActiveDirectoryIntegrated, - "activedirectorypassword": AuthenticationTypeActiveDirectoryPassword, - "none": AuthenticationTypeNone, - "sqlauthentication": AuthenticationTypeSqlAuthentication, - "windowsauthentication": AuthenticationTypeWindowsAuthentication, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AuthenticationType(input) - return &out, nil -} - -type SqlSourcePlatform string - -const ( - SqlSourcePlatformSqlOnPrem SqlSourcePlatform = "SqlOnPrem" -) - -func PossibleValuesForSqlSourcePlatform() []string { - return []string{ - string(SqlSourcePlatformSqlOnPrem), - } -} - -func (s *SqlSourcePlatform) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSqlSourcePlatform(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSqlSourcePlatform(input string) (*SqlSourcePlatform, error) { - vals := map[string]SqlSourcePlatform{ - "sqlonprem": SqlSourcePlatformSqlOnPrem, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SqlSourcePlatform(input) - return &out, nil -} diff --git a/resource-manager/datamigration/2018-04-19/taskscommons/model_connectioninfo.go b/resource-manager/datamigration/2018-04-19/taskscommons/model_connectioninfo.go deleted file mode 100644 index 77e0eec1f8d..00000000000 --- a/resource-manager/datamigration/2018-04-19/taskscommons/model_connectioninfo.go +++ /dev/null @@ -1,61 +0,0 @@ -package taskscommons - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "MiSqlConnectionInfo") { - var out MiSqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MiSqlConnectionInfo: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "SqlConnectionInfo") { - var out SqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2018-04-19/taskscommons/model_misqlconnectioninfo.go b/resource-manager/datamigration/2018-04-19/taskscommons/model_misqlconnectioninfo.go deleted file mode 100644 index af902bfe2c3..00000000000 --- a/resource-manager/datamigration/2018-04-19/taskscommons/model_misqlconnectioninfo.go +++ /dev/null @@ -1,43 +0,0 @@ -package taskscommons - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = MiSqlConnectionInfo{} - -type MiSqlConnectionInfo struct { - ManagedInstanceResourceId string `json:"managedInstanceResourceId"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = MiSqlConnectionInfo{} - -func (s MiSqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper MiSqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MiSqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MiSqlConnectionInfo: %+v", err) - } - decoded["type"] = "MiSqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MiSqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/taskscommons/model_sqlconnectioninfo.go b/resource-manager/datamigration/2018-04-19/taskscommons/model_sqlconnectioninfo.go deleted file mode 100644 index a20bc39ebe1..00000000000 --- a/resource-manager/datamigration/2018-04-19/taskscommons/model_sqlconnectioninfo.go +++ /dev/null @@ -1,48 +0,0 @@ -package taskscommons - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = SqlConnectionInfo{} - -type SqlConnectionInfo struct { - AdditionalSettings *string `json:"additionalSettings,omitempty"` - Authentication *AuthenticationType `json:"authentication,omitempty"` - DataSource string `json:"dataSource"` - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Platform *SqlSourcePlatform `json:"platform,omitempty"` - TrustServerCertificate *bool `json:"trustServerCertificate,omitempty"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = SqlConnectionInfo{} - -func (s SqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper SqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SqlConnectionInfo: %+v", err) - } - decoded["type"] = "SqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/taskscommons/version.go b/resource-manager/datamigration/2018-04-19/taskscommons/version.go deleted file mode 100644 index b3030a5f9d8..00000000000 --- a/resource-manager/datamigration/2018-04-19/taskscommons/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package taskscommons - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2018-04-19" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/taskscommons/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2018-04-19/validatemigrationinputsqlserversqlmisynctasks/README.md b/resource-manager/datamigration/2018-04-19/validatemigrationinputsqlserversqlmisynctasks/README.md deleted file mode 100644 index 8d19f27e787..00000000000 --- a/resource-manager/datamigration/2018-04-19/validatemigrationinputsqlserversqlmisynctasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/validatemigrationinputsqlserversqlmisynctasks` Documentation - -The `validatemigrationinputsqlserversqlmisynctasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2018-04-19`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/validatemigrationinputsqlserversqlmisynctasks" -``` - - -### Client Initialization - -```go -client := validatemigrationinputsqlserversqlmisynctasks.NewValidateMigrationInputSqlServerSqlMiSyncTasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2018-04-19/validatemigrationinputsqlserversqlmisynctasks/client.go b/resource-manager/datamigration/2018-04-19/validatemigrationinputsqlserversqlmisynctasks/client.go deleted file mode 100644 index efd9480d513..00000000000 --- a/resource-manager/datamigration/2018-04-19/validatemigrationinputsqlserversqlmisynctasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package validatemigrationinputsqlserversqlmisynctasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ValidateMigrationInputSqlServerSqlMiSyncTasksClient struct { - Client *resourcemanager.Client -} - -func NewValidateMigrationInputSqlServerSqlMiSyncTasksClientWithBaseURI(sdkApi sdkEnv.Api) (*ValidateMigrationInputSqlServerSqlMiSyncTasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "validatemigrationinputsqlserversqlmisynctasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ValidateMigrationInputSqlServerSqlMiSyncTasksClient: %+v", err) - } - - return &ValidateMigrationInputSqlServerSqlMiSyncTasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2018-04-19/validatemigrationinputsqlserversqlmisynctasks/constants.go b/resource-manager/datamigration/2018-04-19/validatemigrationinputsqlserversqlmisynctasks/constants.go deleted file mode 100644 index 4b4f4f10180..00000000000 --- a/resource-manager/datamigration/2018-04-19/validatemigrationinputsqlserversqlmisynctasks/constants.go +++ /dev/null @@ -1,98 +0,0 @@ -package validatemigrationinputsqlserversqlmisynctasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthenticationType string - -const ( - AuthenticationTypeActiveDirectoryIntegrated AuthenticationType = "ActiveDirectoryIntegrated" - AuthenticationTypeActiveDirectoryPassword AuthenticationType = "ActiveDirectoryPassword" - AuthenticationTypeNone AuthenticationType = "None" - AuthenticationTypeSqlAuthentication AuthenticationType = "SqlAuthentication" - AuthenticationTypeWindowsAuthentication AuthenticationType = "WindowsAuthentication" -) - -func PossibleValuesForAuthenticationType() []string { - return []string{ - string(AuthenticationTypeActiveDirectoryIntegrated), - string(AuthenticationTypeActiveDirectoryPassword), - string(AuthenticationTypeNone), - string(AuthenticationTypeSqlAuthentication), - string(AuthenticationTypeWindowsAuthentication), - } -} - -func (s *AuthenticationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAuthenticationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAuthenticationType(input string) (*AuthenticationType, error) { - vals := map[string]AuthenticationType{ - "activedirectoryintegrated": AuthenticationTypeActiveDirectoryIntegrated, - "activedirectorypassword": AuthenticationTypeActiveDirectoryPassword, - "none": AuthenticationTypeNone, - "sqlauthentication": AuthenticationTypeSqlAuthentication, - "windowsauthentication": AuthenticationTypeWindowsAuthentication, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AuthenticationType(input) - return &out, nil -} - -type SqlSourcePlatform string - -const ( - SqlSourcePlatformSqlOnPrem SqlSourcePlatform = "SqlOnPrem" -) - -func PossibleValuesForSqlSourcePlatform() []string { - return []string{ - string(SqlSourcePlatformSqlOnPrem), - } -} - -func (s *SqlSourcePlatform) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSqlSourcePlatform(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSqlSourcePlatform(input string) (*SqlSourcePlatform, error) { - vals := map[string]SqlSourcePlatform{ - "sqlonprem": SqlSourcePlatformSqlOnPrem, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SqlSourcePlatform(input) - return &out, nil -} diff --git a/resource-manager/datamigration/2018-04-19/validatemigrationinputsqlserversqlmisynctasks/model_connectioninfo.go b/resource-manager/datamigration/2018-04-19/validatemigrationinputsqlserversqlmisynctasks/model_connectioninfo.go deleted file mode 100644 index f9e6da0fbf7..00000000000 --- a/resource-manager/datamigration/2018-04-19/validatemigrationinputsqlserversqlmisynctasks/model_connectioninfo.go +++ /dev/null @@ -1,61 +0,0 @@ -package validatemigrationinputsqlserversqlmisynctasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "MiSqlConnectionInfo") { - var out MiSqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MiSqlConnectionInfo: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "SqlConnectionInfo") { - var out SqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2018-04-19/validatemigrationinputsqlserversqlmisynctasks/model_misqlconnectioninfo.go b/resource-manager/datamigration/2018-04-19/validatemigrationinputsqlserversqlmisynctasks/model_misqlconnectioninfo.go deleted file mode 100644 index 0e2e5e9fdda..00000000000 --- a/resource-manager/datamigration/2018-04-19/validatemigrationinputsqlserversqlmisynctasks/model_misqlconnectioninfo.go +++ /dev/null @@ -1,43 +0,0 @@ -package validatemigrationinputsqlserversqlmisynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = MiSqlConnectionInfo{} - -type MiSqlConnectionInfo struct { - ManagedInstanceResourceId string `json:"managedInstanceResourceId"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = MiSqlConnectionInfo{} - -func (s MiSqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper MiSqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MiSqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MiSqlConnectionInfo: %+v", err) - } - decoded["type"] = "MiSqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MiSqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/validatemigrationinputsqlserversqlmisynctasks/model_sqlconnectioninfo.go b/resource-manager/datamigration/2018-04-19/validatemigrationinputsqlserversqlmisynctasks/model_sqlconnectioninfo.go deleted file mode 100644 index a44f563fedd..00000000000 --- a/resource-manager/datamigration/2018-04-19/validatemigrationinputsqlserversqlmisynctasks/model_sqlconnectioninfo.go +++ /dev/null @@ -1,48 +0,0 @@ -package validatemigrationinputsqlserversqlmisynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = SqlConnectionInfo{} - -type SqlConnectionInfo struct { - AdditionalSettings *string `json:"additionalSettings,omitempty"` - Authentication *AuthenticationType `json:"authentication,omitempty"` - DataSource string `json:"dataSource"` - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Platform *SqlSourcePlatform `json:"platform,omitempty"` - TrustServerCertificate *bool `json:"trustServerCertificate,omitempty"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = SqlConnectionInfo{} - -func (s SqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper SqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SqlConnectionInfo: %+v", err) - } - decoded["type"] = "SqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/validatemigrationinputsqlserversqlmisynctasks/version.go b/resource-manager/datamigration/2018-04-19/validatemigrationinputsqlserversqlmisynctasks/version.go deleted file mode 100644 index 22afa962b22..00000000000 --- a/resource-manager/datamigration/2018-04-19/validatemigrationinputsqlserversqlmisynctasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package validatemigrationinputsqlserversqlmisynctasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2018-04-19" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/validatemigrationinputsqlserversqlmisynctasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2018-04-19/validatemigrationinputsqlserversqlmitasks/README.md b/resource-manager/datamigration/2018-04-19/validatemigrationinputsqlserversqlmitasks/README.md deleted file mode 100644 index ffe6fc2f52d..00000000000 --- a/resource-manager/datamigration/2018-04-19/validatemigrationinputsqlserversqlmitasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/validatemigrationinputsqlserversqlmitasks` Documentation - -The `validatemigrationinputsqlserversqlmitasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2018-04-19`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/validatemigrationinputsqlserversqlmitasks" -``` - - -### Client Initialization - -```go -client := validatemigrationinputsqlserversqlmitasks.NewValidateMigrationInputSqlServerSqlMITasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2018-04-19/validatemigrationinputsqlserversqlmitasks/client.go b/resource-manager/datamigration/2018-04-19/validatemigrationinputsqlserversqlmitasks/client.go deleted file mode 100644 index a26585d76f0..00000000000 --- a/resource-manager/datamigration/2018-04-19/validatemigrationinputsqlserversqlmitasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package validatemigrationinputsqlserversqlmitasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ValidateMigrationInputSqlServerSqlMITasksClient struct { - Client *resourcemanager.Client -} - -func NewValidateMigrationInputSqlServerSqlMITasksClientWithBaseURI(sdkApi sdkEnv.Api) (*ValidateMigrationInputSqlServerSqlMITasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "validatemigrationinputsqlserversqlmitasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ValidateMigrationInputSqlServerSqlMITasksClient: %+v", err) - } - - return &ValidateMigrationInputSqlServerSqlMITasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2018-04-19/validatemigrationinputsqlserversqlmitasks/constants.go b/resource-manager/datamigration/2018-04-19/validatemigrationinputsqlserversqlmitasks/constants.go deleted file mode 100644 index b2b6ef7e22c..00000000000 --- a/resource-manager/datamigration/2018-04-19/validatemigrationinputsqlserversqlmitasks/constants.go +++ /dev/null @@ -1,98 +0,0 @@ -package validatemigrationinputsqlserversqlmitasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthenticationType string - -const ( - AuthenticationTypeActiveDirectoryIntegrated AuthenticationType = "ActiveDirectoryIntegrated" - AuthenticationTypeActiveDirectoryPassword AuthenticationType = "ActiveDirectoryPassword" - AuthenticationTypeNone AuthenticationType = "None" - AuthenticationTypeSqlAuthentication AuthenticationType = "SqlAuthentication" - AuthenticationTypeWindowsAuthentication AuthenticationType = "WindowsAuthentication" -) - -func PossibleValuesForAuthenticationType() []string { - return []string{ - string(AuthenticationTypeActiveDirectoryIntegrated), - string(AuthenticationTypeActiveDirectoryPassword), - string(AuthenticationTypeNone), - string(AuthenticationTypeSqlAuthentication), - string(AuthenticationTypeWindowsAuthentication), - } -} - -func (s *AuthenticationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAuthenticationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAuthenticationType(input string) (*AuthenticationType, error) { - vals := map[string]AuthenticationType{ - "activedirectoryintegrated": AuthenticationTypeActiveDirectoryIntegrated, - "activedirectorypassword": AuthenticationTypeActiveDirectoryPassword, - "none": AuthenticationTypeNone, - "sqlauthentication": AuthenticationTypeSqlAuthentication, - "windowsauthentication": AuthenticationTypeWindowsAuthentication, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AuthenticationType(input) - return &out, nil -} - -type SqlSourcePlatform string - -const ( - SqlSourcePlatformSqlOnPrem SqlSourcePlatform = "SqlOnPrem" -) - -func PossibleValuesForSqlSourcePlatform() []string { - return []string{ - string(SqlSourcePlatformSqlOnPrem), - } -} - -func (s *SqlSourcePlatform) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSqlSourcePlatform(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSqlSourcePlatform(input string) (*SqlSourcePlatform, error) { - vals := map[string]SqlSourcePlatform{ - "sqlonprem": SqlSourcePlatformSqlOnPrem, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SqlSourcePlatform(input) - return &out, nil -} diff --git a/resource-manager/datamigration/2018-04-19/validatemigrationinputsqlserversqlmitasks/model_connectioninfo.go b/resource-manager/datamigration/2018-04-19/validatemigrationinputsqlserversqlmitasks/model_connectioninfo.go deleted file mode 100644 index e0710ab0076..00000000000 --- a/resource-manager/datamigration/2018-04-19/validatemigrationinputsqlserversqlmitasks/model_connectioninfo.go +++ /dev/null @@ -1,53 +0,0 @@ -package validatemigrationinputsqlserversqlmitasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "SqlConnectionInfo") { - var out SqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2018-04-19/validatemigrationinputsqlserversqlmitasks/model_sqlconnectioninfo.go b/resource-manager/datamigration/2018-04-19/validatemigrationinputsqlserversqlmitasks/model_sqlconnectioninfo.go deleted file mode 100644 index b9250672b97..00000000000 --- a/resource-manager/datamigration/2018-04-19/validatemigrationinputsqlserversqlmitasks/model_sqlconnectioninfo.go +++ /dev/null @@ -1,48 +0,0 @@ -package validatemigrationinputsqlserversqlmitasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = SqlConnectionInfo{} - -type SqlConnectionInfo struct { - AdditionalSettings *string `json:"additionalSettings,omitempty"` - Authentication *AuthenticationType `json:"authentication,omitempty"` - DataSource string `json:"dataSource"` - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Platform *SqlSourcePlatform `json:"platform,omitempty"` - TrustServerCertificate *bool `json:"trustServerCertificate,omitempty"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = SqlConnectionInfo{} - -func (s SqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper SqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SqlConnectionInfo: %+v", err) - } - decoded["type"] = "SqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/validatemigrationinputsqlserversqlmitasks/version.go b/resource-manager/datamigration/2018-04-19/validatemigrationinputsqlserversqlmitasks/version.go deleted file mode 100644 index 00e8546e0cc..00000000000 --- a/resource-manager/datamigration/2018-04-19/validatemigrationinputsqlserversqlmitasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package validatemigrationinputsqlserversqlmitasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2018-04-19" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/validatemigrationinputsqlserversqlmitasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2018-04-19/validatesyncmigrationinputsqlservertasks/README.md b/resource-manager/datamigration/2018-04-19/validatesyncmigrationinputsqlservertasks/README.md deleted file mode 100644 index f247e4714c1..00000000000 --- a/resource-manager/datamigration/2018-04-19/validatesyncmigrationinputsqlservertasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/validatesyncmigrationinputsqlservertasks` Documentation - -The `validatesyncmigrationinputsqlservertasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2018-04-19`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/validatesyncmigrationinputsqlservertasks" -``` - - -### Client Initialization - -```go -client := validatesyncmigrationinputsqlservertasks.NewValidateSyncMigrationInputSqlServerTasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2018-04-19/validatesyncmigrationinputsqlservertasks/client.go b/resource-manager/datamigration/2018-04-19/validatesyncmigrationinputsqlservertasks/client.go deleted file mode 100644 index 5b213635314..00000000000 --- a/resource-manager/datamigration/2018-04-19/validatesyncmigrationinputsqlservertasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package validatesyncmigrationinputsqlservertasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ValidateSyncMigrationInputSqlServerTasksClient struct { - Client *resourcemanager.Client -} - -func NewValidateSyncMigrationInputSqlServerTasksClientWithBaseURI(sdkApi sdkEnv.Api) (*ValidateSyncMigrationInputSqlServerTasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "validatesyncmigrationinputsqlservertasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ValidateSyncMigrationInputSqlServerTasksClient: %+v", err) - } - - return &ValidateSyncMigrationInputSqlServerTasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2018-04-19/validatesyncmigrationinputsqlservertasks/constants.go b/resource-manager/datamigration/2018-04-19/validatesyncmigrationinputsqlservertasks/constants.go deleted file mode 100644 index c5e9e2edd3f..00000000000 --- a/resource-manager/datamigration/2018-04-19/validatesyncmigrationinputsqlservertasks/constants.go +++ /dev/null @@ -1,98 +0,0 @@ -package validatesyncmigrationinputsqlservertasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthenticationType string - -const ( - AuthenticationTypeActiveDirectoryIntegrated AuthenticationType = "ActiveDirectoryIntegrated" - AuthenticationTypeActiveDirectoryPassword AuthenticationType = "ActiveDirectoryPassword" - AuthenticationTypeNone AuthenticationType = "None" - AuthenticationTypeSqlAuthentication AuthenticationType = "SqlAuthentication" - AuthenticationTypeWindowsAuthentication AuthenticationType = "WindowsAuthentication" -) - -func PossibleValuesForAuthenticationType() []string { - return []string{ - string(AuthenticationTypeActiveDirectoryIntegrated), - string(AuthenticationTypeActiveDirectoryPassword), - string(AuthenticationTypeNone), - string(AuthenticationTypeSqlAuthentication), - string(AuthenticationTypeWindowsAuthentication), - } -} - -func (s *AuthenticationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAuthenticationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAuthenticationType(input string) (*AuthenticationType, error) { - vals := map[string]AuthenticationType{ - "activedirectoryintegrated": AuthenticationTypeActiveDirectoryIntegrated, - "activedirectorypassword": AuthenticationTypeActiveDirectoryPassword, - "none": AuthenticationTypeNone, - "sqlauthentication": AuthenticationTypeSqlAuthentication, - "windowsauthentication": AuthenticationTypeWindowsAuthentication, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AuthenticationType(input) - return &out, nil -} - -type SqlSourcePlatform string - -const ( - SqlSourcePlatformSqlOnPrem SqlSourcePlatform = "SqlOnPrem" -) - -func PossibleValuesForSqlSourcePlatform() []string { - return []string{ - string(SqlSourcePlatformSqlOnPrem), - } -} - -func (s *SqlSourcePlatform) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSqlSourcePlatform(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSqlSourcePlatform(input string) (*SqlSourcePlatform, error) { - vals := map[string]SqlSourcePlatform{ - "sqlonprem": SqlSourcePlatformSqlOnPrem, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SqlSourcePlatform(input) - return &out, nil -} diff --git a/resource-manager/datamigration/2018-04-19/validatesyncmigrationinputsqlservertasks/model_connectioninfo.go b/resource-manager/datamigration/2018-04-19/validatesyncmigrationinputsqlservertasks/model_connectioninfo.go deleted file mode 100644 index 7268c60c9dc..00000000000 --- a/resource-manager/datamigration/2018-04-19/validatesyncmigrationinputsqlservertasks/model_connectioninfo.go +++ /dev/null @@ -1,53 +0,0 @@ -package validatesyncmigrationinputsqlservertasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "SqlConnectionInfo") { - var out SqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2018-04-19/validatesyncmigrationinputsqlservertasks/model_sqlconnectioninfo.go b/resource-manager/datamigration/2018-04-19/validatesyncmigrationinputsqlservertasks/model_sqlconnectioninfo.go deleted file mode 100644 index 2483b37f663..00000000000 --- a/resource-manager/datamigration/2018-04-19/validatesyncmigrationinputsqlservertasks/model_sqlconnectioninfo.go +++ /dev/null @@ -1,48 +0,0 @@ -package validatesyncmigrationinputsqlservertasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = SqlConnectionInfo{} - -type SqlConnectionInfo struct { - AdditionalSettings *string `json:"additionalSettings,omitempty"` - Authentication *AuthenticationType `json:"authentication,omitempty"` - DataSource string `json:"dataSource"` - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Platform *SqlSourcePlatform `json:"platform,omitempty"` - TrustServerCertificate *bool `json:"trustServerCertificate,omitempty"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = SqlConnectionInfo{} - -func (s SqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper SqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SqlConnectionInfo: %+v", err) - } - decoded["type"] = "SqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2018-04-19/validatesyncmigrationinputsqlservertasks/version.go b/resource-manager/datamigration/2018-04-19/validatesyncmigrationinputsqlservertasks/version.go deleted file mode 100644 index 8843860fadb..00000000000 --- a/resource-manager/datamigration/2018-04-19/validatesyncmigrationinputsqlservertasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package validatesyncmigrationinputsqlservertasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2018-04-19" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/validatesyncmigrationinputsqlservertasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2021-06-30/client.go b/resource-manager/datamigration/2021-06-30/client.go index e91613cb57d..fd4ae7c7687 100644 --- a/resource-manager/datamigration/2021-06-30/client.go +++ b/resource-manager/datamigration/2021-06-30/client.go @@ -6,170 +6,40 @@ package v2021_06_30 import ( "fmt" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/commands" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/commons" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/connecttosourcemysqltasks" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/connecttosourcepostgresqlsynctasks" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/connecttosourcesqlservertasks" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/connecttotargetazuredbformysqltasks" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/connecttotargetazuredbforpostgresqlsynctasks" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/connecttotargetsqldbtasks" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/connecttotargetsqlmisynctasks" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/connecttotargetsqlmitasks" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/connecttotargetsqlsqldbsynctasks" "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/customoperation" "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/delete" "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/fieresource" "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/fileresource" "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/get" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/gettdecertificatessqltasks" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/getusertablesmysqltasks" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/getusertablessqlsynctasks" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/getusertablessqltasks" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlofflinetasks" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlsynctasks" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/migratepostgresqlazuredbforpostgresqlsynctasks" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/migratesqlserversqldbsynctasks" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/migratesqlserversqlmisynctasks" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/migratesqlserversqlmitasks" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/migratessistasks" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/mongodbtasks" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/oracleazuredbpostgresqlsynctasks" "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/patch" "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/post" "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/projectresource" "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/put" "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/serviceresource" "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/servicetaskresource" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/servicetasks" "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/standardoperation" "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/taskresource" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/tasks" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/taskscommons" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/validatemigrationinputsqlserversqlmisynctasks" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/validatemigrationinputsqlserversqlmitasks" - "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/validatesyncmigrationinputsqlservertasks" "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" ) type Client struct { - Commands *commands.CommandsClient - Commons *commons.CommonsClient - ConnectToSourceMySqlTasks *connecttosourcemysqltasks.ConnectToSourceMySqlTasksClient - ConnectToSourcePostgreSqlSyncTasks *connecttosourcepostgresqlsynctasks.ConnectToSourcePostgreSqlSyncTasksClient - ConnectToSourceSqlServerTasks *connecttosourcesqlservertasks.ConnectToSourceSqlServerTasksClient - ConnectToTargetAzureDbForMySqlTasks *connecttotargetazuredbformysqltasks.ConnectToTargetAzureDbForMySqlTasksClient - ConnectToTargetAzureDbForPostgreSqlSyncTasks *connecttotargetazuredbforpostgresqlsynctasks.ConnectToTargetAzureDbForPostgreSqlSyncTasksClient - ConnectToTargetSqlDbTasks *connecttotargetsqldbtasks.ConnectToTargetSqlDbTasksClient - ConnectToTargetSqlMITasks *connecttotargetsqlmitasks.ConnectToTargetSqlMITasksClient - ConnectToTargetSqlMiSyncTasks *connecttotargetsqlmisynctasks.ConnectToTargetSqlMiSyncTasksClient - ConnectToTargetSqlSqlDbSyncTasks *connecttotargetsqlsqldbsynctasks.ConnectToTargetSqlSqlDbSyncTasksClient - CustomOperation *customoperation.CustomOperationClient - DELETE *delete.DELETEClient - FieResource *fieresource.FieResourceClient - FileResource *fileresource.FileResourceClient - GET *get.GETClient - GetTdeCertificatesSqlTasks *gettdecertificatessqltasks.GetTdeCertificatesSqlTasksClient - GetUserTablesMySqlTasks *getusertablesmysqltasks.GetUserTablesMySqlTasksClient - GetUserTablesSqlSyncTasks *getusertablessqlsynctasks.GetUserTablesSqlSyncTasksClient - GetUserTablesSqlTasks *getusertablessqltasks.GetUserTablesSqlTasksClient - MigrateMySqlAzureDbForMySqlOfflineTasks *migratemysqlazuredbformysqlofflinetasks.MigrateMySqlAzureDbForMySqlOfflineTasksClient - MigrateMySqlAzureDbForMySqlSyncTasks *migratemysqlazuredbformysqlsynctasks.MigrateMySqlAzureDbForMySqlSyncTasksClient - MigratePostgreSqlAzureDbForPostgreSqlSyncTasks *migratepostgresqlazuredbforpostgresqlsynctasks.MigratePostgreSqlAzureDbForPostgreSqlSyncTasksClient - MigrateSchemaSqlServerSqlDbTasks *migrateschemasqlserversqldbtasks.MigrateSchemaSqlServerSqlDbTasksClient - MigrateSqlServerSqlDbSyncTasks *migratesqlserversqldbsynctasks.MigrateSqlServerSqlDbSyncTasksClient - MigrateSqlServerSqlDbTasks *migratesqlserversqldbtasks.MigrateSqlServerSqlDbTasksClient - MigrateSqlServerSqlMITasks *migratesqlserversqlmitasks.MigrateSqlServerSqlMITasksClient - MigrateSqlServerSqlMiSyncTasks *migratesqlserversqlmisynctasks.MigrateSqlServerSqlMiSyncTasksClient - MigrateSsisTasks *migratessistasks.MigrateSsisTasksClient - MongoDbTasks *mongodbtasks.MongoDbTasksClient - OracleAzureDbPostgreSqlSyncTasks *oracleazuredbpostgresqlsynctasks.OracleAzureDbPostgreSqlSyncTasksClient - PATCH *patch.PATCHClient - POST *post.POSTClient - PUT *put.PUTClient - ProjectResource *projectresource.ProjectResourceClient - ServiceResource *serviceresource.ServiceResourceClient - ServiceTaskResource *servicetaskresource.ServiceTaskResourceClient - ServiceTasks *servicetasks.ServiceTasksClient - StandardOperation *standardoperation.StandardOperationClient - TaskResource *taskresource.TaskResourceClient - Tasks *tasks.TasksClient - TasksCommons *taskscommons.TasksCommonsClient - ValidateMigrationInputSqlServerSqlMITasks *validatemigrationinputsqlserversqlmitasks.ValidateMigrationInputSqlServerSqlMITasksClient - ValidateMigrationInputSqlServerSqlMiSyncTasks *validatemigrationinputsqlserversqlmisynctasks.ValidateMigrationInputSqlServerSqlMiSyncTasksClient - ValidateSyncMigrationInputSqlServerTasks *validatesyncmigrationinputsqlservertasks.ValidateSyncMigrationInputSqlServerTasksClient + CustomOperation *customoperation.CustomOperationClient + DELETE *delete.DELETEClient + FieResource *fieresource.FieResourceClient + FileResource *fileresource.FileResourceClient + GET *get.GETClient + PATCH *patch.PATCHClient + POST *post.POSTClient + PUT *put.PUTClient + ProjectResource *projectresource.ProjectResourceClient + ServiceResource *serviceresource.ServiceResourceClient + ServiceTaskResource *servicetaskresource.ServiceTaskResourceClient + StandardOperation *standardoperation.StandardOperationClient + TaskResource *taskresource.TaskResourceClient } func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanager.Client)) (*Client, error) { - commandsClient, err := commands.NewCommandsClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building Commands client: %+v", err) - } - configureFunc(commandsClient.Client) - - commonsClient, err := commons.NewCommonsClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building Commons client: %+v", err) - } - configureFunc(commonsClient.Client) - - connectToSourceMySqlTasksClient, err := connecttosourcemysqltasks.NewConnectToSourceMySqlTasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building ConnectToSourceMySqlTasks client: %+v", err) - } - configureFunc(connectToSourceMySqlTasksClient.Client) - - connectToSourcePostgreSqlSyncTasksClient, err := connecttosourcepostgresqlsynctasks.NewConnectToSourcePostgreSqlSyncTasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building ConnectToSourcePostgreSqlSyncTasks client: %+v", err) - } - configureFunc(connectToSourcePostgreSqlSyncTasksClient.Client) - - connectToSourceSqlServerTasksClient, err := connecttosourcesqlservertasks.NewConnectToSourceSqlServerTasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building ConnectToSourceSqlServerTasks client: %+v", err) - } - configureFunc(connectToSourceSqlServerTasksClient.Client) - - connectToTargetAzureDbForMySqlTasksClient, err := connecttotargetazuredbformysqltasks.NewConnectToTargetAzureDbForMySqlTasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building ConnectToTargetAzureDbForMySqlTasks client: %+v", err) - } - configureFunc(connectToTargetAzureDbForMySqlTasksClient.Client) - - connectToTargetAzureDbForPostgreSqlSyncTasksClient, err := connecttotargetazuredbforpostgresqlsynctasks.NewConnectToTargetAzureDbForPostgreSqlSyncTasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building ConnectToTargetAzureDbForPostgreSqlSyncTasks client: %+v", err) - } - configureFunc(connectToTargetAzureDbForPostgreSqlSyncTasksClient.Client) - - connectToTargetSqlDbTasksClient, err := connecttotargetsqldbtasks.NewConnectToTargetSqlDbTasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building ConnectToTargetSqlDbTasks client: %+v", err) - } - configureFunc(connectToTargetSqlDbTasksClient.Client) - - connectToTargetSqlMITasksClient, err := connecttotargetsqlmitasks.NewConnectToTargetSqlMITasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building ConnectToTargetSqlMITasks client: %+v", err) - } - configureFunc(connectToTargetSqlMITasksClient.Client) - - connectToTargetSqlMiSyncTasksClient, err := connecttotargetsqlmisynctasks.NewConnectToTargetSqlMiSyncTasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building ConnectToTargetSqlMiSyncTasks client: %+v", err) - } - configureFunc(connectToTargetSqlMiSyncTasksClient.Client) - - connectToTargetSqlSqlDbSyncTasksClient, err := connecttotargetsqlsqldbsynctasks.NewConnectToTargetSqlSqlDbSyncTasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building ConnectToTargetSqlSqlDbSyncTasks client: %+v", err) - } - configureFunc(connectToTargetSqlSqlDbSyncTasksClient.Client) - customOperationClient, err := customoperation.NewCustomOperationClientWithBaseURI(sdkApi) if err != nil { return nil, fmt.Errorf("building CustomOperation client: %+v", err) @@ -200,96 +70,6 @@ func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanag } configureFunc(gETClient.Client) - getTdeCertificatesSqlTasksClient, err := gettdecertificatessqltasks.NewGetTdeCertificatesSqlTasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building GetTdeCertificatesSqlTasks client: %+v", err) - } - configureFunc(getTdeCertificatesSqlTasksClient.Client) - - getUserTablesMySqlTasksClient, err := getusertablesmysqltasks.NewGetUserTablesMySqlTasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building GetUserTablesMySqlTasks client: %+v", err) - } - configureFunc(getUserTablesMySqlTasksClient.Client) - - getUserTablesSqlSyncTasksClient, err := getusertablessqlsynctasks.NewGetUserTablesSqlSyncTasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building GetUserTablesSqlSyncTasks client: %+v", err) - } - configureFunc(getUserTablesSqlSyncTasksClient.Client) - - getUserTablesSqlTasksClient, err := getusertablessqltasks.NewGetUserTablesSqlTasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building GetUserTablesSqlTasks client: %+v", err) - } - configureFunc(getUserTablesSqlTasksClient.Client) - - migrateMySqlAzureDbForMySqlOfflineTasksClient, err := migratemysqlazuredbformysqlofflinetasks.NewMigrateMySqlAzureDbForMySqlOfflineTasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building MigrateMySqlAzureDbForMySqlOfflineTasks client: %+v", err) - } - configureFunc(migrateMySqlAzureDbForMySqlOfflineTasksClient.Client) - - migrateMySqlAzureDbForMySqlSyncTasksClient, err := migratemysqlazuredbformysqlsynctasks.NewMigrateMySqlAzureDbForMySqlSyncTasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building MigrateMySqlAzureDbForMySqlSyncTasks client: %+v", err) - } - configureFunc(migrateMySqlAzureDbForMySqlSyncTasksClient.Client) - - migratePostgreSqlAzureDbForPostgreSqlSyncTasksClient, err := migratepostgresqlazuredbforpostgresqlsynctasks.NewMigratePostgreSqlAzureDbForPostgreSqlSyncTasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building MigratePostgreSqlAzureDbForPostgreSqlSyncTasks client: %+v", err) - } - configureFunc(migratePostgreSqlAzureDbForPostgreSqlSyncTasksClient.Client) - - migrateSchemaSqlServerSqlDbTasksClient, err := migrateschemasqlserversqldbtasks.NewMigrateSchemaSqlServerSqlDbTasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building MigrateSchemaSqlServerSqlDbTasks client: %+v", err) - } - configureFunc(migrateSchemaSqlServerSqlDbTasksClient.Client) - - migrateSqlServerSqlDbSyncTasksClient, err := migratesqlserversqldbsynctasks.NewMigrateSqlServerSqlDbSyncTasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building MigrateSqlServerSqlDbSyncTasks client: %+v", err) - } - configureFunc(migrateSqlServerSqlDbSyncTasksClient.Client) - - migrateSqlServerSqlDbTasksClient, err := migratesqlserversqldbtasks.NewMigrateSqlServerSqlDbTasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building MigrateSqlServerSqlDbTasks client: %+v", err) - } - configureFunc(migrateSqlServerSqlDbTasksClient.Client) - - migrateSqlServerSqlMITasksClient, err := migratesqlserversqlmitasks.NewMigrateSqlServerSqlMITasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building MigrateSqlServerSqlMITasks client: %+v", err) - } - configureFunc(migrateSqlServerSqlMITasksClient.Client) - - migrateSqlServerSqlMiSyncTasksClient, err := migratesqlserversqlmisynctasks.NewMigrateSqlServerSqlMiSyncTasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building MigrateSqlServerSqlMiSyncTasks client: %+v", err) - } - configureFunc(migrateSqlServerSqlMiSyncTasksClient.Client) - - migrateSsisTasksClient, err := migratessistasks.NewMigrateSsisTasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building MigrateSsisTasks client: %+v", err) - } - configureFunc(migrateSsisTasksClient.Client) - - mongoDbTasksClient, err := mongodbtasks.NewMongoDbTasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building MongoDbTasks client: %+v", err) - } - configureFunc(mongoDbTasksClient.Client) - - oracleAzureDbPostgreSqlSyncTasksClient, err := oracleazuredbpostgresqlsynctasks.NewOracleAzureDbPostgreSqlSyncTasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building OracleAzureDbPostgreSqlSyncTasks client: %+v", err) - } - configureFunc(oracleAzureDbPostgreSqlSyncTasksClient.Client) - pATCHClient, err := patch.NewPATCHClientWithBaseURI(sdkApi) if err != nil { return nil, fmt.Errorf("building PATCH client: %+v", err) @@ -326,12 +106,6 @@ func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanag } configureFunc(serviceTaskResourceClient.Client) - serviceTasksClient, err := servicetasks.NewServiceTasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building ServiceTasks client: %+v", err) - } - configureFunc(serviceTasksClient.Client) - standardOperationClient, err := standardoperation.NewStandardOperationClientWithBaseURI(sdkApi) if err != nil { return nil, fmt.Errorf("building StandardOperation client: %+v", err) @@ -344,81 +118,19 @@ func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanag } configureFunc(taskResourceClient.Client) - tasksClient, err := tasks.NewTasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building Tasks client: %+v", err) - } - configureFunc(tasksClient.Client) - - tasksCommonsClient, err := taskscommons.NewTasksCommonsClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building TasksCommons client: %+v", err) - } - configureFunc(tasksCommonsClient.Client) - - validateMigrationInputSqlServerSqlMITasksClient, err := validatemigrationinputsqlserversqlmitasks.NewValidateMigrationInputSqlServerSqlMITasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building ValidateMigrationInputSqlServerSqlMITasks client: %+v", err) - } - configureFunc(validateMigrationInputSqlServerSqlMITasksClient.Client) - - validateMigrationInputSqlServerSqlMiSyncTasksClient, err := validatemigrationinputsqlserversqlmisynctasks.NewValidateMigrationInputSqlServerSqlMiSyncTasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building ValidateMigrationInputSqlServerSqlMiSyncTasks client: %+v", err) - } - configureFunc(validateMigrationInputSqlServerSqlMiSyncTasksClient.Client) - - validateSyncMigrationInputSqlServerTasksClient, err := validatesyncmigrationinputsqlservertasks.NewValidateSyncMigrationInputSqlServerTasksClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building ValidateSyncMigrationInputSqlServerTasks client: %+v", err) - } - configureFunc(validateSyncMigrationInputSqlServerTasksClient.Client) - return &Client{ - Commands: commandsClient, - Commons: commonsClient, - ConnectToSourceMySqlTasks: connectToSourceMySqlTasksClient, - ConnectToSourcePostgreSqlSyncTasks: connectToSourcePostgreSqlSyncTasksClient, - ConnectToSourceSqlServerTasks: connectToSourceSqlServerTasksClient, - ConnectToTargetAzureDbForMySqlTasks: connectToTargetAzureDbForMySqlTasksClient, - ConnectToTargetAzureDbForPostgreSqlSyncTasks: connectToTargetAzureDbForPostgreSqlSyncTasksClient, - ConnectToTargetSqlDbTasks: connectToTargetSqlDbTasksClient, - ConnectToTargetSqlMITasks: connectToTargetSqlMITasksClient, - ConnectToTargetSqlMiSyncTasks: connectToTargetSqlMiSyncTasksClient, - ConnectToTargetSqlSqlDbSyncTasks: connectToTargetSqlSqlDbSyncTasksClient, - CustomOperation: customOperationClient, - DELETE: dELETEClient, - FieResource: fieResourceClient, - FileResource: fileResourceClient, - GET: gETClient, - GetTdeCertificatesSqlTasks: getTdeCertificatesSqlTasksClient, - GetUserTablesMySqlTasks: getUserTablesMySqlTasksClient, - GetUserTablesSqlSyncTasks: getUserTablesSqlSyncTasksClient, - GetUserTablesSqlTasks: getUserTablesSqlTasksClient, - MigrateMySqlAzureDbForMySqlOfflineTasks: migrateMySqlAzureDbForMySqlOfflineTasksClient, - MigrateMySqlAzureDbForMySqlSyncTasks: migrateMySqlAzureDbForMySqlSyncTasksClient, - MigratePostgreSqlAzureDbForPostgreSqlSyncTasks: migratePostgreSqlAzureDbForPostgreSqlSyncTasksClient, - MigrateSchemaSqlServerSqlDbTasks: migrateSchemaSqlServerSqlDbTasksClient, - MigrateSqlServerSqlDbSyncTasks: migrateSqlServerSqlDbSyncTasksClient, - MigrateSqlServerSqlDbTasks: migrateSqlServerSqlDbTasksClient, - MigrateSqlServerSqlMITasks: migrateSqlServerSqlMITasksClient, - MigrateSqlServerSqlMiSyncTasks: migrateSqlServerSqlMiSyncTasksClient, - MigrateSsisTasks: migrateSsisTasksClient, - MongoDbTasks: mongoDbTasksClient, - OracleAzureDbPostgreSqlSyncTasks: oracleAzureDbPostgreSqlSyncTasksClient, - PATCH: pATCHClient, - POST: pOSTClient, - PUT: pUTClient, - ProjectResource: projectResourceClient, - ServiceResource: serviceResourceClient, - ServiceTaskResource: serviceTaskResourceClient, - ServiceTasks: serviceTasksClient, - StandardOperation: standardOperationClient, - TaskResource: taskResourceClient, - Tasks: tasksClient, - TasksCommons: tasksCommonsClient, - ValidateMigrationInputSqlServerSqlMITasks: validateMigrationInputSqlServerSqlMITasksClient, - ValidateMigrationInputSqlServerSqlMiSyncTasks: validateMigrationInputSqlServerSqlMiSyncTasksClient, - ValidateSyncMigrationInputSqlServerTasks: validateSyncMigrationInputSqlServerTasksClient, + CustomOperation: customOperationClient, + DELETE: dELETEClient, + FieResource: fieResourceClient, + FileResource: fileResourceClient, + GET: gETClient, + PATCH: pATCHClient, + POST: pOSTClient, + PUT: pUTClient, + ProjectResource: projectResourceClient, + ServiceResource: serviceResourceClient, + ServiceTaskResource: serviceTaskResourceClient, + StandardOperation: standardOperationClient, + TaskResource: taskResourceClient, }, nil } diff --git a/resource-manager/datamigration/2021-06-30/commands/README.md b/resource-manager/datamigration/2021-06-30/commands/README.md deleted file mode 100644 index acddd99bad9..00000000000 --- a/resource-manager/datamigration/2021-06-30/commands/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/commands` Documentation - -The `commands` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2021-06-30`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/commands" -``` - - -### Client Initialization - -```go -client := commands.NewCommandsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2021-06-30/commands/client.go b/resource-manager/datamigration/2021-06-30/commands/client.go deleted file mode 100644 index dc12a110a1a..00000000000 --- a/resource-manager/datamigration/2021-06-30/commands/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package commands - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CommandsClient struct { - Client *resourcemanager.Client -} - -func NewCommandsClientWithBaseURI(sdkApi sdkEnv.Api) (*CommandsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "commands", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating CommandsClient: %+v", err) - } - - return &CommandsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2021-06-30/commands/constants.go b/resource-manager/datamigration/2021-06-30/commands/constants.go deleted file mode 100644 index ef4bbb756f9..00000000000 --- a/resource-manager/datamigration/2021-06-30/commands/constants.go +++ /dev/null @@ -1,60 +0,0 @@ -package commands - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CommandState string - -const ( - CommandStateAccepted CommandState = "Accepted" - CommandStateFailed CommandState = "Failed" - CommandStateRunning CommandState = "Running" - CommandStateSucceeded CommandState = "Succeeded" - CommandStateUnknown CommandState = "Unknown" -) - -func PossibleValuesForCommandState() []string { - return []string{ - string(CommandStateAccepted), - string(CommandStateFailed), - string(CommandStateRunning), - string(CommandStateSucceeded), - string(CommandStateUnknown), - } -} - -func (s *CommandState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseCommandState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseCommandState(input string) (*CommandState, error) { - vals := map[string]CommandState{ - "accepted": CommandStateAccepted, - "failed": CommandStateFailed, - "running": CommandStateRunning, - "succeeded": CommandStateSucceeded, - "unknown": CommandStateUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := CommandState(input) - return &out, nil -} diff --git a/resource-manager/datamigration/2021-06-30/commands/model_commandproperties.go b/resource-manager/datamigration/2021-06-30/commands/model_commandproperties.go deleted file mode 100644 index 83e09a6ff6a..00000000000 --- a/resource-manager/datamigration/2021-06-30/commands/model_commandproperties.go +++ /dev/null @@ -1,61 +0,0 @@ -package commands - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CommandProperties interface { -} - -// RawCommandPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawCommandPropertiesImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalCommandPropertiesImplementation(input []byte) (CommandProperties, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling CommandProperties into map[string]interface: %+v", err) - } - - value, ok := temp["commandType"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "Migrate.SqlServer.AzureDbSqlMi.Complete") { - var out MigrateMISyncCompleteCommandProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateMISyncCompleteCommandProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Migrate.Sync.Complete.Database") { - var out MigrateSyncCompleteCommandProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSyncCompleteCommandProperties: %+v", err) - } - return out, nil - } - - out := RawCommandPropertiesImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2021-06-30/commands/model_migratemisynccompletecommandinput.go b/resource-manager/datamigration/2021-06-30/commands/model_migratemisynccompletecommandinput.go deleted file mode 100644 index ed13e1b75e6..00000000000 --- a/resource-manager/datamigration/2021-06-30/commands/model_migratemisynccompletecommandinput.go +++ /dev/null @@ -1,8 +0,0 @@ -package commands - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateMISyncCompleteCommandInput struct { - SourceDatabaseName string `json:"sourceDatabaseName"` -} diff --git a/resource-manager/datamigration/2021-06-30/commands/model_migratemisynccompletecommandoutput.go b/resource-manager/datamigration/2021-06-30/commands/model_migratemisynccompletecommandoutput.go deleted file mode 100644 index 5d155689746..00000000000 --- a/resource-manager/datamigration/2021-06-30/commands/model_migratemisynccompletecommandoutput.go +++ /dev/null @@ -1,8 +0,0 @@ -package commands - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateMISyncCompleteCommandOutput struct { - Errors *[]ReportableException `json:"errors,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/commands/model_migratemisynccompletecommandproperties.go b/resource-manager/datamigration/2021-06-30/commands/model_migratemisynccompletecommandproperties.go deleted file mode 100644 index bb7ad743c37..00000000000 --- a/resource-manager/datamigration/2021-06-30/commands/model_migratemisynccompletecommandproperties.go +++ /dev/null @@ -1,44 +0,0 @@ -package commands - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ CommandProperties = MigrateMISyncCompleteCommandProperties{} - -type MigrateMISyncCompleteCommandProperties struct { - Input *MigrateMISyncCompleteCommandInput `json:"input,omitempty"` - Output *MigrateMISyncCompleteCommandOutput `json:"output,omitempty"` - - // Fields inherited from CommandProperties - Errors *[]ODataError `json:"errors,omitempty"` - State *CommandState `json:"state,omitempty"` -} - -var _ json.Marshaler = MigrateMISyncCompleteCommandProperties{} - -func (s MigrateMISyncCompleteCommandProperties) MarshalJSON() ([]byte, error) { - type wrapper MigrateMISyncCompleteCommandProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateMISyncCompleteCommandProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateMISyncCompleteCommandProperties: %+v", err) - } - decoded["commandType"] = "Migrate.SqlServer.AzureDbSqlMi.Complete" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateMISyncCompleteCommandProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/commands/model_migratesynccompletecommandinput.go b/resource-manager/datamigration/2021-06-30/commands/model_migratesynccompletecommandinput.go deleted file mode 100644 index 1f08a834f7b..00000000000 --- a/resource-manager/datamigration/2021-06-30/commands/model_migratesynccompletecommandinput.go +++ /dev/null @@ -1,27 +0,0 @@ -package commands - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateSyncCompleteCommandInput struct { - CommitTimeStamp *string `json:"commitTimeStamp,omitempty"` - DatabaseName string `json:"databaseName"` -} - -func (o *MigrateSyncCompleteCommandInput) GetCommitTimeStampAsTime() (*time.Time, error) { - if o.CommitTimeStamp == nil { - return nil, nil - } - return dates.ParseAsFormat(o.CommitTimeStamp, "2006-01-02T15:04:05Z07:00") -} - -func (o *MigrateSyncCompleteCommandInput) SetCommitTimeStampAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.CommitTimeStamp = &formatted -} diff --git a/resource-manager/datamigration/2021-06-30/commands/model_migratesynccompletecommandoutput.go b/resource-manager/datamigration/2021-06-30/commands/model_migratesynccompletecommandoutput.go deleted file mode 100644 index d292a30ec26..00000000000 --- a/resource-manager/datamigration/2021-06-30/commands/model_migratesynccompletecommandoutput.go +++ /dev/null @@ -1,9 +0,0 @@ -package commands - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateSyncCompleteCommandOutput struct { - Errors *[]ReportableException `json:"errors,omitempty"` - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/commands/model_migratesynccompletecommandproperties.go b/resource-manager/datamigration/2021-06-30/commands/model_migratesynccompletecommandproperties.go deleted file mode 100644 index 6e05ff8bcba..00000000000 --- a/resource-manager/datamigration/2021-06-30/commands/model_migratesynccompletecommandproperties.go +++ /dev/null @@ -1,44 +0,0 @@ -package commands - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ CommandProperties = MigrateSyncCompleteCommandProperties{} - -type MigrateSyncCompleteCommandProperties struct { - Input *MigrateSyncCompleteCommandInput `json:"input,omitempty"` - Output *MigrateSyncCompleteCommandOutput `json:"output,omitempty"` - - // Fields inherited from CommandProperties - Errors *[]ODataError `json:"errors,omitempty"` - State *CommandState `json:"state,omitempty"` -} - -var _ json.Marshaler = MigrateSyncCompleteCommandProperties{} - -func (s MigrateSyncCompleteCommandProperties) MarshalJSON() ([]byte, error) { - type wrapper MigrateSyncCompleteCommandProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSyncCompleteCommandProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSyncCompleteCommandProperties: %+v", err) - } - decoded["commandType"] = "Migrate.Sync.Complete.Database" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSyncCompleteCommandProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/commands/model_odataerror.go b/resource-manager/datamigration/2021-06-30/commands/model_odataerror.go deleted file mode 100644 index 283b8bb13b9..00000000000 --- a/resource-manager/datamigration/2021-06-30/commands/model_odataerror.go +++ /dev/null @@ -1,10 +0,0 @@ -package commands - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ODataError struct { - Code *string `json:"code,omitempty"` - Details *[]ODataError `json:"details,omitempty"` - Message *string `json:"message,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/commands/model_reportableexception.go b/resource-manager/datamigration/2021-06-30/commands/model_reportableexception.go deleted file mode 100644 index 6efc3158889..00000000000 --- a/resource-manager/datamigration/2021-06-30/commands/model_reportableexception.go +++ /dev/null @@ -1,13 +0,0 @@ -package commands - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ReportableException struct { - ActionableMessage *string `json:"actionableMessage,omitempty"` - FilePath *string `json:"filePath,omitempty"` - HResult *int64 `json:"hResult,omitempty"` - LineNumber *string `json:"lineNumber,omitempty"` - Message *string `json:"message,omitempty"` - StackTrace *string `json:"stackTrace,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/commands/version.go b/resource-manager/datamigration/2021-06-30/commands/version.go deleted file mode 100644 index 3d13038e0d3..00000000000 --- a/resource-manager/datamigration/2021-06-30/commands/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package commands - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-06-30" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/commands/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2021-06-30/commons/README.md b/resource-manager/datamigration/2021-06-30/commons/README.md deleted file mode 100644 index f57c3192894..00000000000 --- a/resource-manager/datamigration/2021-06-30/commons/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/commons` Documentation - -The `commons` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2021-06-30`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/commons" -``` - - -### Client Initialization - -```go -client := commons.NewCommonsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2021-06-30/commons/client.go b/resource-manager/datamigration/2021-06-30/commons/client.go deleted file mode 100644 index 8677c2147d1..00000000000 --- a/resource-manager/datamigration/2021-06-30/commons/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package commons - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CommonsClient struct { - Client *resourcemanager.Client -} - -func NewCommonsClientWithBaseURI(sdkApi sdkEnv.Api) (*CommonsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "commons", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating CommonsClient: %+v", err) - } - - return &CommonsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2021-06-30/commons/constants.go b/resource-manager/datamigration/2021-06-30/commons/constants.go deleted file mode 100644 index dbab7838249..00000000000 --- a/resource-manager/datamigration/2021-06-30/commons/constants.go +++ /dev/null @@ -1,98 +0,0 @@ -package commons - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthenticationType string - -const ( - AuthenticationTypeActiveDirectoryIntegrated AuthenticationType = "ActiveDirectoryIntegrated" - AuthenticationTypeActiveDirectoryPassword AuthenticationType = "ActiveDirectoryPassword" - AuthenticationTypeNone AuthenticationType = "None" - AuthenticationTypeSqlAuthentication AuthenticationType = "SqlAuthentication" - AuthenticationTypeWindowsAuthentication AuthenticationType = "WindowsAuthentication" -) - -func PossibleValuesForAuthenticationType() []string { - return []string{ - string(AuthenticationTypeActiveDirectoryIntegrated), - string(AuthenticationTypeActiveDirectoryPassword), - string(AuthenticationTypeNone), - string(AuthenticationTypeSqlAuthentication), - string(AuthenticationTypeWindowsAuthentication), - } -} - -func (s *AuthenticationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAuthenticationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAuthenticationType(input string) (*AuthenticationType, error) { - vals := map[string]AuthenticationType{ - "activedirectoryintegrated": AuthenticationTypeActiveDirectoryIntegrated, - "activedirectorypassword": AuthenticationTypeActiveDirectoryPassword, - "none": AuthenticationTypeNone, - "sqlauthentication": AuthenticationTypeSqlAuthentication, - "windowsauthentication": AuthenticationTypeWindowsAuthentication, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AuthenticationType(input) - return &out, nil -} - -type SqlSourcePlatform string - -const ( - SqlSourcePlatformSqlOnPrem SqlSourcePlatform = "SqlOnPrem" -) - -func PossibleValuesForSqlSourcePlatform() []string { - return []string{ - string(SqlSourcePlatformSqlOnPrem), - } -} - -func (s *SqlSourcePlatform) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSqlSourcePlatform(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSqlSourcePlatform(input string) (*SqlSourcePlatform, error) { - vals := map[string]SqlSourcePlatform{ - "sqlonprem": SqlSourcePlatformSqlOnPrem, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SqlSourcePlatform(input) - return &out, nil -} diff --git a/resource-manager/datamigration/2021-06-30/commons/model_connectioninfo.go b/resource-manager/datamigration/2021-06-30/commons/model_connectioninfo.go deleted file mode 100644 index 4e7f54c7c3f..00000000000 --- a/resource-manager/datamigration/2021-06-30/commons/model_connectioninfo.go +++ /dev/null @@ -1,85 +0,0 @@ -package commons - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "MiSqlConnectionInfo") { - var out MiSqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MiSqlConnectionInfo: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "MySqlConnectionInfo") { - var out MySqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MySqlConnectionInfo: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "OracleConnectionInfo") { - var out OracleConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into OracleConnectionInfo: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "PostgreSqlConnectionInfo") { - var out PostgreSqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into PostgreSqlConnectionInfo: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "SqlConnectionInfo") { - var out SqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2021-06-30/commons/model_misqlconnectioninfo.go b/resource-manager/datamigration/2021-06-30/commons/model_misqlconnectioninfo.go deleted file mode 100644 index cb04fac2b14..00000000000 --- a/resource-manager/datamigration/2021-06-30/commons/model_misqlconnectioninfo.go +++ /dev/null @@ -1,43 +0,0 @@ -package commons - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = MiSqlConnectionInfo{} - -type MiSqlConnectionInfo struct { - ManagedInstanceResourceId string `json:"managedInstanceResourceId"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = MiSqlConnectionInfo{} - -func (s MiSqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper MiSqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MiSqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MiSqlConnectionInfo: %+v", err) - } - decoded["type"] = "MiSqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MiSqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/commons/model_mysqlconnectioninfo.go b/resource-manager/datamigration/2021-06-30/commons/model_mysqlconnectioninfo.go deleted file mode 100644 index 2a21e8cc7b4..00000000000 --- a/resource-manager/datamigration/2021-06-30/commons/model_mysqlconnectioninfo.go +++ /dev/null @@ -1,45 +0,0 @@ -package commons - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = MySqlConnectionInfo{} - -type MySqlConnectionInfo struct { - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Port int64 `json:"port"` - ServerName string `json:"serverName"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = MySqlConnectionInfo{} - -func (s MySqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper MySqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MySqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MySqlConnectionInfo: %+v", err) - } - decoded["type"] = "MySqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MySqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/commons/model_oracleconnectioninfo.go b/resource-manager/datamigration/2021-06-30/commons/model_oracleconnectioninfo.go deleted file mode 100644 index dd1246b4537..00000000000 --- a/resource-manager/datamigration/2021-06-30/commons/model_oracleconnectioninfo.go +++ /dev/null @@ -1,43 +0,0 @@ -package commons - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = OracleConnectionInfo{} - -type OracleConnectionInfo struct { - DataSource string `json:"dataSource"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = OracleConnectionInfo{} - -func (s OracleConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper OracleConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling OracleConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling OracleConnectionInfo: %+v", err) - } - decoded["type"] = "OracleConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling OracleConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/commons/model_postgresqlconnectioninfo.go b/resource-manager/datamigration/2021-06-30/commons/model_postgresqlconnectioninfo.go deleted file mode 100644 index 0cd997d922d..00000000000 --- a/resource-manager/datamigration/2021-06-30/commons/model_postgresqlconnectioninfo.go +++ /dev/null @@ -1,47 +0,0 @@ -package commons - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = PostgreSqlConnectionInfo{} - -type PostgreSqlConnectionInfo struct { - DatabaseName *string `json:"databaseName,omitempty"` - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Port int64 `json:"port"` - ServerName string `json:"serverName"` - TrustServerCertificate *bool `json:"trustServerCertificate,omitempty"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = PostgreSqlConnectionInfo{} - -func (s PostgreSqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper PostgreSqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling PostgreSqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling PostgreSqlConnectionInfo: %+v", err) - } - decoded["type"] = "PostgreSqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling PostgreSqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/commons/model_sqlconnectioninfo.go b/resource-manager/datamigration/2021-06-30/commons/model_sqlconnectioninfo.go deleted file mode 100644 index f4edb2a1696..00000000000 --- a/resource-manager/datamigration/2021-06-30/commons/model_sqlconnectioninfo.go +++ /dev/null @@ -1,48 +0,0 @@ -package commons - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = SqlConnectionInfo{} - -type SqlConnectionInfo struct { - AdditionalSettings *string `json:"additionalSettings,omitempty"` - Authentication *AuthenticationType `json:"authentication,omitempty"` - DataSource string `json:"dataSource"` - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Platform *SqlSourcePlatform `json:"platform,omitempty"` - TrustServerCertificate *bool `json:"trustServerCertificate,omitempty"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = SqlConnectionInfo{} - -func (s SqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper SqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SqlConnectionInfo: %+v", err) - } - decoded["type"] = "SqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/commons/version.go b/resource-manager/datamigration/2021-06-30/commons/version.go deleted file mode 100644 index b4daeefe491..00000000000 --- a/resource-manager/datamigration/2021-06-30/commons/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package commons - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-06-30" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/commons/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2021-06-30/connecttosourcemysqltasks/README.md b/resource-manager/datamigration/2021-06-30/connecttosourcemysqltasks/README.md deleted file mode 100644 index c0bff5da330..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttosourcemysqltasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/connecttosourcemysqltasks` Documentation - -The `connecttosourcemysqltasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2021-06-30`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/connecttosourcemysqltasks" -``` - - -### Client Initialization - -```go -client := connecttosourcemysqltasks.NewConnectToSourceMySqlTasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2021-06-30/connecttosourcemysqltasks/client.go b/resource-manager/datamigration/2021-06-30/connecttosourcemysqltasks/client.go deleted file mode 100644 index 54889404544..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttosourcemysqltasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package connecttosourcemysqltasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToSourceMySqlTasksClient struct { - Client *resourcemanager.Client -} - -func NewConnectToSourceMySqlTasksClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectToSourceMySqlTasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connecttosourcemysqltasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ConnectToSourceMySqlTasksClient: %+v", err) - } - - return &ConnectToSourceMySqlTasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2021-06-30/connecttosourcemysqltasks/model_connectioninfo.go b/resource-manager/datamigration/2021-06-30/connecttosourcemysqltasks/model_connectioninfo.go deleted file mode 100644 index b2ac98e6424..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttosourcemysqltasks/model_connectioninfo.go +++ /dev/null @@ -1,53 +0,0 @@ -package connecttosourcemysqltasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "MySqlConnectionInfo") { - var out MySqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MySqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2021-06-30/connecttosourcemysqltasks/model_mysqlconnectioninfo.go b/resource-manager/datamigration/2021-06-30/connecttosourcemysqltasks/model_mysqlconnectioninfo.go deleted file mode 100644 index 8028c9851ea..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttosourcemysqltasks/model_mysqlconnectioninfo.go +++ /dev/null @@ -1,45 +0,0 @@ -package connecttosourcemysqltasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = MySqlConnectionInfo{} - -type MySqlConnectionInfo struct { - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Port int64 `json:"port"` - ServerName string `json:"serverName"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = MySqlConnectionInfo{} - -func (s MySqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper MySqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MySqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MySqlConnectionInfo: %+v", err) - } - decoded["type"] = "MySqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MySqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/connecttosourcemysqltasks/version.go b/resource-manager/datamigration/2021-06-30/connecttosourcemysqltasks/version.go deleted file mode 100644 index ce6ddd1e2a2..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttosourcemysqltasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package connecttosourcemysqltasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-06-30" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connecttosourcemysqltasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2021-06-30/connecttosourcepostgresqlsynctasks/README.md b/resource-manager/datamigration/2021-06-30/connecttosourcepostgresqlsynctasks/README.md deleted file mode 100644 index a5064d40de7..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttosourcepostgresqlsynctasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/connecttosourcepostgresqlsynctasks` Documentation - -The `connecttosourcepostgresqlsynctasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2021-06-30`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/connecttosourcepostgresqlsynctasks" -``` - - -### Client Initialization - -```go -client := connecttosourcepostgresqlsynctasks.NewConnectToSourcePostgreSqlSyncTasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2021-06-30/connecttosourcepostgresqlsynctasks/client.go b/resource-manager/datamigration/2021-06-30/connecttosourcepostgresqlsynctasks/client.go deleted file mode 100644 index b113bc728e9..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttosourcepostgresqlsynctasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package connecttosourcepostgresqlsynctasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToSourcePostgreSqlSyncTasksClient struct { - Client *resourcemanager.Client -} - -func NewConnectToSourcePostgreSqlSyncTasksClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectToSourcePostgreSqlSyncTasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connecttosourcepostgresqlsynctasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ConnectToSourcePostgreSqlSyncTasksClient: %+v", err) - } - - return &ConnectToSourcePostgreSqlSyncTasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2021-06-30/connecttosourcepostgresqlsynctasks/model_connectioninfo.go b/resource-manager/datamigration/2021-06-30/connecttosourcepostgresqlsynctasks/model_connectioninfo.go deleted file mode 100644 index 11a519f0942..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttosourcepostgresqlsynctasks/model_connectioninfo.go +++ /dev/null @@ -1,53 +0,0 @@ -package connecttosourcepostgresqlsynctasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "PostgreSqlConnectionInfo") { - var out PostgreSqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into PostgreSqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2021-06-30/connecttosourcepostgresqlsynctasks/model_postgresqlconnectioninfo.go b/resource-manager/datamigration/2021-06-30/connecttosourcepostgresqlsynctasks/model_postgresqlconnectioninfo.go deleted file mode 100644 index 2196014eeff..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttosourcepostgresqlsynctasks/model_postgresqlconnectioninfo.go +++ /dev/null @@ -1,47 +0,0 @@ -package connecttosourcepostgresqlsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = PostgreSqlConnectionInfo{} - -type PostgreSqlConnectionInfo struct { - DatabaseName *string `json:"databaseName,omitempty"` - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Port int64 `json:"port"` - ServerName string `json:"serverName"` - TrustServerCertificate *bool `json:"trustServerCertificate,omitempty"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = PostgreSqlConnectionInfo{} - -func (s PostgreSqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper PostgreSqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling PostgreSqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling PostgreSqlConnectionInfo: %+v", err) - } - decoded["type"] = "PostgreSqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling PostgreSqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/connecttosourcepostgresqlsynctasks/version.go b/resource-manager/datamigration/2021-06-30/connecttosourcepostgresqlsynctasks/version.go deleted file mode 100644 index aabd2bddb6e..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttosourcepostgresqlsynctasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package connecttosourcepostgresqlsynctasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-06-30" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connecttosourcepostgresqlsynctasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2021-06-30/connecttosourcesqlservertasks/README.md b/resource-manager/datamigration/2021-06-30/connecttosourcesqlservertasks/README.md deleted file mode 100644 index 91b28f66fdd..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttosourcesqlservertasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/connecttosourcesqlservertasks` Documentation - -The `connecttosourcesqlservertasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2021-06-30`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/connecttosourcesqlservertasks" -``` - - -### Client Initialization - -```go -client := connecttosourcesqlservertasks.NewConnectToSourceSqlServerTasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2021-06-30/connecttosourcesqlservertasks/client.go b/resource-manager/datamigration/2021-06-30/connecttosourcesqlservertasks/client.go deleted file mode 100644 index 983b5049c55..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttosourcesqlservertasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package connecttosourcesqlservertasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToSourceSqlServerTasksClient struct { - Client *resourcemanager.Client -} - -func NewConnectToSourceSqlServerTasksClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectToSourceSqlServerTasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connecttosourcesqlservertasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ConnectToSourceSqlServerTasksClient: %+v", err) - } - - return &ConnectToSourceSqlServerTasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2021-06-30/connecttosourcesqlservertasks/constants.go b/resource-manager/datamigration/2021-06-30/connecttosourcesqlservertasks/constants.go deleted file mode 100644 index 511cb8d0efb..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttosourcesqlservertasks/constants.go +++ /dev/null @@ -1,322 +0,0 @@ -package connecttosourcesqlservertasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthenticationType string - -const ( - AuthenticationTypeActiveDirectoryIntegrated AuthenticationType = "ActiveDirectoryIntegrated" - AuthenticationTypeActiveDirectoryPassword AuthenticationType = "ActiveDirectoryPassword" - AuthenticationTypeNone AuthenticationType = "None" - AuthenticationTypeSqlAuthentication AuthenticationType = "SqlAuthentication" - AuthenticationTypeWindowsAuthentication AuthenticationType = "WindowsAuthentication" -) - -func PossibleValuesForAuthenticationType() []string { - return []string{ - string(AuthenticationTypeActiveDirectoryIntegrated), - string(AuthenticationTypeActiveDirectoryPassword), - string(AuthenticationTypeNone), - string(AuthenticationTypeSqlAuthentication), - string(AuthenticationTypeWindowsAuthentication), - } -} - -func (s *AuthenticationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAuthenticationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAuthenticationType(input string) (*AuthenticationType, error) { - vals := map[string]AuthenticationType{ - "activedirectoryintegrated": AuthenticationTypeActiveDirectoryIntegrated, - "activedirectorypassword": AuthenticationTypeActiveDirectoryPassword, - "none": AuthenticationTypeNone, - "sqlauthentication": AuthenticationTypeSqlAuthentication, - "windowsauthentication": AuthenticationTypeWindowsAuthentication, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AuthenticationType(input) - return &out, nil -} - -type DatabaseCompatLevel string - -const ( - DatabaseCompatLevelCompatLevelEightZero DatabaseCompatLevel = "CompatLevel80" - DatabaseCompatLevelCompatLevelNineZero DatabaseCompatLevel = "CompatLevel90" - DatabaseCompatLevelCompatLevelOneFourZero DatabaseCompatLevel = "CompatLevel140" - DatabaseCompatLevelCompatLevelOneHundred DatabaseCompatLevel = "CompatLevel100" - DatabaseCompatLevelCompatLevelOneOneZero DatabaseCompatLevel = "CompatLevel110" - DatabaseCompatLevelCompatLevelOneThreeZero DatabaseCompatLevel = "CompatLevel130" - DatabaseCompatLevelCompatLevelOneTwoZero DatabaseCompatLevel = "CompatLevel120" -) - -func PossibleValuesForDatabaseCompatLevel() []string { - return []string{ - string(DatabaseCompatLevelCompatLevelEightZero), - string(DatabaseCompatLevelCompatLevelNineZero), - string(DatabaseCompatLevelCompatLevelOneFourZero), - string(DatabaseCompatLevelCompatLevelOneHundred), - string(DatabaseCompatLevelCompatLevelOneOneZero), - string(DatabaseCompatLevelCompatLevelOneThreeZero), - string(DatabaseCompatLevelCompatLevelOneTwoZero), - } -} - -func (s *DatabaseCompatLevel) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDatabaseCompatLevel(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDatabaseCompatLevel(input string) (*DatabaseCompatLevel, error) { - vals := map[string]DatabaseCompatLevel{ - "compatlevel80": DatabaseCompatLevelCompatLevelEightZero, - "compatlevel90": DatabaseCompatLevelCompatLevelNineZero, - "compatlevel140": DatabaseCompatLevelCompatLevelOneFourZero, - "compatlevel100": DatabaseCompatLevelCompatLevelOneHundred, - "compatlevel110": DatabaseCompatLevelCompatLevelOneOneZero, - "compatlevel130": DatabaseCompatLevelCompatLevelOneThreeZero, - "compatlevel120": DatabaseCompatLevelCompatLevelOneTwoZero, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DatabaseCompatLevel(input) - return &out, nil -} - -type DatabaseFileType string - -const ( - DatabaseFileTypeFilestream DatabaseFileType = "Filestream" - DatabaseFileTypeFulltext DatabaseFileType = "Fulltext" - DatabaseFileTypeLog DatabaseFileType = "Log" - DatabaseFileTypeNotSupported DatabaseFileType = "NotSupported" - DatabaseFileTypeRows DatabaseFileType = "Rows" -) - -func PossibleValuesForDatabaseFileType() []string { - return []string{ - string(DatabaseFileTypeFilestream), - string(DatabaseFileTypeFulltext), - string(DatabaseFileTypeLog), - string(DatabaseFileTypeNotSupported), - string(DatabaseFileTypeRows), - } -} - -func (s *DatabaseFileType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDatabaseFileType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDatabaseFileType(input string) (*DatabaseFileType, error) { - vals := map[string]DatabaseFileType{ - "filestream": DatabaseFileTypeFilestream, - "fulltext": DatabaseFileTypeFulltext, - "log": DatabaseFileTypeLog, - "notsupported": DatabaseFileTypeNotSupported, - "rows": DatabaseFileTypeRows, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DatabaseFileType(input) - return &out, nil -} - -type DatabaseState string - -const ( - DatabaseStateCopying DatabaseState = "Copying" - DatabaseStateEmergency DatabaseState = "Emergency" - DatabaseStateOffline DatabaseState = "Offline" - DatabaseStateOfflineSecondary DatabaseState = "OfflineSecondary" - DatabaseStateOnline DatabaseState = "Online" - DatabaseStateRecovering DatabaseState = "Recovering" - DatabaseStateRecoveryPending DatabaseState = "RecoveryPending" - DatabaseStateRestoring DatabaseState = "Restoring" - DatabaseStateSuspect DatabaseState = "Suspect" -) - -func PossibleValuesForDatabaseState() []string { - return []string{ - string(DatabaseStateCopying), - string(DatabaseStateEmergency), - string(DatabaseStateOffline), - string(DatabaseStateOfflineSecondary), - string(DatabaseStateOnline), - string(DatabaseStateRecovering), - string(DatabaseStateRecoveryPending), - string(DatabaseStateRestoring), - string(DatabaseStateSuspect), - } -} - -func (s *DatabaseState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDatabaseState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDatabaseState(input string) (*DatabaseState, error) { - vals := map[string]DatabaseState{ - "copying": DatabaseStateCopying, - "emergency": DatabaseStateEmergency, - "offline": DatabaseStateOffline, - "offlinesecondary": DatabaseStateOfflineSecondary, - "online": DatabaseStateOnline, - "recovering": DatabaseStateRecovering, - "recoverypending": DatabaseStateRecoveryPending, - "restoring": DatabaseStateRestoring, - "suspect": DatabaseStateSuspect, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DatabaseState(input) - return &out, nil -} - -type LoginType string - -const ( - LoginTypeAsymmetricKey LoginType = "AsymmetricKey" - LoginTypeCertificate LoginType = "Certificate" - LoginTypeExternalGroup LoginType = "ExternalGroup" - LoginTypeExternalUser LoginType = "ExternalUser" - LoginTypeSqlLogin LoginType = "SqlLogin" - LoginTypeWindowsGroup LoginType = "WindowsGroup" - LoginTypeWindowsUser LoginType = "WindowsUser" -) - -func PossibleValuesForLoginType() []string { - return []string{ - string(LoginTypeAsymmetricKey), - string(LoginTypeCertificate), - string(LoginTypeExternalGroup), - string(LoginTypeExternalUser), - string(LoginTypeSqlLogin), - string(LoginTypeWindowsGroup), - string(LoginTypeWindowsUser), - } -} - -func (s *LoginType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoginType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoginType(input string) (*LoginType, error) { - vals := map[string]LoginType{ - "asymmetrickey": LoginTypeAsymmetricKey, - "certificate": LoginTypeCertificate, - "externalgroup": LoginTypeExternalGroup, - "externaluser": LoginTypeExternalUser, - "sqllogin": LoginTypeSqlLogin, - "windowsgroup": LoginTypeWindowsGroup, - "windowsuser": LoginTypeWindowsUser, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoginType(input) - return &out, nil -} - -type SqlSourcePlatform string - -const ( - SqlSourcePlatformSqlOnPrem SqlSourcePlatform = "SqlOnPrem" -) - -func PossibleValuesForSqlSourcePlatform() []string { - return []string{ - string(SqlSourcePlatformSqlOnPrem), - } -} - -func (s *SqlSourcePlatform) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSqlSourcePlatform(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSqlSourcePlatform(input string) (*SqlSourcePlatform, error) { - vals := map[string]SqlSourcePlatform{ - "sqlonprem": SqlSourcePlatformSqlOnPrem, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SqlSourcePlatform(input) - return &out, nil -} diff --git a/resource-manager/datamigration/2021-06-30/connecttosourcesqlservertasks/model_connectioninfo.go b/resource-manager/datamigration/2021-06-30/connecttosourcesqlservertasks/model_connectioninfo.go deleted file mode 100644 index 918db03733d..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttosourcesqlservertasks/model_connectioninfo.go +++ /dev/null @@ -1,53 +0,0 @@ -package connecttosourcesqlservertasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "SqlConnectionInfo") { - var out SqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2021-06-30/connecttosourcesqlservertasks/model_connecttosourcesqlservertaskoutput.go b/resource-manager/datamigration/2021-06-30/connecttosourcesqlservertasks/model_connecttosourcesqlservertaskoutput.go deleted file mode 100644 index 07f534a81ac..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttosourcesqlservertasks/model_connecttosourcesqlservertaskoutput.go +++ /dev/null @@ -1,77 +0,0 @@ -package connecttosourcesqlservertasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToSourceSqlServerTaskOutput interface { -} - -// RawConnectToSourceSqlServerTaskOutputImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectToSourceSqlServerTaskOutputImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectToSourceSqlServerTaskOutputImplementation(input []byte) (ConnectToSourceSqlServerTaskOutput, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectToSourceSqlServerTaskOutput into map[string]interface: %+v", err) - } - - value, ok := temp["resultType"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "AgentJobLevelOutput") { - var out ConnectToSourceSqlServerTaskOutputAgentJobLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ConnectToSourceSqlServerTaskOutputAgentJobLevel: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "DatabaseLevelOutput") { - var out ConnectToSourceSqlServerTaskOutputDatabaseLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ConnectToSourceSqlServerTaskOutputDatabaseLevel: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "LoginLevelOutput") { - var out ConnectToSourceSqlServerTaskOutputLoginLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ConnectToSourceSqlServerTaskOutputLoginLevel: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "TaskLevelOutput") { - var out ConnectToSourceSqlServerTaskOutputTaskLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ConnectToSourceSqlServerTaskOutputTaskLevel: %+v", err) - } - return out, nil - } - - out := RawConnectToSourceSqlServerTaskOutputImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2021-06-30/connecttosourcesqlservertasks/model_connecttosourcesqlservertaskoutputagentjoblevel.go b/resource-manager/datamigration/2021-06-30/connecttosourcesqlservertasks/model_connecttosourcesqlservertaskoutputagentjoblevel.go deleted file mode 100644 index 465994a5ce7..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttosourcesqlservertasks/model_connecttosourcesqlservertaskoutputagentjoblevel.go +++ /dev/null @@ -1,48 +0,0 @@ -package connecttosourcesqlservertasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectToSourceSqlServerTaskOutput = ConnectToSourceSqlServerTaskOutputAgentJobLevel{} - -type ConnectToSourceSqlServerTaskOutputAgentJobLevel struct { - IsEnabled *bool `json:"isEnabled,omitempty"` - JobCategory *string `json:"jobCategory,omitempty"` - JobOwner *string `json:"jobOwner,omitempty"` - LastExecutedOn *string `json:"lastExecutedOn,omitempty"` - MigrationEligibility *MigrationEligibilityInfo `json:"migrationEligibility,omitempty"` - Name *string `json:"name,omitempty"` - ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` - - // Fields inherited from ConnectToSourceSqlServerTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = ConnectToSourceSqlServerTaskOutputAgentJobLevel{} - -func (s ConnectToSourceSqlServerTaskOutputAgentJobLevel) MarshalJSON() ([]byte, error) { - type wrapper ConnectToSourceSqlServerTaskOutputAgentJobLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ConnectToSourceSqlServerTaskOutputAgentJobLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectToSourceSqlServerTaskOutputAgentJobLevel: %+v", err) - } - decoded["resultType"] = "AgentJobLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ConnectToSourceSqlServerTaskOutputAgentJobLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/connecttosourcesqlservertasks/model_connecttosourcesqlservertaskoutputdatabaselevel.go b/resource-manager/datamigration/2021-06-30/connecttosourcesqlservertasks/model_connecttosourcesqlservertaskoutputdatabaselevel.go deleted file mode 100644 index 08bc2785a3a..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttosourcesqlservertasks/model_connecttosourcesqlservertaskoutputdatabaselevel.go +++ /dev/null @@ -1,46 +0,0 @@ -package connecttosourcesqlservertasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectToSourceSqlServerTaskOutput = ConnectToSourceSqlServerTaskOutputDatabaseLevel{} - -type ConnectToSourceSqlServerTaskOutputDatabaseLevel struct { - CompatibilityLevel *DatabaseCompatLevel `json:"compatibilityLevel,omitempty"` - DatabaseFiles *[]DatabaseFileInfo `json:"databaseFiles,omitempty"` - DatabaseState *DatabaseState `json:"databaseState,omitempty"` - Name *string `json:"name,omitempty"` - SizeMB *float64 `json:"sizeMB,omitempty"` - - // Fields inherited from ConnectToSourceSqlServerTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = ConnectToSourceSqlServerTaskOutputDatabaseLevel{} - -func (s ConnectToSourceSqlServerTaskOutputDatabaseLevel) MarshalJSON() ([]byte, error) { - type wrapper ConnectToSourceSqlServerTaskOutputDatabaseLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ConnectToSourceSqlServerTaskOutputDatabaseLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectToSourceSqlServerTaskOutputDatabaseLevel: %+v", err) - } - decoded["resultType"] = "DatabaseLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ConnectToSourceSqlServerTaskOutputDatabaseLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/connecttosourcesqlservertasks/model_connecttosourcesqlservertaskoutputloginlevel.go b/resource-manager/datamigration/2021-06-30/connecttosourcesqlservertasks/model_connecttosourcesqlservertaskoutputloginlevel.go deleted file mode 100644 index 0044f24c32e..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttosourcesqlservertasks/model_connecttosourcesqlservertaskoutputloginlevel.go +++ /dev/null @@ -1,46 +0,0 @@ -package connecttosourcesqlservertasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectToSourceSqlServerTaskOutput = ConnectToSourceSqlServerTaskOutputLoginLevel{} - -type ConnectToSourceSqlServerTaskOutputLoginLevel struct { - DefaultDatabase *string `json:"defaultDatabase,omitempty"` - IsEnabled *bool `json:"isEnabled,omitempty"` - LoginType *LoginType `json:"loginType,omitempty"` - MigrationEligibility *MigrationEligibilityInfo `json:"migrationEligibility,omitempty"` - Name *string `json:"name,omitempty"` - - // Fields inherited from ConnectToSourceSqlServerTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = ConnectToSourceSqlServerTaskOutputLoginLevel{} - -func (s ConnectToSourceSqlServerTaskOutputLoginLevel) MarshalJSON() ([]byte, error) { - type wrapper ConnectToSourceSqlServerTaskOutputLoginLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ConnectToSourceSqlServerTaskOutputLoginLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectToSourceSqlServerTaskOutputLoginLevel: %+v", err) - } - decoded["resultType"] = "LoginLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ConnectToSourceSqlServerTaskOutputLoginLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/connecttosourcesqlservertasks/model_connecttosourcesqlservertaskoutputtasklevel.go b/resource-manager/datamigration/2021-06-30/connecttosourcesqlservertasks/model_connecttosourcesqlservertaskoutputtasklevel.go deleted file mode 100644 index dc2c5309030..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttosourcesqlservertasks/model_connecttosourcesqlservertaskoutputtasklevel.go +++ /dev/null @@ -1,48 +0,0 @@ -package connecttosourcesqlservertasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectToSourceSqlServerTaskOutput = ConnectToSourceSqlServerTaskOutputTaskLevel{} - -type ConnectToSourceSqlServerTaskOutputTaskLevel struct { - AgentJobs *map[string]string `json:"agentJobs,omitempty"` - DatabaseTdeCertificateMapping *map[string]string `json:"databaseTdeCertificateMapping,omitempty"` - Databases *map[string]string `json:"databases,omitempty"` - Logins *map[string]string `json:"logins,omitempty"` - SourceServerBrandVersion *string `json:"sourceServerBrandVersion,omitempty"` - SourceServerVersion *string `json:"sourceServerVersion,omitempty"` - ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` - - // Fields inherited from ConnectToSourceSqlServerTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = ConnectToSourceSqlServerTaskOutputTaskLevel{} - -func (s ConnectToSourceSqlServerTaskOutputTaskLevel) MarshalJSON() ([]byte, error) { - type wrapper ConnectToSourceSqlServerTaskOutputTaskLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ConnectToSourceSqlServerTaskOutputTaskLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectToSourceSqlServerTaskOutputTaskLevel: %+v", err) - } - decoded["resultType"] = "TaskLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ConnectToSourceSqlServerTaskOutputTaskLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/connecttosourcesqlservertasks/model_databasefileinfo.go b/resource-manager/datamigration/2021-06-30/connecttosourcesqlservertasks/model_databasefileinfo.go deleted file mode 100644 index 6581df5cb61..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttosourcesqlservertasks/model_databasefileinfo.go +++ /dev/null @@ -1,14 +0,0 @@ -package connecttosourcesqlservertasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DatabaseFileInfo struct { - DatabaseName *string `json:"databaseName,omitempty"` - FileType *DatabaseFileType `json:"fileType,omitempty"` - Id *string `json:"id,omitempty"` - LogicalName *string `json:"logicalName,omitempty"` - PhysicalFullName *string `json:"physicalFullName,omitempty"` - RestoreFullName *string `json:"restoreFullName,omitempty"` - SizeMB *float64 `json:"sizeMB,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/connecttosourcesqlservertasks/model_migrationeligibilityinfo.go b/resource-manager/datamigration/2021-06-30/connecttosourcesqlservertasks/model_migrationeligibilityinfo.go deleted file mode 100644 index f637608773b..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttosourcesqlservertasks/model_migrationeligibilityinfo.go +++ /dev/null @@ -1,9 +0,0 @@ -package connecttosourcesqlservertasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrationEligibilityInfo struct { - IsEligibleForMigration *bool `json:"isEligibleForMigration,omitempty"` - ValidationMessages *[]string `json:"validationMessages,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/connecttosourcesqlservertasks/model_reportableexception.go b/resource-manager/datamigration/2021-06-30/connecttosourcesqlservertasks/model_reportableexception.go deleted file mode 100644 index 854fa6cf2e2..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttosourcesqlservertasks/model_reportableexception.go +++ /dev/null @@ -1,13 +0,0 @@ -package connecttosourcesqlservertasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ReportableException struct { - ActionableMessage *string `json:"actionableMessage,omitempty"` - FilePath *string `json:"filePath,omitempty"` - HResult *int64 `json:"hResult,omitempty"` - LineNumber *string `json:"lineNumber,omitempty"` - Message *string `json:"message,omitempty"` - StackTrace *string `json:"stackTrace,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/connecttosourcesqlservertasks/model_sqlconnectioninfo.go b/resource-manager/datamigration/2021-06-30/connecttosourcesqlservertasks/model_sqlconnectioninfo.go deleted file mode 100644 index 1368eaf152d..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttosourcesqlservertasks/model_sqlconnectioninfo.go +++ /dev/null @@ -1,48 +0,0 @@ -package connecttosourcesqlservertasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = SqlConnectionInfo{} - -type SqlConnectionInfo struct { - AdditionalSettings *string `json:"additionalSettings,omitempty"` - Authentication *AuthenticationType `json:"authentication,omitempty"` - DataSource string `json:"dataSource"` - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Platform *SqlSourcePlatform `json:"platform,omitempty"` - TrustServerCertificate *bool `json:"trustServerCertificate,omitempty"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = SqlConnectionInfo{} - -func (s SqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper SqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SqlConnectionInfo: %+v", err) - } - decoded["type"] = "SqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/connecttosourcesqlservertasks/version.go b/resource-manager/datamigration/2021-06-30/connecttosourcesqlservertasks/version.go deleted file mode 100644 index 41fa25636fe..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttosourcesqlservertasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package connecttosourcesqlservertasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-06-30" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connecttosourcesqlservertasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2021-06-30/connecttotargetazuredbformysqltasks/README.md b/resource-manager/datamigration/2021-06-30/connecttotargetazuredbformysqltasks/README.md deleted file mode 100644 index 9cde5a96ed0..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttotargetazuredbformysqltasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/connecttotargetazuredbformysqltasks` Documentation - -The `connecttotargetazuredbformysqltasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2021-06-30`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/connecttotargetazuredbformysqltasks" -``` - - -### Client Initialization - -```go -client := connecttotargetazuredbformysqltasks.NewConnectToTargetAzureDbForMySqlTasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2021-06-30/connecttotargetazuredbformysqltasks/client.go b/resource-manager/datamigration/2021-06-30/connecttotargetazuredbformysqltasks/client.go deleted file mode 100644 index 8d8253afb49..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttotargetazuredbformysqltasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package connecttotargetazuredbformysqltasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToTargetAzureDbForMySqlTasksClient struct { - Client *resourcemanager.Client -} - -func NewConnectToTargetAzureDbForMySqlTasksClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectToTargetAzureDbForMySqlTasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connecttotargetazuredbformysqltasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ConnectToTargetAzureDbForMySqlTasksClient: %+v", err) - } - - return &ConnectToTargetAzureDbForMySqlTasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2021-06-30/connecttotargetazuredbformysqltasks/model_connectioninfo.go b/resource-manager/datamigration/2021-06-30/connecttotargetazuredbformysqltasks/model_connectioninfo.go deleted file mode 100644 index 419d2ca18a3..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttotargetazuredbformysqltasks/model_connectioninfo.go +++ /dev/null @@ -1,53 +0,0 @@ -package connecttotargetazuredbformysqltasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "MySqlConnectionInfo") { - var out MySqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MySqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2021-06-30/connecttotargetazuredbformysqltasks/model_mysqlconnectioninfo.go b/resource-manager/datamigration/2021-06-30/connecttotargetazuredbformysqltasks/model_mysqlconnectioninfo.go deleted file mode 100644 index 798a039570a..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttotargetazuredbformysqltasks/model_mysqlconnectioninfo.go +++ /dev/null @@ -1,45 +0,0 @@ -package connecttotargetazuredbformysqltasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = MySqlConnectionInfo{} - -type MySqlConnectionInfo struct { - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Port int64 `json:"port"` - ServerName string `json:"serverName"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = MySqlConnectionInfo{} - -func (s MySqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper MySqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MySqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MySqlConnectionInfo: %+v", err) - } - decoded["type"] = "MySqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MySqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/connecttotargetazuredbformysqltasks/version.go b/resource-manager/datamigration/2021-06-30/connecttotargetazuredbformysqltasks/version.go deleted file mode 100644 index 086d41c8005..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttotargetazuredbformysqltasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package connecttotargetazuredbformysqltasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-06-30" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connecttotargetazuredbformysqltasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2021-06-30/connecttotargetazuredbforpostgresqlsynctasks/README.md b/resource-manager/datamigration/2021-06-30/connecttotargetazuredbforpostgresqlsynctasks/README.md deleted file mode 100644 index db0157bfc0c..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttotargetazuredbforpostgresqlsynctasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/connecttotargetazuredbforpostgresqlsynctasks` Documentation - -The `connecttotargetazuredbforpostgresqlsynctasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2021-06-30`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/connecttotargetazuredbforpostgresqlsynctasks" -``` - - -### Client Initialization - -```go -client := connecttotargetazuredbforpostgresqlsynctasks.NewConnectToTargetAzureDbForPostgreSqlSyncTasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2021-06-30/connecttotargetazuredbforpostgresqlsynctasks/client.go b/resource-manager/datamigration/2021-06-30/connecttotargetazuredbforpostgresqlsynctasks/client.go deleted file mode 100644 index be12275e0dc..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttotargetazuredbforpostgresqlsynctasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package connecttotargetazuredbforpostgresqlsynctasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToTargetAzureDbForPostgreSqlSyncTasksClient struct { - Client *resourcemanager.Client -} - -func NewConnectToTargetAzureDbForPostgreSqlSyncTasksClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectToTargetAzureDbForPostgreSqlSyncTasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connecttotargetazuredbforpostgresqlsynctasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ConnectToTargetAzureDbForPostgreSqlSyncTasksClient: %+v", err) - } - - return &ConnectToTargetAzureDbForPostgreSqlSyncTasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2021-06-30/connecttotargetazuredbforpostgresqlsynctasks/model_connectioninfo.go b/resource-manager/datamigration/2021-06-30/connecttotargetazuredbforpostgresqlsynctasks/model_connectioninfo.go deleted file mode 100644 index fac9f4eb6f1..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttotargetazuredbforpostgresqlsynctasks/model_connectioninfo.go +++ /dev/null @@ -1,53 +0,0 @@ -package connecttotargetazuredbforpostgresqlsynctasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "PostgreSqlConnectionInfo") { - var out PostgreSqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into PostgreSqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2021-06-30/connecttotargetazuredbforpostgresqlsynctasks/model_postgresqlconnectioninfo.go b/resource-manager/datamigration/2021-06-30/connecttotargetazuredbforpostgresqlsynctasks/model_postgresqlconnectioninfo.go deleted file mode 100644 index 6def7773f07..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttotargetazuredbforpostgresqlsynctasks/model_postgresqlconnectioninfo.go +++ /dev/null @@ -1,47 +0,0 @@ -package connecttotargetazuredbforpostgresqlsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = PostgreSqlConnectionInfo{} - -type PostgreSqlConnectionInfo struct { - DatabaseName *string `json:"databaseName,omitempty"` - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Port int64 `json:"port"` - ServerName string `json:"serverName"` - TrustServerCertificate *bool `json:"trustServerCertificate,omitempty"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = PostgreSqlConnectionInfo{} - -func (s PostgreSqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper PostgreSqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling PostgreSqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling PostgreSqlConnectionInfo: %+v", err) - } - decoded["type"] = "PostgreSqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling PostgreSqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/connecttotargetazuredbforpostgresqlsynctasks/version.go b/resource-manager/datamigration/2021-06-30/connecttotargetazuredbforpostgresqlsynctasks/version.go deleted file mode 100644 index 7a43825f483..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttotargetazuredbforpostgresqlsynctasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package connecttotargetazuredbforpostgresqlsynctasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-06-30" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connecttotargetazuredbforpostgresqlsynctasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2021-06-30/connecttotargetsqldbtasks/README.md b/resource-manager/datamigration/2021-06-30/connecttotargetsqldbtasks/README.md deleted file mode 100644 index 6fd62519699..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttotargetsqldbtasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/connecttotargetsqldbtasks` Documentation - -The `connecttotargetsqldbtasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2021-06-30`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/connecttotargetsqldbtasks" -``` - - -### Client Initialization - -```go -client := connecttotargetsqldbtasks.NewConnectToTargetSqlDbTasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2021-06-30/connecttotargetsqldbtasks/client.go b/resource-manager/datamigration/2021-06-30/connecttotargetsqldbtasks/client.go deleted file mode 100644 index 333d7f2c9e7..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttotargetsqldbtasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package connecttotargetsqldbtasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToTargetSqlDbTasksClient struct { - Client *resourcemanager.Client -} - -func NewConnectToTargetSqlDbTasksClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectToTargetSqlDbTasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connecttotargetsqldbtasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ConnectToTargetSqlDbTasksClient: %+v", err) - } - - return &ConnectToTargetSqlDbTasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2021-06-30/connecttotargetsqldbtasks/constants.go b/resource-manager/datamigration/2021-06-30/connecttotargetsqldbtasks/constants.go deleted file mode 100644 index f6784cf6b8d..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttotargetsqldbtasks/constants.go +++ /dev/null @@ -1,98 +0,0 @@ -package connecttotargetsqldbtasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthenticationType string - -const ( - AuthenticationTypeActiveDirectoryIntegrated AuthenticationType = "ActiveDirectoryIntegrated" - AuthenticationTypeActiveDirectoryPassword AuthenticationType = "ActiveDirectoryPassword" - AuthenticationTypeNone AuthenticationType = "None" - AuthenticationTypeSqlAuthentication AuthenticationType = "SqlAuthentication" - AuthenticationTypeWindowsAuthentication AuthenticationType = "WindowsAuthentication" -) - -func PossibleValuesForAuthenticationType() []string { - return []string{ - string(AuthenticationTypeActiveDirectoryIntegrated), - string(AuthenticationTypeActiveDirectoryPassword), - string(AuthenticationTypeNone), - string(AuthenticationTypeSqlAuthentication), - string(AuthenticationTypeWindowsAuthentication), - } -} - -func (s *AuthenticationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAuthenticationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAuthenticationType(input string) (*AuthenticationType, error) { - vals := map[string]AuthenticationType{ - "activedirectoryintegrated": AuthenticationTypeActiveDirectoryIntegrated, - "activedirectorypassword": AuthenticationTypeActiveDirectoryPassword, - "none": AuthenticationTypeNone, - "sqlauthentication": AuthenticationTypeSqlAuthentication, - "windowsauthentication": AuthenticationTypeWindowsAuthentication, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AuthenticationType(input) - return &out, nil -} - -type SqlSourcePlatform string - -const ( - SqlSourcePlatformSqlOnPrem SqlSourcePlatform = "SqlOnPrem" -) - -func PossibleValuesForSqlSourcePlatform() []string { - return []string{ - string(SqlSourcePlatformSqlOnPrem), - } -} - -func (s *SqlSourcePlatform) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSqlSourcePlatform(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSqlSourcePlatform(input string) (*SqlSourcePlatform, error) { - vals := map[string]SqlSourcePlatform{ - "sqlonprem": SqlSourcePlatformSqlOnPrem, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SqlSourcePlatform(input) - return &out, nil -} diff --git a/resource-manager/datamigration/2021-06-30/connecttotargetsqldbtasks/model_connectioninfo.go b/resource-manager/datamigration/2021-06-30/connecttotargetsqldbtasks/model_connectioninfo.go deleted file mode 100644 index 0147083a634..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttotargetsqldbtasks/model_connectioninfo.go +++ /dev/null @@ -1,53 +0,0 @@ -package connecttotargetsqldbtasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "SqlConnectionInfo") { - var out SqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2021-06-30/connecttotargetsqldbtasks/model_sqlconnectioninfo.go b/resource-manager/datamigration/2021-06-30/connecttotargetsqldbtasks/model_sqlconnectioninfo.go deleted file mode 100644 index b43793ed27a..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttotargetsqldbtasks/model_sqlconnectioninfo.go +++ /dev/null @@ -1,48 +0,0 @@ -package connecttotargetsqldbtasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = SqlConnectionInfo{} - -type SqlConnectionInfo struct { - AdditionalSettings *string `json:"additionalSettings,omitempty"` - Authentication *AuthenticationType `json:"authentication,omitempty"` - DataSource string `json:"dataSource"` - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Platform *SqlSourcePlatform `json:"platform,omitempty"` - TrustServerCertificate *bool `json:"trustServerCertificate,omitempty"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = SqlConnectionInfo{} - -func (s SqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper SqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SqlConnectionInfo: %+v", err) - } - decoded["type"] = "SqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/connecttotargetsqldbtasks/version.go b/resource-manager/datamigration/2021-06-30/connecttotargetsqldbtasks/version.go deleted file mode 100644 index 03ab471c53e..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttotargetsqldbtasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package connecttotargetsqldbtasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-06-30" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connecttotargetsqldbtasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2021-06-30/connecttotargetsqlmisynctasks/README.md b/resource-manager/datamigration/2021-06-30/connecttotargetsqlmisynctasks/README.md deleted file mode 100644 index c9eafcb9132..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttotargetsqlmisynctasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/connecttotargetsqlmisynctasks` Documentation - -The `connecttotargetsqlmisynctasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2021-06-30`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/connecttotargetsqlmisynctasks" -``` - - -### Client Initialization - -```go -client := connecttotargetsqlmisynctasks.NewConnectToTargetSqlMiSyncTasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2021-06-30/connecttotargetsqlmisynctasks/client.go b/resource-manager/datamigration/2021-06-30/connecttotargetsqlmisynctasks/client.go deleted file mode 100644 index a2b756a5713..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttotargetsqlmisynctasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package connecttotargetsqlmisynctasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToTargetSqlMiSyncTasksClient struct { - Client *resourcemanager.Client -} - -func NewConnectToTargetSqlMiSyncTasksClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectToTargetSqlMiSyncTasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connecttotargetsqlmisynctasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ConnectToTargetSqlMiSyncTasksClient: %+v", err) - } - - return &ConnectToTargetSqlMiSyncTasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2021-06-30/connecttotargetsqlmisynctasks/model_connectioninfo.go b/resource-manager/datamigration/2021-06-30/connecttotargetsqlmisynctasks/model_connectioninfo.go deleted file mode 100644 index 7214d74ef9e..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttotargetsqlmisynctasks/model_connectioninfo.go +++ /dev/null @@ -1,53 +0,0 @@ -package connecttotargetsqlmisynctasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "MiSqlConnectionInfo") { - var out MiSqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MiSqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2021-06-30/connecttotargetsqlmisynctasks/model_misqlconnectioninfo.go b/resource-manager/datamigration/2021-06-30/connecttotargetsqlmisynctasks/model_misqlconnectioninfo.go deleted file mode 100644 index e127d7bbc12..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttotargetsqlmisynctasks/model_misqlconnectioninfo.go +++ /dev/null @@ -1,43 +0,0 @@ -package connecttotargetsqlmisynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = MiSqlConnectionInfo{} - -type MiSqlConnectionInfo struct { - ManagedInstanceResourceId string `json:"managedInstanceResourceId"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = MiSqlConnectionInfo{} - -func (s MiSqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper MiSqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MiSqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MiSqlConnectionInfo: %+v", err) - } - decoded["type"] = "MiSqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MiSqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/connecttotargetsqlmisynctasks/version.go b/resource-manager/datamigration/2021-06-30/connecttotargetsqlmisynctasks/version.go deleted file mode 100644 index 634c3bafaff..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttotargetsqlmisynctasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package connecttotargetsqlmisynctasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-06-30" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connecttotargetsqlmisynctasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2021-06-30/connecttotargetsqlmitasks/README.md b/resource-manager/datamigration/2021-06-30/connecttotargetsqlmitasks/README.md deleted file mode 100644 index 1f077722ee6..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttotargetsqlmitasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/connecttotargetsqlmitasks` Documentation - -The `connecttotargetsqlmitasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2021-06-30`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/connecttotargetsqlmitasks" -``` - - -### Client Initialization - -```go -client := connecttotargetsqlmitasks.NewConnectToTargetSqlMITasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2021-06-30/connecttotargetsqlmitasks/client.go b/resource-manager/datamigration/2021-06-30/connecttotargetsqlmitasks/client.go deleted file mode 100644 index 756e7c05cc9..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttotargetsqlmitasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package connecttotargetsqlmitasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToTargetSqlMITasksClient struct { - Client *resourcemanager.Client -} - -func NewConnectToTargetSqlMITasksClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectToTargetSqlMITasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connecttotargetsqlmitasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ConnectToTargetSqlMITasksClient: %+v", err) - } - - return &ConnectToTargetSqlMITasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2021-06-30/connecttotargetsqlmitasks/constants.go b/resource-manager/datamigration/2021-06-30/connecttotargetsqlmitasks/constants.go deleted file mode 100644 index add10a759b4..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttotargetsqlmitasks/constants.go +++ /dev/null @@ -1,98 +0,0 @@ -package connecttotargetsqlmitasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthenticationType string - -const ( - AuthenticationTypeActiveDirectoryIntegrated AuthenticationType = "ActiveDirectoryIntegrated" - AuthenticationTypeActiveDirectoryPassword AuthenticationType = "ActiveDirectoryPassword" - AuthenticationTypeNone AuthenticationType = "None" - AuthenticationTypeSqlAuthentication AuthenticationType = "SqlAuthentication" - AuthenticationTypeWindowsAuthentication AuthenticationType = "WindowsAuthentication" -) - -func PossibleValuesForAuthenticationType() []string { - return []string{ - string(AuthenticationTypeActiveDirectoryIntegrated), - string(AuthenticationTypeActiveDirectoryPassword), - string(AuthenticationTypeNone), - string(AuthenticationTypeSqlAuthentication), - string(AuthenticationTypeWindowsAuthentication), - } -} - -func (s *AuthenticationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAuthenticationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAuthenticationType(input string) (*AuthenticationType, error) { - vals := map[string]AuthenticationType{ - "activedirectoryintegrated": AuthenticationTypeActiveDirectoryIntegrated, - "activedirectorypassword": AuthenticationTypeActiveDirectoryPassword, - "none": AuthenticationTypeNone, - "sqlauthentication": AuthenticationTypeSqlAuthentication, - "windowsauthentication": AuthenticationTypeWindowsAuthentication, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AuthenticationType(input) - return &out, nil -} - -type SqlSourcePlatform string - -const ( - SqlSourcePlatformSqlOnPrem SqlSourcePlatform = "SqlOnPrem" -) - -func PossibleValuesForSqlSourcePlatform() []string { - return []string{ - string(SqlSourcePlatformSqlOnPrem), - } -} - -func (s *SqlSourcePlatform) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSqlSourcePlatform(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSqlSourcePlatform(input string) (*SqlSourcePlatform, error) { - vals := map[string]SqlSourcePlatform{ - "sqlonprem": SqlSourcePlatformSqlOnPrem, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SqlSourcePlatform(input) - return &out, nil -} diff --git a/resource-manager/datamigration/2021-06-30/connecttotargetsqlmitasks/model_connectioninfo.go b/resource-manager/datamigration/2021-06-30/connecttotargetsqlmitasks/model_connectioninfo.go deleted file mode 100644 index a8531f68fc9..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttotargetsqlmitasks/model_connectioninfo.go +++ /dev/null @@ -1,53 +0,0 @@ -package connecttotargetsqlmitasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "SqlConnectionInfo") { - var out SqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2021-06-30/connecttotargetsqlmitasks/model_sqlconnectioninfo.go b/resource-manager/datamigration/2021-06-30/connecttotargetsqlmitasks/model_sqlconnectioninfo.go deleted file mode 100644 index b743f11cb0a..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttotargetsqlmitasks/model_sqlconnectioninfo.go +++ /dev/null @@ -1,48 +0,0 @@ -package connecttotargetsqlmitasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = SqlConnectionInfo{} - -type SqlConnectionInfo struct { - AdditionalSettings *string `json:"additionalSettings,omitempty"` - Authentication *AuthenticationType `json:"authentication,omitempty"` - DataSource string `json:"dataSource"` - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Platform *SqlSourcePlatform `json:"platform,omitempty"` - TrustServerCertificate *bool `json:"trustServerCertificate,omitempty"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = SqlConnectionInfo{} - -func (s SqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper SqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SqlConnectionInfo: %+v", err) - } - decoded["type"] = "SqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/connecttotargetsqlmitasks/version.go b/resource-manager/datamigration/2021-06-30/connecttotargetsqlmitasks/version.go deleted file mode 100644 index dc12fe73ab2..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttotargetsqlmitasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package connecttotargetsqlmitasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-06-30" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connecttotargetsqlmitasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2021-06-30/connecttotargetsqlsqldbsynctasks/README.md b/resource-manager/datamigration/2021-06-30/connecttotargetsqlsqldbsynctasks/README.md deleted file mode 100644 index 8d48180eb67..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttotargetsqlsqldbsynctasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/connecttotargetsqlsqldbsynctasks` Documentation - -The `connecttotargetsqlsqldbsynctasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2021-06-30`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/connecttotargetsqlsqldbsynctasks" -``` - - -### Client Initialization - -```go -client := connecttotargetsqlsqldbsynctasks.NewConnectToTargetSqlSqlDbSyncTasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2021-06-30/connecttotargetsqlsqldbsynctasks/client.go b/resource-manager/datamigration/2021-06-30/connecttotargetsqlsqldbsynctasks/client.go deleted file mode 100644 index c80116405b3..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttotargetsqlsqldbsynctasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package connecttotargetsqlsqldbsynctasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToTargetSqlSqlDbSyncTasksClient struct { - Client *resourcemanager.Client -} - -func NewConnectToTargetSqlSqlDbSyncTasksClientWithBaseURI(sdkApi sdkEnv.Api) (*ConnectToTargetSqlSqlDbSyncTasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "connecttotargetsqlsqldbsynctasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ConnectToTargetSqlSqlDbSyncTasksClient: %+v", err) - } - - return &ConnectToTargetSqlSqlDbSyncTasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2021-06-30/connecttotargetsqlsqldbsynctasks/constants.go b/resource-manager/datamigration/2021-06-30/connecttotargetsqlsqldbsynctasks/constants.go deleted file mode 100644 index 829e0059903..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttotargetsqlsqldbsynctasks/constants.go +++ /dev/null @@ -1,98 +0,0 @@ -package connecttotargetsqlsqldbsynctasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthenticationType string - -const ( - AuthenticationTypeActiveDirectoryIntegrated AuthenticationType = "ActiveDirectoryIntegrated" - AuthenticationTypeActiveDirectoryPassword AuthenticationType = "ActiveDirectoryPassword" - AuthenticationTypeNone AuthenticationType = "None" - AuthenticationTypeSqlAuthentication AuthenticationType = "SqlAuthentication" - AuthenticationTypeWindowsAuthentication AuthenticationType = "WindowsAuthentication" -) - -func PossibleValuesForAuthenticationType() []string { - return []string{ - string(AuthenticationTypeActiveDirectoryIntegrated), - string(AuthenticationTypeActiveDirectoryPassword), - string(AuthenticationTypeNone), - string(AuthenticationTypeSqlAuthentication), - string(AuthenticationTypeWindowsAuthentication), - } -} - -func (s *AuthenticationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAuthenticationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAuthenticationType(input string) (*AuthenticationType, error) { - vals := map[string]AuthenticationType{ - "activedirectoryintegrated": AuthenticationTypeActiveDirectoryIntegrated, - "activedirectorypassword": AuthenticationTypeActiveDirectoryPassword, - "none": AuthenticationTypeNone, - "sqlauthentication": AuthenticationTypeSqlAuthentication, - "windowsauthentication": AuthenticationTypeWindowsAuthentication, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AuthenticationType(input) - return &out, nil -} - -type SqlSourcePlatform string - -const ( - SqlSourcePlatformSqlOnPrem SqlSourcePlatform = "SqlOnPrem" -) - -func PossibleValuesForSqlSourcePlatform() []string { - return []string{ - string(SqlSourcePlatformSqlOnPrem), - } -} - -func (s *SqlSourcePlatform) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSqlSourcePlatform(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSqlSourcePlatform(input string) (*SqlSourcePlatform, error) { - vals := map[string]SqlSourcePlatform{ - "sqlonprem": SqlSourcePlatformSqlOnPrem, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SqlSourcePlatform(input) - return &out, nil -} diff --git a/resource-manager/datamigration/2021-06-30/connecttotargetsqlsqldbsynctasks/model_connectioninfo.go b/resource-manager/datamigration/2021-06-30/connecttotargetsqlsqldbsynctasks/model_connectioninfo.go deleted file mode 100644 index 208fe95ab65..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttotargetsqlsqldbsynctasks/model_connectioninfo.go +++ /dev/null @@ -1,53 +0,0 @@ -package connecttotargetsqlsqldbsynctasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "SqlConnectionInfo") { - var out SqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2021-06-30/connecttotargetsqlsqldbsynctasks/model_sqlconnectioninfo.go b/resource-manager/datamigration/2021-06-30/connecttotargetsqlsqldbsynctasks/model_sqlconnectioninfo.go deleted file mode 100644 index 843ddf23344..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttotargetsqlsqldbsynctasks/model_sqlconnectioninfo.go +++ /dev/null @@ -1,48 +0,0 @@ -package connecttotargetsqlsqldbsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = SqlConnectionInfo{} - -type SqlConnectionInfo struct { - AdditionalSettings *string `json:"additionalSettings,omitempty"` - Authentication *AuthenticationType `json:"authentication,omitempty"` - DataSource string `json:"dataSource"` - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Platform *SqlSourcePlatform `json:"platform,omitempty"` - TrustServerCertificate *bool `json:"trustServerCertificate,omitempty"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = SqlConnectionInfo{} - -func (s SqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper SqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SqlConnectionInfo: %+v", err) - } - decoded["type"] = "SqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/connecttotargetsqlsqldbsynctasks/version.go b/resource-manager/datamigration/2021-06-30/connecttotargetsqlsqldbsynctasks/version.go deleted file mode 100644 index 22820db508f..00000000000 --- a/resource-manager/datamigration/2021-06-30/connecttotargetsqlsqldbsynctasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package connecttotargetsqlsqldbsynctasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-06-30" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connecttotargetsqlsqldbsynctasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2021-06-30/gettdecertificatessqltasks/README.md b/resource-manager/datamigration/2021-06-30/gettdecertificatessqltasks/README.md deleted file mode 100644 index 775ea13b642..00000000000 --- a/resource-manager/datamigration/2021-06-30/gettdecertificatessqltasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/gettdecertificatessqltasks` Documentation - -The `gettdecertificatessqltasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2021-06-30`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/gettdecertificatessqltasks" -``` - - -### Client Initialization - -```go -client := gettdecertificatessqltasks.NewGetTdeCertificatesSqlTasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2021-06-30/gettdecertificatessqltasks/client.go b/resource-manager/datamigration/2021-06-30/gettdecertificatessqltasks/client.go deleted file mode 100644 index 8e3c7f595c2..00000000000 --- a/resource-manager/datamigration/2021-06-30/gettdecertificatessqltasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package gettdecertificatessqltasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetTdeCertificatesSqlTasksClient struct { - Client *resourcemanager.Client -} - -func NewGetTdeCertificatesSqlTasksClientWithBaseURI(sdkApi sdkEnv.Api) (*GetTdeCertificatesSqlTasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "gettdecertificatessqltasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating GetTdeCertificatesSqlTasksClient: %+v", err) - } - - return &GetTdeCertificatesSqlTasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2021-06-30/gettdecertificatessqltasks/constants.go b/resource-manager/datamigration/2021-06-30/gettdecertificatessqltasks/constants.go deleted file mode 100644 index b7c7d7d13b4..00000000000 --- a/resource-manager/datamigration/2021-06-30/gettdecertificatessqltasks/constants.go +++ /dev/null @@ -1,98 +0,0 @@ -package gettdecertificatessqltasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthenticationType string - -const ( - AuthenticationTypeActiveDirectoryIntegrated AuthenticationType = "ActiveDirectoryIntegrated" - AuthenticationTypeActiveDirectoryPassword AuthenticationType = "ActiveDirectoryPassword" - AuthenticationTypeNone AuthenticationType = "None" - AuthenticationTypeSqlAuthentication AuthenticationType = "SqlAuthentication" - AuthenticationTypeWindowsAuthentication AuthenticationType = "WindowsAuthentication" -) - -func PossibleValuesForAuthenticationType() []string { - return []string{ - string(AuthenticationTypeActiveDirectoryIntegrated), - string(AuthenticationTypeActiveDirectoryPassword), - string(AuthenticationTypeNone), - string(AuthenticationTypeSqlAuthentication), - string(AuthenticationTypeWindowsAuthentication), - } -} - -func (s *AuthenticationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAuthenticationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAuthenticationType(input string) (*AuthenticationType, error) { - vals := map[string]AuthenticationType{ - "activedirectoryintegrated": AuthenticationTypeActiveDirectoryIntegrated, - "activedirectorypassword": AuthenticationTypeActiveDirectoryPassword, - "none": AuthenticationTypeNone, - "sqlauthentication": AuthenticationTypeSqlAuthentication, - "windowsauthentication": AuthenticationTypeWindowsAuthentication, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AuthenticationType(input) - return &out, nil -} - -type SqlSourcePlatform string - -const ( - SqlSourcePlatformSqlOnPrem SqlSourcePlatform = "SqlOnPrem" -) - -func PossibleValuesForSqlSourcePlatform() []string { - return []string{ - string(SqlSourcePlatformSqlOnPrem), - } -} - -func (s *SqlSourcePlatform) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSqlSourcePlatform(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSqlSourcePlatform(input string) (*SqlSourcePlatform, error) { - vals := map[string]SqlSourcePlatform{ - "sqlonprem": SqlSourcePlatformSqlOnPrem, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SqlSourcePlatform(input) - return &out, nil -} diff --git a/resource-manager/datamigration/2021-06-30/gettdecertificatessqltasks/model_connectioninfo.go b/resource-manager/datamigration/2021-06-30/gettdecertificatessqltasks/model_connectioninfo.go deleted file mode 100644 index 211b29a826e..00000000000 --- a/resource-manager/datamigration/2021-06-30/gettdecertificatessqltasks/model_connectioninfo.go +++ /dev/null @@ -1,53 +0,0 @@ -package gettdecertificatessqltasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "SqlConnectionInfo") { - var out SqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2021-06-30/gettdecertificatessqltasks/model_sqlconnectioninfo.go b/resource-manager/datamigration/2021-06-30/gettdecertificatessqltasks/model_sqlconnectioninfo.go deleted file mode 100644 index e404d04e0ee..00000000000 --- a/resource-manager/datamigration/2021-06-30/gettdecertificatessqltasks/model_sqlconnectioninfo.go +++ /dev/null @@ -1,48 +0,0 @@ -package gettdecertificatessqltasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = SqlConnectionInfo{} - -type SqlConnectionInfo struct { - AdditionalSettings *string `json:"additionalSettings,omitempty"` - Authentication *AuthenticationType `json:"authentication,omitempty"` - DataSource string `json:"dataSource"` - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Platform *SqlSourcePlatform `json:"platform,omitempty"` - TrustServerCertificate *bool `json:"trustServerCertificate,omitempty"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = SqlConnectionInfo{} - -func (s SqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper SqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SqlConnectionInfo: %+v", err) - } - decoded["type"] = "SqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/gettdecertificatessqltasks/version.go b/resource-manager/datamigration/2021-06-30/gettdecertificatessqltasks/version.go deleted file mode 100644 index a62e0a0285c..00000000000 --- a/resource-manager/datamigration/2021-06-30/gettdecertificatessqltasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package gettdecertificatessqltasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-06-30" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/gettdecertificatessqltasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2021-06-30/getusertablesmysqltasks/README.md b/resource-manager/datamigration/2021-06-30/getusertablesmysqltasks/README.md deleted file mode 100644 index 7a69866717d..00000000000 --- a/resource-manager/datamigration/2021-06-30/getusertablesmysqltasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/getusertablesmysqltasks` Documentation - -The `getusertablesmysqltasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2021-06-30`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/getusertablesmysqltasks" -``` - - -### Client Initialization - -```go -client := getusertablesmysqltasks.NewGetUserTablesMySqlTasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2021-06-30/getusertablesmysqltasks/client.go b/resource-manager/datamigration/2021-06-30/getusertablesmysqltasks/client.go deleted file mode 100644 index 107a4623587..00000000000 --- a/resource-manager/datamigration/2021-06-30/getusertablesmysqltasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package getusertablesmysqltasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetUserTablesMySqlTasksClient struct { - Client *resourcemanager.Client -} - -func NewGetUserTablesMySqlTasksClientWithBaseURI(sdkApi sdkEnv.Api) (*GetUserTablesMySqlTasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "getusertablesmysqltasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating GetUserTablesMySqlTasksClient: %+v", err) - } - - return &GetUserTablesMySqlTasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2021-06-30/getusertablesmysqltasks/model_connectioninfo.go b/resource-manager/datamigration/2021-06-30/getusertablesmysqltasks/model_connectioninfo.go deleted file mode 100644 index 704c9a4f66f..00000000000 --- a/resource-manager/datamigration/2021-06-30/getusertablesmysqltasks/model_connectioninfo.go +++ /dev/null @@ -1,53 +0,0 @@ -package getusertablesmysqltasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "MySqlConnectionInfo") { - var out MySqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MySqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2021-06-30/getusertablesmysqltasks/model_mysqlconnectioninfo.go b/resource-manager/datamigration/2021-06-30/getusertablesmysqltasks/model_mysqlconnectioninfo.go deleted file mode 100644 index 067ddbdb1cd..00000000000 --- a/resource-manager/datamigration/2021-06-30/getusertablesmysqltasks/model_mysqlconnectioninfo.go +++ /dev/null @@ -1,45 +0,0 @@ -package getusertablesmysqltasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = MySqlConnectionInfo{} - -type MySqlConnectionInfo struct { - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Port int64 `json:"port"` - ServerName string `json:"serverName"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = MySqlConnectionInfo{} - -func (s MySqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper MySqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MySqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MySqlConnectionInfo: %+v", err) - } - decoded["type"] = "MySqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MySqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/getusertablesmysqltasks/version.go b/resource-manager/datamigration/2021-06-30/getusertablesmysqltasks/version.go deleted file mode 100644 index 327e40c3305..00000000000 --- a/resource-manager/datamigration/2021-06-30/getusertablesmysqltasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package getusertablesmysqltasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-06-30" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/getusertablesmysqltasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2021-06-30/getusertablessqlsynctasks/README.md b/resource-manager/datamigration/2021-06-30/getusertablessqlsynctasks/README.md deleted file mode 100644 index 368d40536e4..00000000000 --- a/resource-manager/datamigration/2021-06-30/getusertablessqlsynctasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/getusertablessqlsynctasks` Documentation - -The `getusertablessqlsynctasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2021-06-30`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/getusertablessqlsynctasks" -``` - - -### Client Initialization - -```go -client := getusertablessqlsynctasks.NewGetUserTablesSqlSyncTasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2021-06-30/getusertablessqlsynctasks/client.go b/resource-manager/datamigration/2021-06-30/getusertablessqlsynctasks/client.go deleted file mode 100644 index 79a37c2f398..00000000000 --- a/resource-manager/datamigration/2021-06-30/getusertablessqlsynctasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package getusertablessqlsynctasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetUserTablesSqlSyncTasksClient struct { - Client *resourcemanager.Client -} - -func NewGetUserTablesSqlSyncTasksClientWithBaseURI(sdkApi sdkEnv.Api) (*GetUserTablesSqlSyncTasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "getusertablessqlsynctasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating GetUserTablesSqlSyncTasksClient: %+v", err) - } - - return &GetUserTablesSqlSyncTasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2021-06-30/getusertablessqlsynctasks/constants.go b/resource-manager/datamigration/2021-06-30/getusertablessqlsynctasks/constants.go deleted file mode 100644 index 87e3d20c6e5..00000000000 --- a/resource-manager/datamigration/2021-06-30/getusertablessqlsynctasks/constants.go +++ /dev/null @@ -1,98 +0,0 @@ -package getusertablessqlsynctasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthenticationType string - -const ( - AuthenticationTypeActiveDirectoryIntegrated AuthenticationType = "ActiveDirectoryIntegrated" - AuthenticationTypeActiveDirectoryPassword AuthenticationType = "ActiveDirectoryPassword" - AuthenticationTypeNone AuthenticationType = "None" - AuthenticationTypeSqlAuthentication AuthenticationType = "SqlAuthentication" - AuthenticationTypeWindowsAuthentication AuthenticationType = "WindowsAuthentication" -) - -func PossibleValuesForAuthenticationType() []string { - return []string{ - string(AuthenticationTypeActiveDirectoryIntegrated), - string(AuthenticationTypeActiveDirectoryPassword), - string(AuthenticationTypeNone), - string(AuthenticationTypeSqlAuthentication), - string(AuthenticationTypeWindowsAuthentication), - } -} - -func (s *AuthenticationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAuthenticationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAuthenticationType(input string) (*AuthenticationType, error) { - vals := map[string]AuthenticationType{ - "activedirectoryintegrated": AuthenticationTypeActiveDirectoryIntegrated, - "activedirectorypassword": AuthenticationTypeActiveDirectoryPassword, - "none": AuthenticationTypeNone, - "sqlauthentication": AuthenticationTypeSqlAuthentication, - "windowsauthentication": AuthenticationTypeWindowsAuthentication, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AuthenticationType(input) - return &out, nil -} - -type SqlSourcePlatform string - -const ( - SqlSourcePlatformSqlOnPrem SqlSourcePlatform = "SqlOnPrem" -) - -func PossibleValuesForSqlSourcePlatform() []string { - return []string{ - string(SqlSourcePlatformSqlOnPrem), - } -} - -func (s *SqlSourcePlatform) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSqlSourcePlatform(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSqlSourcePlatform(input string) (*SqlSourcePlatform, error) { - vals := map[string]SqlSourcePlatform{ - "sqlonprem": SqlSourcePlatformSqlOnPrem, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SqlSourcePlatform(input) - return &out, nil -} diff --git a/resource-manager/datamigration/2021-06-30/getusertablessqlsynctasks/model_connectioninfo.go b/resource-manager/datamigration/2021-06-30/getusertablessqlsynctasks/model_connectioninfo.go deleted file mode 100644 index e299a0e3edd..00000000000 --- a/resource-manager/datamigration/2021-06-30/getusertablessqlsynctasks/model_connectioninfo.go +++ /dev/null @@ -1,53 +0,0 @@ -package getusertablessqlsynctasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "SqlConnectionInfo") { - var out SqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2021-06-30/getusertablessqlsynctasks/model_sqlconnectioninfo.go b/resource-manager/datamigration/2021-06-30/getusertablessqlsynctasks/model_sqlconnectioninfo.go deleted file mode 100644 index f36ec901917..00000000000 --- a/resource-manager/datamigration/2021-06-30/getusertablessqlsynctasks/model_sqlconnectioninfo.go +++ /dev/null @@ -1,48 +0,0 @@ -package getusertablessqlsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = SqlConnectionInfo{} - -type SqlConnectionInfo struct { - AdditionalSettings *string `json:"additionalSettings,omitempty"` - Authentication *AuthenticationType `json:"authentication,omitempty"` - DataSource string `json:"dataSource"` - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Platform *SqlSourcePlatform `json:"platform,omitempty"` - TrustServerCertificate *bool `json:"trustServerCertificate,omitempty"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = SqlConnectionInfo{} - -func (s SqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper SqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SqlConnectionInfo: %+v", err) - } - decoded["type"] = "SqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/getusertablessqlsynctasks/version.go b/resource-manager/datamigration/2021-06-30/getusertablessqlsynctasks/version.go deleted file mode 100644 index 623ccf24d49..00000000000 --- a/resource-manager/datamigration/2021-06-30/getusertablessqlsynctasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package getusertablessqlsynctasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-06-30" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/getusertablessqlsynctasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2021-06-30/getusertablessqltasks/README.md b/resource-manager/datamigration/2021-06-30/getusertablessqltasks/README.md deleted file mode 100644 index c74000f2b55..00000000000 --- a/resource-manager/datamigration/2021-06-30/getusertablessqltasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/getusertablessqltasks` Documentation - -The `getusertablessqltasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2021-06-30`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/getusertablessqltasks" -``` - - -### Client Initialization - -```go -client := getusertablessqltasks.NewGetUserTablesSqlTasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2021-06-30/getusertablessqltasks/client.go b/resource-manager/datamigration/2021-06-30/getusertablessqltasks/client.go deleted file mode 100644 index bda03c33f80..00000000000 --- a/resource-manager/datamigration/2021-06-30/getusertablessqltasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package getusertablessqltasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetUserTablesSqlTasksClient struct { - Client *resourcemanager.Client -} - -func NewGetUserTablesSqlTasksClientWithBaseURI(sdkApi sdkEnv.Api) (*GetUserTablesSqlTasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "getusertablessqltasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating GetUserTablesSqlTasksClient: %+v", err) - } - - return &GetUserTablesSqlTasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2021-06-30/getusertablessqltasks/constants.go b/resource-manager/datamigration/2021-06-30/getusertablessqltasks/constants.go deleted file mode 100644 index 4cd34347a70..00000000000 --- a/resource-manager/datamigration/2021-06-30/getusertablessqltasks/constants.go +++ /dev/null @@ -1,98 +0,0 @@ -package getusertablessqltasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthenticationType string - -const ( - AuthenticationTypeActiveDirectoryIntegrated AuthenticationType = "ActiveDirectoryIntegrated" - AuthenticationTypeActiveDirectoryPassword AuthenticationType = "ActiveDirectoryPassword" - AuthenticationTypeNone AuthenticationType = "None" - AuthenticationTypeSqlAuthentication AuthenticationType = "SqlAuthentication" - AuthenticationTypeWindowsAuthentication AuthenticationType = "WindowsAuthentication" -) - -func PossibleValuesForAuthenticationType() []string { - return []string{ - string(AuthenticationTypeActiveDirectoryIntegrated), - string(AuthenticationTypeActiveDirectoryPassword), - string(AuthenticationTypeNone), - string(AuthenticationTypeSqlAuthentication), - string(AuthenticationTypeWindowsAuthentication), - } -} - -func (s *AuthenticationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAuthenticationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAuthenticationType(input string) (*AuthenticationType, error) { - vals := map[string]AuthenticationType{ - "activedirectoryintegrated": AuthenticationTypeActiveDirectoryIntegrated, - "activedirectorypassword": AuthenticationTypeActiveDirectoryPassword, - "none": AuthenticationTypeNone, - "sqlauthentication": AuthenticationTypeSqlAuthentication, - "windowsauthentication": AuthenticationTypeWindowsAuthentication, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AuthenticationType(input) - return &out, nil -} - -type SqlSourcePlatform string - -const ( - SqlSourcePlatformSqlOnPrem SqlSourcePlatform = "SqlOnPrem" -) - -func PossibleValuesForSqlSourcePlatform() []string { - return []string{ - string(SqlSourcePlatformSqlOnPrem), - } -} - -func (s *SqlSourcePlatform) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSqlSourcePlatform(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSqlSourcePlatform(input string) (*SqlSourcePlatform, error) { - vals := map[string]SqlSourcePlatform{ - "sqlonprem": SqlSourcePlatformSqlOnPrem, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SqlSourcePlatform(input) - return &out, nil -} diff --git a/resource-manager/datamigration/2021-06-30/getusertablessqltasks/model_connectioninfo.go b/resource-manager/datamigration/2021-06-30/getusertablessqltasks/model_connectioninfo.go deleted file mode 100644 index 986e92df3e2..00000000000 --- a/resource-manager/datamigration/2021-06-30/getusertablessqltasks/model_connectioninfo.go +++ /dev/null @@ -1,53 +0,0 @@ -package getusertablessqltasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "SqlConnectionInfo") { - var out SqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2021-06-30/getusertablessqltasks/model_sqlconnectioninfo.go b/resource-manager/datamigration/2021-06-30/getusertablessqltasks/model_sqlconnectioninfo.go deleted file mode 100644 index f58bb4fdd03..00000000000 --- a/resource-manager/datamigration/2021-06-30/getusertablessqltasks/model_sqlconnectioninfo.go +++ /dev/null @@ -1,48 +0,0 @@ -package getusertablessqltasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = SqlConnectionInfo{} - -type SqlConnectionInfo struct { - AdditionalSettings *string `json:"additionalSettings,omitempty"` - Authentication *AuthenticationType `json:"authentication,omitempty"` - DataSource string `json:"dataSource"` - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Platform *SqlSourcePlatform `json:"platform,omitempty"` - TrustServerCertificate *bool `json:"trustServerCertificate,omitempty"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = SqlConnectionInfo{} - -func (s SqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper SqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SqlConnectionInfo: %+v", err) - } - decoded["type"] = "SqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/getusertablessqltasks/version.go b/resource-manager/datamigration/2021-06-30/getusertablessqltasks/version.go deleted file mode 100644 index 310ae2408cd..00000000000 --- a/resource-manager/datamigration/2021-06-30/getusertablessqltasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package getusertablessqltasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-06-30" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/getusertablessqltasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlofflinetasks/README.md b/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlofflinetasks/README.md deleted file mode 100644 index 383a7d3087b..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlofflinetasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlofflinetasks` Documentation - -The `migratemysqlazuredbformysqlofflinetasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2021-06-30`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlofflinetasks" -``` - - -### Client Initialization - -```go -client := migratemysqlazuredbformysqlofflinetasks.NewMigrateMySqlAzureDbForMySqlOfflineTasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlofflinetasks/client.go b/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlofflinetasks/client.go deleted file mode 100644 index a60596ed904..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlofflinetasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package migratemysqlazuredbformysqlofflinetasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateMySqlAzureDbForMySqlOfflineTasksClient struct { - Client *resourcemanager.Client -} - -func NewMigrateMySqlAzureDbForMySqlOfflineTasksClientWithBaseURI(sdkApi sdkEnv.Api) (*MigrateMySqlAzureDbForMySqlOfflineTasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "migratemysqlazuredbformysqlofflinetasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating MigrateMySqlAzureDbForMySqlOfflineTasksClient: %+v", err) - } - - return &MigrateMySqlAzureDbForMySqlOfflineTasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlofflinetasks/constants.go b/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlofflinetasks/constants.go deleted file mode 100644 index e8107c10adc..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlofflinetasks/constants.go +++ /dev/null @@ -1,184 +0,0 @@ -package migratemysqlazuredbformysqlofflinetasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DatabaseMigrationStage string - -const ( - DatabaseMigrationStageBackup DatabaseMigrationStage = "Backup" - DatabaseMigrationStageCompleted DatabaseMigrationStage = "Completed" - DatabaseMigrationStageFileCopy DatabaseMigrationStage = "FileCopy" - DatabaseMigrationStageInitialize DatabaseMigrationStage = "Initialize" - DatabaseMigrationStageNone DatabaseMigrationStage = "None" - DatabaseMigrationStageRestore DatabaseMigrationStage = "Restore" -) - -func PossibleValuesForDatabaseMigrationStage() []string { - return []string{ - string(DatabaseMigrationStageBackup), - string(DatabaseMigrationStageCompleted), - string(DatabaseMigrationStageFileCopy), - string(DatabaseMigrationStageInitialize), - string(DatabaseMigrationStageNone), - string(DatabaseMigrationStageRestore), - } -} - -func (s *DatabaseMigrationStage) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDatabaseMigrationStage(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDatabaseMigrationStage(input string) (*DatabaseMigrationStage, error) { - vals := map[string]DatabaseMigrationStage{ - "backup": DatabaseMigrationStageBackup, - "completed": DatabaseMigrationStageCompleted, - "filecopy": DatabaseMigrationStageFileCopy, - "initialize": DatabaseMigrationStageInitialize, - "none": DatabaseMigrationStageNone, - "restore": DatabaseMigrationStageRestore, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DatabaseMigrationStage(input) - return &out, nil -} - -type MigrationState string - -const ( - MigrationStateCompleted MigrationState = "Completed" - MigrationStateFailed MigrationState = "Failed" - MigrationStateInProgress MigrationState = "InProgress" - MigrationStateNone MigrationState = "None" - MigrationStateSkipped MigrationState = "Skipped" - MigrationStateStopped MigrationState = "Stopped" - MigrationStateWarning MigrationState = "Warning" -) - -func PossibleValuesForMigrationState() []string { - return []string{ - string(MigrationStateCompleted), - string(MigrationStateFailed), - string(MigrationStateInProgress), - string(MigrationStateNone), - string(MigrationStateSkipped), - string(MigrationStateStopped), - string(MigrationStateWarning), - } -} - -func (s *MigrationState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseMigrationState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseMigrationState(input string) (*MigrationState, error) { - vals := map[string]MigrationState{ - "completed": MigrationStateCompleted, - "failed": MigrationStateFailed, - "inprogress": MigrationStateInProgress, - "none": MigrationStateNone, - "skipped": MigrationStateSkipped, - "stopped": MigrationStateStopped, - "warning": MigrationStateWarning, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := MigrationState(input) - return &out, nil -} - -type MigrationStatus string - -const ( - MigrationStatusCompleted MigrationStatus = "Completed" - MigrationStatusCompletedWithWarnings MigrationStatus = "CompletedWithWarnings" - MigrationStatusConfigured MigrationStatus = "Configured" - MigrationStatusConnecting MigrationStatus = "Connecting" - MigrationStatusDefault MigrationStatus = "Default" - MigrationStatusError MigrationStatus = "Error" - MigrationStatusRunning MigrationStatus = "Running" - MigrationStatusSelectLogins MigrationStatus = "SelectLogins" - MigrationStatusSourceAndTargetSelected MigrationStatus = "SourceAndTargetSelected" - MigrationStatusStopped MigrationStatus = "Stopped" -) - -func PossibleValuesForMigrationStatus() []string { - return []string{ - string(MigrationStatusCompleted), - string(MigrationStatusCompletedWithWarnings), - string(MigrationStatusConfigured), - string(MigrationStatusConnecting), - string(MigrationStatusDefault), - string(MigrationStatusError), - string(MigrationStatusRunning), - string(MigrationStatusSelectLogins), - string(MigrationStatusSourceAndTargetSelected), - string(MigrationStatusStopped), - } -} - -func (s *MigrationStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseMigrationStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseMigrationStatus(input string) (*MigrationStatus, error) { - vals := map[string]MigrationStatus{ - "completed": MigrationStatusCompleted, - "completedwithwarnings": MigrationStatusCompletedWithWarnings, - "configured": MigrationStatusConfigured, - "connecting": MigrationStatusConnecting, - "default": MigrationStatusDefault, - "error": MigrationStatusError, - "running": MigrationStatusRunning, - "selectlogins": MigrationStatusSelectLogins, - "sourceandtargetselected": MigrationStatusSourceAndTargetSelected, - "stopped": MigrationStatusStopped, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := MigrationStatus(input) - return &out, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlofflinetasks/model_connectioninfo.go b/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlofflinetasks/model_connectioninfo.go deleted file mode 100644 index f562c792282..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlofflinetasks/model_connectioninfo.go +++ /dev/null @@ -1,53 +0,0 @@ -package migratemysqlazuredbformysqlofflinetasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "MySqlConnectionInfo") { - var out MySqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MySqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlofflinetasks/model_databasesummaryresult.go b/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlofflinetasks/model_databasesummaryresult.go deleted file mode 100644 index 0d4b772ecd6..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlofflinetasks/model_databasesummaryresult.go +++ /dev/null @@ -1,47 +0,0 @@ -package migratemysqlazuredbformysqlofflinetasks - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DatabaseSummaryResult struct { - EndedOn *string `json:"endedOn,omitempty"` - ErrorPrefix *string `json:"errorPrefix,omitempty"` - ItemsCompletedCount *int64 `json:"itemsCompletedCount,omitempty"` - ItemsCount *int64 `json:"itemsCount,omitempty"` - Name *string `json:"name,omitempty"` - ResultPrefix *string `json:"resultPrefix,omitempty"` - SizeMB *float64 `json:"sizeMB,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - State *MigrationState `json:"state,omitempty"` - StatusMessage *string `json:"statusMessage,omitempty"` -} - -func (o *DatabaseSummaryResult) GetEndedOnAsTime() (*time.Time, error) { - if o.EndedOn == nil { - return nil, nil - } - return dates.ParseAsFormat(o.EndedOn, "2006-01-02T15:04:05Z07:00") -} - -func (o *DatabaseSummaryResult) SetEndedOnAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.EndedOn = &formatted -} - -func (o *DatabaseSummaryResult) GetStartedOnAsTime() (*time.Time, error) { - if o.StartedOn == nil { - return nil, nil - } - return dates.ParseAsFormat(o.StartedOn, "2006-01-02T15:04:05Z07:00") -} - -func (o *DatabaseSummaryResult) SetStartedOnAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.StartedOn = &formatted -} diff --git a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlofflinetasks/model_dataitemmigrationsummaryresult.go b/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlofflinetasks/model_dataitemmigrationsummaryresult.go deleted file mode 100644 index c2494edbf54..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlofflinetasks/model_dataitemmigrationsummaryresult.go +++ /dev/null @@ -1,46 +0,0 @@ -package migratemysqlazuredbformysqlofflinetasks - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DataItemMigrationSummaryResult struct { - EndedOn *string `json:"endedOn,omitempty"` - ErrorPrefix *string `json:"errorPrefix,omitempty"` - ItemsCompletedCount *int64 `json:"itemsCompletedCount,omitempty"` - ItemsCount *int64 `json:"itemsCount,omitempty"` - Name *string `json:"name,omitempty"` - ResultPrefix *string `json:"resultPrefix,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - State *MigrationState `json:"state,omitempty"` - StatusMessage *string `json:"statusMessage,omitempty"` -} - -func (o *DataItemMigrationSummaryResult) GetEndedOnAsTime() (*time.Time, error) { - if o.EndedOn == nil { - return nil, nil - } - return dates.ParseAsFormat(o.EndedOn, "2006-01-02T15:04:05Z07:00") -} - -func (o *DataItemMigrationSummaryResult) SetEndedOnAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.EndedOn = &formatted -} - -func (o *DataItemMigrationSummaryResult) GetStartedOnAsTime() (*time.Time, error) { - if o.StartedOn == nil { - return nil, nil - } - return dates.ParseAsFormat(o.StartedOn, "2006-01-02T15:04:05Z07:00") -} - -func (o *DataItemMigrationSummaryResult) SetStartedOnAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.StartedOn = &formatted -} diff --git a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlofflinetasks/model_migratemysqlazuredbformysqlofflinetaskoutput.go b/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlofflinetasks/model_migratemysqlazuredbformysqlofflinetaskoutput.go deleted file mode 100644 index 8e11120e39d..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlofflinetasks/model_migratemysqlazuredbformysqlofflinetaskoutput.go +++ /dev/null @@ -1,77 +0,0 @@ -package migratemysqlazuredbformysqlofflinetasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateMySqlAzureDbForMySqlOfflineTaskOutput interface { -} - -// RawMigrateMySqlAzureDbForMySqlOfflineTaskOutputImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawMigrateMySqlAzureDbForMySqlOfflineTaskOutputImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalMigrateMySqlAzureDbForMySqlOfflineTaskOutputImplementation(input []byte) (MigrateMySqlAzureDbForMySqlOfflineTaskOutput, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateMySqlAzureDbForMySqlOfflineTaskOutput into map[string]interface: %+v", err) - } - - value, ok := temp["resultType"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "DatabaseLevelOutput") { - var out MigrateMySqlAzureDbForMySqlOfflineTaskOutputDatabaseLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateMySqlAzureDbForMySqlOfflineTaskOutputDatabaseLevel: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "ErrorOutput") { - var out MigrateMySqlAzureDbForMySqlOfflineTaskOutputError - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateMySqlAzureDbForMySqlOfflineTaskOutputError: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "MigrationLevelOutput") { - var out MigrateMySqlAzureDbForMySqlOfflineTaskOutputMigrationLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateMySqlAzureDbForMySqlOfflineTaskOutputMigrationLevel: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "TableLevelOutput") { - var out MigrateMySqlAzureDbForMySqlOfflineTaskOutputTableLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateMySqlAzureDbForMySqlOfflineTaskOutputTableLevel: %+v", err) - } - return out, nil - } - - out := RawMigrateMySqlAzureDbForMySqlOfflineTaskOutputImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlofflinetasks/model_migratemysqlazuredbformysqlofflinetaskoutputdatabaselevel.go b/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlofflinetasks/model_migratemysqlazuredbformysqlofflinetaskoutputdatabaselevel.go deleted file mode 100644 index a32f3758d83..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlofflinetasks/model_migratemysqlazuredbformysqlofflinetaskoutputdatabaselevel.go +++ /dev/null @@ -1,56 +0,0 @@ -package migratemysqlazuredbformysqlofflinetasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateMySqlAzureDbForMySqlOfflineTaskOutput = MigrateMySqlAzureDbForMySqlOfflineTaskOutputDatabaseLevel{} - -type MigrateMySqlAzureDbForMySqlOfflineTaskOutputDatabaseLevel struct { - DatabaseName *string `json:"databaseName,omitempty"` - EndedOn *string `json:"endedOn,omitempty"` - ErrorCount *int64 `json:"errorCount,omitempty"` - ErrorPrefix *string `json:"errorPrefix,omitempty"` - ExceptionsAndWarnings *[]ReportableException `json:"exceptionsAndWarnings,omitempty"` - LastStorageUpdate *string `json:"lastStorageUpdate,omitempty"` - Message *string `json:"message,omitempty"` - NumberOfObjects *int64 `json:"numberOfObjects,omitempty"` - NumberOfObjectsCompleted *int64 `json:"numberOfObjectsCompleted,omitempty"` - ObjectSummary *map[string]DataItemMigrationSummaryResult `json:"objectSummary,omitempty"` - ResultPrefix *string `json:"resultPrefix,omitempty"` - Stage *DatabaseMigrationStage `json:"stage,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - State *MigrationState `json:"state,omitempty"` - StatusMessage *string `json:"statusMessage,omitempty"` - - // Fields inherited from MigrateMySqlAzureDbForMySqlOfflineTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateMySqlAzureDbForMySqlOfflineTaskOutputDatabaseLevel{} - -func (s MigrateMySqlAzureDbForMySqlOfflineTaskOutputDatabaseLevel) MarshalJSON() ([]byte, error) { - type wrapper MigrateMySqlAzureDbForMySqlOfflineTaskOutputDatabaseLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateMySqlAzureDbForMySqlOfflineTaskOutputDatabaseLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateMySqlAzureDbForMySqlOfflineTaskOutputDatabaseLevel: %+v", err) - } - decoded["resultType"] = "DatabaseLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateMySqlAzureDbForMySqlOfflineTaskOutputDatabaseLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlofflinetasks/model_migratemysqlazuredbformysqlofflinetaskoutputerror.go b/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlofflinetasks/model_migratemysqlazuredbformysqlofflinetaskoutputerror.go deleted file mode 100644 index 3bc8dc61ee4..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlofflinetasks/model_migratemysqlazuredbformysqlofflinetaskoutputerror.go +++ /dev/null @@ -1,42 +0,0 @@ -package migratemysqlazuredbformysqlofflinetasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateMySqlAzureDbForMySqlOfflineTaskOutput = MigrateMySqlAzureDbForMySqlOfflineTaskOutputError{} - -type MigrateMySqlAzureDbForMySqlOfflineTaskOutputError struct { - Error *ReportableException `json:"error,omitempty"` - - // Fields inherited from MigrateMySqlAzureDbForMySqlOfflineTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateMySqlAzureDbForMySqlOfflineTaskOutputError{} - -func (s MigrateMySqlAzureDbForMySqlOfflineTaskOutputError) MarshalJSON() ([]byte, error) { - type wrapper MigrateMySqlAzureDbForMySqlOfflineTaskOutputError - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateMySqlAzureDbForMySqlOfflineTaskOutputError: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateMySqlAzureDbForMySqlOfflineTaskOutputError: %+v", err) - } - decoded["resultType"] = "ErrorOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateMySqlAzureDbForMySqlOfflineTaskOutputError: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlofflinetasks/model_migratemysqlazuredbformysqlofflinetaskoutputmigrationlevel.go b/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlofflinetasks/model_migratemysqlazuredbformysqlofflinetaskoutputmigrationlevel.go deleted file mode 100644 index 7380b70f78a..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlofflinetasks/model_migratemysqlazuredbformysqlofflinetaskoutputmigrationlevel.go +++ /dev/null @@ -1,56 +0,0 @@ -package migratemysqlazuredbformysqlofflinetasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateMySqlAzureDbForMySqlOfflineTaskOutput = MigrateMySqlAzureDbForMySqlOfflineTaskOutputMigrationLevel{} - -type MigrateMySqlAzureDbForMySqlOfflineTaskOutputMigrationLevel struct { - DatabaseSummary *map[string]DatabaseSummaryResult `json:"databaseSummary,omitempty"` - Databases *map[string]string `json:"databases,omitempty"` - DurationInSeconds *int64 `json:"durationInSeconds,omitempty"` - EndedOn *string `json:"endedOn,omitempty"` - ExceptionsAndWarnings *[]ReportableException `json:"exceptionsAndWarnings,omitempty"` - LastStorageUpdate *string `json:"lastStorageUpdate,omitempty"` - Message *string `json:"message,omitempty"` - MigrationReportResult *MigrationReportResult `json:"migrationReportResult,omitempty"` - SourceServerBrandVersion *string `json:"sourceServerBrandVersion,omitempty"` - SourceServerVersion *string `json:"sourceServerVersion,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - Status *MigrationStatus `json:"status,omitempty"` - StatusMessage *string `json:"statusMessage,omitempty"` - TargetServerBrandVersion *string `json:"targetServerBrandVersion,omitempty"` - TargetServerVersion *string `json:"targetServerVersion,omitempty"` - - // Fields inherited from MigrateMySqlAzureDbForMySqlOfflineTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateMySqlAzureDbForMySqlOfflineTaskOutputMigrationLevel{} - -func (s MigrateMySqlAzureDbForMySqlOfflineTaskOutputMigrationLevel) MarshalJSON() ([]byte, error) { - type wrapper MigrateMySqlAzureDbForMySqlOfflineTaskOutputMigrationLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateMySqlAzureDbForMySqlOfflineTaskOutputMigrationLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateMySqlAzureDbForMySqlOfflineTaskOutputMigrationLevel: %+v", err) - } - decoded["resultType"] = "MigrationLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateMySqlAzureDbForMySqlOfflineTaskOutputMigrationLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlofflinetasks/model_migratemysqlazuredbformysqlofflinetaskoutputtablelevel.go b/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlofflinetasks/model_migratemysqlazuredbformysqlofflinetaskoutputtablelevel.go deleted file mode 100644 index 1ad8b09b172..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlofflinetasks/model_migratemysqlazuredbformysqlofflinetaskoutputtablelevel.go +++ /dev/null @@ -1,51 +0,0 @@ -package migratemysqlazuredbformysqlofflinetasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateMySqlAzureDbForMySqlOfflineTaskOutput = MigrateMySqlAzureDbForMySqlOfflineTaskOutputTableLevel{} - -type MigrateMySqlAzureDbForMySqlOfflineTaskOutputTableLevel struct { - EndedOn *string `json:"endedOn,omitempty"` - ErrorPrefix *string `json:"errorPrefix,omitempty"` - ItemsCompletedCount *int64 `json:"itemsCompletedCount,omitempty"` - ItemsCount *int64 `json:"itemsCount,omitempty"` - LastStorageUpdate *string `json:"lastStorageUpdate,omitempty"` - ObjectName *string `json:"objectName,omitempty"` - ResultPrefix *string `json:"resultPrefix,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - State *MigrationState `json:"state,omitempty"` - StatusMessage *string `json:"statusMessage,omitempty"` - - // Fields inherited from MigrateMySqlAzureDbForMySqlOfflineTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateMySqlAzureDbForMySqlOfflineTaskOutputTableLevel{} - -func (s MigrateMySqlAzureDbForMySqlOfflineTaskOutputTableLevel) MarshalJSON() ([]byte, error) { - type wrapper MigrateMySqlAzureDbForMySqlOfflineTaskOutputTableLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateMySqlAzureDbForMySqlOfflineTaskOutputTableLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateMySqlAzureDbForMySqlOfflineTaskOutputTableLevel: %+v", err) - } - decoded["resultType"] = "TableLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateMySqlAzureDbForMySqlOfflineTaskOutputTableLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlofflinetasks/model_migrationreportresult.go b/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlofflinetasks/model_migrationreportresult.go deleted file mode 100644 index 8d76b25918f..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlofflinetasks/model_migrationreportresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package migratemysqlazuredbformysqlofflinetasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrationReportResult struct { - Id *string `json:"id,omitempty"` - ReportUrl *string `json:"reportUrl,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlofflinetasks/model_mysqlconnectioninfo.go b/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlofflinetasks/model_mysqlconnectioninfo.go deleted file mode 100644 index afd85599f5a..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlofflinetasks/model_mysqlconnectioninfo.go +++ /dev/null @@ -1,45 +0,0 @@ -package migratemysqlazuredbformysqlofflinetasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = MySqlConnectionInfo{} - -type MySqlConnectionInfo struct { - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Port int64 `json:"port"` - ServerName string `json:"serverName"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = MySqlConnectionInfo{} - -func (s MySqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper MySqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MySqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MySqlConnectionInfo: %+v", err) - } - decoded["type"] = "MySqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MySqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlofflinetasks/model_reportableexception.go b/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlofflinetasks/model_reportableexception.go deleted file mode 100644 index 81c3e87be77..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlofflinetasks/model_reportableexception.go +++ /dev/null @@ -1,13 +0,0 @@ -package migratemysqlazuredbformysqlofflinetasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ReportableException struct { - ActionableMessage *string `json:"actionableMessage,omitempty"` - FilePath *string `json:"filePath,omitempty"` - HResult *int64 `json:"hResult,omitempty"` - LineNumber *string `json:"lineNumber,omitempty"` - Message *string `json:"message,omitempty"` - StackTrace *string `json:"stackTrace,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlofflinetasks/version.go b/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlofflinetasks/version.go deleted file mode 100644 index 4bcd6aaa7a3..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlofflinetasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package migratemysqlazuredbformysqlofflinetasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-06-30" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/migratemysqlazuredbformysqlofflinetasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlsynctasks/README.md b/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlsynctasks/README.md deleted file mode 100644 index ca7a23a791b..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlsynctasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlsynctasks` Documentation - -The `migratemysqlazuredbformysqlsynctasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2021-06-30`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlsynctasks" -``` - - -### Client Initialization - -```go -client := migratemysqlazuredbformysqlsynctasks.NewMigrateMySqlAzureDbForMySqlSyncTasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlsynctasks/client.go b/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlsynctasks/client.go deleted file mode 100644 index 3586c17c71a..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlsynctasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package migratemysqlazuredbformysqlsynctasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateMySqlAzureDbForMySqlSyncTasksClient struct { - Client *resourcemanager.Client -} - -func NewMigrateMySqlAzureDbForMySqlSyncTasksClientWithBaseURI(sdkApi sdkEnv.Api) (*MigrateMySqlAzureDbForMySqlSyncTasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "migratemysqlazuredbformysqlsynctasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating MigrateMySqlAzureDbForMySqlSyncTasksClient: %+v", err) - } - - return &MigrateMySqlAzureDbForMySqlSyncTasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlsynctasks/constants.go b/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlsynctasks/constants.go deleted file mode 100644 index 02b4fdb4981..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlsynctasks/constants.go +++ /dev/null @@ -1,152 +0,0 @@ -package migratemysqlazuredbformysqlsynctasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SyncDatabaseMigrationReportingState string - -const ( - SyncDatabaseMigrationReportingStateBACKUPCOMPLETED SyncDatabaseMigrationReportingState = "BACKUP_COMPLETED" - SyncDatabaseMigrationReportingStateBACKUPINPROGRESS SyncDatabaseMigrationReportingState = "BACKUP_IN_PROGRESS" - SyncDatabaseMigrationReportingStateCANCELLED SyncDatabaseMigrationReportingState = "CANCELLED" - SyncDatabaseMigrationReportingStateCANCELLING SyncDatabaseMigrationReportingState = "CANCELLING" - SyncDatabaseMigrationReportingStateCOMPLETE SyncDatabaseMigrationReportingState = "COMPLETE" - SyncDatabaseMigrationReportingStateCOMPLETING SyncDatabaseMigrationReportingState = "COMPLETING" - SyncDatabaseMigrationReportingStateCONFIGURING SyncDatabaseMigrationReportingState = "CONFIGURING" - SyncDatabaseMigrationReportingStateFAILED SyncDatabaseMigrationReportingState = "FAILED" - SyncDatabaseMigrationReportingStateINITIALIAZING SyncDatabaseMigrationReportingState = "INITIALIAZING" - SyncDatabaseMigrationReportingStateREADYTOCOMPLETE SyncDatabaseMigrationReportingState = "READY_TO_COMPLETE" - SyncDatabaseMigrationReportingStateRESTORECOMPLETED SyncDatabaseMigrationReportingState = "RESTORE_COMPLETED" - SyncDatabaseMigrationReportingStateRESTOREINPROGRESS SyncDatabaseMigrationReportingState = "RESTORE_IN_PROGRESS" - SyncDatabaseMigrationReportingStateRUNNING SyncDatabaseMigrationReportingState = "RUNNING" - SyncDatabaseMigrationReportingStateSTARTING SyncDatabaseMigrationReportingState = "STARTING" - SyncDatabaseMigrationReportingStateUNDEFINED SyncDatabaseMigrationReportingState = "UNDEFINED" - SyncDatabaseMigrationReportingStateVALIDATING SyncDatabaseMigrationReportingState = "VALIDATING" - SyncDatabaseMigrationReportingStateVALIDATIONCOMPLETE SyncDatabaseMigrationReportingState = "VALIDATION_COMPLETE" - SyncDatabaseMigrationReportingStateVALIDATIONFAILED SyncDatabaseMigrationReportingState = "VALIDATION_FAILED" -) - -func PossibleValuesForSyncDatabaseMigrationReportingState() []string { - return []string{ - string(SyncDatabaseMigrationReportingStateBACKUPCOMPLETED), - string(SyncDatabaseMigrationReportingStateBACKUPINPROGRESS), - string(SyncDatabaseMigrationReportingStateCANCELLED), - string(SyncDatabaseMigrationReportingStateCANCELLING), - string(SyncDatabaseMigrationReportingStateCOMPLETE), - string(SyncDatabaseMigrationReportingStateCOMPLETING), - string(SyncDatabaseMigrationReportingStateCONFIGURING), - string(SyncDatabaseMigrationReportingStateFAILED), - string(SyncDatabaseMigrationReportingStateINITIALIAZING), - string(SyncDatabaseMigrationReportingStateREADYTOCOMPLETE), - string(SyncDatabaseMigrationReportingStateRESTORECOMPLETED), - string(SyncDatabaseMigrationReportingStateRESTOREINPROGRESS), - string(SyncDatabaseMigrationReportingStateRUNNING), - string(SyncDatabaseMigrationReportingStateSTARTING), - string(SyncDatabaseMigrationReportingStateUNDEFINED), - string(SyncDatabaseMigrationReportingStateVALIDATING), - string(SyncDatabaseMigrationReportingStateVALIDATIONCOMPLETE), - string(SyncDatabaseMigrationReportingStateVALIDATIONFAILED), - } -} - -func (s *SyncDatabaseMigrationReportingState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSyncDatabaseMigrationReportingState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSyncDatabaseMigrationReportingState(input string) (*SyncDatabaseMigrationReportingState, error) { - vals := map[string]SyncDatabaseMigrationReportingState{ - "backup_completed": SyncDatabaseMigrationReportingStateBACKUPCOMPLETED, - "backup_in_progress": SyncDatabaseMigrationReportingStateBACKUPINPROGRESS, - "cancelled": SyncDatabaseMigrationReportingStateCANCELLED, - "cancelling": SyncDatabaseMigrationReportingStateCANCELLING, - "complete": SyncDatabaseMigrationReportingStateCOMPLETE, - "completing": SyncDatabaseMigrationReportingStateCOMPLETING, - "configuring": SyncDatabaseMigrationReportingStateCONFIGURING, - "failed": SyncDatabaseMigrationReportingStateFAILED, - "initialiazing": SyncDatabaseMigrationReportingStateINITIALIAZING, - "ready_to_complete": SyncDatabaseMigrationReportingStateREADYTOCOMPLETE, - "restore_completed": SyncDatabaseMigrationReportingStateRESTORECOMPLETED, - "restore_in_progress": SyncDatabaseMigrationReportingStateRESTOREINPROGRESS, - "running": SyncDatabaseMigrationReportingStateRUNNING, - "starting": SyncDatabaseMigrationReportingStateSTARTING, - "undefined": SyncDatabaseMigrationReportingStateUNDEFINED, - "validating": SyncDatabaseMigrationReportingStateVALIDATING, - "validation_complete": SyncDatabaseMigrationReportingStateVALIDATIONCOMPLETE, - "validation_failed": SyncDatabaseMigrationReportingStateVALIDATIONFAILED, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SyncDatabaseMigrationReportingState(input) - return &out, nil -} - -type SyncTableMigrationState string - -const ( - SyncTableMigrationStateBEFORELOAD SyncTableMigrationState = "BEFORE_LOAD" - SyncTableMigrationStateCANCELED SyncTableMigrationState = "CANCELED" - SyncTableMigrationStateCOMPLETED SyncTableMigrationState = "COMPLETED" - SyncTableMigrationStateERROR SyncTableMigrationState = "ERROR" - SyncTableMigrationStateFAILED SyncTableMigrationState = "FAILED" - SyncTableMigrationStateFULLLOAD SyncTableMigrationState = "FULL_LOAD" -) - -func PossibleValuesForSyncTableMigrationState() []string { - return []string{ - string(SyncTableMigrationStateBEFORELOAD), - string(SyncTableMigrationStateCANCELED), - string(SyncTableMigrationStateCOMPLETED), - string(SyncTableMigrationStateERROR), - string(SyncTableMigrationStateFAILED), - string(SyncTableMigrationStateFULLLOAD), - } -} - -func (s *SyncTableMigrationState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSyncTableMigrationState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSyncTableMigrationState(input string) (*SyncTableMigrationState, error) { - vals := map[string]SyncTableMigrationState{ - "before_load": SyncTableMigrationStateBEFORELOAD, - "canceled": SyncTableMigrationStateCANCELED, - "completed": SyncTableMigrationStateCOMPLETED, - "error": SyncTableMigrationStateERROR, - "failed": SyncTableMigrationStateFAILED, - "full_load": SyncTableMigrationStateFULLLOAD, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SyncTableMigrationState(input) - return &out, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlsynctasks/model_connectioninfo.go b/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlsynctasks/model_connectioninfo.go deleted file mode 100644 index a259461caf3..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlsynctasks/model_connectioninfo.go +++ /dev/null @@ -1,53 +0,0 @@ -package migratemysqlazuredbformysqlsynctasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "MySqlConnectionInfo") { - var out MySqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MySqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlsynctasks/model_migratemysqlazuredbformysqlsynctaskoutput.go b/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlsynctasks/model_migratemysqlazuredbformysqlsynctaskoutput.go deleted file mode 100644 index e1e8dff3491..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlsynctasks/model_migratemysqlazuredbformysqlsynctaskoutput.go +++ /dev/null @@ -1,85 +0,0 @@ -package migratemysqlazuredbformysqlsynctasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateMySqlAzureDbForMySqlSyncTaskOutput interface { -} - -// RawMigrateMySqlAzureDbForMySqlSyncTaskOutputImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawMigrateMySqlAzureDbForMySqlSyncTaskOutputImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalMigrateMySqlAzureDbForMySqlSyncTaskOutputImplementation(input []byte) (MigrateMySqlAzureDbForMySqlSyncTaskOutput, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateMySqlAzureDbForMySqlSyncTaskOutput into map[string]interface: %+v", err) - } - - value, ok := temp["resultType"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "DatabaseLevelErrorOutput") { - var out MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "DatabaseLevelOutput") { - var out MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "ErrorOutput") { - var out MigrateMySqlAzureDbForMySqlSyncTaskOutputError - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateMySqlAzureDbForMySqlSyncTaskOutputError: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "MigrationLevelOutput") { - var out MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "TableLevelOutput") { - var out MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel: %+v", err) - } - return out, nil - } - - out := RawMigrateMySqlAzureDbForMySqlSyncTaskOutputImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlsynctasks/model_migratemysqlazuredbformysqlsynctaskoutputdatabaseerror.go b/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlsynctasks/model_migratemysqlazuredbformysqlsynctaskoutputdatabaseerror.go deleted file mode 100644 index fa87332753d..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlsynctasks/model_migratemysqlazuredbformysqlsynctaskoutputdatabaseerror.go +++ /dev/null @@ -1,43 +0,0 @@ -package migratemysqlazuredbformysqlsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateMySqlAzureDbForMySqlSyncTaskOutput = MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError{} - -type MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError struct { - ErrorMessage *string `json:"errorMessage,omitempty"` - Events *[]SyncMigrationDatabaseErrorEvent `json:"events,omitempty"` - - // Fields inherited from MigrateMySqlAzureDbForMySqlSyncTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError{} - -func (s MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError) MarshalJSON() ([]byte, error) { - type wrapper MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError: %+v", err) - } - decoded["resultType"] = "DatabaseLevelErrorOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlsynctasks/model_migratemysqlazuredbformysqlsynctaskoutputdatabaselevel.go b/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlsynctasks/model_migratemysqlazuredbformysqlsynctaskoutputdatabaselevel.go deleted file mode 100644 index 0166cc5662e..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlsynctasks/model_migratemysqlazuredbformysqlsynctaskoutputdatabaselevel.go +++ /dev/null @@ -1,56 +0,0 @@ -package migratemysqlazuredbformysqlsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateMySqlAzureDbForMySqlSyncTaskOutput = MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel{} - -type MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel struct { - AppliedChanges *int64 `json:"appliedChanges,omitempty"` - CdcDeleteCounter *int64 `json:"cdcDeleteCounter,omitempty"` - CdcInsertCounter *int64 `json:"cdcInsertCounter,omitempty"` - CdcUpdateCounter *int64 `json:"cdcUpdateCounter,omitempty"` - DatabaseName *string `json:"databaseName,omitempty"` - EndedOn *string `json:"endedOn,omitempty"` - FullLoadCompletedTables *int64 `json:"fullLoadCompletedTables,omitempty"` - FullLoadErroredTables *int64 `json:"fullLoadErroredTables,omitempty"` - FullLoadLoadingTables *int64 `json:"fullLoadLoadingTables,omitempty"` - FullLoadQueuedTables *int64 `json:"fullLoadQueuedTables,omitempty"` - IncomingChanges *int64 `json:"incomingChanges,omitempty"` - InitializationCompleted *bool `json:"initializationCompleted,omitempty"` - Latency *int64 `json:"latency,omitempty"` - MigrationState *SyncDatabaseMigrationReportingState `json:"migrationState,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - - // Fields inherited from MigrateMySqlAzureDbForMySqlSyncTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel{} - -func (s MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel) MarshalJSON() ([]byte, error) { - type wrapper MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel: %+v", err) - } - decoded["resultType"] = "DatabaseLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlsynctasks/model_migratemysqlazuredbformysqlsynctaskoutputerror.go b/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlsynctasks/model_migratemysqlazuredbformysqlsynctaskoutputerror.go deleted file mode 100644 index f2ff3433d7b..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlsynctasks/model_migratemysqlazuredbformysqlsynctaskoutputerror.go +++ /dev/null @@ -1,42 +0,0 @@ -package migratemysqlazuredbformysqlsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateMySqlAzureDbForMySqlSyncTaskOutput = MigrateMySqlAzureDbForMySqlSyncTaskOutputError{} - -type MigrateMySqlAzureDbForMySqlSyncTaskOutputError struct { - Error *ReportableException `json:"error,omitempty"` - - // Fields inherited from MigrateMySqlAzureDbForMySqlSyncTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateMySqlAzureDbForMySqlSyncTaskOutputError{} - -func (s MigrateMySqlAzureDbForMySqlSyncTaskOutputError) MarshalJSON() ([]byte, error) { - type wrapper MigrateMySqlAzureDbForMySqlSyncTaskOutputError - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateMySqlAzureDbForMySqlSyncTaskOutputError: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateMySqlAzureDbForMySqlSyncTaskOutputError: %+v", err) - } - decoded["resultType"] = "ErrorOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateMySqlAzureDbForMySqlSyncTaskOutputError: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlsynctasks/model_migratemysqlazuredbformysqlsynctaskoutputmigrationlevel.go b/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlsynctasks/model_migratemysqlazuredbformysqlsynctaskoutputmigrationlevel.go deleted file mode 100644 index 808d334fcfe..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlsynctasks/model_migratemysqlazuredbformysqlsynctaskoutputmigrationlevel.go +++ /dev/null @@ -1,47 +0,0 @@ -package migratemysqlazuredbformysqlsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateMySqlAzureDbForMySqlSyncTaskOutput = MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel{} - -type MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel struct { - EndedOn *string `json:"endedOn,omitempty"` - SourceServer *string `json:"sourceServer,omitempty"` - SourceServerVersion *string `json:"sourceServerVersion,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - TargetServer *string `json:"targetServer,omitempty"` - TargetServerVersion *string `json:"targetServerVersion,omitempty"` - - // Fields inherited from MigrateMySqlAzureDbForMySqlSyncTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel{} - -func (s MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel) MarshalJSON() ([]byte, error) { - type wrapper MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel: %+v", err) - } - decoded["resultType"] = "MigrationLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlsynctasks/model_migratemysqlazuredbformysqlsynctaskoutputtablelevel.go b/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlsynctasks/model_migratemysqlazuredbformysqlsynctaskoutputtablelevel.go deleted file mode 100644 index 3fa8eef214f..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlsynctasks/model_migratemysqlazuredbformysqlsynctaskoutputtablelevel.go +++ /dev/null @@ -1,54 +0,0 @@ -package migratemysqlazuredbformysqlsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateMySqlAzureDbForMySqlSyncTaskOutput = MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel{} - -type MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel struct { - CdcDeleteCounter *string `json:"cdcDeleteCounter,omitempty"` - CdcInsertCounter *string `json:"cdcInsertCounter,omitempty"` - CdcUpdateCounter *string `json:"cdcUpdateCounter,omitempty"` - DataErrorsCounter *int64 `json:"dataErrorsCounter,omitempty"` - DatabaseName *string `json:"databaseName,omitempty"` - FullLoadEndedOn *string `json:"fullLoadEndedOn,omitempty"` - FullLoadEstFinishTime *string `json:"fullLoadEstFinishTime,omitempty"` - FullLoadStartedOn *string `json:"fullLoadStartedOn,omitempty"` - FullLoadTotalRows *int64 `json:"fullLoadTotalRows,omitempty"` - LastModifiedTime *string `json:"lastModifiedTime,omitempty"` - State *SyncTableMigrationState `json:"state,omitempty"` - TableName *string `json:"tableName,omitempty"` - TotalChangesApplied *int64 `json:"totalChangesApplied,omitempty"` - - // Fields inherited from MigrateMySqlAzureDbForMySqlSyncTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel{} - -func (s MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel) MarshalJSON() ([]byte, error) { - type wrapper MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel: %+v", err) - } - decoded["resultType"] = "TableLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlsynctasks/model_mysqlconnectioninfo.go b/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlsynctasks/model_mysqlconnectioninfo.go deleted file mode 100644 index 439d20667f9..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlsynctasks/model_mysqlconnectioninfo.go +++ /dev/null @@ -1,45 +0,0 @@ -package migratemysqlazuredbformysqlsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = MySqlConnectionInfo{} - -type MySqlConnectionInfo struct { - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Port int64 `json:"port"` - ServerName string `json:"serverName"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = MySqlConnectionInfo{} - -func (s MySqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper MySqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MySqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MySqlConnectionInfo: %+v", err) - } - decoded["type"] = "MySqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MySqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlsynctasks/model_reportableexception.go b/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlsynctasks/model_reportableexception.go deleted file mode 100644 index bedbd776be0..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlsynctasks/model_reportableexception.go +++ /dev/null @@ -1,13 +0,0 @@ -package migratemysqlazuredbformysqlsynctasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ReportableException struct { - ActionableMessage *string `json:"actionableMessage,omitempty"` - FilePath *string `json:"filePath,omitempty"` - HResult *int64 `json:"hResult,omitempty"` - LineNumber *string `json:"lineNumber,omitempty"` - Message *string `json:"message,omitempty"` - StackTrace *string `json:"stackTrace,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlsynctasks/model_syncmigrationdatabaseerrorevent.go b/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlsynctasks/model_syncmigrationdatabaseerrorevent.go deleted file mode 100644 index 597272f34cc..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlsynctasks/model_syncmigrationdatabaseerrorevent.go +++ /dev/null @@ -1,10 +0,0 @@ -package migratemysqlazuredbformysqlsynctasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SyncMigrationDatabaseErrorEvent struct { - EventText *string `json:"eventText,omitempty"` - EventTypeString *string `json:"eventTypeString,omitempty"` - TimestampString *string `json:"timestampString,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlsynctasks/version.go b/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlsynctasks/version.go deleted file mode 100644 index 81aee251b74..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratemysqlazuredbformysqlsynctasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package migratemysqlazuredbformysqlsynctasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-06-30" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/migratemysqlazuredbformysqlsynctasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2021-06-30/migratepostgresqlazuredbforpostgresqlsynctasks/README.md b/resource-manager/datamigration/2021-06-30/migratepostgresqlazuredbforpostgresqlsynctasks/README.md deleted file mode 100644 index eaca3792d77..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratepostgresqlazuredbforpostgresqlsynctasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/migratepostgresqlazuredbforpostgresqlsynctasks` Documentation - -The `migratepostgresqlazuredbforpostgresqlsynctasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2021-06-30`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/migratepostgresqlazuredbforpostgresqlsynctasks" -``` - - -### Client Initialization - -```go -client := migratepostgresqlazuredbforpostgresqlsynctasks.NewMigratePostgreSqlAzureDbForPostgreSqlSyncTasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2021-06-30/migratepostgresqlazuredbforpostgresqlsynctasks/client.go b/resource-manager/datamigration/2021-06-30/migratepostgresqlazuredbforpostgresqlsynctasks/client.go deleted file mode 100644 index 0724804434b..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratepostgresqlazuredbforpostgresqlsynctasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package migratepostgresqlazuredbforpostgresqlsynctasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigratePostgreSqlAzureDbForPostgreSqlSyncTasksClient struct { - Client *resourcemanager.Client -} - -func NewMigratePostgreSqlAzureDbForPostgreSqlSyncTasksClientWithBaseURI(sdkApi sdkEnv.Api) (*MigratePostgreSqlAzureDbForPostgreSqlSyncTasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "migratepostgresqlazuredbforpostgresqlsynctasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating MigratePostgreSqlAzureDbForPostgreSqlSyncTasksClient: %+v", err) - } - - return &MigratePostgreSqlAzureDbForPostgreSqlSyncTasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratepostgresqlazuredbforpostgresqlsynctasks/constants.go b/resource-manager/datamigration/2021-06-30/migratepostgresqlazuredbforpostgresqlsynctasks/constants.go deleted file mode 100644 index 45e4b7a093d..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratepostgresqlazuredbforpostgresqlsynctasks/constants.go +++ /dev/null @@ -1,329 +0,0 @@ -package migratepostgresqlazuredbforpostgresqlsynctasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ReplicateMigrationState string - -const ( - ReplicateMigrationStateACTIONREQUIRED ReplicateMigrationState = "ACTION_REQUIRED" - ReplicateMigrationStateCOMPLETE ReplicateMigrationState = "COMPLETE" - ReplicateMigrationStateFAILED ReplicateMigrationState = "FAILED" - ReplicateMigrationStatePENDING ReplicateMigrationState = "PENDING" - ReplicateMigrationStateUNDEFINED ReplicateMigrationState = "UNDEFINED" - ReplicateMigrationStateVALIDATING ReplicateMigrationState = "VALIDATING" -) - -func PossibleValuesForReplicateMigrationState() []string { - return []string{ - string(ReplicateMigrationStateACTIONREQUIRED), - string(ReplicateMigrationStateCOMPLETE), - string(ReplicateMigrationStateFAILED), - string(ReplicateMigrationStatePENDING), - string(ReplicateMigrationStateUNDEFINED), - string(ReplicateMigrationStateVALIDATING), - } -} - -func (s *ReplicateMigrationState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseReplicateMigrationState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseReplicateMigrationState(input string) (*ReplicateMigrationState, error) { - vals := map[string]ReplicateMigrationState{ - "action_required": ReplicateMigrationStateACTIONREQUIRED, - "complete": ReplicateMigrationStateCOMPLETE, - "failed": ReplicateMigrationStateFAILED, - "pending": ReplicateMigrationStatePENDING, - "undefined": ReplicateMigrationStateUNDEFINED, - "validating": ReplicateMigrationStateVALIDATING, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ReplicateMigrationState(input) - return &out, nil -} - -type ScenarioSource string - -const ( - ScenarioSourceAccess ScenarioSource = "Access" - ScenarioSourceDBTwo ScenarioSource = "DB2" - ScenarioSourceMongoDB ScenarioSource = "MongoDB" - ScenarioSourceMySQL ScenarioSource = "MySQL" - ScenarioSourceMySQLRDS ScenarioSource = "MySQLRDS" - ScenarioSourceOracle ScenarioSource = "Oracle" - ScenarioSourcePostgreSQL ScenarioSource = "PostgreSQL" - ScenarioSourcePostgreSQLRDS ScenarioSource = "PostgreSQLRDS" - ScenarioSourceSQL ScenarioSource = "SQL" - ScenarioSourceSQLRDS ScenarioSource = "SQLRDS" - ScenarioSourceSybase ScenarioSource = "Sybase" -) - -func PossibleValuesForScenarioSource() []string { - return []string{ - string(ScenarioSourceAccess), - string(ScenarioSourceDBTwo), - string(ScenarioSourceMongoDB), - string(ScenarioSourceMySQL), - string(ScenarioSourceMySQLRDS), - string(ScenarioSourceOracle), - string(ScenarioSourcePostgreSQL), - string(ScenarioSourcePostgreSQLRDS), - string(ScenarioSourceSQL), - string(ScenarioSourceSQLRDS), - string(ScenarioSourceSybase), - } -} - -func (s *ScenarioSource) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseScenarioSource(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseScenarioSource(input string) (*ScenarioSource, error) { - vals := map[string]ScenarioSource{ - "access": ScenarioSourceAccess, - "db2": ScenarioSourceDBTwo, - "mongodb": ScenarioSourceMongoDB, - "mysql": ScenarioSourceMySQL, - "mysqlrds": ScenarioSourceMySQLRDS, - "oracle": ScenarioSourceOracle, - "postgresql": ScenarioSourcePostgreSQL, - "postgresqlrds": ScenarioSourcePostgreSQLRDS, - "sql": ScenarioSourceSQL, - "sqlrds": ScenarioSourceSQLRDS, - "sybase": ScenarioSourceSybase, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ScenarioSource(input) - return &out, nil -} - -type ScenarioTarget string - -const ( - ScenarioTargetAzureDBForMySql ScenarioTarget = "AzureDBForMySql" - ScenarioTargetAzureDBForPostgresSQL ScenarioTarget = "AzureDBForPostgresSQL" - ScenarioTargetMongoDB ScenarioTarget = "MongoDB" - ScenarioTargetSQLDB ScenarioTarget = "SQLDB" - ScenarioTargetSQLDW ScenarioTarget = "SQLDW" - ScenarioTargetSQLMI ScenarioTarget = "SQLMI" - ScenarioTargetSQLServer ScenarioTarget = "SQLServer" -) - -func PossibleValuesForScenarioTarget() []string { - return []string{ - string(ScenarioTargetAzureDBForMySql), - string(ScenarioTargetAzureDBForPostgresSQL), - string(ScenarioTargetMongoDB), - string(ScenarioTargetSQLDB), - string(ScenarioTargetSQLDW), - string(ScenarioTargetSQLMI), - string(ScenarioTargetSQLServer), - } -} - -func (s *ScenarioTarget) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseScenarioTarget(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseScenarioTarget(input string) (*ScenarioTarget, error) { - vals := map[string]ScenarioTarget{ - "azuredbformysql": ScenarioTargetAzureDBForMySql, - "azuredbforpostgressql": ScenarioTargetAzureDBForPostgresSQL, - "mongodb": ScenarioTargetMongoDB, - "sqldb": ScenarioTargetSQLDB, - "sqldw": ScenarioTargetSQLDW, - "sqlmi": ScenarioTargetSQLMI, - "sqlserver": ScenarioTargetSQLServer, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ScenarioTarget(input) - return &out, nil -} - -type SyncDatabaseMigrationReportingState string - -const ( - SyncDatabaseMigrationReportingStateBACKUPCOMPLETED SyncDatabaseMigrationReportingState = "BACKUP_COMPLETED" - SyncDatabaseMigrationReportingStateBACKUPINPROGRESS SyncDatabaseMigrationReportingState = "BACKUP_IN_PROGRESS" - SyncDatabaseMigrationReportingStateCANCELLED SyncDatabaseMigrationReportingState = "CANCELLED" - SyncDatabaseMigrationReportingStateCANCELLING SyncDatabaseMigrationReportingState = "CANCELLING" - SyncDatabaseMigrationReportingStateCOMPLETE SyncDatabaseMigrationReportingState = "COMPLETE" - SyncDatabaseMigrationReportingStateCOMPLETING SyncDatabaseMigrationReportingState = "COMPLETING" - SyncDatabaseMigrationReportingStateCONFIGURING SyncDatabaseMigrationReportingState = "CONFIGURING" - SyncDatabaseMigrationReportingStateFAILED SyncDatabaseMigrationReportingState = "FAILED" - SyncDatabaseMigrationReportingStateINITIALIAZING SyncDatabaseMigrationReportingState = "INITIALIAZING" - SyncDatabaseMigrationReportingStateREADYTOCOMPLETE SyncDatabaseMigrationReportingState = "READY_TO_COMPLETE" - SyncDatabaseMigrationReportingStateRESTORECOMPLETED SyncDatabaseMigrationReportingState = "RESTORE_COMPLETED" - SyncDatabaseMigrationReportingStateRESTOREINPROGRESS SyncDatabaseMigrationReportingState = "RESTORE_IN_PROGRESS" - SyncDatabaseMigrationReportingStateRUNNING SyncDatabaseMigrationReportingState = "RUNNING" - SyncDatabaseMigrationReportingStateSTARTING SyncDatabaseMigrationReportingState = "STARTING" - SyncDatabaseMigrationReportingStateUNDEFINED SyncDatabaseMigrationReportingState = "UNDEFINED" - SyncDatabaseMigrationReportingStateVALIDATING SyncDatabaseMigrationReportingState = "VALIDATING" - SyncDatabaseMigrationReportingStateVALIDATIONCOMPLETE SyncDatabaseMigrationReportingState = "VALIDATION_COMPLETE" - SyncDatabaseMigrationReportingStateVALIDATIONFAILED SyncDatabaseMigrationReportingState = "VALIDATION_FAILED" -) - -func PossibleValuesForSyncDatabaseMigrationReportingState() []string { - return []string{ - string(SyncDatabaseMigrationReportingStateBACKUPCOMPLETED), - string(SyncDatabaseMigrationReportingStateBACKUPINPROGRESS), - string(SyncDatabaseMigrationReportingStateCANCELLED), - string(SyncDatabaseMigrationReportingStateCANCELLING), - string(SyncDatabaseMigrationReportingStateCOMPLETE), - string(SyncDatabaseMigrationReportingStateCOMPLETING), - string(SyncDatabaseMigrationReportingStateCONFIGURING), - string(SyncDatabaseMigrationReportingStateFAILED), - string(SyncDatabaseMigrationReportingStateINITIALIAZING), - string(SyncDatabaseMigrationReportingStateREADYTOCOMPLETE), - string(SyncDatabaseMigrationReportingStateRESTORECOMPLETED), - string(SyncDatabaseMigrationReportingStateRESTOREINPROGRESS), - string(SyncDatabaseMigrationReportingStateRUNNING), - string(SyncDatabaseMigrationReportingStateSTARTING), - string(SyncDatabaseMigrationReportingStateUNDEFINED), - string(SyncDatabaseMigrationReportingStateVALIDATING), - string(SyncDatabaseMigrationReportingStateVALIDATIONCOMPLETE), - string(SyncDatabaseMigrationReportingStateVALIDATIONFAILED), - } -} - -func (s *SyncDatabaseMigrationReportingState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSyncDatabaseMigrationReportingState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSyncDatabaseMigrationReportingState(input string) (*SyncDatabaseMigrationReportingState, error) { - vals := map[string]SyncDatabaseMigrationReportingState{ - "backup_completed": SyncDatabaseMigrationReportingStateBACKUPCOMPLETED, - "backup_in_progress": SyncDatabaseMigrationReportingStateBACKUPINPROGRESS, - "cancelled": SyncDatabaseMigrationReportingStateCANCELLED, - "cancelling": SyncDatabaseMigrationReportingStateCANCELLING, - "complete": SyncDatabaseMigrationReportingStateCOMPLETE, - "completing": SyncDatabaseMigrationReportingStateCOMPLETING, - "configuring": SyncDatabaseMigrationReportingStateCONFIGURING, - "failed": SyncDatabaseMigrationReportingStateFAILED, - "initialiazing": SyncDatabaseMigrationReportingStateINITIALIAZING, - "ready_to_complete": SyncDatabaseMigrationReportingStateREADYTOCOMPLETE, - "restore_completed": SyncDatabaseMigrationReportingStateRESTORECOMPLETED, - "restore_in_progress": SyncDatabaseMigrationReportingStateRESTOREINPROGRESS, - "running": SyncDatabaseMigrationReportingStateRUNNING, - "starting": SyncDatabaseMigrationReportingStateSTARTING, - "undefined": SyncDatabaseMigrationReportingStateUNDEFINED, - "validating": SyncDatabaseMigrationReportingStateVALIDATING, - "validation_complete": SyncDatabaseMigrationReportingStateVALIDATIONCOMPLETE, - "validation_failed": SyncDatabaseMigrationReportingStateVALIDATIONFAILED, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SyncDatabaseMigrationReportingState(input) - return &out, nil -} - -type SyncTableMigrationState string - -const ( - SyncTableMigrationStateBEFORELOAD SyncTableMigrationState = "BEFORE_LOAD" - SyncTableMigrationStateCANCELED SyncTableMigrationState = "CANCELED" - SyncTableMigrationStateCOMPLETED SyncTableMigrationState = "COMPLETED" - SyncTableMigrationStateERROR SyncTableMigrationState = "ERROR" - SyncTableMigrationStateFAILED SyncTableMigrationState = "FAILED" - SyncTableMigrationStateFULLLOAD SyncTableMigrationState = "FULL_LOAD" -) - -func PossibleValuesForSyncTableMigrationState() []string { - return []string{ - string(SyncTableMigrationStateBEFORELOAD), - string(SyncTableMigrationStateCANCELED), - string(SyncTableMigrationStateCOMPLETED), - string(SyncTableMigrationStateERROR), - string(SyncTableMigrationStateFAILED), - string(SyncTableMigrationStateFULLLOAD), - } -} - -func (s *SyncTableMigrationState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSyncTableMigrationState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSyncTableMigrationState(input string) (*SyncTableMigrationState, error) { - vals := map[string]SyncTableMigrationState{ - "before_load": SyncTableMigrationStateBEFORELOAD, - "canceled": SyncTableMigrationStateCANCELED, - "completed": SyncTableMigrationStateCOMPLETED, - "error": SyncTableMigrationStateERROR, - "failed": SyncTableMigrationStateFAILED, - "full_load": SyncTableMigrationStateFULLLOAD, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SyncTableMigrationState(input) - return &out, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratepostgresqlazuredbforpostgresqlsynctasks/model_connectioninfo.go b/resource-manager/datamigration/2021-06-30/migratepostgresqlazuredbforpostgresqlsynctasks/model_connectioninfo.go deleted file mode 100644 index 5d5af97c2c7..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratepostgresqlazuredbforpostgresqlsynctasks/model_connectioninfo.go +++ /dev/null @@ -1,53 +0,0 @@ -package migratepostgresqlazuredbforpostgresqlsynctasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "PostgreSqlConnectionInfo") { - var out PostgreSqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into PostgreSqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2021-06-30/migratepostgresqlazuredbforpostgresqlsynctasks/model_migratepostgresqlazuredbforpostgresqlsynctaskoutput.go b/resource-manager/datamigration/2021-06-30/migratepostgresqlazuredbforpostgresqlsynctasks/model_migratepostgresqlazuredbforpostgresqlsynctaskoutput.go deleted file mode 100644 index 95715d44e3f..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratepostgresqlazuredbforpostgresqlsynctasks/model_migratepostgresqlazuredbforpostgresqlsynctaskoutput.go +++ /dev/null @@ -1,85 +0,0 @@ -package migratepostgresqlazuredbforpostgresqlsynctasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput interface { -} - -// RawMigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawMigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalMigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputImplementation(input []byte) (MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput into map[string]interface: %+v", err) - } - - value, ok := temp["resultType"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "DatabaseLevelErrorOutput") { - var out MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "DatabaseLevelOutput") { - var out MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "ErrorOutput") { - var out MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "MigrationLevelOutput") { - var out MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "TableLevelOutput") { - var out MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel: %+v", err) - } - return out, nil - } - - out := RawMigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2021-06-30/migratepostgresqlazuredbforpostgresqlsynctasks/model_migratepostgresqlazuredbforpostgresqlsynctaskoutputdatabaseerror.go b/resource-manager/datamigration/2021-06-30/migratepostgresqlazuredbforpostgresqlsynctasks/model_migratepostgresqlazuredbforpostgresqlsynctaskoutputdatabaseerror.go deleted file mode 100644 index 87383b60ee5..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratepostgresqlazuredbforpostgresqlsynctasks/model_migratepostgresqlazuredbforpostgresqlsynctaskoutputdatabaseerror.go +++ /dev/null @@ -1,43 +0,0 @@ -package migratepostgresqlazuredbforpostgresqlsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError{} - -type MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError struct { - ErrorMessage *string `json:"errorMessage,omitempty"` - Events *[]SyncMigrationDatabaseErrorEvent `json:"events,omitempty"` - - // Fields inherited from MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError{} - -func (s MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError) MarshalJSON() ([]byte, error) { - type wrapper MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError: %+v", err) - } - decoded["resultType"] = "DatabaseLevelErrorOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratepostgresqlazuredbforpostgresqlsynctasks/model_migratepostgresqlazuredbforpostgresqlsynctaskoutputdatabaselevel.go b/resource-manager/datamigration/2021-06-30/migratepostgresqlazuredbforpostgresqlsynctasks/model_migratepostgresqlazuredbforpostgresqlsynctaskoutputdatabaselevel.go deleted file mode 100644 index 373e032f81a..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratepostgresqlazuredbforpostgresqlsynctasks/model_migratepostgresqlazuredbforpostgresqlsynctaskoutputdatabaselevel.go +++ /dev/null @@ -1,56 +0,0 @@ -package migratepostgresqlazuredbforpostgresqlsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel{} - -type MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel struct { - AppliedChanges *int64 `json:"appliedChanges,omitempty"` - CdcDeleteCounter *int64 `json:"cdcDeleteCounter,omitempty"` - CdcInsertCounter *int64 `json:"cdcInsertCounter,omitempty"` - CdcUpdateCounter *int64 `json:"cdcUpdateCounter,omitempty"` - DatabaseName *string `json:"databaseName,omitempty"` - EndedOn *string `json:"endedOn,omitempty"` - FullLoadCompletedTables *int64 `json:"fullLoadCompletedTables,omitempty"` - FullLoadErroredTables *int64 `json:"fullLoadErroredTables,omitempty"` - FullLoadLoadingTables *int64 `json:"fullLoadLoadingTables,omitempty"` - FullLoadQueuedTables *int64 `json:"fullLoadQueuedTables,omitempty"` - IncomingChanges *int64 `json:"incomingChanges,omitempty"` - InitializationCompleted *bool `json:"initializationCompleted,omitempty"` - Latency *int64 `json:"latency,omitempty"` - MigrationState *SyncDatabaseMigrationReportingState `json:"migrationState,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - - // Fields inherited from MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel{} - -func (s MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel) MarshalJSON() ([]byte, error) { - type wrapper MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel: %+v", err) - } - decoded["resultType"] = "DatabaseLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratepostgresqlazuredbforpostgresqlsynctasks/model_migratepostgresqlazuredbforpostgresqlsynctaskoutputerror.go b/resource-manager/datamigration/2021-06-30/migratepostgresqlazuredbforpostgresqlsynctasks/model_migratepostgresqlazuredbforpostgresqlsynctaskoutputerror.go deleted file mode 100644 index d671c4d0ae4..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratepostgresqlazuredbforpostgresqlsynctasks/model_migratepostgresqlazuredbforpostgresqlsynctaskoutputerror.go +++ /dev/null @@ -1,42 +0,0 @@ -package migratepostgresqlazuredbforpostgresqlsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError{} - -type MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError struct { - Error *ReportableException `json:"error,omitempty"` - - // Fields inherited from MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError{} - -func (s MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError) MarshalJSON() ([]byte, error) { - type wrapper MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError: %+v", err) - } - decoded["resultType"] = "ErrorOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratepostgresqlazuredbforpostgresqlsynctasks/model_migratepostgresqlazuredbforpostgresqlsynctaskoutputmigrationlevel.go b/resource-manager/datamigration/2021-06-30/migratepostgresqlazuredbforpostgresqlsynctasks/model_migratepostgresqlazuredbforpostgresqlsynctaskoutputmigrationlevel.go deleted file mode 100644 index 1c9e1b876e1..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratepostgresqlazuredbforpostgresqlsynctasks/model_migratepostgresqlazuredbforpostgresqlsynctaskoutputmigrationlevel.go +++ /dev/null @@ -1,50 +0,0 @@ -package migratepostgresqlazuredbforpostgresqlsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel{} - -type MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel struct { - EndedOn *string `json:"endedOn,omitempty"` - SourceServer *string `json:"sourceServer,omitempty"` - SourceServerType *ScenarioSource `json:"sourceServerType,omitempty"` - SourceServerVersion *string `json:"sourceServerVersion,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - State *ReplicateMigrationState `json:"state,omitempty"` - TargetServer *string `json:"targetServer,omitempty"` - TargetServerType *ScenarioTarget `json:"targetServerType,omitempty"` - TargetServerVersion *string `json:"targetServerVersion,omitempty"` - - // Fields inherited from MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel{} - -func (s MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel) MarshalJSON() ([]byte, error) { - type wrapper MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel: %+v", err) - } - decoded["resultType"] = "MigrationLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratepostgresqlazuredbforpostgresqlsynctasks/model_migratepostgresqlazuredbforpostgresqlsynctaskoutputtablelevel.go b/resource-manager/datamigration/2021-06-30/migratepostgresqlazuredbforpostgresqlsynctasks/model_migratepostgresqlazuredbforpostgresqlsynctaskoutputtablelevel.go deleted file mode 100644 index 4776dc25967..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratepostgresqlazuredbforpostgresqlsynctasks/model_migratepostgresqlazuredbforpostgresqlsynctaskoutputtablelevel.go +++ /dev/null @@ -1,54 +0,0 @@ -package migratepostgresqlazuredbforpostgresqlsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel{} - -type MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel struct { - CdcDeleteCounter *int64 `json:"cdcDeleteCounter,omitempty"` - CdcInsertCounter *int64 `json:"cdcInsertCounter,omitempty"` - CdcUpdateCounter *int64 `json:"cdcUpdateCounter,omitempty"` - DataErrorsCounter *int64 `json:"dataErrorsCounter,omitempty"` - DatabaseName *string `json:"databaseName,omitempty"` - FullLoadEndedOn *string `json:"fullLoadEndedOn,omitempty"` - FullLoadEstFinishTime *string `json:"fullLoadEstFinishTime,omitempty"` - FullLoadStartedOn *string `json:"fullLoadStartedOn,omitempty"` - FullLoadTotalRows *int64 `json:"fullLoadTotalRows,omitempty"` - LastModifiedTime *string `json:"lastModifiedTime,omitempty"` - State *SyncTableMigrationState `json:"state,omitempty"` - TableName *string `json:"tableName,omitempty"` - TotalChangesApplied *int64 `json:"totalChangesApplied,omitempty"` - - // Fields inherited from MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel{} - -func (s MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel) MarshalJSON() ([]byte, error) { - type wrapper MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel: %+v", err) - } - decoded["resultType"] = "TableLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratepostgresqlazuredbforpostgresqlsynctasks/model_postgresqlconnectioninfo.go b/resource-manager/datamigration/2021-06-30/migratepostgresqlazuredbforpostgresqlsynctasks/model_postgresqlconnectioninfo.go deleted file mode 100644 index 835748c861f..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratepostgresqlazuredbforpostgresqlsynctasks/model_postgresqlconnectioninfo.go +++ /dev/null @@ -1,47 +0,0 @@ -package migratepostgresqlazuredbforpostgresqlsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = PostgreSqlConnectionInfo{} - -type PostgreSqlConnectionInfo struct { - DatabaseName *string `json:"databaseName,omitempty"` - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Port int64 `json:"port"` - ServerName string `json:"serverName"` - TrustServerCertificate *bool `json:"trustServerCertificate,omitempty"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = PostgreSqlConnectionInfo{} - -func (s PostgreSqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper PostgreSqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling PostgreSqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling PostgreSqlConnectionInfo: %+v", err) - } - decoded["type"] = "PostgreSqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling PostgreSqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratepostgresqlazuredbforpostgresqlsynctasks/model_reportableexception.go b/resource-manager/datamigration/2021-06-30/migratepostgresqlazuredbforpostgresqlsynctasks/model_reportableexception.go deleted file mode 100644 index 3c7df449ddb..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratepostgresqlazuredbforpostgresqlsynctasks/model_reportableexception.go +++ /dev/null @@ -1,13 +0,0 @@ -package migratepostgresqlazuredbforpostgresqlsynctasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ReportableException struct { - ActionableMessage *string `json:"actionableMessage,omitempty"` - FilePath *string `json:"filePath,omitempty"` - HResult *int64 `json:"hResult,omitempty"` - LineNumber *string `json:"lineNumber,omitempty"` - Message *string `json:"message,omitempty"` - StackTrace *string `json:"stackTrace,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/migratepostgresqlazuredbforpostgresqlsynctasks/model_syncmigrationdatabaseerrorevent.go b/resource-manager/datamigration/2021-06-30/migratepostgresqlazuredbforpostgresqlsynctasks/model_syncmigrationdatabaseerrorevent.go deleted file mode 100644 index b58759da9be..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratepostgresqlazuredbforpostgresqlsynctasks/model_syncmigrationdatabaseerrorevent.go +++ /dev/null @@ -1,10 +0,0 @@ -package migratepostgresqlazuredbforpostgresqlsynctasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SyncMigrationDatabaseErrorEvent struct { - EventText *string `json:"eventText,omitempty"` - EventTypeString *string `json:"eventTypeString,omitempty"` - TimestampString *string `json:"timestampString,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/migratepostgresqlazuredbforpostgresqlsynctasks/version.go b/resource-manager/datamigration/2021-06-30/migratepostgresqlazuredbforpostgresqlsynctasks/version.go deleted file mode 100644 index f90b839b364..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratepostgresqlazuredbforpostgresqlsynctasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package migratepostgresqlazuredbforpostgresqlsynctasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-06-30" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/migratepostgresqlazuredbforpostgresqlsynctasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/README.md b/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/README.md deleted file mode 100644 index 166957b4971..00000000000 --- a/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks` Documentation - -The `migrateschemasqlserversqldbtasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2021-06-30`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks" -``` - - -### Client Initialization - -```go -client := migrateschemasqlserversqldbtasks.NewMigrateSchemaSqlServerSqlDbTasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/client.go b/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/client.go deleted file mode 100644 index 88aad2df676..00000000000 --- a/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package migrateschemasqlserversqldbtasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateSchemaSqlServerSqlDbTasksClient struct { - Client *resourcemanager.Client -} - -func NewMigrateSchemaSqlServerSqlDbTasksClientWithBaseURI(sdkApi sdkEnv.Api) (*MigrateSchemaSqlServerSqlDbTasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "migrateschemasqlserversqldbtasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating MigrateSchemaSqlServerSqlDbTasksClient: %+v", err) - } - - return &MigrateSchemaSqlServerSqlDbTasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/constants.go b/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/constants.go deleted file mode 100644 index 884dcda1ad1..00000000000 --- a/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/constants.go +++ /dev/null @@ -1,372 +0,0 @@ -package migrateschemasqlserversqldbtasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthenticationType string - -const ( - AuthenticationTypeActiveDirectoryIntegrated AuthenticationType = "ActiveDirectoryIntegrated" - AuthenticationTypeActiveDirectoryPassword AuthenticationType = "ActiveDirectoryPassword" - AuthenticationTypeNone AuthenticationType = "None" - AuthenticationTypeSqlAuthentication AuthenticationType = "SqlAuthentication" - AuthenticationTypeWindowsAuthentication AuthenticationType = "WindowsAuthentication" -) - -func PossibleValuesForAuthenticationType() []string { - return []string{ - string(AuthenticationTypeActiveDirectoryIntegrated), - string(AuthenticationTypeActiveDirectoryPassword), - string(AuthenticationTypeNone), - string(AuthenticationTypeSqlAuthentication), - string(AuthenticationTypeWindowsAuthentication), - } -} - -func (s *AuthenticationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAuthenticationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAuthenticationType(input string) (*AuthenticationType, error) { - vals := map[string]AuthenticationType{ - "activedirectoryintegrated": AuthenticationTypeActiveDirectoryIntegrated, - "activedirectorypassword": AuthenticationTypeActiveDirectoryPassword, - "none": AuthenticationTypeNone, - "sqlauthentication": AuthenticationTypeSqlAuthentication, - "windowsauthentication": AuthenticationTypeWindowsAuthentication, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AuthenticationType(input) - return &out, nil -} - -type CommandState string - -const ( - CommandStateAccepted CommandState = "Accepted" - CommandStateFailed CommandState = "Failed" - CommandStateRunning CommandState = "Running" - CommandStateSucceeded CommandState = "Succeeded" - CommandStateUnknown CommandState = "Unknown" -) - -func PossibleValuesForCommandState() []string { - return []string{ - string(CommandStateAccepted), - string(CommandStateFailed), - string(CommandStateRunning), - string(CommandStateSucceeded), - string(CommandStateUnknown), - } -} - -func (s *CommandState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseCommandState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseCommandState(input string) (*CommandState, error) { - vals := map[string]CommandState{ - "accepted": CommandStateAccepted, - "failed": CommandStateFailed, - "running": CommandStateRunning, - "succeeded": CommandStateSucceeded, - "unknown": CommandStateUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := CommandState(input) - return &out, nil -} - -type MigrationState string - -const ( - MigrationStateCompleted MigrationState = "Completed" - MigrationStateFailed MigrationState = "Failed" - MigrationStateInProgress MigrationState = "InProgress" - MigrationStateNone MigrationState = "None" - MigrationStateSkipped MigrationState = "Skipped" - MigrationStateStopped MigrationState = "Stopped" - MigrationStateWarning MigrationState = "Warning" -) - -func PossibleValuesForMigrationState() []string { - return []string{ - string(MigrationStateCompleted), - string(MigrationStateFailed), - string(MigrationStateInProgress), - string(MigrationStateNone), - string(MigrationStateSkipped), - string(MigrationStateStopped), - string(MigrationStateWarning), - } -} - -func (s *MigrationState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseMigrationState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseMigrationState(input string) (*MigrationState, error) { - vals := map[string]MigrationState{ - "completed": MigrationStateCompleted, - "failed": MigrationStateFailed, - "inprogress": MigrationStateInProgress, - "none": MigrationStateNone, - "skipped": MigrationStateSkipped, - "stopped": MigrationStateStopped, - "warning": MigrationStateWarning, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := MigrationState(input) - return &out, nil -} - -type SchemaMigrationOption string - -const ( - SchemaMigrationOptionExtractFromSource SchemaMigrationOption = "ExtractFromSource" - SchemaMigrationOptionNone SchemaMigrationOption = "None" - SchemaMigrationOptionUseStorageFile SchemaMigrationOption = "UseStorageFile" -) - -func PossibleValuesForSchemaMigrationOption() []string { - return []string{ - string(SchemaMigrationOptionExtractFromSource), - string(SchemaMigrationOptionNone), - string(SchemaMigrationOptionUseStorageFile), - } -} - -func (s *SchemaMigrationOption) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSchemaMigrationOption(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSchemaMigrationOption(input string) (*SchemaMigrationOption, error) { - vals := map[string]SchemaMigrationOption{ - "extractfromsource": SchemaMigrationOptionExtractFromSource, - "none": SchemaMigrationOptionNone, - "usestoragefile": SchemaMigrationOptionUseStorageFile, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SchemaMigrationOption(input) - return &out, nil -} - -type SchemaMigrationStage string - -const ( - SchemaMigrationStageCollectingObjects SchemaMigrationStage = "CollectingObjects" - SchemaMigrationStageCompleted SchemaMigrationStage = "Completed" - SchemaMigrationStageCompletedWithWarnings SchemaMigrationStage = "CompletedWithWarnings" - SchemaMigrationStageDeployingSchema SchemaMigrationStage = "DeployingSchema" - SchemaMigrationStageDownloadingScript SchemaMigrationStage = "DownloadingScript" - SchemaMigrationStageFailed SchemaMigrationStage = "Failed" - SchemaMigrationStageGeneratingScript SchemaMigrationStage = "GeneratingScript" - SchemaMigrationStageNotStarted SchemaMigrationStage = "NotStarted" - SchemaMigrationStageUploadingScript SchemaMigrationStage = "UploadingScript" - SchemaMigrationStageValidatingInputs SchemaMigrationStage = "ValidatingInputs" -) - -func PossibleValuesForSchemaMigrationStage() []string { - return []string{ - string(SchemaMigrationStageCollectingObjects), - string(SchemaMigrationStageCompleted), - string(SchemaMigrationStageCompletedWithWarnings), - string(SchemaMigrationStageDeployingSchema), - string(SchemaMigrationStageDownloadingScript), - string(SchemaMigrationStageFailed), - string(SchemaMigrationStageGeneratingScript), - string(SchemaMigrationStageNotStarted), - string(SchemaMigrationStageUploadingScript), - string(SchemaMigrationStageValidatingInputs), - } -} - -func (s *SchemaMigrationStage) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSchemaMigrationStage(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSchemaMigrationStage(input string) (*SchemaMigrationStage, error) { - vals := map[string]SchemaMigrationStage{ - "collectingobjects": SchemaMigrationStageCollectingObjects, - "completed": SchemaMigrationStageCompleted, - "completedwithwarnings": SchemaMigrationStageCompletedWithWarnings, - "deployingschema": SchemaMigrationStageDeployingSchema, - "downloadingscript": SchemaMigrationStageDownloadingScript, - "failed": SchemaMigrationStageFailed, - "generatingscript": SchemaMigrationStageGeneratingScript, - "notstarted": SchemaMigrationStageNotStarted, - "uploadingscript": SchemaMigrationStageUploadingScript, - "validatinginputs": SchemaMigrationStageValidatingInputs, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SchemaMigrationStage(input) - return &out, nil -} - -type SqlSourcePlatform string - -const ( - SqlSourcePlatformSqlOnPrem SqlSourcePlatform = "SqlOnPrem" -) - -func PossibleValuesForSqlSourcePlatform() []string { - return []string{ - string(SqlSourcePlatformSqlOnPrem), - } -} - -func (s *SqlSourcePlatform) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSqlSourcePlatform(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSqlSourcePlatform(input string) (*SqlSourcePlatform, error) { - vals := map[string]SqlSourcePlatform{ - "sqlonprem": SqlSourcePlatformSqlOnPrem, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SqlSourcePlatform(input) - return &out, nil -} - -type TaskState string - -const ( - TaskStateCanceled TaskState = "Canceled" - TaskStateFailed TaskState = "Failed" - TaskStateFailedInputValidation TaskState = "FailedInputValidation" - TaskStateFaulted TaskState = "Faulted" - TaskStateQueued TaskState = "Queued" - TaskStateRunning TaskState = "Running" - TaskStateSucceeded TaskState = "Succeeded" - TaskStateUnknown TaskState = "Unknown" -) - -func PossibleValuesForTaskState() []string { - return []string{ - string(TaskStateCanceled), - string(TaskStateFailed), - string(TaskStateFailedInputValidation), - string(TaskStateFaulted), - string(TaskStateQueued), - string(TaskStateRunning), - string(TaskStateSucceeded), - string(TaskStateUnknown), - } -} - -func (s *TaskState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTaskState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTaskState(input string) (*TaskState, error) { - vals := map[string]TaskState{ - "canceled": TaskStateCanceled, - "failed": TaskStateFailed, - "failedinputvalidation": TaskStateFailedInputValidation, - "faulted": TaskStateFaulted, - "queued": TaskStateQueued, - "running": TaskStateRunning, - "succeeded": TaskStateSucceeded, - "unknown": TaskStateUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TaskState(input) - return &out, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_commandproperties.go b/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_commandproperties.go deleted file mode 100644 index 9bc1a7a954c..00000000000 --- a/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_commandproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package migrateschemasqlserversqldbtasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CommandProperties struct { - CommandType string `json:"commandType"` - Errors *[]ODataError `json:"errors,omitempty"` - State *CommandState `json:"state,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_connectioninfo.go b/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_connectioninfo.go deleted file mode 100644 index 540d84daca3..00000000000 --- a/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_connectioninfo.go +++ /dev/null @@ -1,53 +0,0 @@ -package migrateschemasqlserversqldbtasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "SqlConnectionInfo") { - var out SqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_migrateschemasqlserversqldbdatabaseinput.go b/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_migrateschemasqlserversqldbdatabaseinput.go deleted file mode 100644 index 27ac6c904f5..00000000000 --- a/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_migrateschemasqlserversqldbdatabaseinput.go +++ /dev/null @@ -1,10 +0,0 @@ -package migrateschemasqlserversqldbtasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateSchemaSqlServerSqlDbDatabaseInput struct { - Name *string `json:"name,omitempty"` - SchemaSetting *SchemaMigrationSetting `json:"schemaSetting,omitempty"` - TargetDatabaseName *string `json:"targetDatabaseName,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_migrateschemasqlserversqldbtaskinput.go b/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_migrateschemasqlserversqldbtaskinput.go deleted file mode 100644 index 549be327130..00000000000 --- a/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_migrateschemasqlserversqldbtaskinput.go +++ /dev/null @@ -1,10 +0,0 @@ -package migrateschemasqlserversqldbtasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateSchemaSqlServerSqlDbTaskInput struct { - SelectedDatabases []MigrateSchemaSqlServerSqlDbDatabaseInput `json:"selectedDatabases"` - SourceConnectionInfo SqlConnectionInfo `json:"sourceConnectionInfo"` - TargetConnectionInfo SqlConnectionInfo `json:"targetConnectionInfo"` -} diff --git a/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_migrateschemasqlserversqldbtaskoutput.go b/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_migrateschemasqlserversqldbtaskoutput.go deleted file mode 100644 index af3483db589..00000000000 --- a/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_migrateschemasqlserversqldbtaskoutput.go +++ /dev/null @@ -1,77 +0,0 @@ -package migrateschemasqlserversqldbtasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateSchemaSqlServerSqlDbTaskOutput interface { -} - -// RawMigrateSchemaSqlServerSqlDbTaskOutputImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawMigrateSchemaSqlServerSqlDbTaskOutputImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalMigrateSchemaSqlServerSqlDbTaskOutputImplementation(input []byte) (MigrateSchemaSqlServerSqlDbTaskOutput, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSchemaSqlServerSqlDbTaskOutput into map[string]interface: %+v", err) - } - - value, ok := temp["resultType"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "DatabaseLevelOutput") { - var out MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "SchemaErrorOutput") { - var out MigrateSchemaSqlServerSqlDbTaskOutputError - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSchemaSqlServerSqlDbTaskOutputError: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "MigrationLevelOutput") { - var out MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "ErrorOutput") { - var out MigrateSchemaSqlTaskOutputError - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSchemaSqlTaskOutputError: %+v", err) - } - return out, nil - } - - out := RawMigrateSchemaSqlServerSqlDbTaskOutputImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_migrateschemasqlserversqldbtaskoutputdatabaselevel.go b/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_migrateschemasqlserversqldbtaskoutputdatabaselevel.go deleted file mode 100644 index b0d2802e435..00000000000 --- a/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_migrateschemasqlserversqldbtaskoutputdatabaselevel.go +++ /dev/null @@ -1,51 +0,0 @@ -package migrateschemasqlserversqldbtasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateSchemaSqlServerSqlDbTaskOutput = MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel{} - -type MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel struct { - DatabaseErrorResultPrefix *string `json:"databaseErrorResultPrefix,omitempty"` - DatabaseName *string `json:"databaseName,omitempty"` - EndedOn *string `json:"endedOn,omitempty"` - FileId *string `json:"fileId,omitempty"` - NumberOfFailedOperations *int64 `json:"numberOfFailedOperations,omitempty"` - NumberOfSuccessfulOperations *int64 `json:"numberOfSuccessfulOperations,omitempty"` - SchemaErrorResultPrefix *string `json:"schemaErrorResultPrefix,omitempty"` - Stage *SchemaMigrationStage `json:"stage,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - State *MigrationState `json:"state,omitempty"` - - // Fields inherited from MigrateSchemaSqlServerSqlDbTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel{} - -func (s MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel) MarshalJSON() ([]byte, error) { - type wrapper MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel: %+v", err) - } - decoded["resultType"] = "DatabaseLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_migrateschemasqlserversqldbtaskoutputerror.go b/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_migrateschemasqlserversqldbtaskoutputerror.go deleted file mode 100644 index 59919686d8f..00000000000 --- a/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_migrateschemasqlserversqldbtaskoutputerror.go +++ /dev/null @@ -1,43 +0,0 @@ -package migrateschemasqlserversqldbtasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateSchemaSqlServerSqlDbTaskOutput = MigrateSchemaSqlServerSqlDbTaskOutputError{} - -type MigrateSchemaSqlServerSqlDbTaskOutputError struct { - CommandText *string `json:"commandText,omitempty"` - ErrorText *string `json:"errorText,omitempty"` - - // Fields inherited from MigrateSchemaSqlServerSqlDbTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateSchemaSqlServerSqlDbTaskOutputError{} - -func (s MigrateSchemaSqlServerSqlDbTaskOutputError) MarshalJSON() ([]byte, error) { - type wrapper MigrateSchemaSqlServerSqlDbTaskOutputError - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSchemaSqlServerSqlDbTaskOutputError: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSchemaSqlServerSqlDbTaskOutputError: %+v", err) - } - decoded["resultType"] = "SchemaErrorOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSchemaSqlServerSqlDbTaskOutputError: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_migrateschemasqlserversqldbtaskoutputmigrationlevel.go b/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_migrateschemasqlserversqldbtaskoutputmigrationlevel.go deleted file mode 100644 index 10bc6c362a9..00000000000 --- a/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_migrateschemasqlserversqldbtaskoutputmigrationlevel.go +++ /dev/null @@ -1,48 +0,0 @@ -package migrateschemasqlserversqldbtasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateSchemaSqlServerSqlDbTaskOutput = MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel{} - -type MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel struct { - EndedOn *string `json:"endedOn,omitempty"` - SourceServerBrandVersion *string `json:"sourceServerBrandVersion,omitempty"` - SourceServerVersion *string `json:"sourceServerVersion,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - State *MigrationState `json:"state,omitempty"` - TargetServerBrandVersion *string `json:"targetServerBrandVersion,omitempty"` - TargetServerVersion *string `json:"targetServerVersion,omitempty"` - - // Fields inherited from MigrateSchemaSqlServerSqlDbTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel{} - -func (s MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel) MarshalJSON() ([]byte, error) { - type wrapper MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel: %+v", err) - } - decoded["resultType"] = "MigrationLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_migrateschemasqlserversqldbtaskproperties.go b/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_migrateschemasqlserversqldbtaskproperties.go deleted file mode 100644 index 153e30435eb..00000000000 --- a/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_migrateschemasqlserversqldbtaskproperties.go +++ /dev/null @@ -1,85 +0,0 @@ -package migrateschemasqlserversqldbtasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = MigrateSchemaSqlServerSqlDbTaskProperties{} - -type MigrateSchemaSqlServerSqlDbTaskProperties struct { - Input *MigrateSchemaSqlServerSqlDbTaskInput `json:"input,omitempty"` - Output *[]MigrateSchemaSqlServerSqlDbTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - ClientData *map[string]string `json:"clientData,omitempty"` - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = MigrateSchemaSqlServerSqlDbTaskProperties{} - -func (s MigrateSchemaSqlServerSqlDbTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper MigrateSchemaSqlServerSqlDbTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSchemaSqlServerSqlDbTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSchemaSqlServerSqlDbTaskProperties: %+v", err) - } - decoded["taskType"] = "MigrateSchemaSqlServerSqlDb" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSchemaSqlServerSqlDbTaskProperties: %+v", err) - } - - return encoded, nil -} - -var _ json.Unmarshaler = &MigrateSchemaSqlServerSqlDbTaskProperties{} - -func (s *MigrateSchemaSqlServerSqlDbTaskProperties) UnmarshalJSON(bytes []byte) error { - type alias MigrateSchemaSqlServerSqlDbTaskProperties - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into MigrateSchemaSqlServerSqlDbTaskProperties: %+v", err) - } - - s.ClientData = decoded.ClientData - s.Commands = decoded.Commands - s.Errors = decoded.Errors - s.Input = decoded.Input - s.State = decoded.State - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling MigrateSchemaSqlServerSqlDbTaskProperties into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["output"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling Output into list []json.RawMessage: %+v", err) - } - - output := make([]MigrateSchemaSqlServerSqlDbTaskOutput, 0) - for i, val := range listTemp { - impl, err := unmarshalMigrateSchemaSqlServerSqlDbTaskOutputImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'Output' for 'MigrateSchemaSqlServerSqlDbTaskProperties': %+v", i, err) - } - output = append(output, impl) - } - s.Output = &output - } - return nil -} diff --git a/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_migrateschemasqltaskoutputerror.go b/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_migrateschemasqltaskoutputerror.go deleted file mode 100644 index f386a5d7237..00000000000 --- a/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_migrateschemasqltaskoutputerror.go +++ /dev/null @@ -1,42 +0,0 @@ -package migrateschemasqlserversqldbtasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateSchemaSqlServerSqlDbTaskOutput = MigrateSchemaSqlTaskOutputError{} - -type MigrateSchemaSqlTaskOutputError struct { - Error *ReportableException `json:"error,omitempty"` - - // Fields inherited from MigrateSchemaSqlServerSqlDbTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateSchemaSqlTaskOutputError{} - -func (s MigrateSchemaSqlTaskOutputError) MarshalJSON() ([]byte, error) { - type wrapper MigrateSchemaSqlTaskOutputError - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSchemaSqlTaskOutputError: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSchemaSqlTaskOutputError: %+v", err) - } - decoded["resultType"] = "ErrorOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSchemaSqlTaskOutputError: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_odataerror.go b/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_odataerror.go deleted file mode 100644 index 9cbb6a35916..00000000000 --- a/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_odataerror.go +++ /dev/null @@ -1,10 +0,0 @@ -package migrateschemasqlserversqldbtasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ODataError struct { - Code *string `json:"code,omitempty"` - Details *[]ODataError `json:"details,omitempty"` - Message *string `json:"message,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_projecttaskproperties.go b/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_projecttaskproperties.go deleted file mode 100644 index 4630cb9711e..00000000000 --- a/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_projecttaskproperties.go +++ /dev/null @@ -1,53 +0,0 @@ -package migrateschemasqlserversqldbtasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProjectTaskProperties interface { -} - -// RawProjectTaskPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawProjectTaskPropertiesImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalProjectTaskPropertiesImplementation(input []byte) (ProjectTaskProperties, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ProjectTaskProperties into map[string]interface: %+v", err) - } - - value, ok := temp["taskType"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "MigrateSchemaSqlServerSqlDb") { - var out MigrateSchemaSqlServerSqlDbTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSchemaSqlServerSqlDbTaskProperties: %+v", err) - } - return out, nil - } - - out := RawProjectTaskPropertiesImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_reportableexception.go b/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_reportableexception.go deleted file mode 100644 index a8884bb47c2..00000000000 --- a/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_reportableexception.go +++ /dev/null @@ -1,13 +0,0 @@ -package migrateschemasqlserversqldbtasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ReportableException struct { - ActionableMessage *string `json:"actionableMessage,omitempty"` - FilePath *string `json:"filePath,omitempty"` - HResult *int64 `json:"hResult,omitempty"` - LineNumber *string `json:"lineNumber,omitempty"` - Message *string `json:"message,omitempty"` - StackTrace *string `json:"stackTrace,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_schemamigrationsetting.go b/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_schemamigrationsetting.go deleted file mode 100644 index 50713b71b62..00000000000 --- a/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_schemamigrationsetting.go +++ /dev/null @@ -1,9 +0,0 @@ -package migrateschemasqlserversqldbtasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SchemaMigrationSetting struct { - FileId *string `json:"fileId,omitempty"` - SchemaOption *SchemaMigrationOption `json:"schemaOption,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_sqlconnectioninfo.go b/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_sqlconnectioninfo.go deleted file mode 100644 index 1c371309eac..00000000000 --- a/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/model_sqlconnectioninfo.go +++ /dev/null @@ -1,48 +0,0 @@ -package migrateschemasqlserversqldbtasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = SqlConnectionInfo{} - -type SqlConnectionInfo struct { - AdditionalSettings *string `json:"additionalSettings,omitempty"` - Authentication *AuthenticationType `json:"authentication,omitempty"` - DataSource string `json:"dataSource"` - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Platform *SqlSourcePlatform `json:"platform,omitempty"` - TrustServerCertificate *bool `json:"trustServerCertificate,omitempty"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = SqlConnectionInfo{} - -func (s SqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper SqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SqlConnectionInfo: %+v", err) - } - decoded["type"] = "SqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/version.go b/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/version.go deleted file mode 100644 index 2fd2f8417db..00000000000 --- a/resource-manager/datamigration/2021-06-30/migrateschemasqlserversqldbtasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package migrateschemasqlserversqldbtasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-06-30" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/migrateschemasqlserversqldbtasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbsynctasks/README.md b/resource-manager/datamigration/2021-06-30/migratesqlserversqldbsynctasks/README.md deleted file mode 100644 index 63443fa4a76..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbsynctasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/migratesqlserversqldbsynctasks` Documentation - -The `migratesqlserversqldbsynctasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2021-06-30`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/migratesqlserversqldbsynctasks" -``` - - -### Client Initialization - -```go -client := migratesqlserversqldbsynctasks.NewMigrateSqlServerSqlDbSyncTasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbsynctasks/client.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqldbsynctasks/client.go deleted file mode 100644 index e927056ca27..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbsynctasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package migratesqlserversqldbsynctasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateSqlServerSqlDbSyncTasksClient struct { - Client *resourcemanager.Client -} - -func NewMigrateSqlServerSqlDbSyncTasksClientWithBaseURI(sdkApi sdkEnv.Api) (*MigrateSqlServerSqlDbSyncTasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "migratesqlserversqldbsynctasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating MigrateSqlServerSqlDbSyncTasksClient: %+v", err) - } - - return &MigrateSqlServerSqlDbSyncTasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbsynctasks/constants.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqldbsynctasks/constants.go deleted file mode 100644 index 16f0c3b52b8..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbsynctasks/constants.go +++ /dev/null @@ -1,240 +0,0 @@ -package migratesqlserversqldbsynctasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthenticationType string - -const ( - AuthenticationTypeActiveDirectoryIntegrated AuthenticationType = "ActiveDirectoryIntegrated" - AuthenticationTypeActiveDirectoryPassword AuthenticationType = "ActiveDirectoryPassword" - AuthenticationTypeNone AuthenticationType = "None" - AuthenticationTypeSqlAuthentication AuthenticationType = "SqlAuthentication" - AuthenticationTypeWindowsAuthentication AuthenticationType = "WindowsAuthentication" -) - -func PossibleValuesForAuthenticationType() []string { - return []string{ - string(AuthenticationTypeActiveDirectoryIntegrated), - string(AuthenticationTypeActiveDirectoryPassword), - string(AuthenticationTypeNone), - string(AuthenticationTypeSqlAuthentication), - string(AuthenticationTypeWindowsAuthentication), - } -} - -func (s *AuthenticationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAuthenticationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAuthenticationType(input string) (*AuthenticationType, error) { - vals := map[string]AuthenticationType{ - "activedirectoryintegrated": AuthenticationTypeActiveDirectoryIntegrated, - "activedirectorypassword": AuthenticationTypeActiveDirectoryPassword, - "none": AuthenticationTypeNone, - "sqlauthentication": AuthenticationTypeSqlAuthentication, - "windowsauthentication": AuthenticationTypeWindowsAuthentication, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AuthenticationType(input) - return &out, nil -} - -type SqlSourcePlatform string - -const ( - SqlSourcePlatformSqlOnPrem SqlSourcePlatform = "SqlOnPrem" -) - -func PossibleValuesForSqlSourcePlatform() []string { - return []string{ - string(SqlSourcePlatformSqlOnPrem), - } -} - -func (s *SqlSourcePlatform) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSqlSourcePlatform(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSqlSourcePlatform(input string) (*SqlSourcePlatform, error) { - vals := map[string]SqlSourcePlatform{ - "sqlonprem": SqlSourcePlatformSqlOnPrem, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SqlSourcePlatform(input) - return &out, nil -} - -type SyncDatabaseMigrationReportingState string - -const ( - SyncDatabaseMigrationReportingStateBACKUPCOMPLETED SyncDatabaseMigrationReportingState = "BACKUP_COMPLETED" - SyncDatabaseMigrationReportingStateBACKUPINPROGRESS SyncDatabaseMigrationReportingState = "BACKUP_IN_PROGRESS" - SyncDatabaseMigrationReportingStateCANCELLED SyncDatabaseMigrationReportingState = "CANCELLED" - SyncDatabaseMigrationReportingStateCANCELLING SyncDatabaseMigrationReportingState = "CANCELLING" - SyncDatabaseMigrationReportingStateCOMPLETE SyncDatabaseMigrationReportingState = "COMPLETE" - SyncDatabaseMigrationReportingStateCOMPLETING SyncDatabaseMigrationReportingState = "COMPLETING" - SyncDatabaseMigrationReportingStateCONFIGURING SyncDatabaseMigrationReportingState = "CONFIGURING" - SyncDatabaseMigrationReportingStateFAILED SyncDatabaseMigrationReportingState = "FAILED" - SyncDatabaseMigrationReportingStateINITIALIAZING SyncDatabaseMigrationReportingState = "INITIALIAZING" - SyncDatabaseMigrationReportingStateREADYTOCOMPLETE SyncDatabaseMigrationReportingState = "READY_TO_COMPLETE" - SyncDatabaseMigrationReportingStateRESTORECOMPLETED SyncDatabaseMigrationReportingState = "RESTORE_COMPLETED" - SyncDatabaseMigrationReportingStateRESTOREINPROGRESS SyncDatabaseMigrationReportingState = "RESTORE_IN_PROGRESS" - SyncDatabaseMigrationReportingStateRUNNING SyncDatabaseMigrationReportingState = "RUNNING" - SyncDatabaseMigrationReportingStateSTARTING SyncDatabaseMigrationReportingState = "STARTING" - SyncDatabaseMigrationReportingStateUNDEFINED SyncDatabaseMigrationReportingState = "UNDEFINED" - SyncDatabaseMigrationReportingStateVALIDATING SyncDatabaseMigrationReportingState = "VALIDATING" - SyncDatabaseMigrationReportingStateVALIDATIONCOMPLETE SyncDatabaseMigrationReportingState = "VALIDATION_COMPLETE" - SyncDatabaseMigrationReportingStateVALIDATIONFAILED SyncDatabaseMigrationReportingState = "VALIDATION_FAILED" -) - -func PossibleValuesForSyncDatabaseMigrationReportingState() []string { - return []string{ - string(SyncDatabaseMigrationReportingStateBACKUPCOMPLETED), - string(SyncDatabaseMigrationReportingStateBACKUPINPROGRESS), - string(SyncDatabaseMigrationReportingStateCANCELLED), - string(SyncDatabaseMigrationReportingStateCANCELLING), - string(SyncDatabaseMigrationReportingStateCOMPLETE), - string(SyncDatabaseMigrationReportingStateCOMPLETING), - string(SyncDatabaseMigrationReportingStateCONFIGURING), - string(SyncDatabaseMigrationReportingStateFAILED), - string(SyncDatabaseMigrationReportingStateINITIALIAZING), - string(SyncDatabaseMigrationReportingStateREADYTOCOMPLETE), - string(SyncDatabaseMigrationReportingStateRESTORECOMPLETED), - string(SyncDatabaseMigrationReportingStateRESTOREINPROGRESS), - string(SyncDatabaseMigrationReportingStateRUNNING), - string(SyncDatabaseMigrationReportingStateSTARTING), - string(SyncDatabaseMigrationReportingStateUNDEFINED), - string(SyncDatabaseMigrationReportingStateVALIDATING), - string(SyncDatabaseMigrationReportingStateVALIDATIONCOMPLETE), - string(SyncDatabaseMigrationReportingStateVALIDATIONFAILED), - } -} - -func (s *SyncDatabaseMigrationReportingState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSyncDatabaseMigrationReportingState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSyncDatabaseMigrationReportingState(input string) (*SyncDatabaseMigrationReportingState, error) { - vals := map[string]SyncDatabaseMigrationReportingState{ - "backup_completed": SyncDatabaseMigrationReportingStateBACKUPCOMPLETED, - "backup_in_progress": SyncDatabaseMigrationReportingStateBACKUPINPROGRESS, - "cancelled": SyncDatabaseMigrationReportingStateCANCELLED, - "cancelling": SyncDatabaseMigrationReportingStateCANCELLING, - "complete": SyncDatabaseMigrationReportingStateCOMPLETE, - "completing": SyncDatabaseMigrationReportingStateCOMPLETING, - "configuring": SyncDatabaseMigrationReportingStateCONFIGURING, - "failed": SyncDatabaseMigrationReportingStateFAILED, - "initialiazing": SyncDatabaseMigrationReportingStateINITIALIAZING, - "ready_to_complete": SyncDatabaseMigrationReportingStateREADYTOCOMPLETE, - "restore_completed": SyncDatabaseMigrationReportingStateRESTORECOMPLETED, - "restore_in_progress": SyncDatabaseMigrationReportingStateRESTOREINPROGRESS, - "running": SyncDatabaseMigrationReportingStateRUNNING, - "starting": SyncDatabaseMigrationReportingStateSTARTING, - "undefined": SyncDatabaseMigrationReportingStateUNDEFINED, - "validating": SyncDatabaseMigrationReportingStateVALIDATING, - "validation_complete": SyncDatabaseMigrationReportingStateVALIDATIONCOMPLETE, - "validation_failed": SyncDatabaseMigrationReportingStateVALIDATIONFAILED, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SyncDatabaseMigrationReportingState(input) - return &out, nil -} - -type SyncTableMigrationState string - -const ( - SyncTableMigrationStateBEFORELOAD SyncTableMigrationState = "BEFORE_LOAD" - SyncTableMigrationStateCANCELED SyncTableMigrationState = "CANCELED" - SyncTableMigrationStateCOMPLETED SyncTableMigrationState = "COMPLETED" - SyncTableMigrationStateERROR SyncTableMigrationState = "ERROR" - SyncTableMigrationStateFAILED SyncTableMigrationState = "FAILED" - SyncTableMigrationStateFULLLOAD SyncTableMigrationState = "FULL_LOAD" -) - -func PossibleValuesForSyncTableMigrationState() []string { - return []string{ - string(SyncTableMigrationStateBEFORELOAD), - string(SyncTableMigrationStateCANCELED), - string(SyncTableMigrationStateCOMPLETED), - string(SyncTableMigrationStateERROR), - string(SyncTableMigrationStateFAILED), - string(SyncTableMigrationStateFULLLOAD), - } -} - -func (s *SyncTableMigrationState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSyncTableMigrationState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSyncTableMigrationState(input string) (*SyncTableMigrationState, error) { - vals := map[string]SyncTableMigrationState{ - "before_load": SyncTableMigrationStateBEFORELOAD, - "canceled": SyncTableMigrationStateCANCELED, - "completed": SyncTableMigrationStateCOMPLETED, - "error": SyncTableMigrationStateERROR, - "failed": SyncTableMigrationStateFAILED, - "full_load": SyncTableMigrationStateFULLLOAD, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SyncTableMigrationState(input) - return &out, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbsynctasks/model_connectioninfo.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqldbsynctasks/model_connectioninfo.go deleted file mode 100644 index fafd83d6275..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbsynctasks/model_connectioninfo.go +++ /dev/null @@ -1,53 +0,0 @@ -package migratesqlserversqldbsynctasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "SqlConnectionInfo") { - var out SqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbsynctasks/model_migratesqlserversqldbsynctaskoutput.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqldbsynctasks/model_migratesqlserversqldbsynctaskoutput.go deleted file mode 100644 index ec9ed73fb2b..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbsynctasks/model_migratesqlserversqldbsynctaskoutput.go +++ /dev/null @@ -1,85 +0,0 @@ -package migratesqlserversqldbsynctasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateSqlServerSqlDbSyncTaskOutput interface { -} - -// RawMigrateSqlServerSqlDbSyncTaskOutputImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawMigrateSqlServerSqlDbSyncTaskOutputImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalMigrateSqlServerSqlDbSyncTaskOutputImplementation(input []byte) (MigrateSqlServerSqlDbSyncTaskOutput, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlDbSyncTaskOutput into map[string]interface: %+v", err) - } - - value, ok := temp["resultType"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "DatabaseLevelErrorOutput") { - var out MigrateSqlServerSqlDbSyncTaskOutputDatabaseError - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSqlServerSqlDbSyncTaskOutputDatabaseError: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "DatabaseLevelOutput") { - var out MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "ErrorOutput") { - var out MigrateSqlServerSqlDbSyncTaskOutputError - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSqlServerSqlDbSyncTaskOutputError: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "MigrationLevelOutput") { - var out MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "TableLevelOutput") { - var out MigrateSqlServerSqlDbSyncTaskOutputTableLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSqlServerSqlDbSyncTaskOutputTableLevel: %+v", err) - } - return out, nil - } - - out := RawMigrateSqlServerSqlDbSyncTaskOutputImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbsynctasks/model_migratesqlserversqldbsynctaskoutputdatabaseerror.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqldbsynctasks/model_migratesqlserversqldbsynctaskoutputdatabaseerror.go deleted file mode 100644 index 0ad3565de09..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbsynctasks/model_migratesqlserversqldbsynctaskoutputdatabaseerror.go +++ /dev/null @@ -1,43 +0,0 @@ -package migratesqlserversqldbsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateSqlServerSqlDbSyncTaskOutput = MigrateSqlServerSqlDbSyncTaskOutputDatabaseError{} - -type MigrateSqlServerSqlDbSyncTaskOutputDatabaseError struct { - ErrorMessage *string `json:"errorMessage,omitempty"` - Events *[]SyncMigrationDatabaseErrorEvent `json:"events,omitempty"` - - // Fields inherited from MigrateSqlServerSqlDbSyncTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateSqlServerSqlDbSyncTaskOutputDatabaseError{} - -func (s MigrateSqlServerSqlDbSyncTaskOutputDatabaseError) MarshalJSON() ([]byte, error) { - type wrapper MigrateSqlServerSqlDbSyncTaskOutputDatabaseError - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSqlServerSqlDbSyncTaskOutputDatabaseError: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlDbSyncTaskOutputDatabaseError: %+v", err) - } - decoded["resultType"] = "DatabaseLevelErrorOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSqlServerSqlDbSyncTaskOutputDatabaseError: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbsynctasks/model_migratesqlserversqldbsynctaskoutputdatabaselevel.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqldbsynctasks/model_migratesqlserversqldbsynctaskoutputdatabaselevel.go deleted file mode 100644 index b8685c38330..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbsynctasks/model_migratesqlserversqldbsynctaskoutputdatabaselevel.go +++ /dev/null @@ -1,56 +0,0 @@ -package migratesqlserversqldbsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateSqlServerSqlDbSyncTaskOutput = MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel{} - -type MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel struct { - AppliedChanges *int64 `json:"appliedChanges,omitempty"` - CdcDeleteCounter *int64 `json:"cdcDeleteCounter,omitempty"` - CdcInsertCounter *int64 `json:"cdcInsertCounter,omitempty"` - CdcUpdateCounter *int64 `json:"cdcUpdateCounter,omitempty"` - DatabaseName *string `json:"databaseName,omitempty"` - EndedOn *string `json:"endedOn,omitempty"` - FullLoadCompletedTables *int64 `json:"fullLoadCompletedTables,omitempty"` - FullLoadErroredTables *int64 `json:"fullLoadErroredTables,omitempty"` - FullLoadLoadingTables *int64 `json:"fullLoadLoadingTables,omitempty"` - FullLoadQueuedTables *int64 `json:"fullLoadQueuedTables,omitempty"` - IncomingChanges *int64 `json:"incomingChanges,omitempty"` - InitializationCompleted *bool `json:"initializationCompleted,omitempty"` - Latency *int64 `json:"latency,omitempty"` - MigrationState *SyncDatabaseMigrationReportingState `json:"migrationState,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - - // Fields inherited from MigrateSqlServerSqlDbSyncTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel{} - -func (s MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel) MarshalJSON() ([]byte, error) { - type wrapper MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel: %+v", err) - } - decoded["resultType"] = "DatabaseLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbsynctasks/model_migratesqlserversqldbsynctaskoutputerror.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqldbsynctasks/model_migratesqlserversqldbsynctaskoutputerror.go deleted file mode 100644 index 359b8cfce1b..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbsynctasks/model_migratesqlserversqldbsynctaskoutputerror.go +++ /dev/null @@ -1,42 +0,0 @@ -package migratesqlserversqldbsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateSqlServerSqlDbSyncTaskOutput = MigrateSqlServerSqlDbSyncTaskOutputError{} - -type MigrateSqlServerSqlDbSyncTaskOutputError struct { - Error *ReportableException `json:"error,omitempty"` - - // Fields inherited from MigrateSqlServerSqlDbSyncTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateSqlServerSqlDbSyncTaskOutputError{} - -func (s MigrateSqlServerSqlDbSyncTaskOutputError) MarshalJSON() ([]byte, error) { - type wrapper MigrateSqlServerSqlDbSyncTaskOutputError - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSqlServerSqlDbSyncTaskOutputError: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlDbSyncTaskOutputError: %+v", err) - } - decoded["resultType"] = "ErrorOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSqlServerSqlDbSyncTaskOutputError: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbsynctasks/model_migratesqlserversqldbsynctaskoutputmigrationlevel.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqldbsynctasks/model_migratesqlserversqldbsynctaskoutputmigrationlevel.go deleted file mode 100644 index 4d9bd48fc89..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbsynctasks/model_migratesqlserversqldbsynctaskoutputmigrationlevel.go +++ /dev/null @@ -1,48 +0,0 @@ -package migratesqlserversqldbsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateSqlServerSqlDbSyncTaskOutput = MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel{} - -type MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel struct { - DatabaseCount *int64 `json:"databaseCount,omitempty"` - EndedOn *string `json:"endedOn,omitempty"` - SourceServer *string `json:"sourceServer,omitempty"` - SourceServerVersion *string `json:"sourceServerVersion,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - TargetServer *string `json:"targetServer,omitempty"` - TargetServerVersion *string `json:"targetServerVersion,omitempty"` - - // Fields inherited from MigrateSqlServerSqlDbSyncTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel{} - -func (s MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel) MarshalJSON() ([]byte, error) { - type wrapper MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel: %+v", err) - } - decoded["resultType"] = "MigrationLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbsynctasks/model_migratesqlserversqldbsynctaskoutputtablelevel.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqldbsynctasks/model_migratesqlserversqldbsynctaskoutputtablelevel.go deleted file mode 100644 index 44d08b23ffa..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbsynctasks/model_migratesqlserversqldbsynctaskoutputtablelevel.go +++ /dev/null @@ -1,54 +0,0 @@ -package migratesqlserversqldbsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateSqlServerSqlDbSyncTaskOutput = MigrateSqlServerSqlDbSyncTaskOutputTableLevel{} - -type MigrateSqlServerSqlDbSyncTaskOutputTableLevel struct { - CdcDeleteCounter *int64 `json:"cdcDeleteCounter,omitempty"` - CdcInsertCounter *int64 `json:"cdcInsertCounter,omitempty"` - CdcUpdateCounter *int64 `json:"cdcUpdateCounter,omitempty"` - DataErrorsCounter *int64 `json:"dataErrorsCounter,omitempty"` - DatabaseName *string `json:"databaseName,omitempty"` - FullLoadEndedOn *string `json:"fullLoadEndedOn,omitempty"` - FullLoadEstFinishTime *string `json:"fullLoadEstFinishTime,omitempty"` - FullLoadStartedOn *string `json:"fullLoadStartedOn,omitempty"` - FullLoadTotalRows *int64 `json:"fullLoadTotalRows,omitempty"` - LastModifiedTime *string `json:"lastModifiedTime,omitempty"` - State *SyncTableMigrationState `json:"state,omitempty"` - TableName *string `json:"tableName,omitempty"` - TotalChangesApplied *int64 `json:"totalChangesApplied,omitempty"` - - // Fields inherited from MigrateSqlServerSqlDbSyncTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateSqlServerSqlDbSyncTaskOutputTableLevel{} - -func (s MigrateSqlServerSqlDbSyncTaskOutputTableLevel) MarshalJSON() ([]byte, error) { - type wrapper MigrateSqlServerSqlDbSyncTaskOutputTableLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSqlServerSqlDbSyncTaskOutputTableLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlDbSyncTaskOutputTableLevel: %+v", err) - } - decoded["resultType"] = "TableLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSqlServerSqlDbSyncTaskOutputTableLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbsynctasks/model_reportableexception.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqldbsynctasks/model_reportableexception.go deleted file mode 100644 index c219cb58e12..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbsynctasks/model_reportableexception.go +++ /dev/null @@ -1,13 +0,0 @@ -package migratesqlserversqldbsynctasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ReportableException struct { - ActionableMessage *string `json:"actionableMessage,omitempty"` - FilePath *string `json:"filePath,omitempty"` - HResult *int64 `json:"hResult,omitempty"` - LineNumber *string `json:"lineNumber,omitempty"` - Message *string `json:"message,omitempty"` - StackTrace *string `json:"stackTrace,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbsynctasks/model_sqlconnectioninfo.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqldbsynctasks/model_sqlconnectioninfo.go deleted file mode 100644 index 0f34ab8d4f1..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbsynctasks/model_sqlconnectioninfo.go +++ /dev/null @@ -1,48 +0,0 @@ -package migratesqlserversqldbsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = SqlConnectionInfo{} - -type SqlConnectionInfo struct { - AdditionalSettings *string `json:"additionalSettings,omitempty"` - Authentication *AuthenticationType `json:"authentication,omitempty"` - DataSource string `json:"dataSource"` - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Platform *SqlSourcePlatform `json:"platform,omitempty"` - TrustServerCertificate *bool `json:"trustServerCertificate,omitempty"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = SqlConnectionInfo{} - -func (s SqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper SqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SqlConnectionInfo: %+v", err) - } - decoded["type"] = "SqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbsynctasks/model_syncmigrationdatabaseerrorevent.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqldbsynctasks/model_syncmigrationdatabaseerrorevent.go deleted file mode 100644 index 4c69cef9faf..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbsynctasks/model_syncmigrationdatabaseerrorevent.go +++ /dev/null @@ -1,10 +0,0 @@ -package migratesqlserversqldbsynctasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SyncMigrationDatabaseErrorEvent struct { - EventText *string `json:"eventText,omitempty"` - EventTypeString *string `json:"eventTypeString,omitempty"` - TimestampString *string `json:"timestampString,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbsynctasks/version.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqldbsynctasks/version.go deleted file mode 100644 index 0bfd7a94b77..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbsynctasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package migratesqlserversqldbsynctasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-06-30" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/migratesqlserversqldbsynctasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/README.md b/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/README.md deleted file mode 100644 index bb3152e4a2b..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks` Documentation - -The `migratesqlserversqldbtasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2021-06-30`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks" -``` - - -### Client Initialization - -```go -client := migratesqlserversqldbtasks.NewMigrateSqlServerSqlDbTasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/client.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/client.go deleted file mode 100644 index ce54815dd7b..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package migratesqlserversqldbtasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateSqlServerSqlDbTasksClient struct { - Client *resourcemanager.Client -} - -func NewMigrateSqlServerSqlDbTasksClientWithBaseURI(sdkApi sdkEnv.Api) (*MigrateSqlServerSqlDbTasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "migratesqlserversqldbtasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating MigrateSqlServerSqlDbTasksClient: %+v", err) - } - - return &MigrateSqlServerSqlDbTasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/constants.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/constants.go deleted file mode 100644 index 99e6e160d1f..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/constants.go +++ /dev/null @@ -1,469 +0,0 @@ -package migratesqlserversqldbtasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthenticationType string - -const ( - AuthenticationTypeActiveDirectoryIntegrated AuthenticationType = "ActiveDirectoryIntegrated" - AuthenticationTypeActiveDirectoryPassword AuthenticationType = "ActiveDirectoryPassword" - AuthenticationTypeNone AuthenticationType = "None" - AuthenticationTypeSqlAuthentication AuthenticationType = "SqlAuthentication" - AuthenticationTypeWindowsAuthentication AuthenticationType = "WindowsAuthentication" -) - -func PossibleValuesForAuthenticationType() []string { - return []string{ - string(AuthenticationTypeActiveDirectoryIntegrated), - string(AuthenticationTypeActiveDirectoryPassword), - string(AuthenticationTypeNone), - string(AuthenticationTypeSqlAuthentication), - string(AuthenticationTypeWindowsAuthentication), - } -} - -func (s *AuthenticationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAuthenticationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAuthenticationType(input string) (*AuthenticationType, error) { - vals := map[string]AuthenticationType{ - "activedirectoryintegrated": AuthenticationTypeActiveDirectoryIntegrated, - "activedirectorypassword": AuthenticationTypeActiveDirectoryPassword, - "none": AuthenticationTypeNone, - "sqlauthentication": AuthenticationTypeSqlAuthentication, - "windowsauthentication": AuthenticationTypeWindowsAuthentication, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AuthenticationType(input) - return &out, nil -} - -type DatabaseMigrationStage string - -const ( - DatabaseMigrationStageBackup DatabaseMigrationStage = "Backup" - DatabaseMigrationStageCompleted DatabaseMigrationStage = "Completed" - DatabaseMigrationStageFileCopy DatabaseMigrationStage = "FileCopy" - DatabaseMigrationStageInitialize DatabaseMigrationStage = "Initialize" - DatabaseMigrationStageNone DatabaseMigrationStage = "None" - DatabaseMigrationStageRestore DatabaseMigrationStage = "Restore" -) - -func PossibleValuesForDatabaseMigrationStage() []string { - return []string{ - string(DatabaseMigrationStageBackup), - string(DatabaseMigrationStageCompleted), - string(DatabaseMigrationStageFileCopy), - string(DatabaseMigrationStageInitialize), - string(DatabaseMigrationStageNone), - string(DatabaseMigrationStageRestore), - } -} - -func (s *DatabaseMigrationStage) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDatabaseMigrationStage(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDatabaseMigrationStage(input string) (*DatabaseMigrationStage, error) { - vals := map[string]DatabaseMigrationStage{ - "backup": DatabaseMigrationStageBackup, - "completed": DatabaseMigrationStageCompleted, - "filecopy": DatabaseMigrationStageFileCopy, - "initialize": DatabaseMigrationStageInitialize, - "none": DatabaseMigrationStageNone, - "restore": DatabaseMigrationStageRestore, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DatabaseMigrationStage(input) - return &out, nil -} - -type MigrationState string - -const ( - MigrationStateCompleted MigrationState = "Completed" - MigrationStateFailed MigrationState = "Failed" - MigrationStateInProgress MigrationState = "InProgress" - MigrationStateNone MigrationState = "None" - MigrationStateSkipped MigrationState = "Skipped" - MigrationStateStopped MigrationState = "Stopped" - MigrationStateWarning MigrationState = "Warning" -) - -func PossibleValuesForMigrationState() []string { - return []string{ - string(MigrationStateCompleted), - string(MigrationStateFailed), - string(MigrationStateInProgress), - string(MigrationStateNone), - string(MigrationStateSkipped), - string(MigrationStateStopped), - string(MigrationStateWarning), - } -} - -func (s *MigrationState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseMigrationState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseMigrationState(input string) (*MigrationState, error) { - vals := map[string]MigrationState{ - "completed": MigrationStateCompleted, - "failed": MigrationStateFailed, - "inprogress": MigrationStateInProgress, - "none": MigrationStateNone, - "skipped": MigrationStateSkipped, - "stopped": MigrationStateStopped, - "warning": MigrationStateWarning, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := MigrationState(input) - return &out, nil -} - -type MigrationStatus string - -const ( - MigrationStatusCompleted MigrationStatus = "Completed" - MigrationStatusCompletedWithWarnings MigrationStatus = "CompletedWithWarnings" - MigrationStatusConfigured MigrationStatus = "Configured" - MigrationStatusConnecting MigrationStatus = "Connecting" - MigrationStatusDefault MigrationStatus = "Default" - MigrationStatusError MigrationStatus = "Error" - MigrationStatusRunning MigrationStatus = "Running" - MigrationStatusSelectLogins MigrationStatus = "SelectLogins" - MigrationStatusSourceAndTargetSelected MigrationStatus = "SourceAndTargetSelected" - MigrationStatusStopped MigrationStatus = "Stopped" -) - -func PossibleValuesForMigrationStatus() []string { - return []string{ - string(MigrationStatusCompleted), - string(MigrationStatusCompletedWithWarnings), - string(MigrationStatusConfigured), - string(MigrationStatusConnecting), - string(MigrationStatusDefault), - string(MigrationStatusError), - string(MigrationStatusRunning), - string(MigrationStatusSelectLogins), - string(MigrationStatusSourceAndTargetSelected), - string(MigrationStatusStopped), - } -} - -func (s *MigrationStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseMigrationStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseMigrationStatus(input string) (*MigrationStatus, error) { - vals := map[string]MigrationStatus{ - "completed": MigrationStatusCompleted, - "completedwithwarnings": MigrationStatusCompletedWithWarnings, - "configured": MigrationStatusConfigured, - "connecting": MigrationStatusConnecting, - "default": MigrationStatusDefault, - "error": MigrationStatusError, - "running": MigrationStatusRunning, - "selectlogins": MigrationStatusSelectLogins, - "sourceandtargetselected": MigrationStatusSourceAndTargetSelected, - "stopped": MigrationStatusStopped, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := MigrationStatus(input) - return &out, nil -} - -type ObjectType string - -const ( - ObjectTypeFunction ObjectType = "Function" - ObjectTypeStoredProcedures ObjectType = "StoredProcedures" - ObjectTypeTable ObjectType = "Table" - ObjectTypeUser ObjectType = "User" - ObjectTypeView ObjectType = "View" -) - -func PossibleValuesForObjectType() []string { - return []string{ - string(ObjectTypeFunction), - string(ObjectTypeStoredProcedures), - string(ObjectTypeTable), - string(ObjectTypeUser), - string(ObjectTypeView), - } -} - -func (s *ObjectType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseObjectType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseObjectType(input string) (*ObjectType, error) { - vals := map[string]ObjectType{ - "function": ObjectTypeFunction, - "storedprocedures": ObjectTypeStoredProcedures, - "table": ObjectTypeTable, - "user": ObjectTypeUser, - "view": ObjectTypeView, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ObjectType(input) - return &out, nil -} - -type Severity string - -const ( - SeverityError Severity = "Error" - SeverityMessage Severity = "Message" - SeverityWarning Severity = "Warning" -) - -func PossibleValuesForSeverity() []string { - return []string{ - string(SeverityError), - string(SeverityMessage), - string(SeverityWarning), - } -} - -func (s *Severity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSeverity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSeverity(input string) (*Severity, error) { - vals := map[string]Severity{ - "error": SeverityError, - "message": SeverityMessage, - "warning": SeverityWarning, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Severity(input) - return &out, nil -} - -type SqlSourcePlatform string - -const ( - SqlSourcePlatformSqlOnPrem SqlSourcePlatform = "SqlOnPrem" -) - -func PossibleValuesForSqlSourcePlatform() []string { - return []string{ - string(SqlSourcePlatformSqlOnPrem), - } -} - -func (s *SqlSourcePlatform) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSqlSourcePlatform(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSqlSourcePlatform(input string) (*SqlSourcePlatform, error) { - vals := map[string]SqlSourcePlatform{ - "sqlonprem": SqlSourcePlatformSqlOnPrem, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SqlSourcePlatform(input) - return &out, nil -} - -type UpdateActionType string - -const ( - UpdateActionTypeAddedOnTarget UpdateActionType = "AddedOnTarget" - UpdateActionTypeChangedOnTarget UpdateActionType = "ChangedOnTarget" - UpdateActionTypeDeletedOnTarget UpdateActionType = "DeletedOnTarget" -) - -func PossibleValuesForUpdateActionType() []string { - return []string{ - string(UpdateActionTypeAddedOnTarget), - string(UpdateActionTypeChangedOnTarget), - string(UpdateActionTypeDeletedOnTarget), - } -} - -func (s *UpdateActionType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseUpdateActionType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseUpdateActionType(input string) (*UpdateActionType, error) { - vals := map[string]UpdateActionType{ - "addedontarget": UpdateActionTypeAddedOnTarget, - "changedontarget": UpdateActionTypeChangedOnTarget, - "deletedontarget": UpdateActionTypeDeletedOnTarget, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := UpdateActionType(input) - return &out, nil -} - -type ValidationStatus string - -const ( - ValidationStatusCompleted ValidationStatus = "Completed" - ValidationStatusCompletedWithIssues ValidationStatus = "CompletedWithIssues" - ValidationStatusDefault ValidationStatus = "Default" - ValidationStatusFailed ValidationStatus = "Failed" - ValidationStatusInProgress ValidationStatus = "InProgress" - ValidationStatusInitialized ValidationStatus = "Initialized" - ValidationStatusNotStarted ValidationStatus = "NotStarted" - ValidationStatusStopped ValidationStatus = "Stopped" -) - -func PossibleValuesForValidationStatus() []string { - return []string{ - string(ValidationStatusCompleted), - string(ValidationStatusCompletedWithIssues), - string(ValidationStatusDefault), - string(ValidationStatusFailed), - string(ValidationStatusInProgress), - string(ValidationStatusInitialized), - string(ValidationStatusNotStarted), - string(ValidationStatusStopped), - } -} - -func (s *ValidationStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseValidationStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseValidationStatus(input string) (*ValidationStatus, error) { - vals := map[string]ValidationStatus{ - "completed": ValidationStatusCompleted, - "completedwithissues": ValidationStatusCompletedWithIssues, - "default": ValidationStatusDefault, - "failed": ValidationStatusFailed, - "inprogress": ValidationStatusInProgress, - "initialized": ValidationStatusInitialized, - "notstarted": ValidationStatusNotStarted, - "stopped": ValidationStatusStopped, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ValidationStatus(input) - return &out, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_connectioninfo.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_connectioninfo.go deleted file mode 100644 index 7f7a1016853..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_connectioninfo.go +++ /dev/null @@ -1,53 +0,0 @@ -package migratesqlserversqldbtasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "SqlConnectionInfo") { - var out SqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_databasesummaryresult.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_databasesummaryresult.go deleted file mode 100644 index 00068f9c55c..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_databasesummaryresult.go +++ /dev/null @@ -1,47 +0,0 @@ -package migratesqlserversqldbtasks - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DatabaseSummaryResult struct { - EndedOn *string `json:"endedOn,omitempty"` - ErrorPrefix *string `json:"errorPrefix,omitempty"` - ItemsCompletedCount *int64 `json:"itemsCompletedCount,omitempty"` - ItemsCount *int64 `json:"itemsCount,omitempty"` - Name *string `json:"name,omitempty"` - ResultPrefix *string `json:"resultPrefix,omitempty"` - SizeMB *float64 `json:"sizeMB,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - State *MigrationState `json:"state,omitempty"` - StatusMessage *string `json:"statusMessage,omitempty"` -} - -func (o *DatabaseSummaryResult) GetEndedOnAsTime() (*time.Time, error) { - if o.EndedOn == nil { - return nil, nil - } - return dates.ParseAsFormat(o.EndedOn, "2006-01-02T15:04:05Z07:00") -} - -func (o *DatabaseSummaryResult) SetEndedOnAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.EndedOn = &formatted -} - -func (o *DatabaseSummaryResult) GetStartedOnAsTime() (*time.Time, error) { - if o.StartedOn == nil { - return nil, nil - } - return dates.ParseAsFormat(o.StartedOn, "2006-01-02T15:04:05Z07:00") -} - -func (o *DatabaseSummaryResult) SetStartedOnAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.StartedOn = &formatted -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_dataintegrityvalidationresult.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_dataintegrityvalidationresult.go deleted file mode 100644 index 2cca74b7258..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_dataintegrityvalidationresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package migratesqlserversqldbtasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DataIntegrityValidationResult struct { - FailedObjects *map[string]string `json:"failedObjects,omitempty"` - ValidationErrors *ValidationError `json:"validationErrors,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_dataitemmigrationsummaryresult.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_dataitemmigrationsummaryresult.go deleted file mode 100644 index 5d0abd02d94..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_dataitemmigrationsummaryresult.go +++ /dev/null @@ -1,46 +0,0 @@ -package migratesqlserversqldbtasks - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DataItemMigrationSummaryResult struct { - EndedOn *string `json:"endedOn,omitempty"` - ErrorPrefix *string `json:"errorPrefix,omitempty"` - ItemsCompletedCount *int64 `json:"itemsCompletedCount,omitempty"` - ItemsCount *int64 `json:"itemsCount,omitempty"` - Name *string `json:"name,omitempty"` - ResultPrefix *string `json:"resultPrefix,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - State *MigrationState `json:"state,omitempty"` - StatusMessage *string `json:"statusMessage,omitempty"` -} - -func (o *DataItemMigrationSummaryResult) GetEndedOnAsTime() (*time.Time, error) { - if o.EndedOn == nil { - return nil, nil - } - return dates.ParseAsFormat(o.EndedOn, "2006-01-02T15:04:05Z07:00") -} - -func (o *DataItemMigrationSummaryResult) SetEndedOnAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.EndedOn = &formatted -} - -func (o *DataItemMigrationSummaryResult) GetStartedOnAsTime() (*time.Time, error) { - if o.StartedOn == nil { - return nil, nil - } - return dates.ParseAsFormat(o.StartedOn, "2006-01-02T15:04:05Z07:00") -} - -func (o *DataItemMigrationSummaryResult) SetStartedOnAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.StartedOn = &formatted -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_executionstatistics.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_executionstatistics.go deleted file mode 100644 index 8fc6b746007..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_executionstatistics.go +++ /dev/null @@ -1,13 +0,0 @@ -package migratesqlserversqldbtasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExecutionStatistics struct { - CpuTimeMs *float64 `json:"cpuTimeMs,omitempty"` - ElapsedTimeMs *float64 `json:"elapsedTimeMs,omitempty"` - ExecutionCount *int64 `json:"executionCount,omitempty"` - HasErrors *bool `json:"hasErrors,omitempty"` - SqlErrors *[]string `json:"sqlErrors,omitempty"` - WaitStats *map[string]WaitStatistics `json:"waitStats,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_migratesqlserversqldbtaskoutput.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_migratesqlserversqldbtaskoutput.go deleted file mode 100644 index 5c00237272d..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_migratesqlserversqldbtaskoutput.go +++ /dev/null @@ -1,93 +0,0 @@ -package migratesqlserversqldbtasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateSqlServerSqlDbTaskOutput interface { -} - -// RawMigrateSqlServerSqlDbTaskOutputImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawMigrateSqlServerSqlDbTaskOutputImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalMigrateSqlServerSqlDbTaskOutputImplementation(input []byte) (MigrateSqlServerSqlDbTaskOutput, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlDbTaskOutput into map[string]interface: %+v", err) - } - - value, ok := temp["resultType"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "DatabaseLevelOutput") { - var out MigrateSqlServerSqlDbTaskOutputDatabaseLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSqlServerSqlDbTaskOutputDatabaseLevel: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "MigrationDatabaseLevelValidationOutput") { - var out MigrateSqlServerSqlDbTaskOutputDatabaseLevelValidationResult - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSqlServerSqlDbTaskOutputDatabaseLevelValidationResult: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "ErrorOutput") { - var out MigrateSqlServerSqlDbTaskOutputError - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSqlServerSqlDbTaskOutputError: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "MigrationLevelOutput") { - var out MigrateSqlServerSqlDbTaskOutputMigrationLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSqlServerSqlDbTaskOutputMigrationLevel: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "TableLevelOutput") { - var out MigrateSqlServerSqlDbTaskOutputTableLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSqlServerSqlDbTaskOutputTableLevel: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "MigrationValidationOutput") { - var out MigrateSqlServerSqlDbTaskOutputValidationResult - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSqlServerSqlDbTaskOutputValidationResult: %+v", err) - } - return out, nil - } - - out := RawMigrateSqlServerSqlDbTaskOutputImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_migratesqlserversqldbtaskoutputdatabaselevel.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_migratesqlserversqldbtaskoutputdatabaselevel.go deleted file mode 100644 index 3b2e2f48802..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_migratesqlserversqldbtaskoutputdatabaselevel.go +++ /dev/null @@ -1,55 +0,0 @@ -package migratesqlserversqldbtasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateSqlServerSqlDbTaskOutput = MigrateSqlServerSqlDbTaskOutputDatabaseLevel{} - -type MigrateSqlServerSqlDbTaskOutputDatabaseLevel struct { - DatabaseName *string `json:"databaseName,omitempty"` - EndedOn *string `json:"endedOn,omitempty"` - ErrorCount *int64 `json:"errorCount,omitempty"` - ErrorPrefix *string `json:"errorPrefix,omitempty"` - ExceptionsAndWarnings *[]ReportableException `json:"exceptionsAndWarnings,omitempty"` - Message *string `json:"message,omitempty"` - NumberOfObjects *int64 `json:"numberOfObjects,omitempty"` - NumberOfObjectsCompleted *int64 `json:"numberOfObjectsCompleted,omitempty"` - ObjectSummary *map[string]DataItemMigrationSummaryResult `json:"objectSummary,omitempty"` - ResultPrefix *string `json:"resultPrefix,omitempty"` - Stage *DatabaseMigrationStage `json:"stage,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - State *MigrationState `json:"state,omitempty"` - StatusMessage *string `json:"statusMessage,omitempty"` - - // Fields inherited from MigrateSqlServerSqlDbTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateSqlServerSqlDbTaskOutputDatabaseLevel{} - -func (s MigrateSqlServerSqlDbTaskOutputDatabaseLevel) MarshalJSON() ([]byte, error) { - type wrapper MigrateSqlServerSqlDbTaskOutputDatabaseLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSqlServerSqlDbTaskOutputDatabaseLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlDbTaskOutputDatabaseLevel: %+v", err) - } - decoded["resultType"] = "DatabaseLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSqlServerSqlDbTaskOutputDatabaseLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_migratesqlserversqldbtaskoutputdatabaselevelvalidationresult.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_migratesqlserversqldbtaskoutputdatabaselevelvalidationresult.go deleted file mode 100644 index 3f21157da7c..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_migratesqlserversqldbtaskoutputdatabaselevelvalidationresult.go +++ /dev/null @@ -1,50 +0,0 @@ -package migratesqlserversqldbtasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateSqlServerSqlDbTaskOutput = MigrateSqlServerSqlDbTaskOutputDatabaseLevelValidationResult{} - -type MigrateSqlServerSqlDbTaskOutputDatabaseLevelValidationResult struct { - DataIntegrityValidationResult *DataIntegrityValidationResult `json:"dataIntegrityValidationResult,omitempty"` - EndedOn *string `json:"endedOn,omitempty"` - MigrationId *string `json:"migrationId,omitempty"` - QueryAnalysisValidationResult *QueryAnalysisValidationResult `json:"queryAnalysisValidationResult,omitempty"` - SchemaValidationResult *SchemaComparisonValidationResult `json:"schemaValidationResult,omitempty"` - SourceDatabaseName *string `json:"sourceDatabaseName,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - Status *ValidationStatus `json:"status,omitempty"` - TargetDatabaseName *string `json:"targetDatabaseName,omitempty"` - - // Fields inherited from MigrateSqlServerSqlDbTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateSqlServerSqlDbTaskOutputDatabaseLevelValidationResult{} - -func (s MigrateSqlServerSqlDbTaskOutputDatabaseLevelValidationResult) MarshalJSON() ([]byte, error) { - type wrapper MigrateSqlServerSqlDbTaskOutputDatabaseLevelValidationResult - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSqlServerSqlDbTaskOutputDatabaseLevelValidationResult: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlDbTaskOutputDatabaseLevelValidationResult: %+v", err) - } - decoded["resultType"] = "MigrationDatabaseLevelValidationOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSqlServerSqlDbTaskOutputDatabaseLevelValidationResult: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_migratesqlserversqldbtaskoutputerror.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_migratesqlserversqldbtaskoutputerror.go deleted file mode 100644 index 31ef4ff5a1b..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_migratesqlserversqldbtaskoutputerror.go +++ /dev/null @@ -1,42 +0,0 @@ -package migratesqlserversqldbtasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateSqlServerSqlDbTaskOutput = MigrateSqlServerSqlDbTaskOutputError{} - -type MigrateSqlServerSqlDbTaskOutputError struct { - Error *ReportableException `json:"error,omitempty"` - - // Fields inherited from MigrateSqlServerSqlDbTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateSqlServerSqlDbTaskOutputError{} - -func (s MigrateSqlServerSqlDbTaskOutputError) MarshalJSON() ([]byte, error) { - type wrapper MigrateSqlServerSqlDbTaskOutputError - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSqlServerSqlDbTaskOutputError: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlDbTaskOutputError: %+v", err) - } - decoded["resultType"] = "ErrorOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSqlServerSqlDbTaskOutputError: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_migratesqlserversqldbtaskoutputmigrationlevel.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_migratesqlserversqldbtaskoutputmigrationlevel.go deleted file mode 100644 index d2303bafce6..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_migratesqlserversqldbtaskoutputmigrationlevel.go +++ /dev/null @@ -1,56 +0,0 @@ -package migratesqlserversqldbtasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateSqlServerSqlDbTaskOutput = MigrateSqlServerSqlDbTaskOutputMigrationLevel{} - -type MigrateSqlServerSqlDbTaskOutputMigrationLevel struct { - DatabaseSummary *map[string]DatabaseSummaryResult `json:"databaseSummary,omitempty"` - Databases *map[string]string `json:"databases,omitempty"` - DurationInSeconds *int64 `json:"durationInSeconds,omitempty"` - EndedOn *string `json:"endedOn,omitempty"` - ExceptionsAndWarnings *[]ReportableException `json:"exceptionsAndWarnings,omitempty"` - Message *string `json:"message,omitempty"` - MigrationReportResult *MigrationReportResult `json:"migrationReportResult,omitempty"` - MigrationValidationResult *MigrationValidationResult `json:"migrationValidationResult,omitempty"` - SourceServerBrandVersion *string `json:"sourceServerBrandVersion,omitempty"` - SourceServerVersion *string `json:"sourceServerVersion,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - Status *MigrationStatus `json:"status,omitempty"` - StatusMessage *string `json:"statusMessage,omitempty"` - TargetServerBrandVersion *string `json:"targetServerBrandVersion,omitempty"` - TargetServerVersion *string `json:"targetServerVersion,omitempty"` - - // Fields inherited from MigrateSqlServerSqlDbTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateSqlServerSqlDbTaskOutputMigrationLevel{} - -func (s MigrateSqlServerSqlDbTaskOutputMigrationLevel) MarshalJSON() ([]byte, error) { - type wrapper MigrateSqlServerSqlDbTaskOutputMigrationLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSqlServerSqlDbTaskOutputMigrationLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlDbTaskOutputMigrationLevel: %+v", err) - } - decoded["resultType"] = "MigrationLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSqlServerSqlDbTaskOutputMigrationLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_migratesqlserversqldbtaskoutputtablelevel.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_migratesqlserversqldbtaskoutputtablelevel.go deleted file mode 100644 index 1fb13cf34da..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_migratesqlserversqldbtaskoutputtablelevel.go +++ /dev/null @@ -1,50 +0,0 @@ -package migratesqlserversqldbtasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateSqlServerSqlDbTaskOutput = MigrateSqlServerSqlDbTaskOutputTableLevel{} - -type MigrateSqlServerSqlDbTaskOutputTableLevel struct { - EndedOn *string `json:"endedOn,omitempty"` - ErrorPrefix *string `json:"errorPrefix,omitempty"` - ItemsCompletedCount *int64 `json:"itemsCompletedCount,omitempty"` - ItemsCount *int64 `json:"itemsCount,omitempty"` - ObjectName *string `json:"objectName,omitempty"` - ResultPrefix *string `json:"resultPrefix,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - State *MigrationState `json:"state,omitempty"` - StatusMessage *string `json:"statusMessage,omitempty"` - - // Fields inherited from MigrateSqlServerSqlDbTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateSqlServerSqlDbTaskOutputTableLevel{} - -func (s MigrateSqlServerSqlDbTaskOutputTableLevel) MarshalJSON() ([]byte, error) { - type wrapper MigrateSqlServerSqlDbTaskOutputTableLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSqlServerSqlDbTaskOutputTableLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlDbTaskOutputTableLevel: %+v", err) - } - decoded["resultType"] = "TableLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSqlServerSqlDbTaskOutputTableLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_migratesqlserversqldbtaskoutputvalidationresult.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_migratesqlserversqldbtaskoutputvalidationresult.go deleted file mode 100644 index ec949cc523c..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_migratesqlserversqldbtaskoutputvalidationresult.go +++ /dev/null @@ -1,44 +0,0 @@ -package migratesqlserversqldbtasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateSqlServerSqlDbTaskOutput = MigrateSqlServerSqlDbTaskOutputValidationResult{} - -type MigrateSqlServerSqlDbTaskOutputValidationResult struct { - MigrationId *string `json:"migrationId,omitempty"` - Status *ValidationStatus `json:"status,omitempty"` - SummaryResults *map[string]MigrationValidationDatabaseSummaryResult `json:"summaryResults,omitempty"` - - // Fields inherited from MigrateSqlServerSqlDbTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateSqlServerSqlDbTaskOutputValidationResult{} - -func (s MigrateSqlServerSqlDbTaskOutputValidationResult) MarshalJSON() ([]byte, error) { - type wrapper MigrateSqlServerSqlDbTaskOutputValidationResult - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSqlServerSqlDbTaskOutputValidationResult: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlDbTaskOutputValidationResult: %+v", err) - } - decoded["resultType"] = "MigrationValidationOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSqlServerSqlDbTaskOutputValidationResult: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_migrationreportresult.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_migrationreportresult.go deleted file mode 100644 index 806f4dbd673..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_migrationreportresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package migratesqlserversqldbtasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrationReportResult struct { - Id *string `json:"id,omitempty"` - ReportUrl *string `json:"reportUrl,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_migrationvalidationdatabasesummaryresult.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_migrationvalidationdatabasesummaryresult.go deleted file mode 100644 index 9c17f408545..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_migrationvalidationdatabasesummaryresult.go +++ /dev/null @@ -1,44 +0,0 @@ -package migratesqlserversqldbtasks - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrationValidationDatabaseSummaryResult struct { - EndedOn *string `json:"endedOn,omitempty"` - Id *string `json:"id,omitempty"` - MigrationId *string `json:"migrationId,omitempty"` - SourceDatabaseName *string `json:"sourceDatabaseName,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - Status *ValidationStatus `json:"status,omitempty"` - TargetDatabaseName *string `json:"targetDatabaseName,omitempty"` -} - -func (o *MigrationValidationDatabaseSummaryResult) GetEndedOnAsTime() (*time.Time, error) { - if o.EndedOn == nil { - return nil, nil - } - return dates.ParseAsFormat(o.EndedOn, "2006-01-02T15:04:05Z07:00") -} - -func (o *MigrationValidationDatabaseSummaryResult) SetEndedOnAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.EndedOn = &formatted -} - -func (o *MigrationValidationDatabaseSummaryResult) GetStartedOnAsTime() (*time.Time, error) { - if o.StartedOn == nil { - return nil, nil - } - return dates.ParseAsFormat(o.StartedOn, "2006-01-02T15:04:05Z07:00") -} - -func (o *MigrationValidationDatabaseSummaryResult) SetStartedOnAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.StartedOn = &formatted -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_migrationvalidationresult.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_migrationvalidationresult.go deleted file mode 100644 index 548cb78be55..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_migrationvalidationresult.go +++ /dev/null @@ -1,11 +0,0 @@ -package migratesqlserversqldbtasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrationValidationResult struct { - Id *string `json:"id,omitempty"` - MigrationId *string `json:"migrationId,omitempty"` - Status *ValidationStatus `json:"status,omitempty"` - SummaryResults *map[string]MigrationValidationDatabaseSummaryResult `json:"summaryResults,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_queryanalysisvalidationresult.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_queryanalysisvalidationresult.go deleted file mode 100644 index 93079a964c6..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_queryanalysisvalidationresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package migratesqlserversqldbtasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type QueryAnalysisValidationResult struct { - QueryResults *QueryExecutionResult `json:"queryResults,omitempty"` - ValidationErrors *ValidationError `json:"validationErrors,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_queryexecutionresult.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_queryexecutionresult.go deleted file mode 100644 index 66c7ae8113c..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_queryexecutionresult.go +++ /dev/null @@ -1,11 +0,0 @@ -package migratesqlserversqldbtasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type QueryExecutionResult struct { - QueryText *string `json:"queryText,omitempty"` - SourceResult *ExecutionStatistics `json:"sourceResult,omitempty"` - StatementsInBatch *int64 `json:"statementsInBatch,omitempty"` - TargetResult *ExecutionStatistics `json:"targetResult,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_reportableexception.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_reportableexception.go deleted file mode 100644 index f1b7d25d106..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_reportableexception.go +++ /dev/null @@ -1,13 +0,0 @@ -package migratesqlserversqldbtasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ReportableException struct { - ActionableMessage *string `json:"actionableMessage,omitempty"` - FilePath *string `json:"filePath,omitempty"` - HResult *int64 `json:"hResult,omitempty"` - LineNumber *string `json:"lineNumber,omitempty"` - Message *string `json:"message,omitempty"` - StackTrace *string `json:"stackTrace,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_schemacomparisonvalidationresult.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_schemacomparisonvalidationresult.go deleted file mode 100644 index 929dd7cdeef..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_schemacomparisonvalidationresult.go +++ /dev/null @@ -1,11 +0,0 @@ -package migratesqlserversqldbtasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SchemaComparisonValidationResult struct { - SchemaDifferences *SchemaComparisonValidationResultType `json:"schemaDifferences,omitempty"` - SourceDatabaseObjectCount *map[string]int64 `json:"sourceDatabaseObjectCount,omitempty"` - TargetDatabaseObjectCount *map[string]int64 `json:"targetDatabaseObjectCount,omitempty"` - ValidationErrors *ValidationError `json:"validationErrors,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_schemacomparisonvalidationresulttype.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_schemacomparisonvalidationresulttype.go deleted file mode 100644 index 830a75e629f..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_schemacomparisonvalidationresulttype.go +++ /dev/null @@ -1,10 +0,0 @@ -package migratesqlserversqldbtasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SchemaComparisonValidationResultType struct { - ObjectName *string `json:"objectName,omitempty"` - ObjectType *ObjectType `json:"objectType,omitempty"` - UpdateAction *UpdateActionType `json:"updateAction,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_sqlconnectioninfo.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_sqlconnectioninfo.go deleted file mode 100644 index aba22ab0597..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_sqlconnectioninfo.go +++ /dev/null @@ -1,48 +0,0 @@ -package migratesqlserversqldbtasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = SqlConnectionInfo{} - -type SqlConnectionInfo struct { - AdditionalSettings *string `json:"additionalSettings,omitempty"` - Authentication *AuthenticationType `json:"authentication,omitempty"` - DataSource string `json:"dataSource"` - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Platform *SqlSourcePlatform `json:"platform,omitempty"` - TrustServerCertificate *bool `json:"trustServerCertificate,omitempty"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = SqlConnectionInfo{} - -func (s SqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper SqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SqlConnectionInfo: %+v", err) - } - decoded["type"] = "SqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_validationerror.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_validationerror.go deleted file mode 100644 index dd15c1ae0a3..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_validationerror.go +++ /dev/null @@ -1,9 +0,0 @@ -package migratesqlserversqldbtasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ValidationError struct { - Severity *Severity `json:"severity,omitempty"` - Text *string `json:"text,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_waitstatistics.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_waitstatistics.go deleted file mode 100644 index 214b674614a..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/model_waitstatistics.go +++ /dev/null @@ -1,10 +0,0 @@ -package migratesqlserversqldbtasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type WaitStatistics struct { - WaitCount *int64 `json:"waitCount,omitempty"` - WaitTimeMs *float64 `json:"waitTimeMs,omitempty"` - WaitType *string `json:"waitType,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/version.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/version.go deleted file mode 100644 index ebd2c3b6480..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqldbtasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package migratesqlserversqldbtasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-06-30" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/migratesqlserversqldbtasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmisynctasks/README.md b/resource-manager/datamigration/2021-06-30/migratesqlserversqlmisynctasks/README.md deleted file mode 100644 index 94f731e37e5..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmisynctasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/migratesqlserversqlmisynctasks` Documentation - -The `migratesqlserversqlmisynctasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2021-06-30`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/migratesqlserversqlmisynctasks" -``` - - -### Client Initialization - -```go -client := migratesqlserversqlmisynctasks.NewMigrateSqlServerSqlMiSyncTasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmisynctasks/client.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqlmisynctasks/client.go deleted file mode 100644 index f5be18628bf..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmisynctasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package migratesqlserversqlmisynctasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateSqlServerSqlMiSyncTasksClient struct { - Client *resourcemanager.Client -} - -func NewMigrateSqlServerSqlMiSyncTasksClientWithBaseURI(sdkApi sdkEnv.Api) (*MigrateSqlServerSqlMiSyncTasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "migratesqlserversqlmisynctasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating MigrateSqlServerSqlMiSyncTasksClient: %+v", err) - } - - return &MigrateSqlServerSqlMiSyncTasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmisynctasks/constants.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqlmisynctasks/constants.go deleted file mode 100644 index 575dcb8a70c..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmisynctasks/constants.go +++ /dev/null @@ -1,331 +0,0 @@ -package migratesqlserversqlmisynctasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthenticationType string - -const ( - AuthenticationTypeActiveDirectoryIntegrated AuthenticationType = "ActiveDirectoryIntegrated" - AuthenticationTypeActiveDirectoryPassword AuthenticationType = "ActiveDirectoryPassword" - AuthenticationTypeNone AuthenticationType = "None" - AuthenticationTypeSqlAuthentication AuthenticationType = "SqlAuthentication" - AuthenticationTypeWindowsAuthentication AuthenticationType = "WindowsAuthentication" -) - -func PossibleValuesForAuthenticationType() []string { - return []string{ - string(AuthenticationTypeActiveDirectoryIntegrated), - string(AuthenticationTypeActiveDirectoryPassword), - string(AuthenticationTypeNone), - string(AuthenticationTypeSqlAuthentication), - string(AuthenticationTypeWindowsAuthentication), - } -} - -func (s *AuthenticationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAuthenticationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAuthenticationType(input string) (*AuthenticationType, error) { - vals := map[string]AuthenticationType{ - "activedirectoryintegrated": AuthenticationTypeActiveDirectoryIntegrated, - "activedirectorypassword": AuthenticationTypeActiveDirectoryPassword, - "none": AuthenticationTypeNone, - "sqlauthentication": AuthenticationTypeSqlAuthentication, - "windowsauthentication": AuthenticationTypeWindowsAuthentication, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AuthenticationType(input) - return &out, nil -} - -type BackupFileStatus string - -const ( - BackupFileStatusArrived BackupFileStatus = "Arrived" - BackupFileStatusCancelled BackupFileStatus = "Cancelled" - BackupFileStatusQueued BackupFileStatus = "Queued" - BackupFileStatusRestored BackupFileStatus = "Restored" - BackupFileStatusRestoring BackupFileStatus = "Restoring" - BackupFileStatusUploaded BackupFileStatus = "Uploaded" - BackupFileStatusUploading BackupFileStatus = "Uploading" -) - -func PossibleValuesForBackupFileStatus() []string { - return []string{ - string(BackupFileStatusArrived), - string(BackupFileStatusCancelled), - string(BackupFileStatusQueued), - string(BackupFileStatusRestored), - string(BackupFileStatusRestoring), - string(BackupFileStatusUploaded), - string(BackupFileStatusUploading), - } -} - -func (s *BackupFileStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseBackupFileStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseBackupFileStatus(input string) (*BackupFileStatus, error) { - vals := map[string]BackupFileStatus{ - "arrived": BackupFileStatusArrived, - "cancelled": BackupFileStatusCancelled, - "queued": BackupFileStatusQueued, - "restored": BackupFileStatusRestored, - "restoring": BackupFileStatusRestoring, - "uploaded": BackupFileStatusUploaded, - "uploading": BackupFileStatusUploading, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := BackupFileStatus(input) - return &out, nil -} - -type BackupType string - -const ( - BackupTypeDatabase BackupType = "Database" - BackupTypeDifferentialDatabase BackupType = "DifferentialDatabase" - BackupTypeDifferentialFile BackupType = "DifferentialFile" - BackupTypeDifferentialPartial BackupType = "DifferentialPartial" - BackupTypeFile BackupType = "File" - BackupTypePartial BackupType = "Partial" - BackupTypeTransactionLog BackupType = "TransactionLog" -) - -func PossibleValuesForBackupType() []string { - return []string{ - string(BackupTypeDatabase), - string(BackupTypeDifferentialDatabase), - string(BackupTypeDifferentialFile), - string(BackupTypeDifferentialPartial), - string(BackupTypeFile), - string(BackupTypePartial), - string(BackupTypeTransactionLog), - } -} - -func (s *BackupType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseBackupType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseBackupType(input string) (*BackupType, error) { - vals := map[string]BackupType{ - "database": BackupTypeDatabase, - "differentialdatabase": BackupTypeDifferentialDatabase, - "differentialfile": BackupTypeDifferentialFile, - "differentialpartial": BackupTypeDifferentialPartial, - "file": BackupTypeFile, - "partial": BackupTypePartial, - "transactionlog": BackupTypeTransactionLog, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := BackupType(input) - return &out, nil -} - -type DatabaseMigrationState string - -const ( - DatabaseMigrationStateCANCELLED DatabaseMigrationState = "CANCELLED" - DatabaseMigrationStateCOMPLETED DatabaseMigrationState = "COMPLETED" - DatabaseMigrationStateCUTOVERSTART DatabaseMigrationState = "CUTOVER_START" - DatabaseMigrationStateFAILED DatabaseMigrationState = "FAILED" - DatabaseMigrationStateFULLBACKUPUPLOADSTART DatabaseMigrationState = "FULL_BACKUP_UPLOAD_START" - DatabaseMigrationStateINITIAL DatabaseMigrationState = "INITIAL" - DatabaseMigrationStateLOGSHIPPINGSTART DatabaseMigrationState = "LOG_SHIPPING_START" - DatabaseMigrationStatePOSTCUTOVERCOMPLETE DatabaseMigrationState = "POST_CUTOVER_COMPLETE" - DatabaseMigrationStateUNDEFINED DatabaseMigrationState = "UNDEFINED" - DatabaseMigrationStateUPLOADLOGFILESSTART DatabaseMigrationState = "UPLOAD_LOG_FILES_START" -) - -func PossibleValuesForDatabaseMigrationState() []string { - return []string{ - string(DatabaseMigrationStateCANCELLED), - string(DatabaseMigrationStateCOMPLETED), - string(DatabaseMigrationStateCUTOVERSTART), - string(DatabaseMigrationStateFAILED), - string(DatabaseMigrationStateFULLBACKUPUPLOADSTART), - string(DatabaseMigrationStateINITIAL), - string(DatabaseMigrationStateLOGSHIPPINGSTART), - string(DatabaseMigrationStatePOSTCUTOVERCOMPLETE), - string(DatabaseMigrationStateUNDEFINED), - string(DatabaseMigrationStateUPLOADLOGFILESSTART), - } -} - -func (s *DatabaseMigrationState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDatabaseMigrationState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDatabaseMigrationState(input string) (*DatabaseMigrationState, error) { - vals := map[string]DatabaseMigrationState{ - "cancelled": DatabaseMigrationStateCANCELLED, - "completed": DatabaseMigrationStateCOMPLETED, - "cutover_start": DatabaseMigrationStateCUTOVERSTART, - "failed": DatabaseMigrationStateFAILED, - "full_backup_upload_start": DatabaseMigrationStateFULLBACKUPUPLOADSTART, - "initial": DatabaseMigrationStateINITIAL, - "log_shipping_start": DatabaseMigrationStateLOGSHIPPINGSTART, - "post_cutover_complete": DatabaseMigrationStatePOSTCUTOVERCOMPLETE, - "undefined": DatabaseMigrationStateUNDEFINED, - "upload_log_files_start": DatabaseMigrationStateUPLOADLOGFILESSTART, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DatabaseMigrationState(input) - return &out, nil -} - -type MigrationState string - -const ( - MigrationStateCompleted MigrationState = "Completed" - MigrationStateFailed MigrationState = "Failed" - MigrationStateInProgress MigrationState = "InProgress" - MigrationStateNone MigrationState = "None" - MigrationStateSkipped MigrationState = "Skipped" - MigrationStateStopped MigrationState = "Stopped" - MigrationStateWarning MigrationState = "Warning" -) - -func PossibleValuesForMigrationState() []string { - return []string{ - string(MigrationStateCompleted), - string(MigrationStateFailed), - string(MigrationStateInProgress), - string(MigrationStateNone), - string(MigrationStateSkipped), - string(MigrationStateStopped), - string(MigrationStateWarning), - } -} - -func (s *MigrationState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseMigrationState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseMigrationState(input string) (*MigrationState, error) { - vals := map[string]MigrationState{ - "completed": MigrationStateCompleted, - "failed": MigrationStateFailed, - "inprogress": MigrationStateInProgress, - "none": MigrationStateNone, - "skipped": MigrationStateSkipped, - "stopped": MigrationStateStopped, - "warning": MigrationStateWarning, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := MigrationState(input) - return &out, nil -} - -type SqlSourcePlatform string - -const ( - SqlSourcePlatformSqlOnPrem SqlSourcePlatform = "SqlOnPrem" -) - -func PossibleValuesForSqlSourcePlatform() []string { - return []string{ - string(SqlSourcePlatformSqlOnPrem), - } -} - -func (s *SqlSourcePlatform) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSqlSourcePlatform(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSqlSourcePlatform(input string) (*SqlSourcePlatform, error) { - vals := map[string]SqlSourcePlatform{ - "sqlonprem": SqlSourcePlatformSqlOnPrem, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SqlSourcePlatform(input) - return &out, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmisynctasks/model_backupfileinfo.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqlmisynctasks/model_backupfileinfo.go deleted file mode 100644 index 98958095a47..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmisynctasks/model_backupfileinfo.go +++ /dev/null @@ -1,10 +0,0 @@ -package migratesqlserversqlmisynctasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackupFileInfo struct { - FamilySequenceNumber *int64 `json:"familySequenceNumber,omitempty"` - FileLocation *string `json:"fileLocation,omitempty"` - Status *BackupFileStatus `json:"status,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmisynctasks/model_backupsetinfo.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqlmisynctasks/model_backupsetinfo.go deleted file mode 100644 index 2552343852a..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmisynctasks/model_backupsetinfo.go +++ /dev/null @@ -1,59 +0,0 @@ -package migratesqlserversqlmisynctasks - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackupSetInfo struct { - BackupFinishedDate *string `json:"backupFinishedDate,omitempty"` - BackupSetId *string `json:"backupSetId,omitempty"` - BackupStartDate *string `json:"backupStartDate,omitempty"` - BackupType *BackupType `json:"backupType,omitempty"` - DatabaseName *string `json:"databaseName,omitempty"` - FirstLsn *string `json:"firstLsn,omitempty"` - IsBackupRestored *bool `json:"isBackupRestored,omitempty"` - LastLsn *string `json:"lastLsn,omitempty"` - LastModifiedTime *string `json:"lastModifiedTime,omitempty"` - ListOfBackupFiles *[]BackupFileInfo `json:"listOfBackupFiles,omitempty"` -} - -func (o *BackupSetInfo) GetBackupFinishedDateAsTime() (*time.Time, error) { - if o.BackupFinishedDate == nil { - return nil, nil - } - return dates.ParseAsFormat(o.BackupFinishedDate, "2006-01-02T15:04:05Z07:00") -} - -func (o *BackupSetInfo) SetBackupFinishedDateAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.BackupFinishedDate = &formatted -} - -func (o *BackupSetInfo) GetBackupStartDateAsTime() (*time.Time, error) { - if o.BackupStartDate == nil { - return nil, nil - } - return dates.ParseAsFormat(o.BackupStartDate, "2006-01-02T15:04:05Z07:00") -} - -func (o *BackupSetInfo) SetBackupStartDateAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.BackupStartDate = &formatted -} - -func (o *BackupSetInfo) GetLastModifiedTimeAsTime() (*time.Time, error) { - if o.LastModifiedTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastModifiedTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *BackupSetInfo) SetLastModifiedTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastModifiedTime = &formatted -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmisynctasks/model_connectioninfo.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqlmisynctasks/model_connectioninfo.go deleted file mode 100644 index 7141ae5518c..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmisynctasks/model_connectioninfo.go +++ /dev/null @@ -1,61 +0,0 @@ -package migratesqlserversqlmisynctasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "MiSqlConnectionInfo") { - var out MiSqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MiSqlConnectionInfo: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "SqlConnectionInfo") { - var out SqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmisynctasks/model_migratesqlserversqlmisynctaskoutput.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqlmisynctasks/model_migratesqlserversqlmisynctaskoutput.go deleted file mode 100644 index 6576265e24c..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmisynctasks/model_migratesqlserversqlmisynctaskoutput.go +++ /dev/null @@ -1,69 +0,0 @@ -package migratesqlserversqlmisynctasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateSqlServerSqlMISyncTaskOutput interface { -} - -// RawMigrateSqlServerSqlMISyncTaskOutputImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawMigrateSqlServerSqlMISyncTaskOutputImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalMigrateSqlServerSqlMISyncTaskOutputImplementation(input []byte) (MigrateSqlServerSqlMISyncTaskOutput, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlMISyncTaskOutput into map[string]interface: %+v", err) - } - - value, ok := temp["resultType"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "DatabaseLevelOutput") { - var out MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "ErrorOutput") { - var out MigrateSqlServerSqlMISyncTaskOutputError - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSqlServerSqlMISyncTaskOutputError: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "MigrationLevelOutput") { - var out MigrateSqlServerSqlMISyncTaskOutputMigrationLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSqlServerSqlMISyncTaskOutputMigrationLevel: %+v", err) - } - return out, nil - } - - out := RawMigrateSqlServerSqlMISyncTaskOutputImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmisynctasks/model_migratesqlserversqlmisynctaskoutputdatabaselevel.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqlmisynctasks/model_migratesqlserversqlmisynctaskoutputdatabaselevel.go deleted file mode 100644 index 5375bb07685..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmisynctasks/model_migratesqlserversqlmisynctaskoutputdatabaselevel.go +++ /dev/null @@ -1,52 +0,0 @@ -package migratesqlserversqlmisynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateSqlServerSqlMISyncTaskOutput = MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel{} - -type MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel struct { - ActiveBackupSets *[]BackupSetInfo `json:"activeBackupSets,omitempty"` - ContainerName *string `json:"containerName,omitempty"` - EndedOn *string `json:"endedOn,omitempty"` - ErrorPrefix *string `json:"errorPrefix,omitempty"` - ExceptionsAndWarnings *[]ReportableException `json:"exceptionsAndWarnings,omitempty"` - FullBackupSetInfo *BackupSetInfo `json:"fullBackupSetInfo,omitempty"` - IsFullBackupRestored *bool `json:"isFullBackupRestored,omitempty"` - LastRestoredBackupSetInfo *BackupSetInfo `json:"lastRestoredBackupSetInfo,omitempty"` - MigrationState *DatabaseMigrationState `json:"migrationState,omitempty"` - SourceDatabaseName *string `json:"sourceDatabaseName,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - - // Fields inherited from MigrateSqlServerSqlMISyncTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel{} - -func (s MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel) MarshalJSON() ([]byte, error) { - type wrapper MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel: %+v", err) - } - decoded["resultType"] = "DatabaseLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmisynctasks/model_migratesqlserversqlmisynctaskoutputerror.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqlmisynctasks/model_migratesqlserversqlmisynctaskoutputerror.go deleted file mode 100644 index 7befdcf9fa7..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmisynctasks/model_migratesqlserversqlmisynctaskoutputerror.go +++ /dev/null @@ -1,42 +0,0 @@ -package migratesqlserversqlmisynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateSqlServerSqlMISyncTaskOutput = MigrateSqlServerSqlMISyncTaskOutputError{} - -type MigrateSqlServerSqlMISyncTaskOutputError struct { - Error *ReportableException `json:"error,omitempty"` - - // Fields inherited from MigrateSqlServerSqlMISyncTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateSqlServerSqlMISyncTaskOutputError{} - -func (s MigrateSqlServerSqlMISyncTaskOutputError) MarshalJSON() ([]byte, error) { - type wrapper MigrateSqlServerSqlMISyncTaskOutputError - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSqlServerSqlMISyncTaskOutputError: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlMISyncTaskOutputError: %+v", err) - } - decoded["resultType"] = "ErrorOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSqlServerSqlMISyncTaskOutputError: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmisynctasks/model_migratesqlserversqlmisynctaskoutputmigrationlevel.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqlmisynctasks/model_migratesqlserversqlmisynctaskoutputmigrationlevel.go deleted file mode 100644 index 967f5d72aac..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmisynctasks/model_migratesqlserversqlmisynctaskoutputmigrationlevel.go +++ /dev/null @@ -1,52 +0,0 @@ -package migratesqlserversqlmisynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateSqlServerSqlMISyncTaskOutput = MigrateSqlServerSqlMISyncTaskOutputMigrationLevel{} - -type MigrateSqlServerSqlMISyncTaskOutputMigrationLevel struct { - DatabaseCount *int64 `json:"databaseCount,omitempty"` - DatabaseErrorCount *int64 `json:"databaseErrorCount,omitempty"` - EndedOn *string `json:"endedOn,omitempty"` - SourceServerBrandVersion *string `json:"sourceServerBrandVersion,omitempty"` - SourceServerName *string `json:"sourceServerName,omitempty"` - SourceServerVersion *string `json:"sourceServerVersion,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - State *MigrationState `json:"state,omitempty"` - TargetServerBrandVersion *string `json:"targetServerBrandVersion,omitempty"` - TargetServerName *string `json:"targetServerName,omitempty"` - TargetServerVersion *string `json:"targetServerVersion,omitempty"` - - // Fields inherited from MigrateSqlServerSqlMISyncTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateSqlServerSqlMISyncTaskOutputMigrationLevel{} - -func (s MigrateSqlServerSqlMISyncTaskOutputMigrationLevel) MarshalJSON() ([]byte, error) { - type wrapper MigrateSqlServerSqlMISyncTaskOutputMigrationLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSqlServerSqlMISyncTaskOutputMigrationLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlMISyncTaskOutputMigrationLevel: %+v", err) - } - decoded["resultType"] = "MigrationLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSqlServerSqlMISyncTaskOutputMigrationLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmisynctasks/model_misqlconnectioninfo.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqlmisynctasks/model_misqlconnectioninfo.go deleted file mode 100644 index ce69fdfc6d3..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmisynctasks/model_misqlconnectioninfo.go +++ /dev/null @@ -1,43 +0,0 @@ -package migratesqlserversqlmisynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = MiSqlConnectionInfo{} - -type MiSqlConnectionInfo struct { - ManagedInstanceResourceId string `json:"managedInstanceResourceId"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = MiSqlConnectionInfo{} - -func (s MiSqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper MiSqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MiSqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MiSqlConnectionInfo: %+v", err) - } - decoded["type"] = "MiSqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MiSqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmisynctasks/model_reportableexception.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqlmisynctasks/model_reportableexception.go deleted file mode 100644 index 6bb7af355d2..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmisynctasks/model_reportableexception.go +++ /dev/null @@ -1,13 +0,0 @@ -package migratesqlserversqlmisynctasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ReportableException struct { - ActionableMessage *string `json:"actionableMessage,omitempty"` - FilePath *string `json:"filePath,omitempty"` - HResult *int64 `json:"hResult,omitempty"` - LineNumber *string `json:"lineNumber,omitempty"` - Message *string `json:"message,omitempty"` - StackTrace *string `json:"stackTrace,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmisynctasks/model_sqlconnectioninfo.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqlmisynctasks/model_sqlconnectioninfo.go deleted file mode 100644 index 9aba59dccc8..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmisynctasks/model_sqlconnectioninfo.go +++ /dev/null @@ -1,48 +0,0 @@ -package migratesqlserversqlmisynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = SqlConnectionInfo{} - -type SqlConnectionInfo struct { - AdditionalSettings *string `json:"additionalSettings,omitempty"` - Authentication *AuthenticationType `json:"authentication,omitempty"` - DataSource string `json:"dataSource"` - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Platform *SqlSourcePlatform `json:"platform,omitempty"` - TrustServerCertificate *bool `json:"trustServerCertificate,omitempty"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = SqlConnectionInfo{} - -func (s SqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper SqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SqlConnectionInfo: %+v", err) - } - decoded["type"] = "SqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmisynctasks/version.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqlmisynctasks/version.go deleted file mode 100644 index 256b153e7d9..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmisynctasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package migratesqlserversqlmisynctasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-06-30" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/migratesqlserversqlmisynctasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmitasks/README.md b/resource-manager/datamigration/2021-06-30/migratesqlserversqlmitasks/README.md deleted file mode 100644 index e8018213348..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmitasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/migratesqlserversqlmitasks` Documentation - -The `migratesqlserversqlmitasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2021-06-30`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/migratesqlserversqlmitasks" -``` - - -### Client Initialization - -```go -client := migratesqlserversqlmitasks.NewMigrateSqlServerSqlMITasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmitasks/client.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqlmitasks/client.go deleted file mode 100644 index af18cc02001..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmitasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package migratesqlserversqlmitasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateSqlServerSqlMITasksClient struct { - Client *resourcemanager.Client -} - -func NewMigrateSqlServerSqlMITasksClientWithBaseURI(sdkApi sdkEnv.Api) (*MigrateSqlServerSqlMITasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "migratesqlserversqlmitasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating MigrateSqlServerSqlMITasksClient: %+v", err) - } - - return &MigrateSqlServerSqlMITasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmitasks/constants.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqlmitasks/constants.go deleted file mode 100644 index 4eec65a272b..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmitasks/constants.go +++ /dev/null @@ -1,334 +0,0 @@ -package migratesqlserversqlmitasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthenticationType string - -const ( - AuthenticationTypeActiveDirectoryIntegrated AuthenticationType = "ActiveDirectoryIntegrated" - AuthenticationTypeActiveDirectoryPassword AuthenticationType = "ActiveDirectoryPassword" - AuthenticationTypeNone AuthenticationType = "None" - AuthenticationTypeSqlAuthentication AuthenticationType = "SqlAuthentication" - AuthenticationTypeWindowsAuthentication AuthenticationType = "WindowsAuthentication" -) - -func PossibleValuesForAuthenticationType() []string { - return []string{ - string(AuthenticationTypeActiveDirectoryIntegrated), - string(AuthenticationTypeActiveDirectoryPassword), - string(AuthenticationTypeNone), - string(AuthenticationTypeSqlAuthentication), - string(AuthenticationTypeWindowsAuthentication), - } -} - -func (s *AuthenticationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAuthenticationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAuthenticationType(input string) (*AuthenticationType, error) { - vals := map[string]AuthenticationType{ - "activedirectoryintegrated": AuthenticationTypeActiveDirectoryIntegrated, - "activedirectorypassword": AuthenticationTypeActiveDirectoryPassword, - "none": AuthenticationTypeNone, - "sqlauthentication": AuthenticationTypeSqlAuthentication, - "windowsauthentication": AuthenticationTypeWindowsAuthentication, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AuthenticationType(input) - return &out, nil -} - -type DatabaseMigrationStage string - -const ( - DatabaseMigrationStageBackup DatabaseMigrationStage = "Backup" - DatabaseMigrationStageCompleted DatabaseMigrationStage = "Completed" - DatabaseMigrationStageFileCopy DatabaseMigrationStage = "FileCopy" - DatabaseMigrationStageInitialize DatabaseMigrationStage = "Initialize" - DatabaseMigrationStageNone DatabaseMigrationStage = "None" - DatabaseMigrationStageRestore DatabaseMigrationStage = "Restore" -) - -func PossibleValuesForDatabaseMigrationStage() []string { - return []string{ - string(DatabaseMigrationStageBackup), - string(DatabaseMigrationStageCompleted), - string(DatabaseMigrationStageFileCopy), - string(DatabaseMigrationStageInitialize), - string(DatabaseMigrationStageNone), - string(DatabaseMigrationStageRestore), - } -} - -func (s *DatabaseMigrationStage) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDatabaseMigrationStage(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDatabaseMigrationStage(input string) (*DatabaseMigrationStage, error) { - vals := map[string]DatabaseMigrationStage{ - "backup": DatabaseMigrationStageBackup, - "completed": DatabaseMigrationStageCompleted, - "filecopy": DatabaseMigrationStageFileCopy, - "initialize": DatabaseMigrationStageInitialize, - "none": DatabaseMigrationStageNone, - "restore": DatabaseMigrationStageRestore, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DatabaseMigrationStage(input) - return &out, nil -} - -type LoginMigrationStage string - -const ( - LoginMigrationStageAssignRoleMembership LoginMigrationStage = "AssignRoleMembership" - LoginMigrationStageAssignRoleOwnership LoginMigrationStage = "AssignRoleOwnership" - LoginMigrationStageCompleted LoginMigrationStage = "Completed" - LoginMigrationStageEstablishObjectPermissions LoginMigrationStage = "EstablishObjectPermissions" - LoginMigrationStageEstablishServerPermissions LoginMigrationStage = "EstablishServerPermissions" - LoginMigrationStageEstablishUserMapping LoginMigrationStage = "EstablishUserMapping" - LoginMigrationStageInitialize LoginMigrationStage = "Initialize" - LoginMigrationStageLoginMigration LoginMigrationStage = "LoginMigration" - LoginMigrationStageNone LoginMigrationStage = "None" -) - -func PossibleValuesForLoginMigrationStage() []string { - return []string{ - string(LoginMigrationStageAssignRoleMembership), - string(LoginMigrationStageAssignRoleOwnership), - string(LoginMigrationStageCompleted), - string(LoginMigrationStageEstablishObjectPermissions), - string(LoginMigrationStageEstablishServerPermissions), - string(LoginMigrationStageEstablishUserMapping), - string(LoginMigrationStageInitialize), - string(LoginMigrationStageLoginMigration), - string(LoginMigrationStageNone), - } -} - -func (s *LoginMigrationStage) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoginMigrationStage(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoginMigrationStage(input string) (*LoginMigrationStage, error) { - vals := map[string]LoginMigrationStage{ - "assignrolemembership": LoginMigrationStageAssignRoleMembership, - "assignroleownership": LoginMigrationStageAssignRoleOwnership, - "completed": LoginMigrationStageCompleted, - "establishobjectpermissions": LoginMigrationStageEstablishObjectPermissions, - "establishserverpermissions": LoginMigrationStageEstablishServerPermissions, - "establishusermapping": LoginMigrationStageEstablishUserMapping, - "initialize": LoginMigrationStageInitialize, - "loginmigration": LoginMigrationStageLoginMigration, - "none": LoginMigrationStageNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoginMigrationStage(input) - return &out, nil -} - -type MigrationState string - -const ( - MigrationStateCompleted MigrationState = "Completed" - MigrationStateFailed MigrationState = "Failed" - MigrationStateInProgress MigrationState = "InProgress" - MigrationStateNone MigrationState = "None" - MigrationStateSkipped MigrationState = "Skipped" - MigrationStateStopped MigrationState = "Stopped" - MigrationStateWarning MigrationState = "Warning" -) - -func PossibleValuesForMigrationState() []string { - return []string{ - string(MigrationStateCompleted), - string(MigrationStateFailed), - string(MigrationStateInProgress), - string(MigrationStateNone), - string(MigrationStateSkipped), - string(MigrationStateStopped), - string(MigrationStateWarning), - } -} - -func (s *MigrationState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseMigrationState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseMigrationState(input string) (*MigrationState, error) { - vals := map[string]MigrationState{ - "completed": MigrationStateCompleted, - "failed": MigrationStateFailed, - "inprogress": MigrationStateInProgress, - "none": MigrationStateNone, - "skipped": MigrationStateSkipped, - "stopped": MigrationStateStopped, - "warning": MigrationStateWarning, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := MigrationState(input) - return &out, nil -} - -type MigrationStatus string - -const ( - MigrationStatusCompleted MigrationStatus = "Completed" - MigrationStatusCompletedWithWarnings MigrationStatus = "CompletedWithWarnings" - MigrationStatusConfigured MigrationStatus = "Configured" - MigrationStatusConnecting MigrationStatus = "Connecting" - MigrationStatusDefault MigrationStatus = "Default" - MigrationStatusError MigrationStatus = "Error" - MigrationStatusRunning MigrationStatus = "Running" - MigrationStatusSelectLogins MigrationStatus = "SelectLogins" - MigrationStatusSourceAndTargetSelected MigrationStatus = "SourceAndTargetSelected" - MigrationStatusStopped MigrationStatus = "Stopped" -) - -func PossibleValuesForMigrationStatus() []string { - return []string{ - string(MigrationStatusCompleted), - string(MigrationStatusCompletedWithWarnings), - string(MigrationStatusConfigured), - string(MigrationStatusConnecting), - string(MigrationStatusDefault), - string(MigrationStatusError), - string(MigrationStatusRunning), - string(MigrationStatusSelectLogins), - string(MigrationStatusSourceAndTargetSelected), - string(MigrationStatusStopped), - } -} - -func (s *MigrationStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseMigrationStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseMigrationStatus(input string) (*MigrationStatus, error) { - vals := map[string]MigrationStatus{ - "completed": MigrationStatusCompleted, - "completedwithwarnings": MigrationStatusCompletedWithWarnings, - "configured": MigrationStatusConfigured, - "connecting": MigrationStatusConnecting, - "default": MigrationStatusDefault, - "error": MigrationStatusError, - "running": MigrationStatusRunning, - "selectlogins": MigrationStatusSelectLogins, - "sourceandtargetselected": MigrationStatusSourceAndTargetSelected, - "stopped": MigrationStatusStopped, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := MigrationStatus(input) - return &out, nil -} - -type SqlSourcePlatform string - -const ( - SqlSourcePlatformSqlOnPrem SqlSourcePlatform = "SqlOnPrem" -) - -func PossibleValuesForSqlSourcePlatform() []string { - return []string{ - string(SqlSourcePlatformSqlOnPrem), - } -} - -func (s *SqlSourcePlatform) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSqlSourcePlatform(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSqlSourcePlatform(input string) (*SqlSourcePlatform, error) { - vals := map[string]SqlSourcePlatform{ - "sqlonprem": SqlSourcePlatformSqlOnPrem, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SqlSourcePlatform(input) - return &out, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmitasks/model_connectioninfo.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqlmitasks/model_connectioninfo.go deleted file mode 100644 index d693572bb12..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmitasks/model_connectioninfo.go +++ /dev/null @@ -1,53 +0,0 @@ -package migratesqlserversqlmitasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "SqlConnectionInfo") { - var out SqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmitasks/model_migratesqlserversqlmitaskoutput.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqlmitasks/model_migratesqlserversqlmitaskoutput.go deleted file mode 100644 index 0adc1adfe40..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmitasks/model_migratesqlserversqlmitaskoutput.go +++ /dev/null @@ -1,85 +0,0 @@ -package migratesqlserversqlmitasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateSqlServerSqlMITaskOutput interface { -} - -// RawMigrateSqlServerSqlMITaskOutputImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawMigrateSqlServerSqlMITaskOutputImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalMigrateSqlServerSqlMITaskOutputImplementation(input []byte) (MigrateSqlServerSqlMITaskOutput, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlMITaskOutput into map[string]interface: %+v", err) - } - - value, ok := temp["resultType"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "AgentJobLevelOutput") { - var out MigrateSqlServerSqlMITaskOutputAgentJobLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSqlServerSqlMITaskOutputAgentJobLevel: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "DatabaseLevelOutput") { - var out MigrateSqlServerSqlMITaskOutputDatabaseLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSqlServerSqlMITaskOutputDatabaseLevel: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "ErrorOutput") { - var out MigrateSqlServerSqlMITaskOutputError - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSqlServerSqlMITaskOutputError: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "LoginLevelOutput") { - var out MigrateSqlServerSqlMITaskOutputLoginLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSqlServerSqlMITaskOutputLoginLevel: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "MigrationLevelOutput") { - var out MigrateSqlServerSqlMITaskOutputMigrationLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSqlServerSqlMITaskOutputMigrationLevel: %+v", err) - } - return out, nil - } - - out := RawMigrateSqlServerSqlMITaskOutputImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmitasks/model_migratesqlserversqlmitaskoutputagentjoblevel.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqlmitasks/model_migratesqlserversqlmitaskoutputagentjoblevel.go deleted file mode 100644 index 0a5d615e2c9..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmitasks/model_migratesqlserversqlmitaskoutputagentjoblevel.go +++ /dev/null @@ -1,48 +0,0 @@ -package migratesqlserversqlmitasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateSqlServerSqlMITaskOutput = MigrateSqlServerSqlMITaskOutputAgentJobLevel{} - -type MigrateSqlServerSqlMITaskOutputAgentJobLevel struct { - EndedOn *string `json:"endedOn,omitempty"` - ExceptionsAndWarnings *[]ReportableException `json:"exceptionsAndWarnings,omitempty"` - IsEnabled *bool `json:"isEnabled,omitempty"` - Message *string `json:"message,omitempty"` - Name *string `json:"name,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - State *MigrationState `json:"state,omitempty"` - - // Fields inherited from MigrateSqlServerSqlMITaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateSqlServerSqlMITaskOutputAgentJobLevel{} - -func (s MigrateSqlServerSqlMITaskOutputAgentJobLevel) MarshalJSON() ([]byte, error) { - type wrapper MigrateSqlServerSqlMITaskOutputAgentJobLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSqlServerSqlMITaskOutputAgentJobLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlMITaskOutputAgentJobLevel: %+v", err) - } - decoded["resultType"] = "AgentJobLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSqlServerSqlMITaskOutputAgentJobLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmitasks/model_migratesqlserversqlmitaskoutputdatabaselevel.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqlmitasks/model_migratesqlserversqlmitaskoutputdatabaselevel.go deleted file mode 100644 index 7bcc7dc4dfd..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmitasks/model_migratesqlserversqlmitaskoutputdatabaselevel.go +++ /dev/null @@ -1,49 +0,0 @@ -package migratesqlserversqlmitasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateSqlServerSqlMITaskOutput = MigrateSqlServerSqlMITaskOutputDatabaseLevel{} - -type MigrateSqlServerSqlMITaskOutputDatabaseLevel struct { - DatabaseName *string `json:"databaseName,omitempty"` - EndedOn *string `json:"endedOn,omitempty"` - ExceptionsAndWarnings *[]ReportableException `json:"exceptionsAndWarnings,omitempty"` - Message *string `json:"message,omitempty"` - SizeMB *float64 `json:"sizeMB,omitempty"` - Stage *DatabaseMigrationStage `json:"stage,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - State *MigrationState `json:"state,omitempty"` - - // Fields inherited from MigrateSqlServerSqlMITaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateSqlServerSqlMITaskOutputDatabaseLevel{} - -func (s MigrateSqlServerSqlMITaskOutputDatabaseLevel) MarshalJSON() ([]byte, error) { - type wrapper MigrateSqlServerSqlMITaskOutputDatabaseLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSqlServerSqlMITaskOutputDatabaseLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlMITaskOutputDatabaseLevel: %+v", err) - } - decoded["resultType"] = "DatabaseLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSqlServerSqlMITaskOutputDatabaseLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmitasks/model_migratesqlserversqlmitaskoutputerror.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqlmitasks/model_migratesqlserversqlmitaskoutputerror.go deleted file mode 100644 index 30d34369fb1..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmitasks/model_migratesqlserversqlmitaskoutputerror.go +++ /dev/null @@ -1,42 +0,0 @@ -package migratesqlserversqlmitasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateSqlServerSqlMITaskOutput = MigrateSqlServerSqlMITaskOutputError{} - -type MigrateSqlServerSqlMITaskOutputError struct { - Error *ReportableException `json:"error,omitempty"` - - // Fields inherited from MigrateSqlServerSqlMITaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateSqlServerSqlMITaskOutputError{} - -func (s MigrateSqlServerSqlMITaskOutputError) MarshalJSON() ([]byte, error) { - type wrapper MigrateSqlServerSqlMITaskOutputError - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSqlServerSqlMITaskOutputError: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlMITaskOutputError: %+v", err) - } - decoded["resultType"] = "ErrorOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSqlServerSqlMITaskOutputError: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmitasks/model_migratesqlserversqlmitaskoutputloginlevel.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqlmitasks/model_migratesqlserversqlmitaskoutputloginlevel.go deleted file mode 100644 index bfcba90ac11..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmitasks/model_migratesqlserversqlmitaskoutputloginlevel.go +++ /dev/null @@ -1,48 +0,0 @@ -package migratesqlserversqlmitasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateSqlServerSqlMITaskOutput = MigrateSqlServerSqlMITaskOutputLoginLevel{} - -type MigrateSqlServerSqlMITaskOutputLoginLevel struct { - EndedOn *string `json:"endedOn,omitempty"` - ExceptionsAndWarnings *[]ReportableException `json:"exceptionsAndWarnings,omitempty"` - LoginName *string `json:"loginName,omitempty"` - Message *string `json:"message,omitempty"` - Stage *LoginMigrationStage `json:"stage,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - State *MigrationState `json:"state,omitempty"` - - // Fields inherited from MigrateSqlServerSqlMITaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateSqlServerSqlMITaskOutputLoginLevel{} - -func (s MigrateSqlServerSqlMITaskOutputLoginLevel) MarshalJSON() ([]byte, error) { - type wrapper MigrateSqlServerSqlMITaskOutputLoginLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSqlServerSqlMITaskOutputLoginLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlMITaskOutputLoginLevel: %+v", err) - } - decoded["resultType"] = "LoginLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSqlServerSqlMITaskOutputLoginLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmitasks/model_migratesqlserversqlmitaskoutputmigrationlevel.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqlmitasks/model_migratesqlserversqlmitaskoutputmigrationlevel.go deleted file mode 100644 index bc37235d71d..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmitasks/model_migratesqlserversqlmitaskoutputmigrationlevel.go +++ /dev/null @@ -1,56 +0,0 @@ -package migratesqlserversqlmitasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateSqlServerSqlMITaskOutput = MigrateSqlServerSqlMITaskOutputMigrationLevel{} - -type MigrateSqlServerSqlMITaskOutputMigrationLevel struct { - AgentJobs *map[string]string `json:"agentJobs,omitempty"` - Databases *map[string]string `json:"databases,omitempty"` - EndedOn *string `json:"endedOn,omitempty"` - ExceptionsAndWarnings *[]ReportableException `json:"exceptionsAndWarnings,omitempty"` - Logins *map[string]string `json:"logins,omitempty"` - Message *string `json:"message,omitempty"` - OrphanedUsersInfo *[]OrphanedUserInfo `json:"orphanedUsersInfo,omitempty"` - ServerRoleResults *map[string]StartMigrationScenarioServerRoleResult `json:"serverRoleResults,omitempty"` - SourceServerBrandVersion *string `json:"sourceServerBrandVersion,omitempty"` - SourceServerVersion *string `json:"sourceServerVersion,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - State *MigrationState `json:"state,omitempty"` - Status *MigrationStatus `json:"status,omitempty"` - TargetServerBrandVersion *string `json:"targetServerBrandVersion,omitempty"` - TargetServerVersion *string `json:"targetServerVersion,omitempty"` - - // Fields inherited from MigrateSqlServerSqlMITaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateSqlServerSqlMITaskOutputMigrationLevel{} - -func (s MigrateSqlServerSqlMITaskOutputMigrationLevel) MarshalJSON() ([]byte, error) { - type wrapper MigrateSqlServerSqlMITaskOutputMigrationLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSqlServerSqlMITaskOutputMigrationLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlMITaskOutputMigrationLevel: %+v", err) - } - decoded["resultType"] = "MigrationLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSqlServerSqlMITaskOutputMigrationLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmitasks/model_orphaneduserinfo.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqlmitasks/model_orphaneduserinfo.go deleted file mode 100644 index bee0c71717d..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmitasks/model_orphaneduserinfo.go +++ /dev/null @@ -1,9 +0,0 @@ -package migratesqlserversqlmitasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type OrphanedUserInfo struct { - DatabaseName *string `json:"databaseName,omitempty"` - Name *string `json:"name,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmitasks/model_reportableexception.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqlmitasks/model_reportableexception.go deleted file mode 100644 index 4f506e7f5e8..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmitasks/model_reportableexception.go +++ /dev/null @@ -1,13 +0,0 @@ -package migratesqlserversqlmitasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ReportableException struct { - ActionableMessage *string `json:"actionableMessage,omitempty"` - FilePath *string `json:"filePath,omitempty"` - HResult *int64 `json:"hResult,omitempty"` - LineNumber *string `json:"lineNumber,omitempty"` - Message *string `json:"message,omitempty"` - StackTrace *string `json:"stackTrace,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmitasks/model_sqlconnectioninfo.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqlmitasks/model_sqlconnectioninfo.go deleted file mode 100644 index fb3394c9a92..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmitasks/model_sqlconnectioninfo.go +++ /dev/null @@ -1,48 +0,0 @@ -package migratesqlserversqlmitasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = SqlConnectionInfo{} - -type SqlConnectionInfo struct { - AdditionalSettings *string `json:"additionalSettings,omitempty"` - Authentication *AuthenticationType `json:"authentication,omitempty"` - DataSource string `json:"dataSource"` - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Platform *SqlSourcePlatform `json:"platform,omitempty"` - TrustServerCertificate *bool `json:"trustServerCertificate,omitempty"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = SqlConnectionInfo{} - -func (s SqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper SqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SqlConnectionInfo: %+v", err) - } - decoded["type"] = "SqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmitasks/model_startmigrationscenarioserverroleresult.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqlmitasks/model_startmigrationscenarioserverroleresult.go deleted file mode 100644 index 8b5b2427863..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmitasks/model_startmigrationscenarioserverroleresult.go +++ /dev/null @@ -1,10 +0,0 @@ -package migratesqlserversqlmitasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StartMigrationScenarioServerRoleResult struct { - ExceptionsAndWarnings *[]ReportableException `json:"exceptionsAndWarnings,omitempty"` - Name *string `json:"name,omitempty"` - State *MigrationState `json:"state,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmitasks/version.go b/resource-manager/datamigration/2021-06-30/migratesqlserversqlmitasks/version.go deleted file mode 100644 index 50d2bf0bb87..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratesqlserversqlmitasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package migratesqlserversqlmitasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-06-30" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/migratesqlserversqlmitasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2021-06-30/migratessistasks/README.md b/resource-manager/datamigration/2021-06-30/migratessistasks/README.md deleted file mode 100644 index 06dc30ab413..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratessistasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/migratessistasks` Documentation - -The `migratessistasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2021-06-30`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/migratessistasks" -``` - - -### Client Initialization - -```go -client := migratessistasks.NewMigrateSsisTasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2021-06-30/migratessistasks/client.go b/resource-manager/datamigration/2021-06-30/migratessistasks/client.go deleted file mode 100644 index 6819c8bcd0e..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratessistasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package migratessistasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateSsisTasksClient struct { - Client *resourcemanager.Client -} - -func NewMigrateSsisTasksClientWithBaseURI(sdkApi sdkEnv.Api) (*MigrateSsisTasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "migratessistasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating MigrateSsisTasksClient: %+v", err) - } - - return &MigrateSsisTasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratessistasks/constants.go b/resource-manager/datamigration/2021-06-30/migratessistasks/constants.go deleted file mode 100644 index 414e955e8dc..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratessistasks/constants.go +++ /dev/null @@ -1,266 +0,0 @@ -package migratessistasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthenticationType string - -const ( - AuthenticationTypeActiveDirectoryIntegrated AuthenticationType = "ActiveDirectoryIntegrated" - AuthenticationTypeActiveDirectoryPassword AuthenticationType = "ActiveDirectoryPassword" - AuthenticationTypeNone AuthenticationType = "None" - AuthenticationTypeSqlAuthentication AuthenticationType = "SqlAuthentication" - AuthenticationTypeWindowsAuthentication AuthenticationType = "WindowsAuthentication" -) - -func PossibleValuesForAuthenticationType() []string { - return []string{ - string(AuthenticationTypeActiveDirectoryIntegrated), - string(AuthenticationTypeActiveDirectoryPassword), - string(AuthenticationTypeNone), - string(AuthenticationTypeSqlAuthentication), - string(AuthenticationTypeWindowsAuthentication), - } -} - -func (s *AuthenticationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAuthenticationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAuthenticationType(input string) (*AuthenticationType, error) { - vals := map[string]AuthenticationType{ - "activedirectoryintegrated": AuthenticationTypeActiveDirectoryIntegrated, - "activedirectorypassword": AuthenticationTypeActiveDirectoryPassword, - "none": AuthenticationTypeNone, - "sqlauthentication": AuthenticationTypeSqlAuthentication, - "windowsauthentication": AuthenticationTypeWindowsAuthentication, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AuthenticationType(input) - return &out, nil -} - -type MigrationState string - -const ( - MigrationStateCompleted MigrationState = "Completed" - MigrationStateFailed MigrationState = "Failed" - MigrationStateInProgress MigrationState = "InProgress" - MigrationStateNone MigrationState = "None" - MigrationStateSkipped MigrationState = "Skipped" - MigrationStateStopped MigrationState = "Stopped" - MigrationStateWarning MigrationState = "Warning" -) - -func PossibleValuesForMigrationState() []string { - return []string{ - string(MigrationStateCompleted), - string(MigrationStateFailed), - string(MigrationStateInProgress), - string(MigrationStateNone), - string(MigrationStateSkipped), - string(MigrationStateStopped), - string(MigrationStateWarning), - } -} - -func (s *MigrationState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseMigrationState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseMigrationState(input string) (*MigrationState, error) { - vals := map[string]MigrationState{ - "completed": MigrationStateCompleted, - "failed": MigrationStateFailed, - "inprogress": MigrationStateInProgress, - "none": MigrationStateNone, - "skipped": MigrationStateSkipped, - "stopped": MigrationStateStopped, - "warning": MigrationStateWarning, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := MigrationState(input) - return &out, nil -} - -type MigrationStatus string - -const ( - MigrationStatusCompleted MigrationStatus = "Completed" - MigrationStatusCompletedWithWarnings MigrationStatus = "CompletedWithWarnings" - MigrationStatusConfigured MigrationStatus = "Configured" - MigrationStatusConnecting MigrationStatus = "Connecting" - MigrationStatusDefault MigrationStatus = "Default" - MigrationStatusError MigrationStatus = "Error" - MigrationStatusRunning MigrationStatus = "Running" - MigrationStatusSelectLogins MigrationStatus = "SelectLogins" - MigrationStatusSourceAndTargetSelected MigrationStatus = "SourceAndTargetSelected" - MigrationStatusStopped MigrationStatus = "Stopped" -) - -func PossibleValuesForMigrationStatus() []string { - return []string{ - string(MigrationStatusCompleted), - string(MigrationStatusCompletedWithWarnings), - string(MigrationStatusConfigured), - string(MigrationStatusConnecting), - string(MigrationStatusDefault), - string(MigrationStatusError), - string(MigrationStatusRunning), - string(MigrationStatusSelectLogins), - string(MigrationStatusSourceAndTargetSelected), - string(MigrationStatusStopped), - } -} - -func (s *MigrationStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseMigrationStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseMigrationStatus(input string) (*MigrationStatus, error) { - vals := map[string]MigrationStatus{ - "completed": MigrationStatusCompleted, - "completedwithwarnings": MigrationStatusCompletedWithWarnings, - "configured": MigrationStatusConfigured, - "connecting": MigrationStatusConnecting, - "default": MigrationStatusDefault, - "error": MigrationStatusError, - "running": MigrationStatusRunning, - "selectlogins": MigrationStatusSelectLogins, - "sourceandtargetselected": MigrationStatusSourceAndTargetSelected, - "stopped": MigrationStatusStopped, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := MigrationStatus(input) - return &out, nil -} - -type SqlSourcePlatform string - -const ( - SqlSourcePlatformSqlOnPrem SqlSourcePlatform = "SqlOnPrem" -) - -func PossibleValuesForSqlSourcePlatform() []string { - return []string{ - string(SqlSourcePlatformSqlOnPrem), - } -} - -func (s *SqlSourcePlatform) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSqlSourcePlatform(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSqlSourcePlatform(input string) (*SqlSourcePlatform, error) { - vals := map[string]SqlSourcePlatform{ - "sqlonprem": SqlSourcePlatformSqlOnPrem, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SqlSourcePlatform(input) - return &out, nil -} - -type SsisMigrationStage string - -const ( - SsisMigrationStageCompleted SsisMigrationStage = "Completed" - SsisMigrationStageInProgress SsisMigrationStage = "InProgress" - SsisMigrationStageInitialize SsisMigrationStage = "Initialize" - SsisMigrationStageNone SsisMigrationStage = "None" -) - -func PossibleValuesForSsisMigrationStage() []string { - return []string{ - string(SsisMigrationStageCompleted), - string(SsisMigrationStageInProgress), - string(SsisMigrationStageInitialize), - string(SsisMigrationStageNone), - } -} - -func (s *SsisMigrationStage) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSsisMigrationStage(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSsisMigrationStage(input string) (*SsisMigrationStage, error) { - vals := map[string]SsisMigrationStage{ - "completed": SsisMigrationStageCompleted, - "inprogress": SsisMigrationStageInProgress, - "initialize": SsisMigrationStageInitialize, - "none": SsisMigrationStageNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SsisMigrationStage(input) - return &out, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratessistasks/model_connectioninfo.go b/resource-manager/datamigration/2021-06-30/migratessistasks/model_connectioninfo.go deleted file mode 100644 index ab9e22a1e9c..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratessistasks/model_connectioninfo.go +++ /dev/null @@ -1,53 +0,0 @@ -package migratessistasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "SqlConnectionInfo") { - var out SqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2021-06-30/migratessistasks/model_migratessistaskoutput.go b/resource-manager/datamigration/2021-06-30/migratessistasks/model_migratessistaskoutput.go deleted file mode 100644 index 951a8229fb2..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratessistasks/model_migratessistaskoutput.go +++ /dev/null @@ -1,61 +0,0 @@ -package migratessistasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateSsisTaskOutput interface { -} - -// RawMigrateSsisTaskOutputImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawMigrateSsisTaskOutputImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalMigrateSsisTaskOutputImplementation(input []byte) (MigrateSsisTaskOutput, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSsisTaskOutput into map[string]interface: %+v", err) - } - - value, ok := temp["resultType"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "MigrationLevelOutput") { - var out MigrateSsisTaskOutputMigrationLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSsisTaskOutputMigrationLevel: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "SsisProjectLevelOutput") { - var out MigrateSsisTaskOutputProjectLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSsisTaskOutputProjectLevel: %+v", err) - } - return out, nil - } - - out := RawMigrateSsisTaskOutputImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2021-06-30/migratessistasks/model_migratessistaskoutputmigrationlevel.go b/resource-manager/datamigration/2021-06-30/migratessistasks/model_migratessistaskoutputmigrationlevel.go deleted file mode 100644 index 1ccfb33f3c8..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratessistasks/model_migratessistaskoutputmigrationlevel.go +++ /dev/null @@ -1,51 +0,0 @@ -package migratessistasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateSsisTaskOutput = MigrateSsisTaskOutputMigrationLevel{} - -type MigrateSsisTaskOutputMigrationLevel struct { - EndedOn *string `json:"endedOn,omitempty"` - ExceptionsAndWarnings *[]ReportableException `json:"exceptionsAndWarnings,omitempty"` - Message *string `json:"message,omitempty"` - SourceServerBrandVersion *string `json:"sourceServerBrandVersion,omitempty"` - SourceServerVersion *string `json:"sourceServerVersion,omitempty"` - Stage *SsisMigrationStage `json:"stage,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - Status *MigrationStatus `json:"status,omitempty"` - TargetServerBrandVersion *string `json:"targetServerBrandVersion,omitempty"` - TargetServerVersion *string `json:"targetServerVersion,omitempty"` - - // Fields inherited from MigrateSsisTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateSsisTaskOutputMigrationLevel{} - -func (s MigrateSsisTaskOutputMigrationLevel) MarshalJSON() ([]byte, error) { - type wrapper MigrateSsisTaskOutputMigrationLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSsisTaskOutputMigrationLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSsisTaskOutputMigrationLevel: %+v", err) - } - decoded["resultType"] = "MigrationLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSsisTaskOutputMigrationLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratessistasks/model_migratessistaskoutputprojectlevel.go b/resource-manager/datamigration/2021-06-30/migratessistasks/model_migratessistaskoutputprojectlevel.go deleted file mode 100644 index 99696d38043..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratessistasks/model_migratessistaskoutputprojectlevel.go +++ /dev/null @@ -1,49 +0,0 @@ -package migratessistasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateSsisTaskOutput = MigrateSsisTaskOutputProjectLevel{} - -type MigrateSsisTaskOutputProjectLevel struct { - EndedOn *string `json:"endedOn,omitempty"` - ExceptionsAndWarnings *[]ReportableException `json:"exceptionsAndWarnings,omitempty"` - FolderName *string `json:"folderName,omitempty"` - Message *string `json:"message,omitempty"` - ProjectName *string `json:"projectName,omitempty"` - Stage *SsisMigrationStage `json:"stage,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - State *MigrationState `json:"state,omitempty"` - - // Fields inherited from MigrateSsisTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateSsisTaskOutputProjectLevel{} - -func (s MigrateSsisTaskOutputProjectLevel) MarshalJSON() ([]byte, error) { - type wrapper MigrateSsisTaskOutputProjectLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSsisTaskOutputProjectLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSsisTaskOutputProjectLevel: %+v", err) - } - decoded["resultType"] = "SsisProjectLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSsisTaskOutputProjectLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratessistasks/model_reportableexception.go b/resource-manager/datamigration/2021-06-30/migratessistasks/model_reportableexception.go deleted file mode 100644 index f10d6967db5..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratessistasks/model_reportableexception.go +++ /dev/null @@ -1,13 +0,0 @@ -package migratessistasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ReportableException struct { - ActionableMessage *string `json:"actionableMessage,omitempty"` - FilePath *string `json:"filePath,omitempty"` - HResult *int64 `json:"hResult,omitempty"` - LineNumber *string `json:"lineNumber,omitempty"` - Message *string `json:"message,omitempty"` - StackTrace *string `json:"stackTrace,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/migratessistasks/model_sqlconnectioninfo.go b/resource-manager/datamigration/2021-06-30/migratessistasks/model_sqlconnectioninfo.go deleted file mode 100644 index f3733ef88bd..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratessistasks/model_sqlconnectioninfo.go +++ /dev/null @@ -1,48 +0,0 @@ -package migratessistasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = SqlConnectionInfo{} - -type SqlConnectionInfo struct { - AdditionalSettings *string `json:"additionalSettings,omitempty"` - Authentication *AuthenticationType `json:"authentication,omitempty"` - DataSource string `json:"dataSource"` - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Platform *SqlSourcePlatform `json:"platform,omitempty"` - TrustServerCertificate *bool `json:"trustServerCertificate,omitempty"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = SqlConnectionInfo{} - -func (s SqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper SqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SqlConnectionInfo: %+v", err) - } - decoded["type"] = "SqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/migratessistasks/version.go b/resource-manager/datamigration/2021-06-30/migratessistasks/version.go deleted file mode 100644 index dc673507b43..00000000000 --- a/resource-manager/datamigration/2021-06-30/migratessistasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package migratessistasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-06-30" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/migratessistasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2021-06-30/mongodbtasks/README.md b/resource-manager/datamigration/2021-06-30/mongodbtasks/README.md deleted file mode 100644 index eff37324e77..00000000000 --- a/resource-manager/datamigration/2021-06-30/mongodbtasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/mongodbtasks` Documentation - -The `mongodbtasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2021-06-30`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/mongodbtasks" -``` - - -### Client Initialization - -```go -client := mongodbtasks.NewMongoDbTasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2021-06-30/mongodbtasks/client.go b/resource-manager/datamigration/2021-06-30/mongodbtasks/client.go deleted file mode 100644 index 7773a1540b9..00000000000 --- a/resource-manager/datamigration/2021-06-30/mongodbtasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package mongodbtasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MongoDbTasksClient struct { - Client *resourcemanager.Client -} - -func NewMongoDbTasksClientWithBaseURI(sdkApi sdkEnv.Api) (*MongoDbTasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "mongodbtasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating MongoDbTasksClient: %+v", err) - } - - return &MongoDbTasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2021-06-30/mongodbtasks/constants.go b/resource-manager/datamigration/2021-06-30/mongodbtasks/constants.go deleted file mode 100644 index 9a93d74c8ac..00000000000 --- a/resource-manager/datamigration/2021-06-30/mongodbtasks/constants.go +++ /dev/null @@ -1,216 +0,0 @@ -package mongodbtasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CommandState string - -const ( - CommandStateAccepted CommandState = "Accepted" - CommandStateFailed CommandState = "Failed" - CommandStateRunning CommandState = "Running" - CommandStateSucceeded CommandState = "Succeeded" - CommandStateUnknown CommandState = "Unknown" -) - -func PossibleValuesForCommandState() []string { - return []string{ - string(CommandStateAccepted), - string(CommandStateFailed), - string(CommandStateRunning), - string(CommandStateSucceeded), - string(CommandStateUnknown), - } -} - -func (s *CommandState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseCommandState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseCommandState(input string) (*CommandState, error) { - vals := map[string]CommandState{ - "accepted": CommandStateAccepted, - "failed": CommandStateFailed, - "running": CommandStateRunning, - "succeeded": CommandStateSucceeded, - "unknown": CommandStateUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := CommandState(input) - return &out, nil -} - -type MongoDbErrorType string - -const ( - MongoDbErrorTypeError MongoDbErrorType = "Error" - MongoDbErrorTypeValidationError MongoDbErrorType = "ValidationError" - MongoDbErrorTypeWarning MongoDbErrorType = "Warning" -) - -func PossibleValuesForMongoDbErrorType() []string { - return []string{ - string(MongoDbErrorTypeError), - string(MongoDbErrorTypeValidationError), - string(MongoDbErrorTypeWarning), - } -} - -func (s *MongoDbErrorType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseMongoDbErrorType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseMongoDbErrorType(input string) (*MongoDbErrorType, error) { - vals := map[string]MongoDbErrorType{ - "error": MongoDbErrorTypeError, - "validationerror": MongoDbErrorTypeValidationError, - "warning": MongoDbErrorTypeWarning, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := MongoDbErrorType(input) - return &out, nil -} - -type MongoDbMigrationState string - -const ( - MongoDbMigrationStateCanceled MongoDbMigrationState = "Canceled" - MongoDbMigrationStateComplete MongoDbMigrationState = "Complete" - MongoDbMigrationStateCopying MongoDbMigrationState = "Copying" - MongoDbMigrationStateFailed MongoDbMigrationState = "Failed" - MongoDbMigrationStateFinalizing MongoDbMigrationState = "Finalizing" - MongoDbMigrationStateInitialReplay MongoDbMigrationState = "InitialReplay" - MongoDbMigrationStateInitializing MongoDbMigrationState = "Initializing" - MongoDbMigrationStateNotStarted MongoDbMigrationState = "NotStarted" - MongoDbMigrationStateReplaying MongoDbMigrationState = "Replaying" - MongoDbMigrationStateRestarting MongoDbMigrationState = "Restarting" - MongoDbMigrationStateValidatingInput MongoDbMigrationState = "ValidatingInput" -) - -func PossibleValuesForMongoDbMigrationState() []string { - return []string{ - string(MongoDbMigrationStateCanceled), - string(MongoDbMigrationStateComplete), - string(MongoDbMigrationStateCopying), - string(MongoDbMigrationStateFailed), - string(MongoDbMigrationStateFinalizing), - string(MongoDbMigrationStateInitialReplay), - string(MongoDbMigrationStateInitializing), - string(MongoDbMigrationStateNotStarted), - string(MongoDbMigrationStateReplaying), - string(MongoDbMigrationStateRestarting), - string(MongoDbMigrationStateValidatingInput), - } -} - -func (s *MongoDbMigrationState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseMongoDbMigrationState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseMongoDbMigrationState(input string) (*MongoDbMigrationState, error) { - vals := map[string]MongoDbMigrationState{ - "canceled": MongoDbMigrationStateCanceled, - "complete": MongoDbMigrationStateComplete, - "copying": MongoDbMigrationStateCopying, - "failed": MongoDbMigrationStateFailed, - "finalizing": MongoDbMigrationStateFinalizing, - "initialreplay": MongoDbMigrationStateInitialReplay, - "initializing": MongoDbMigrationStateInitializing, - "notstarted": MongoDbMigrationStateNotStarted, - "replaying": MongoDbMigrationStateReplaying, - "restarting": MongoDbMigrationStateRestarting, - "validatinginput": MongoDbMigrationStateValidatingInput, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := MongoDbMigrationState(input) - return &out, nil -} - -type ResultType string - -const ( - ResultTypeCollection ResultType = "Collection" - ResultTypeDatabase ResultType = "Database" - ResultTypeMigration ResultType = "Migration" -) - -func PossibleValuesForResultType() []string { - return []string{ - string(ResultTypeCollection), - string(ResultTypeDatabase), - string(ResultTypeMigration), - } -} - -func (s *ResultType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseResultType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseResultType(input string) (*ResultType, error) { - vals := map[string]ResultType{ - "collection": ResultTypeCollection, - "database": ResultTypeDatabase, - "migration": ResultTypeMigration, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ResultType(input) - return &out, nil -} diff --git a/resource-manager/datamigration/2021-06-30/mongodbtasks/model_commandproperties.go b/resource-manager/datamigration/2021-06-30/mongodbtasks/model_commandproperties.go deleted file mode 100644 index a0d57b2dc76..00000000000 --- a/resource-manager/datamigration/2021-06-30/mongodbtasks/model_commandproperties.go +++ /dev/null @@ -1,69 +0,0 @@ -package mongodbtasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CommandProperties interface { -} - -// RawCommandPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawCommandPropertiesImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalCommandPropertiesImplementation(input []byte) (CommandProperties, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling CommandProperties into map[string]interface: %+v", err) - } - - value, ok := temp["commandType"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "cancel") { - var out MongoDbCancelCommand - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MongoDbCancelCommand: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "finish") { - var out MongoDbFinishCommand - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MongoDbFinishCommand: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "restart") { - var out MongoDbRestartCommand - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MongoDbRestartCommand: %+v", err) - } - return out, nil - } - - out := RawCommandPropertiesImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2021-06-30/mongodbtasks/model_mongodbcancelcommand.go b/resource-manager/datamigration/2021-06-30/mongodbtasks/model_mongodbcancelcommand.go deleted file mode 100644 index b25a77ad309..00000000000 --- a/resource-manager/datamigration/2021-06-30/mongodbtasks/model_mongodbcancelcommand.go +++ /dev/null @@ -1,43 +0,0 @@ -package mongodbtasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ CommandProperties = MongoDbCancelCommand{} - -type MongoDbCancelCommand struct { - Input *MongoDbCommandInput `json:"input,omitempty"` - - // Fields inherited from CommandProperties - Errors *[]ODataError `json:"errors,omitempty"` - State *CommandState `json:"state,omitempty"` -} - -var _ json.Marshaler = MongoDbCancelCommand{} - -func (s MongoDbCancelCommand) MarshalJSON() ([]byte, error) { - type wrapper MongoDbCancelCommand - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MongoDbCancelCommand: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MongoDbCancelCommand: %+v", err) - } - decoded["commandType"] = "cancel" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MongoDbCancelCommand: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/mongodbtasks/model_mongodbcollectionprogress.go b/resource-manager/datamigration/2021-06-30/mongodbtasks/model_mongodbcollectionprogress.go deleted file mode 100644 index 6db23027256..00000000000 --- a/resource-manager/datamigration/2021-06-30/mongodbtasks/model_mongodbcollectionprogress.go +++ /dev/null @@ -1,80 +0,0 @@ -package mongodbtasks - -import ( - "encoding/json" - "fmt" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MongoDbProgress = MongoDbCollectionProgress{} - -type MongoDbCollectionProgress struct { - - // Fields inherited from MongoDbProgress - BytesCopied int64 `json:"bytesCopied"` - DocumentsCopied int64 `json:"documentsCopied"` - ElapsedTime string `json:"elapsedTime"` - Errors map[string]MongoDbError `json:"errors"` - EventsPending int64 `json:"eventsPending"` - EventsReplayed int64 `json:"eventsReplayed"` - LastEventTime *string `json:"lastEventTime,omitempty"` - LastReplayTime *string `json:"lastReplayTime,omitempty"` - Name *string `json:"name,omitempty"` - QualifiedName *string `json:"qualifiedName,omitempty"` - State MongoDbMigrationState `json:"state"` - TotalBytes int64 `json:"totalBytes"` - TotalDocuments int64 `json:"totalDocuments"` -} - -func (o *MongoDbCollectionProgress) GetLastEventTimeAsTime() (*time.Time, error) { - if o.LastEventTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastEventTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *MongoDbCollectionProgress) SetLastEventTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastEventTime = &formatted -} - -func (o *MongoDbCollectionProgress) GetLastReplayTimeAsTime() (*time.Time, error) { - if o.LastReplayTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastReplayTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *MongoDbCollectionProgress) SetLastReplayTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastReplayTime = &formatted -} - -var _ json.Marshaler = MongoDbCollectionProgress{} - -func (s MongoDbCollectionProgress) MarshalJSON() ([]byte, error) { - type wrapper MongoDbCollectionProgress - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MongoDbCollectionProgress: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MongoDbCollectionProgress: %+v", err) - } - decoded["resultType"] = "Collection" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MongoDbCollectionProgress: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/mongodbtasks/model_mongodbcommandinput.go b/resource-manager/datamigration/2021-06-30/mongodbtasks/model_mongodbcommandinput.go deleted file mode 100644 index 843ff9a78d5..00000000000 --- a/resource-manager/datamigration/2021-06-30/mongodbtasks/model_mongodbcommandinput.go +++ /dev/null @@ -1,8 +0,0 @@ -package mongodbtasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MongoDbCommandInput struct { - ObjectName *string `json:"objectName,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/mongodbtasks/model_mongodbdatabaseprogress.go b/resource-manager/datamigration/2021-06-30/mongodbtasks/model_mongodbdatabaseprogress.go deleted file mode 100644 index abbcdb7c51c..00000000000 --- a/resource-manager/datamigration/2021-06-30/mongodbtasks/model_mongodbdatabaseprogress.go +++ /dev/null @@ -1,128 +0,0 @@ -package mongodbtasks - -import ( - "encoding/json" - "fmt" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MongoDbProgress = MongoDbDatabaseProgress{} - -type MongoDbDatabaseProgress struct { - Collections *map[string]MongoDbProgress `json:"collections,omitempty"` - - // Fields inherited from MongoDbProgress - BytesCopied int64 `json:"bytesCopied"` - DocumentsCopied int64 `json:"documentsCopied"` - ElapsedTime string `json:"elapsedTime"` - Errors map[string]MongoDbError `json:"errors"` - EventsPending int64 `json:"eventsPending"` - EventsReplayed int64 `json:"eventsReplayed"` - LastEventTime *string `json:"lastEventTime,omitempty"` - LastReplayTime *string `json:"lastReplayTime,omitempty"` - Name *string `json:"name,omitempty"` - QualifiedName *string `json:"qualifiedName,omitempty"` - State MongoDbMigrationState `json:"state"` - TotalBytes int64 `json:"totalBytes"` - TotalDocuments int64 `json:"totalDocuments"` -} - -func (o *MongoDbDatabaseProgress) GetLastEventTimeAsTime() (*time.Time, error) { - if o.LastEventTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastEventTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *MongoDbDatabaseProgress) SetLastEventTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastEventTime = &formatted -} - -func (o *MongoDbDatabaseProgress) GetLastReplayTimeAsTime() (*time.Time, error) { - if o.LastReplayTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastReplayTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *MongoDbDatabaseProgress) SetLastReplayTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastReplayTime = &formatted -} - -var _ json.Marshaler = MongoDbDatabaseProgress{} - -func (s MongoDbDatabaseProgress) MarshalJSON() ([]byte, error) { - type wrapper MongoDbDatabaseProgress - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MongoDbDatabaseProgress: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MongoDbDatabaseProgress: %+v", err) - } - decoded["resultType"] = "Database" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MongoDbDatabaseProgress: %+v", err) - } - - return encoded, nil -} - -var _ json.Unmarshaler = &MongoDbDatabaseProgress{} - -func (s *MongoDbDatabaseProgress) UnmarshalJSON(bytes []byte) error { - type alias MongoDbDatabaseProgress - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into MongoDbDatabaseProgress: %+v", err) - } - - s.BytesCopied = decoded.BytesCopied - s.DocumentsCopied = decoded.DocumentsCopied - s.ElapsedTime = decoded.ElapsedTime - s.Errors = decoded.Errors - s.EventsPending = decoded.EventsPending - s.EventsReplayed = decoded.EventsReplayed - s.LastEventTime = decoded.LastEventTime - s.LastReplayTime = decoded.LastReplayTime - s.Name = decoded.Name - s.QualifiedName = decoded.QualifiedName - s.State = decoded.State - s.TotalBytes = decoded.TotalBytes - s.TotalDocuments = decoded.TotalDocuments - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling MongoDbDatabaseProgress into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["collections"]; ok { - var dictionaryTemp map[string]json.RawMessage - if err := json.Unmarshal(v, &dictionaryTemp); err != nil { - return fmt.Errorf("unmarshaling Collections into dictionary map[string]json.RawMessage: %+v", err) - } - - output := make(map[string]MongoDbProgress) - for key, val := range dictionaryTemp { - impl, err := unmarshalMongoDbProgressImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling key %q field 'Collections' for 'MongoDbDatabaseProgress': %+v", key, err) - } - output[key] = impl - } - s.Collections = &output - } - return nil -} diff --git a/resource-manager/datamigration/2021-06-30/mongodbtasks/model_mongodberror.go b/resource-manager/datamigration/2021-06-30/mongodbtasks/model_mongodberror.go deleted file mode 100644 index 769d2851b27..00000000000 --- a/resource-manager/datamigration/2021-06-30/mongodbtasks/model_mongodberror.go +++ /dev/null @@ -1,11 +0,0 @@ -package mongodbtasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MongoDbError struct { - Code *string `json:"code,omitempty"` - Count *int64 `json:"count,omitempty"` - Message *string `json:"message,omitempty"` - Type *MongoDbErrorType `json:"type,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/mongodbtasks/model_mongodbfinishcommand.go b/resource-manager/datamigration/2021-06-30/mongodbtasks/model_mongodbfinishcommand.go deleted file mode 100644 index 3e9bae70f1d..00000000000 --- a/resource-manager/datamigration/2021-06-30/mongodbtasks/model_mongodbfinishcommand.go +++ /dev/null @@ -1,43 +0,0 @@ -package mongodbtasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ CommandProperties = MongoDbFinishCommand{} - -type MongoDbFinishCommand struct { - Input *MongoDbFinishCommandInput `json:"input,omitempty"` - - // Fields inherited from CommandProperties - Errors *[]ODataError `json:"errors,omitempty"` - State *CommandState `json:"state,omitempty"` -} - -var _ json.Marshaler = MongoDbFinishCommand{} - -func (s MongoDbFinishCommand) MarshalJSON() ([]byte, error) { - type wrapper MongoDbFinishCommand - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MongoDbFinishCommand: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MongoDbFinishCommand: %+v", err) - } - decoded["commandType"] = "finish" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MongoDbFinishCommand: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/mongodbtasks/model_mongodbfinishcommandinput.go b/resource-manager/datamigration/2021-06-30/mongodbtasks/model_mongodbfinishcommandinput.go deleted file mode 100644 index 69da4b035d3..00000000000 --- a/resource-manager/datamigration/2021-06-30/mongodbtasks/model_mongodbfinishcommandinput.go +++ /dev/null @@ -1,9 +0,0 @@ -package mongodbtasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MongoDbFinishCommandInput struct { - Immediate bool `json:"immediate"` - ObjectName *string `json:"objectName,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/mongodbtasks/model_mongodbmigrationprogress.go b/resource-manager/datamigration/2021-06-30/mongodbtasks/model_mongodbmigrationprogress.go deleted file mode 100644 index 7e9415a6b5d..00000000000 --- a/resource-manager/datamigration/2021-06-30/mongodbtasks/model_mongodbmigrationprogress.go +++ /dev/null @@ -1,81 +0,0 @@ -package mongodbtasks - -import ( - "encoding/json" - "fmt" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MongoDbProgress = MongoDbMigrationProgress{} - -type MongoDbMigrationProgress struct { - Databases *map[string]MongoDbDatabaseProgress `json:"databases,omitempty"` - - // Fields inherited from MongoDbProgress - BytesCopied int64 `json:"bytesCopied"` - DocumentsCopied int64 `json:"documentsCopied"` - ElapsedTime string `json:"elapsedTime"` - Errors map[string]MongoDbError `json:"errors"` - EventsPending int64 `json:"eventsPending"` - EventsReplayed int64 `json:"eventsReplayed"` - LastEventTime *string `json:"lastEventTime,omitempty"` - LastReplayTime *string `json:"lastReplayTime,omitempty"` - Name *string `json:"name,omitempty"` - QualifiedName *string `json:"qualifiedName,omitempty"` - State MongoDbMigrationState `json:"state"` - TotalBytes int64 `json:"totalBytes"` - TotalDocuments int64 `json:"totalDocuments"` -} - -func (o *MongoDbMigrationProgress) GetLastEventTimeAsTime() (*time.Time, error) { - if o.LastEventTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastEventTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *MongoDbMigrationProgress) SetLastEventTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastEventTime = &formatted -} - -func (o *MongoDbMigrationProgress) GetLastReplayTimeAsTime() (*time.Time, error) { - if o.LastReplayTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastReplayTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *MongoDbMigrationProgress) SetLastReplayTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastReplayTime = &formatted -} - -var _ json.Marshaler = MongoDbMigrationProgress{} - -func (s MongoDbMigrationProgress) MarshalJSON() ([]byte, error) { - type wrapper MongoDbMigrationProgress - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MongoDbMigrationProgress: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MongoDbMigrationProgress: %+v", err) - } - decoded["resultType"] = "Migration" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MongoDbMigrationProgress: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/mongodbtasks/model_mongodbprogress.go b/resource-manager/datamigration/2021-06-30/mongodbtasks/model_mongodbprogress.go deleted file mode 100644 index 8da9b958106..00000000000 --- a/resource-manager/datamigration/2021-06-30/mongodbtasks/model_mongodbprogress.go +++ /dev/null @@ -1,69 +0,0 @@ -package mongodbtasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MongoDbProgress interface { -} - -// RawMongoDbProgressImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawMongoDbProgressImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalMongoDbProgressImplementation(input []byte) (MongoDbProgress, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling MongoDbProgress into map[string]interface: %+v", err) - } - - value, ok := temp["resultType"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "Collection") { - var out MongoDbCollectionProgress - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MongoDbCollectionProgress: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Database") { - var out MongoDbDatabaseProgress - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MongoDbDatabaseProgress: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Migration") { - var out MongoDbMigrationProgress - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MongoDbMigrationProgress: %+v", err) - } - return out, nil - } - - out := RawMongoDbProgressImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2021-06-30/mongodbtasks/model_mongodbrestartcommand.go b/resource-manager/datamigration/2021-06-30/mongodbtasks/model_mongodbrestartcommand.go deleted file mode 100644 index bf9c129aff6..00000000000 --- a/resource-manager/datamigration/2021-06-30/mongodbtasks/model_mongodbrestartcommand.go +++ /dev/null @@ -1,43 +0,0 @@ -package mongodbtasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ CommandProperties = MongoDbRestartCommand{} - -type MongoDbRestartCommand struct { - Input *MongoDbCommandInput `json:"input,omitempty"` - - // Fields inherited from CommandProperties - Errors *[]ODataError `json:"errors,omitempty"` - State *CommandState `json:"state,omitempty"` -} - -var _ json.Marshaler = MongoDbRestartCommand{} - -func (s MongoDbRestartCommand) MarshalJSON() ([]byte, error) { - type wrapper MongoDbRestartCommand - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MongoDbRestartCommand: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MongoDbRestartCommand: %+v", err) - } - decoded["commandType"] = "restart" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MongoDbRestartCommand: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/mongodbtasks/model_odataerror.go b/resource-manager/datamigration/2021-06-30/mongodbtasks/model_odataerror.go deleted file mode 100644 index 472b2f87499..00000000000 --- a/resource-manager/datamigration/2021-06-30/mongodbtasks/model_odataerror.go +++ /dev/null @@ -1,10 +0,0 @@ -package mongodbtasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ODataError struct { - Code *string `json:"code,omitempty"` - Details *[]ODataError `json:"details,omitempty"` - Message *string `json:"message,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/mongodbtasks/version.go b/resource-manager/datamigration/2021-06-30/mongodbtasks/version.go deleted file mode 100644 index 91cb2196ecf..00000000000 --- a/resource-manager/datamigration/2021-06-30/mongodbtasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package mongodbtasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-06-30" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/mongodbtasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2021-06-30/oracleazuredbpostgresqlsynctasks/README.md b/resource-manager/datamigration/2021-06-30/oracleazuredbpostgresqlsynctasks/README.md deleted file mode 100644 index a68beed560b..00000000000 --- a/resource-manager/datamigration/2021-06-30/oracleazuredbpostgresqlsynctasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/oracleazuredbpostgresqlsynctasks` Documentation - -The `oracleazuredbpostgresqlsynctasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2021-06-30`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/oracleazuredbpostgresqlsynctasks" -``` - - -### Client Initialization - -```go -client := oracleazuredbpostgresqlsynctasks.NewOracleAzureDbPostgreSqlSyncTasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2021-06-30/oracleazuredbpostgresqlsynctasks/client.go b/resource-manager/datamigration/2021-06-30/oracleazuredbpostgresqlsynctasks/client.go deleted file mode 100644 index dc8e204e5a3..00000000000 --- a/resource-manager/datamigration/2021-06-30/oracleazuredbpostgresqlsynctasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package oracleazuredbpostgresqlsynctasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type OracleAzureDbPostgreSqlSyncTasksClient struct { - Client *resourcemanager.Client -} - -func NewOracleAzureDbPostgreSqlSyncTasksClientWithBaseURI(sdkApi sdkEnv.Api) (*OracleAzureDbPostgreSqlSyncTasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "oracleazuredbpostgresqlsynctasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating OracleAzureDbPostgreSqlSyncTasksClient: %+v", err) - } - - return &OracleAzureDbPostgreSqlSyncTasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2021-06-30/oracleazuredbpostgresqlsynctasks/constants.go b/resource-manager/datamigration/2021-06-30/oracleazuredbpostgresqlsynctasks/constants.go deleted file mode 100644 index 3161a9ae6ad..00000000000 --- a/resource-manager/datamigration/2021-06-30/oracleazuredbpostgresqlsynctasks/constants.go +++ /dev/null @@ -1,152 +0,0 @@ -package oracleazuredbpostgresqlsynctasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SyncDatabaseMigrationReportingState string - -const ( - SyncDatabaseMigrationReportingStateBACKUPCOMPLETED SyncDatabaseMigrationReportingState = "BACKUP_COMPLETED" - SyncDatabaseMigrationReportingStateBACKUPINPROGRESS SyncDatabaseMigrationReportingState = "BACKUP_IN_PROGRESS" - SyncDatabaseMigrationReportingStateCANCELLED SyncDatabaseMigrationReportingState = "CANCELLED" - SyncDatabaseMigrationReportingStateCANCELLING SyncDatabaseMigrationReportingState = "CANCELLING" - SyncDatabaseMigrationReportingStateCOMPLETE SyncDatabaseMigrationReportingState = "COMPLETE" - SyncDatabaseMigrationReportingStateCOMPLETING SyncDatabaseMigrationReportingState = "COMPLETING" - SyncDatabaseMigrationReportingStateCONFIGURING SyncDatabaseMigrationReportingState = "CONFIGURING" - SyncDatabaseMigrationReportingStateFAILED SyncDatabaseMigrationReportingState = "FAILED" - SyncDatabaseMigrationReportingStateINITIALIAZING SyncDatabaseMigrationReportingState = "INITIALIAZING" - SyncDatabaseMigrationReportingStateREADYTOCOMPLETE SyncDatabaseMigrationReportingState = "READY_TO_COMPLETE" - SyncDatabaseMigrationReportingStateRESTORECOMPLETED SyncDatabaseMigrationReportingState = "RESTORE_COMPLETED" - SyncDatabaseMigrationReportingStateRESTOREINPROGRESS SyncDatabaseMigrationReportingState = "RESTORE_IN_PROGRESS" - SyncDatabaseMigrationReportingStateRUNNING SyncDatabaseMigrationReportingState = "RUNNING" - SyncDatabaseMigrationReportingStateSTARTING SyncDatabaseMigrationReportingState = "STARTING" - SyncDatabaseMigrationReportingStateUNDEFINED SyncDatabaseMigrationReportingState = "UNDEFINED" - SyncDatabaseMigrationReportingStateVALIDATING SyncDatabaseMigrationReportingState = "VALIDATING" - SyncDatabaseMigrationReportingStateVALIDATIONCOMPLETE SyncDatabaseMigrationReportingState = "VALIDATION_COMPLETE" - SyncDatabaseMigrationReportingStateVALIDATIONFAILED SyncDatabaseMigrationReportingState = "VALIDATION_FAILED" -) - -func PossibleValuesForSyncDatabaseMigrationReportingState() []string { - return []string{ - string(SyncDatabaseMigrationReportingStateBACKUPCOMPLETED), - string(SyncDatabaseMigrationReportingStateBACKUPINPROGRESS), - string(SyncDatabaseMigrationReportingStateCANCELLED), - string(SyncDatabaseMigrationReportingStateCANCELLING), - string(SyncDatabaseMigrationReportingStateCOMPLETE), - string(SyncDatabaseMigrationReportingStateCOMPLETING), - string(SyncDatabaseMigrationReportingStateCONFIGURING), - string(SyncDatabaseMigrationReportingStateFAILED), - string(SyncDatabaseMigrationReportingStateINITIALIAZING), - string(SyncDatabaseMigrationReportingStateREADYTOCOMPLETE), - string(SyncDatabaseMigrationReportingStateRESTORECOMPLETED), - string(SyncDatabaseMigrationReportingStateRESTOREINPROGRESS), - string(SyncDatabaseMigrationReportingStateRUNNING), - string(SyncDatabaseMigrationReportingStateSTARTING), - string(SyncDatabaseMigrationReportingStateUNDEFINED), - string(SyncDatabaseMigrationReportingStateVALIDATING), - string(SyncDatabaseMigrationReportingStateVALIDATIONCOMPLETE), - string(SyncDatabaseMigrationReportingStateVALIDATIONFAILED), - } -} - -func (s *SyncDatabaseMigrationReportingState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSyncDatabaseMigrationReportingState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSyncDatabaseMigrationReportingState(input string) (*SyncDatabaseMigrationReportingState, error) { - vals := map[string]SyncDatabaseMigrationReportingState{ - "backup_completed": SyncDatabaseMigrationReportingStateBACKUPCOMPLETED, - "backup_in_progress": SyncDatabaseMigrationReportingStateBACKUPINPROGRESS, - "cancelled": SyncDatabaseMigrationReportingStateCANCELLED, - "cancelling": SyncDatabaseMigrationReportingStateCANCELLING, - "complete": SyncDatabaseMigrationReportingStateCOMPLETE, - "completing": SyncDatabaseMigrationReportingStateCOMPLETING, - "configuring": SyncDatabaseMigrationReportingStateCONFIGURING, - "failed": SyncDatabaseMigrationReportingStateFAILED, - "initialiazing": SyncDatabaseMigrationReportingStateINITIALIAZING, - "ready_to_complete": SyncDatabaseMigrationReportingStateREADYTOCOMPLETE, - "restore_completed": SyncDatabaseMigrationReportingStateRESTORECOMPLETED, - "restore_in_progress": SyncDatabaseMigrationReportingStateRESTOREINPROGRESS, - "running": SyncDatabaseMigrationReportingStateRUNNING, - "starting": SyncDatabaseMigrationReportingStateSTARTING, - "undefined": SyncDatabaseMigrationReportingStateUNDEFINED, - "validating": SyncDatabaseMigrationReportingStateVALIDATING, - "validation_complete": SyncDatabaseMigrationReportingStateVALIDATIONCOMPLETE, - "validation_failed": SyncDatabaseMigrationReportingStateVALIDATIONFAILED, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SyncDatabaseMigrationReportingState(input) - return &out, nil -} - -type SyncTableMigrationState string - -const ( - SyncTableMigrationStateBEFORELOAD SyncTableMigrationState = "BEFORE_LOAD" - SyncTableMigrationStateCANCELED SyncTableMigrationState = "CANCELED" - SyncTableMigrationStateCOMPLETED SyncTableMigrationState = "COMPLETED" - SyncTableMigrationStateERROR SyncTableMigrationState = "ERROR" - SyncTableMigrationStateFAILED SyncTableMigrationState = "FAILED" - SyncTableMigrationStateFULLLOAD SyncTableMigrationState = "FULL_LOAD" -) - -func PossibleValuesForSyncTableMigrationState() []string { - return []string{ - string(SyncTableMigrationStateBEFORELOAD), - string(SyncTableMigrationStateCANCELED), - string(SyncTableMigrationStateCOMPLETED), - string(SyncTableMigrationStateERROR), - string(SyncTableMigrationStateFAILED), - string(SyncTableMigrationStateFULLLOAD), - } -} - -func (s *SyncTableMigrationState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSyncTableMigrationState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSyncTableMigrationState(input string) (*SyncTableMigrationState, error) { - vals := map[string]SyncTableMigrationState{ - "before_load": SyncTableMigrationStateBEFORELOAD, - "canceled": SyncTableMigrationStateCANCELED, - "completed": SyncTableMigrationStateCOMPLETED, - "error": SyncTableMigrationStateERROR, - "failed": SyncTableMigrationStateFAILED, - "full_load": SyncTableMigrationStateFULLLOAD, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SyncTableMigrationState(input) - return &out, nil -} diff --git a/resource-manager/datamigration/2021-06-30/oracleazuredbpostgresqlsynctasks/model_connectioninfo.go b/resource-manager/datamigration/2021-06-30/oracleazuredbpostgresqlsynctasks/model_connectioninfo.go deleted file mode 100644 index 5e4ea8b7dff..00000000000 --- a/resource-manager/datamigration/2021-06-30/oracleazuredbpostgresqlsynctasks/model_connectioninfo.go +++ /dev/null @@ -1,61 +0,0 @@ -package oracleazuredbpostgresqlsynctasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "OracleConnectionInfo") { - var out OracleConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into OracleConnectionInfo: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "PostgreSqlConnectionInfo") { - var out PostgreSqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into PostgreSqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2021-06-30/oracleazuredbpostgresqlsynctasks/model_migrateoracleazuredbpostgresqlsynctaskoutput.go b/resource-manager/datamigration/2021-06-30/oracleazuredbpostgresqlsynctasks/model_migrateoracleazuredbpostgresqlsynctaskoutput.go deleted file mode 100644 index b4eb97287fb..00000000000 --- a/resource-manager/datamigration/2021-06-30/oracleazuredbpostgresqlsynctasks/model_migrateoracleazuredbpostgresqlsynctaskoutput.go +++ /dev/null @@ -1,85 +0,0 @@ -package oracleazuredbpostgresqlsynctasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateOracleAzureDbPostgreSqlSyncTaskOutput interface { -} - -// RawMigrateOracleAzureDbPostgreSqlSyncTaskOutputImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawMigrateOracleAzureDbPostgreSqlSyncTaskOutputImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalMigrateOracleAzureDbPostgreSqlSyncTaskOutputImplementation(input []byte) (MigrateOracleAzureDbPostgreSqlSyncTaskOutput, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateOracleAzureDbPostgreSqlSyncTaskOutput into map[string]interface: %+v", err) - } - - value, ok := temp["resultType"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "DatabaseLevelErrorOutput") { - var out MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseError - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseError: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "DatabaseLevelOutput") { - var out MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseLevel: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "ErrorOutput") { - var out MigrateOracleAzureDbPostgreSqlSyncTaskOutputError - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateOracleAzureDbPostgreSqlSyncTaskOutputError: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "MigrationLevelOutput") { - var out MigrateOracleAzureDbPostgreSqlSyncTaskOutputMigrationLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateOracleAzureDbPostgreSqlSyncTaskOutputMigrationLevel: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "TableLevelOutput") { - var out MigrateOracleAzureDbPostgreSqlSyncTaskOutputTableLevel - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateOracleAzureDbPostgreSqlSyncTaskOutputTableLevel: %+v", err) - } - return out, nil - } - - out := RawMigrateOracleAzureDbPostgreSqlSyncTaskOutputImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2021-06-30/oracleazuredbpostgresqlsynctasks/model_migrateoracleazuredbpostgresqlsynctaskoutputdatabaseerror.go b/resource-manager/datamigration/2021-06-30/oracleazuredbpostgresqlsynctasks/model_migrateoracleazuredbpostgresqlsynctaskoutputdatabaseerror.go deleted file mode 100644 index 7e4ce105cd5..00000000000 --- a/resource-manager/datamigration/2021-06-30/oracleazuredbpostgresqlsynctasks/model_migrateoracleazuredbpostgresqlsynctaskoutputdatabaseerror.go +++ /dev/null @@ -1,43 +0,0 @@ -package oracleazuredbpostgresqlsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateOracleAzureDbPostgreSqlSyncTaskOutput = MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseError{} - -type MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseError struct { - ErrorMessage *string `json:"errorMessage,omitempty"` - Events *[]SyncMigrationDatabaseErrorEvent `json:"events,omitempty"` - - // Fields inherited from MigrateOracleAzureDbPostgreSqlSyncTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseError{} - -func (s MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseError) MarshalJSON() ([]byte, error) { - type wrapper MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseError - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseError: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseError: %+v", err) - } - decoded["resultType"] = "DatabaseLevelErrorOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseError: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/oracleazuredbpostgresqlsynctasks/model_migrateoracleazuredbpostgresqlsynctaskoutputdatabaselevel.go b/resource-manager/datamigration/2021-06-30/oracleazuredbpostgresqlsynctasks/model_migrateoracleazuredbpostgresqlsynctaskoutputdatabaselevel.go deleted file mode 100644 index 079e9973de9..00000000000 --- a/resource-manager/datamigration/2021-06-30/oracleazuredbpostgresqlsynctasks/model_migrateoracleazuredbpostgresqlsynctaskoutputdatabaselevel.go +++ /dev/null @@ -1,56 +0,0 @@ -package oracleazuredbpostgresqlsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateOracleAzureDbPostgreSqlSyncTaskOutput = MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseLevel{} - -type MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseLevel struct { - AppliedChanges *int64 `json:"appliedChanges,omitempty"` - CdcDeleteCounter *int64 `json:"cdcDeleteCounter,omitempty"` - CdcInsertCounter *int64 `json:"cdcInsertCounter,omitempty"` - CdcUpdateCounter *int64 `json:"cdcUpdateCounter,omitempty"` - DatabaseName *string `json:"databaseName,omitempty"` - EndedOn *string `json:"endedOn,omitempty"` - FullLoadCompletedTables *int64 `json:"fullLoadCompletedTables,omitempty"` - FullLoadErroredTables *int64 `json:"fullLoadErroredTables,omitempty"` - FullLoadLoadingTables *int64 `json:"fullLoadLoadingTables,omitempty"` - FullLoadQueuedTables *int64 `json:"fullLoadQueuedTables,omitempty"` - IncomingChanges *int64 `json:"incomingChanges,omitempty"` - InitializationCompleted *bool `json:"initializationCompleted,omitempty"` - Latency *int64 `json:"latency,omitempty"` - MigrationState *SyncDatabaseMigrationReportingState `json:"migrationState,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - - // Fields inherited from MigrateOracleAzureDbPostgreSqlSyncTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseLevel{} - -func (s MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseLevel) MarshalJSON() ([]byte, error) { - type wrapper MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseLevel: %+v", err) - } - decoded["resultType"] = "DatabaseLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/oracleazuredbpostgresqlsynctasks/model_migrateoracleazuredbpostgresqlsynctaskoutputerror.go b/resource-manager/datamigration/2021-06-30/oracleazuredbpostgresqlsynctasks/model_migrateoracleazuredbpostgresqlsynctaskoutputerror.go deleted file mode 100644 index d230cf9f877..00000000000 --- a/resource-manager/datamigration/2021-06-30/oracleazuredbpostgresqlsynctasks/model_migrateoracleazuredbpostgresqlsynctaskoutputerror.go +++ /dev/null @@ -1,42 +0,0 @@ -package oracleazuredbpostgresqlsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateOracleAzureDbPostgreSqlSyncTaskOutput = MigrateOracleAzureDbPostgreSqlSyncTaskOutputError{} - -type MigrateOracleAzureDbPostgreSqlSyncTaskOutputError struct { - Error *ReportableException `json:"error,omitempty"` - - // Fields inherited from MigrateOracleAzureDbPostgreSqlSyncTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateOracleAzureDbPostgreSqlSyncTaskOutputError{} - -func (s MigrateOracleAzureDbPostgreSqlSyncTaskOutputError) MarshalJSON() ([]byte, error) { - type wrapper MigrateOracleAzureDbPostgreSqlSyncTaskOutputError - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateOracleAzureDbPostgreSqlSyncTaskOutputError: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateOracleAzureDbPostgreSqlSyncTaskOutputError: %+v", err) - } - decoded["resultType"] = "ErrorOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateOracleAzureDbPostgreSqlSyncTaskOutputError: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/oracleazuredbpostgresqlsynctasks/model_migrateoracleazuredbpostgresqlsynctaskoutputmigrationlevel.go b/resource-manager/datamigration/2021-06-30/oracleazuredbpostgresqlsynctasks/model_migrateoracleazuredbpostgresqlsynctaskoutputmigrationlevel.go deleted file mode 100644 index 3911cc74d6b..00000000000 --- a/resource-manager/datamigration/2021-06-30/oracleazuredbpostgresqlsynctasks/model_migrateoracleazuredbpostgresqlsynctaskoutputmigrationlevel.go +++ /dev/null @@ -1,47 +0,0 @@ -package oracleazuredbpostgresqlsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateOracleAzureDbPostgreSqlSyncTaskOutput = MigrateOracleAzureDbPostgreSqlSyncTaskOutputMigrationLevel{} - -type MigrateOracleAzureDbPostgreSqlSyncTaskOutputMigrationLevel struct { - EndedOn *string `json:"endedOn,omitempty"` - SourceServer *string `json:"sourceServer,omitempty"` - SourceServerVersion *string `json:"sourceServerVersion,omitempty"` - StartedOn *string `json:"startedOn,omitempty"` - TargetServer *string `json:"targetServer,omitempty"` - TargetServerVersion *string `json:"targetServerVersion,omitempty"` - - // Fields inherited from MigrateOracleAzureDbPostgreSqlSyncTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateOracleAzureDbPostgreSqlSyncTaskOutputMigrationLevel{} - -func (s MigrateOracleAzureDbPostgreSqlSyncTaskOutputMigrationLevel) MarshalJSON() ([]byte, error) { - type wrapper MigrateOracleAzureDbPostgreSqlSyncTaskOutputMigrationLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateOracleAzureDbPostgreSqlSyncTaskOutputMigrationLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateOracleAzureDbPostgreSqlSyncTaskOutputMigrationLevel: %+v", err) - } - decoded["resultType"] = "MigrationLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateOracleAzureDbPostgreSqlSyncTaskOutputMigrationLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/oracleazuredbpostgresqlsynctasks/model_migrateoracleazuredbpostgresqlsynctaskoutputtablelevel.go b/resource-manager/datamigration/2021-06-30/oracleazuredbpostgresqlsynctasks/model_migrateoracleazuredbpostgresqlsynctaskoutputtablelevel.go deleted file mode 100644 index 2d125e87c32..00000000000 --- a/resource-manager/datamigration/2021-06-30/oracleazuredbpostgresqlsynctasks/model_migrateoracleazuredbpostgresqlsynctaskoutputtablelevel.go +++ /dev/null @@ -1,54 +0,0 @@ -package oracleazuredbpostgresqlsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MigrateOracleAzureDbPostgreSqlSyncTaskOutput = MigrateOracleAzureDbPostgreSqlSyncTaskOutputTableLevel{} - -type MigrateOracleAzureDbPostgreSqlSyncTaskOutputTableLevel struct { - CdcDeleteCounter *int64 `json:"cdcDeleteCounter,omitempty"` - CdcInsertCounter *int64 `json:"cdcInsertCounter,omitempty"` - CdcUpdateCounter *int64 `json:"cdcUpdateCounter,omitempty"` - DataErrorsCounter *int64 `json:"dataErrorsCounter,omitempty"` - DatabaseName *string `json:"databaseName,omitempty"` - FullLoadEndedOn *string `json:"fullLoadEndedOn,omitempty"` - FullLoadEstFinishTime *string `json:"fullLoadEstFinishTime,omitempty"` - FullLoadStartedOn *string `json:"fullLoadStartedOn,omitempty"` - FullLoadTotalRows *int64 `json:"fullLoadTotalRows,omitempty"` - LastModifiedTime *string `json:"lastModifiedTime,omitempty"` - State *SyncTableMigrationState `json:"state,omitempty"` - TableName *string `json:"tableName,omitempty"` - TotalChangesApplied *int64 `json:"totalChangesApplied,omitempty"` - - // Fields inherited from MigrateOracleAzureDbPostgreSqlSyncTaskOutput - Id *string `json:"id,omitempty"` -} - -var _ json.Marshaler = MigrateOracleAzureDbPostgreSqlSyncTaskOutputTableLevel{} - -func (s MigrateOracleAzureDbPostgreSqlSyncTaskOutputTableLevel) MarshalJSON() ([]byte, error) { - type wrapper MigrateOracleAzureDbPostgreSqlSyncTaskOutputTableLevel - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateOracleAzureDbPostgreSqlSyncTaskOutputTableLevel: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateOracleAzureDbPostgreSqlSyncTaskOutputTableLevel: %+v", err) - } - decoded["resultType"] = "TableLevelOutput" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateOracleAzureDbPostgreSqlSyncTaskOutputTableLevel: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/oracleazuredbpostgresqlsynctasks/model_oracleconnectioninfo.go b/resource-manager/datamigration/2021-06-30/oracleazuredbpostgresqlsynctasks/model_oracleconnectioninfo.go deleted file mode 100644 index 1e78343210e..00000000000 --- a/resource-manager/datamigration/2021-06-30/oracleazuredbpostgresqlsynctasks/model_oracleconnectioninfo.go +++ /dev/null @@ -1,43 +0,0 @@ -package oracleazuredbpostgresqlsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = OracleConnectionInfo{} - -type OracleConnectionInfo struct { - DataSource string `json:"dataSource"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = OracleConnectionInfo{} - -func (s OracleConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper OracleConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling OracleConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling OracleConnectionInfo: %+v", err) - } - decoded["type"] = "OracleConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling OracleConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/oracleazuredbpostgresqlsynctasks/model_postgresqlconnectioninfo.go b/resource-manager/datamigration/2021-06-30/oracleazuredbpostgresqlsynctasks/model_postgresqlconnectioninfo.go deleted file mode 100644 index cbcf69765fe..00000000000 --- a/resource-manager/datamigration/2021-06-30/oracleazuredbpostgresqlsynctasks/model_postgresqlconnectioninfo.go +++ /dev/null @@ -1,47 +0,0 @@ -package oracleazuredbpostgresqlsynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = PostgreSqlConnectionInfo{} - -type PostgreSqlConnectionInfo struct { - DatabaseName *string `json:"databaseName,omitempty"` - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Port int64 `json:"port"` - ServerName string `json:"serverName"` - TrustServerCertificate *bool `json:"trustServerCertificate,omitempty"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = PostgreSqlConnectionInfo{} - -func (s PostgreSqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper PostgreSqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling PostgreSqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling PostgreSqlConnectionInfo: %+v", err) - } - decoded["type"] = "PostgreSqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling PostgreSqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/oracleazuredbpostgresqlsynctasks/model_reportableexception.go b/resource-manager/datamigration/2021-06-30/oracleazuredbpostgresqlsynctasks/model_reportableexception.go deleted file mode 100644 index 088e0fcf108..00000000000 --- a/resource-manager/datamigration/2021-06-30/oracleazuredbpostgresqlsynctasks/model_reportableexception.go +++ /dev/null @@ -1,13 +0,0 @@ -package oracleazuredbpostgresqlsynctasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ReportableException struct { - ActionableMessage *string `json:"actionableMessage,omitempty"` - FilePath *string `json:"filePath,omitempty"` - HResult *int64 `json:"hResult,omitempty"` - LineNumber *string `json:"lineNumber,omitempty"` - Message *string `json:"message,omitempty"` - StackTrace *string `json:"stackTrace,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/oracleazuredbpostgresqlsynctasks/model_syncmigrationdatabaseerrorevent.go b/resource-manager/datamigration/2021-06-30/oracleazuredbpostgresqlsynctasks/model_syncmigrationdatabaseerrorevent.go deleted file mode 100644 index d7bd08037ba..00000000000 --- a/resource-manager/datamigration/2021-06-30/oracleazuredbpostgresqlsynctasks/model_syncmigrationdatabaseerrorevent.go +++ /dev/null @@ -1,10 +0,0 @@ -package oracleazuredbpostgresqlsynctasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SyncMigrationDatabaseErrorEvent struct { - EventText *string `json:"eventText,omitempty"` - EventTypeString *string `json:"eventTypeString,omitempty"` - TimestampString *string `json:"timestampString,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/oracleazuredbpostgresqlsynctasks/version.go b/resource-manager/datamigration/2021-06-30/oracleazuredbpostgresqlsynctasks/version.go deleted file mode 100644 index 7e775818c65..00000000000 --- a/resource-manager/datamigration/2021-06-30/oracleazuredbpostgresqlsynctasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package oracleazuredbpostgresqlsynctasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-06-30" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/oracleazuredbpostgresqlsynctasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2021-06-30/servicetasks/README.md b/resource-manager/datamigration/2021-06-30/servicetasks/README.md deleted file mode 100644 index 3bd6fd39215..00000000000 --- a/resource-manager/datamigration/2021-06-30/servicetasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/servicetasks` Documentation - -The `servicetasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2021-06-30`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/servicetasks" -``` - - -### Client Initialization - -```go -client := servicetasks.NewServiceTasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2021-06-30/servicetasks/client.go b/resource-manager/datamigration/2021-06-30/servicetasks/client.go deleted file mode 100644 index b88ba3855c4..00000000000 --- a/resource-manager/datamigration/2021-06-30/servicetasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package servicetasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceTasksClient struct { - Client *resourcemanager.Client -} - -func NewServiceTasksClientWithBaseURI(sdkApi sdkEnv.Api) (*ServiceTasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "servicetasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ServiceTasksClient: %+v", err) - } - - return &ServiceTasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2021-06-30/servicetasks/constants.go b/resource-manager/datamigration/2021-06-30/servicetasks/constants.go deleted file mode 100644 index 36191f9552e..00000000000 --- a/resource-manager/datamigration/2021-06-30/servicetasks/constants.go +++ /dev/null @@ -1,119 +0,0 @@ -package servicetasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CommandState string - -const ( - CommandStateAccepted CommandState = "Accepted" - CommandStateFailed CommandState = "Failed" - CommandStateRunning CommandState = "Running" - CommandStateSucceeded CommandState = "Succeeded" - CommandStateUnknown CommandState = "Unknown" -) - -func PossibleValuesForCommandState() []string { - return []string{ - string(CommandStateAccepted), - string(CommandStateFailed), - string(CommandStateRunning), - string(CommandStateSucceeded), - string(CommandStateUnknown), - } -} - -func (s *CommandState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseCommandState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseCommandState(input string) (*CommandState, error) { - vals := map[string]CommandState{ - "accepted": CommandStateAccepted, - "failed": CommandStateFailed, - "running": CommandStateRunning, - "succeeded": CommandStateSucceeded, - "unknown": CommandStateUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := CommandState(input) - return &out, nil -} - -type TaskState string - -const ( - TaskStateCanceled TaskState = "Canceled" - TaskStateFailed TaskState = "Failed" - TaskStateFailedInputValidation TaskState = "FailedInputValidation" - TaskStateFaulted TaskState = "Faulted" - TaskStateQueued TaskState = "Queued" - TaskStateRunning TaskState = "Running" - TaskStateSucceeded TaskState = "Succeeded" - TaskStateUnknown TaskState = "Unknown" -) - -func PossibleValuesForTaskState() []string { - return []string{ - string(TaskStateCanceled), - string(TaskStateFailed), - string(TaskStateFailedInputValidation), - string(TaskStateFaulted), - string(TaskStateQueued), - string(TaskStateRunning), - string(TaskStateSucceeded), - string(TaskStateUnknown), - } -} - -func (s *TaskState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTaskState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTaskState(input string) (*TaskState, error) { - vals := map[string]TaskState{ - "canceled": TaskStateCanceled, - "failed": TaskStateFailed, - "failedinputvalidation": TaskStateFailedInputValidation, - "faulted": TaskStateFaulted, - "queued": TaskStateQueued, - "running": TaskStateRunning, - "succeeded": TaskStateSucceeded, - "unknown": TaskStateUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TaskState(input) - return &out, nil -} diff --git a/resource-manager/datamigration/2021-06-30/servicetasks/model_checkocidrivertaskinput.go b/resource-manager/datamigration/2021-06-30/servicetasks/model_checkocidrivertaskinput.go deleted file mode 100644 index c789659b39b..00000000000 --- a/resource-manager/datamigration/2021-06-30/servicetasks/model_checkocidrivertaskinput.go +++ /dev/null @@ -1,8 +0,0 @@ -package servicetasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CheckOCIDriverTaskInput struct { - ServerVersion *string `json:"serverVersion,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/servicetasks/model_checkocidrivertaskoutput.go b/resource-manager/datamigration/2021-06-30/servicetasks/model_checkocidrivertaskoutput.go deleted file mode 100644 index 74ad96bc3c1..00000000000 --- a/resource-manager/datamigration/2021-06-30/servicetasks/model_checkocidrivertaskoutput.go +++ /dev/null @@ -1,9 +0,0 @@ -package servicetasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CheckOCIDriverTaskOutput struct { - InstalledDriver *OracleOCIDriverInfo `json:"installedDriver,omitempty"` - ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/servicetasks/model_checkocidrivertaskproperties.go b/resource-manager/datamigration/2021-06-30/servicetasks/model_checkocidrivertaskproperties.go deleted file mode 100644 index 225b7879882..00000000000 --- a/resource-manager/datamigration/2021-06-30/servicetasks/model_checkocidrivertaskproperties.go +++ /dev/null @@ -1,46 +0,0 @@ -package servicetasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = CheckOCIDriverTaskProperties{} - -type CheckOCIDriverTaskProperties struct { - Input *CheckOCIDriverTaskInput `json:"input,omitempty"` - Output *[]CheckOCIDriverTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - ClientData *map[string]string `json:"clientData,omitempty"` - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = CheckOCIDriverTaskProperties{} - -func (s CheckOCIDriverTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper CheckOCIDriverTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling CheckOCIDriverTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling CheckOCIDriverTaskProperties: %+v", err) - } - decoded["taskType"] = "Service.Check.OCI" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling CheckOCIDriverTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/servicetasks/model_commandproperties.go b/resource-manager/datamigration/2021-06-30/servicetasks/model_commandproperties.go deleted file mode 100644 index 0d72f85c511..00000000000 --- a/resource-manager/datamigration/2021-06-30/servicetasks/model_commandproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package servicetasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CommandProperties struct { - CommandType string `json:"commandType"` - Errors *[]ODataError `json:"errors,omitempty"` - State *CommandState `json:"state,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/servicetasks/model_fileshare.go b/resource-manager/datamigration/2021-06-30/servicetasks/model_fileshare.go deleted file mode 100644 index c71ded3b545..00000000000 --- a/resource-manager/datamigration/2021-06-30/servicetasks/model_fileshare.go +++ /dev/null @@ -1,10 +0,0 @@ -package servicetasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FileShare struct { - Password *string `json:"password,omitempty"` - Path string `json:"path"` - UserName *string `json:"userName,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/servicetasks/model_installocidrivertaskinput.go b/resource-manager/datamigration/2021-06-30/servicetasks/model_installocidrivertaskinput.go deleted file mode 100644 index cd60a98f08d..00000000000 --- a/resource-manager/datamigration/2021-06-30/servicetasks/model_installocidrivertaskinput.go +++ /dev/null @@ -1,8 +0,0 @@ -package servicetasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InstallOCIDriverTaskInput struct { - DriverPackageName *string `json:"driverPackageName,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/servicetasks/model_installocidrivertaskoutput.go b/resource-manager/datamigration/2021-06-30/servicetasks/model_installocidrivertaskoutput.go deleted file mode 100644 index 40b9eab86e3..00000000000 --- a/resource-manager/datamigration/2021-06-30/servicetasks/model_installocidrivertaskoutput.go +++ /dev/null @@ -1,8 +0,0 @@ -package servicetasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InstallOCIDriverTaskOutput struct { - ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/servicetasks/model_installocidrivertaskproperties.go b/resource-manager/datamigration/2021-06-30/servicetasks/model_installocidrivertaskproperties.go deleted file mode 100644 index 6d9dae1e61a..00000000000 --- a/resource-manager/datamigration/2021-06-30/servicetasks/model_installocidrivertaskproperties.go +++ /dev/null @@ -1,46 +0,0 @@ -package servicetasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = InstallOCIDriverTaskProperties{} - -type InstallOCIDriverTaskProperties struct { - Input *InstallOCIDriverTaskInput `json:"input,omitempty"` - Output *[]InstallOCIDriverTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - ClientData *map[string]string `json:"clientData,omitempty"` - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = InstallOCIDriverTaskProperties{} - -func (s InstallOCIDriverTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper InstallOCIDriverTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling InstallOCIDriverTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling InstallOCIDriverTaskProperties: %+v", err) - } - decoded["taskType"] = "Service.Install.OCI" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling InstallOCIDriverTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/servicetasks/model_odataerror.go b/resource-manager/datamigration/2021-06-30/servicetasks/model_odataerror.go deleted file mode 100644 index 15d55f152ec..00000000000 --- a/resource-manager/datamigration/2021-06-30/servicetasks/model_odataerror.go +++ /dev/null @@ -1,10 +0,0 @@ -package servicetasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ODataError struct { - Code *string `json:"code,omitempty"` - Details *[]ODataError `json:"details,omitempty"` - Message *string `json:"message,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/servicetasks/model_oracleocidriverinfo.go b/resource-manager/datamigration/2021-06-30/servicetasks/model_oracleocidriverinfo.go deleted file mode 100644 index 368f2d7f46d..00000000000 --- a/resource-manager/datamigration/2021-06-30/servicetasks/model_oracleocidriverinfo.go +++ /dev/null @@ -1,13 +0,0 @@ -package servicetasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type OracleOCIDriverInfo struct { - ArchiveChecksum *string `json:"archiveChecksum,omitempty"` - AssemblyVersion *string `json:"assemblyVersion,omitempty"` - DriverName *string `json:"driverName,omitempty"` - DriverSize *string `json:"driverSize,omitempty"` - OracleChecksum *string `json:"oracleChecksum,omitempty"` - SupportedOracleVersions *[]string `json:"supportedOracleVersions,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/servicetasks/model_projecttaskproperties.go b/resource-manager/datamigration/2021-06-30/servicetasks/model_projecttaskproperties.go deleted file mode 100644 index 92655537f00..00000000000 --- a/resource-manager/datamigration/2021-06-30/servicetasks/model_projecttaskproperties.go +++ /dev/null @@ -1,69 +0,0 @@ -package servicetasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProjectTaskProperties interface { -} - -// RawProjectTaskPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawProjectTaskPropertiesImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalProjectTaskPropertiesImplementation(input []byte) (ProjectTaskProperties, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ProjectTaskProperties into map[string]interface: %+v", err) - } - - value, ok := temp["taskType"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "Service.Check.OCI") { - var out CheckOCIDriverTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into CheckOCIDriverTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Service.Install.OCI") { - var out InstallOCIDriverTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into InstallOCIDriverTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Service.Upload.OCI") { - var out UploadOCIDriverTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into UploadOCIDriverTaskProperties: %+v", err) - } - return out, nil - } - - out := RawProjectTaskPropertiesImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2021-06-30/servicetasks/model_reportableexception.go b/resource-manager/datamigration/2021-06-30/servicetasks/model_reportableexception.go deleted file mode 100644 index 5ed363f6103..00000000000 --- a/resource-manager/datamigration/2021-06-30/servicetasks/model_reportableexception.go +++ /dev/null @@ -1,13 +0,0 @@ -package servicetasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ReportableException struct { - ActionableMessage *string `json:"actionableMessage,omitempty"` - FilePath *string `json:"filePath,omitempty"` - HResult *int64 `json:"hResult,omitempty"` - LineNumber *string `json:"lineNumber,omitempty"` - Message *string `json:"message,omitempty"` - StackTrace *string `json:"stackTrace,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/servicetasks/model_uploadocidrivertaskinput.go b/resource-manager/datamigration/2021-06-30/servicetasks/model_uploadocidrivertaskinput.go deleted file mode 100644 index e9fed1b4a2a..00000000000 --- a/resource-manager/datamigration/2021-06-30/servicetasks/model_uploadocidrivertaskinput.go +++ /dev/null @@ -1,8 +0,0 @@ -package servicetasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UploadOCIDriverTaskInput struct { - DriverShare *FileShare `json:"driverShare,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/servicetasks/model_uploadocidrivertaskoutput.go b/resource-manager/datamigration/2021-06-30/servicetasks/model_uploadocidrivertaskoutput.go deleted file mode 100644 index 5471d4843a4..00000000000 --- a/resource-manager/datamigration/2021-06-30/servicetasks/model_uploadocidrivertaskoutput.go +++ /dev/null @@ -1,9 +0,0 @@ -package servicetasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UploadOCIDriverTaskOutput struct { - DriverPackageName *string `json:"driverPackageName,omitempty"` - ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/servicetasks/model_uploadocidrivertaskproperties.go b/resource-manager/datamigration/2021-06-30/servicetasks/model_uploadocidrivertaskproperties.go deleted file mode 100644 index f9a3909eaae..00000000000 --- a/resource-manager/datamigration/2021-06-30/servicetasks/model_uploadocidrivertaskproperties.go +++ /dev/null @@ -1,46 +0,0 @@ -package servicetasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = UploadOCIDriverTaskProperties{} - -type UploadOCIDriverTaskProperties struct { - Input *UploadOCIDriverTaskInput `json:"input,omitempty"` - Output *[]UploadOCIDriverTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - ClientData *map[string]string `json:"clientData,omitempty"` - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = UploadOCIDriverTaskProperties{} - -func (s UploadOCIDriverTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper UploadOCIDriverTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling UploadOCIDriverTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling UploadOCIDriverTaskProperties: %+v", err) - } - decoded["taskType"] = "Service.Upload.OCI" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling UploadOCIDriverTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/servicetasks/version.go b/resource-manager/datamigration/2021-06-30/servicetasks/version.go deleted file mode 100644 index bec50b84bd0..00000000000 --- a/resource-manager/datamigration/2021-06-30/servicetasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package servicetasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-06-30" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/servicetasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/README.md b/resource-manager/datamigration/2021-06-30/tasks/README.md deleted file mode 100644 index 442a6533863..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/tasks` Documentation - -The `tasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2021-06-30`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/tasks" -``` - - -### Client Initialization - -```go -client := tasks.NewTasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2021-06-30/tasks/client.go b/resource-manager/datamigration/2021-06-30/tasks/client.go deleted file mode 100644 index 8e365f36b1a..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package tasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TasksClient struct { - Client *resourcemanager.Client -} - -func NewTasksClientWithBaseURI(sdkApi sdkEnv.Api) (*TasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "tasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating TasksClient: %+v", err) - } - - return &TasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/constants.go b/resource-manager/datamigration/2021-06-30/tasks/constants.go deleted file mode 100644 index c199ede62a0..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/constants.go +++ /dev/null @@ -1,759 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthenticationType string - -const ( - AuthenticationTypeActiveDirectoryIntegrated AuthenticationType = "ActiveDirectoryIntegrated" - AuthenticationTypeActiveDirectoryPassword AuthenticationType = "ActiveDirectoryPassword" - AuthenticationTypeNone AuthenticationType = "None" - AuthenticationTypeSqlAuthentication AuthenticationType = "SqlAuthentication" - AuthenticationTypeWindowsAuthentication AuthenticationType = "WindowsAuthentication" -) - -func PossibleValuesForAuthenticationType() []string { - return []string{ - string(AuthenticationTypeActiveDirectoryIntegrated), - string(AuthenticationTypeActiveDirectoryPassword), - string(AuthenticationTypeNone), - string(AuthenticationTypeSqlAuthentication), - string(AuthenticationTypeWindowsAuthentication), - } -} - -func (s *AuthenticationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAuthenticationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAuthenticationType(input string) (*AuthenticationType, error) { - vals := map[string]AuthenticationType{ - "activedirectoryintegrated": AuthenticationTypeActiveDirectoryIntegrated, - "activedirectorypassword": AuthenticationTypeActiveDirectoryPassword, - "none": AuthenticationTypeNone, - "sqlauthentication": AuthenticationTypeSqlAuthentication, - "windowsauthentication": AuthenticationTypeWindowsAuthentication, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AuthenticationType(input) - return &out, nil -} - -type BackupMode string - -const ( - BackupModeCreateBackup BackupMode = "CreateBackup" - BackupModeExistingBackup BackupMode = "ExistingBackup" -) - -func PossibleValuesForBackupMode() []string { - return []string{ - string(BackupModeCreateBackup), - string(BackupModeExistingBackup), - } -} - -func (s *BackupMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseBackupMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseBackupMode(input string) (*BackupMode, error) { - vals := map[string]BackupMode{ - "createbackup": BackupModeCreateBackup, - "existingbackup": BackupModeExistingBackup, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := BackupMode(input) - return &out, nil -} - -type BackupType string - -const ( - BackupTypeDatabase BackupType = "Database" - BackupTypeDifferentialDatabase BackupType = "DifferentialDatabase" - BackupTypeDifferentialFile BackupType = "DifferentialFile" - BackupTypeDifferentialPartial BackupType = "DifferentialPartial" - BackupTypeFile BackupType = "File" - BackupTypePartial BackupType = "Partial" - BackupTypeTransactionLog BackupType = "TransactionLog" -) - -func PossibleValuesForBackupType() []string { - return []string{ - string(BackupTypeDatabase), - string(BackupTypeDifferentialDatabase), - string(BackupTypeDifferentialFile), - string(BackupTypeDifferentialPartial), - string(BackupTypeFile), - string(BackupTypePartial), - string(BackupTypeTransactionLog), - } -} - -func (s *BackupType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseBackupType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseBackupType(input string) (*BackupType, error) { - vals := map[string]BackupType{ - "database": BackupTypeDatabase, - "differentialdatabase": BackupTypeDifferentialDatabase, - "differentialfile": BackupTypeDifferentialFile, - "differentialpartial": BackupTypeDifferentialPartial, - "file": BackupTypeFile, - "partial": BackupTypePartial, - "transactionlog": BackupTypeTransactionLog, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := BackupType(input) - return &out, nil -} - -type CommandState string - -const ( - CommandStateAccepted CommandState = "Accepted" - CommandStateFailed CommandState = "Failed" - CommandStateRunning CommandState = "Running" - CommandStateSucceeded CommandState = "Succeeded" - CommandStateUnknown CommandState = "Unknown" -) - -func PossibleValuesForCommandState() []string { - return []string{ - string(CommandStateAccepted), - string(CommandStateFailed), - string(CommandStateRunning), - string(CommandStateSucceeded), - string(CommandStateUnknown), - } -} - -func (s *CommandState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseCommandState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseCommandState(input string) (*CommandState, error) { - vals := map[string]CommandState{ - "accepted": CommandStateAccepted, - "failed": CommandStateFailed, - "running": CommandStateRunning, - "succeeded": CommandStateSucceeded, - "unknown": CommandStateUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := CommandState(input) - return &out, nil -} - -type MongoDbClusterType string - -const ( - MongoDbClusterTypeBlobContainer MongoDbClusterType = "BlobContainer" - MongoDbClusterTypeCosmosDb MongoDbClusterType = "CosmosDb" - MongoDbClusterTypeMongoDb MongoDbClusterType = "MongoDb" -) - -func PossibleValuesForMongoDbClusterType() []string { - return []string{ - string(MongoDbClusterTypeBlobContainer), - string(MongoDbClusterTypeCosmosDb), - string(MongoDbClusterTypeMongoDb), - } -} - -func (s *MongoDbClusterType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseMongoDbClusterType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseMongoDbClusterType(input string) (*MongoDbClusterType, error) { - vals := map[string]MongoDbClusterType{ - "blobcontainer": MongoDbClusterTypeBlobContainer, - "cosmosdb": MongoDbClusterTypeCosmosDb, - "mongodb": MongoDbClusterTypeMongoDb, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := MongoDbClusterType(input) - return &out, nil -} - -type MongoDbErrorType string - -const ( - MongoDbErrorTypeError MongoDbErrorType = "Error" - MongoDbErrorTypeValidationError MongoDbErrorType = "ValidationError" - MongoDbErrorTypeWarning MongoDbErrorType = "Warning" -) - -func PossibleValuesForMongoDbErrorType() []string { - return []string{ - string(MongoDbErrorTypeError), - string(MongoDbErrorTypeValidationError), - string(MongoDbErrorTypeWarning), - } -} - -func (s *MongoDbErrorType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseMongoDbErrorType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseMongoDbErrorType(input string) (*MongoDbErrorType, error) { - vals := map[string]MongoDbErrorType{ - "error": MongoDbErrorTypeError, - "validationerror": MongoDbErrorTypeValidationError, - "warning": MongoDbErrorTypeWarning, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := MongoDbErrorType(input) - return &out, nil -} - -type MongoDbMigrationState string - -const ( - MongoDbMigrationStateCanceled MongoDbMigrationState = "Canceled" - MongoDbMigrationStateComplete MongoDbMigrationState = "Complete" - MongoDbMigrationStateCopying MongoDbMigrationState = "Copying" - MongoDbMigrationStateFailed MongoDbMigrationState = "Failed" - MongoDbMigrationStateFinalizing MongoDbMigrationState = "Finalizing" - MongoDbMigrationStateInitialReplay MongoDbMigrationState = "InitialReplay" - MongoDbMigrationStateInitializing MongoDbMigrationState = "Initializing" - MongoDbMigrationStateNotStarted MongoDbMigrationState = "NotStarted" - MongoDbMigrationStateReplaying MongoDbMigrationState = "Replaying" - MongoDbMigrationStateRestarting MongoDbMigrationState = "Restarting" - MongoDbMigrationStateValidatingInput MongoDbMigrationState = "ValidatingInput" -) - -func PossibleValuesForMongoDbMigrationState() []string { - return []string{ - string(MongoDbMigrationStateCanceled), - string(MongoDbMigrationStateComplete), - string(MongoDbMigrationStateCopying), - string(MongoDbMigrationStateFailed), - string(MongoDbMigrationStateFinalizing), - string(MongoDbMigrationStateInitialReplay), - string(MongoDbMigrationStateInitializing), - string(MongoDbMigrationStateNotStarted), - string(MongoDbMigrationStateReplaying), - string(MongoDbMigrationStateRestarting), - string(MongoDbMigrationStateValidatingInput), - } -} - -func (s *MongoDbMigrationState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseMongoDbMigrationState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseMongoDbMigrationState(input string) (*MongoDbMigrationState, error) { - vals := map[string]MongoDbMigrationState{ - "canceled": MongoDbMigrationStateCanceled, - "complete": MongoDbMigrationStateComplete, - "copying": MongoDbMigrationStateCopying, - "failed": MongoDbMigrationStateFailed, - "finalizing": MongoDbMigrationStateFinalizing, - "initialreplay": MongoDbMigrationStateInitialReplay, - "initializing": MongoDbMigrationStateInitializing, - "notstarted": MongoDbMigrationStateNotStarted, - "replaying": MongoDbMigrationStateReplaying, - "restarting": MongoDbMigrationStateRestarting, - "validatinginput": MongoDbMigrationStateValidatingInput, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := MongoDbMigrationState(input) - return &out, nil -} - -type MongoDbReplication string - -const ( - MongoDbReplicationContinuous MongoDbReplication = "Continuous" - MongoDbReplicationDisabled MongoDbReplication = "Disabled" - MongoDbReplicationOneTime MongoDbReplication = "OneTime" -) - -func PossibleValuesForMongoDbReplication() []string { - return []string{ - string(MongoDbReplicationContinuous), - string(MongoDbReplicationDisabled), - string(MongoDbReplicationOneTime), - } -} - -func (s *MongoDbReplication) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseMongoDbReplication(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseMongoDbReplication(input string) (*MongoDbReplication, error) { - vals := map[string]MongoDbReplication{ - "continuous": MongoDbReplicationContinuous, - "disabled": MongoDbReplicationDisabled, - "onetime": MongoDbReplicationOneTime, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := MongoDbReplication(input) - return &out, nil -} - -type MongoDbShardKeyOrder string - -const ( - MongoDbShardKeyOrderForward MongoDbShardKeyOrder = "Forward" - MongoDbShardKeyOrderHashed MongoDbShardKeyOrder = "Hashed" - MongoDbShardKeyOrderReverse MongoDbShardKeyOrder = "Reverse" -) - -func PossibleValuesForMongoDbShardKeyOrder() []string { - return []string{ - string(MongoDbShardKeyOrderForward), - string(MongoDbShardKeyOrderHashed), - string(MongoDbShardKeyOrderReverse), - } -} - -func (s *MongoDbShardKeyOrder) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseMongoDbShardKeyOrder(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseMongoDbShardKeyOrder(input string) (*MongoDbShardKeyOrder, error) { - vals := map[string]MongoDbShardKeyOrder{ - "forward": MongoDbShardKeyOrderForward, - "hashed": MongoDbShardKeyOrderHashed, - "reverse": MongoDbShardKeyOrderReverse, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := MongoDbShardKeyOrder(input) - return &out, nil -} - -type MySqlTargetPlatformType string - -const ( - MySqlTargetPlatformTypeAzureDbForMySQL MySqlTargetPlatformType = "AzureDbForMySQL" - MySqlTargetPlatformTypeSqlServer MySqlTargetPlatformType = "SqlServer" -) - -func PossibleValuesForMySqlTargetPlatformType() []string { - return []string{ - string(MySqlTargetPlatformTypeAzureDbForMySQL), - string(MySqlTargetPlatformTypeSqlServer), - } -} - -func (s *MySqlTargetPlatformType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseMySqlTargetPlatformType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseMySqlTargetPlatformType(input string) (*MySqlTargetPlatformType, error) { - vals := map[string]MySqlTargetPlatformType{ - "azuredbformysql": MySqlTargetPlatformTypeAzureDbForMySQL, - "sqlserver": MySqlTargetPlatformTypeSqlServer, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := MySqlTargetPlatformType(input) - return &out, nil -} - -type ResultType string - -const ( - ResultTypeCollection ResultType = "Collection" - ResultTypeDatabase ResultType = "Database" - ResultTypeMigration ResultType = "Migration" -) - -func PossibleValuesForResultType() []string { - return []string{ - string(ResultTypeCollection), - string(ResultTypeDatabase), - string(ResultTypeMigration), - } -} - -func (s *ResultType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseResultType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseResultType(input string) (*ResultType, error) { - vals := map[string]ResultType{ - "collection": ResultTypeCollection, - "database": ResultTypeDatabase, - "migration": ResultTypeMigration, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ResultType(input) - return &out, nil -} - -type ServerLevelPermissionsGroup string - -const ( - ServerLevelPermissionsGroupDefault ServerLevelPermissionsGroup = "Default" - ServerLevelPermissionsGroupMigrationFromMySQLToAzureDBForMySQL ServerLevelPermissionsGroup = "MigrationFromMySQLToAzureDBForMySQL" - ServerLevelPermissionsGroupMigrationFromSqlServerToAzureDB ServerLevelPermissionsGroup = "MigrationFromSqlServerToAzureDB" - ServerLevelPermissionsGroupMigrationFromSqlServerToAzureMI ServerLevelPermissionsGroup = "MigrationFromSqlServerToAzureMI" -) - -func PossibleValuesForServerLevelPermissionsGroup() []string { - return []string{ - string(ServerLevelPermissionsGroupDefault), - string(ServerLevelPermissionsGroupMigrationFromMySQLToAzureDBForMySQL), - string(ServerLevelPermissionsGroupMigrationFromSqlServerToAzureDB), - string(ServerLevelPermissionsGroupMigrationFromSqlServerToAzureMI), - } -} - -func (s *ServerLevelPermissionsGroup) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseServerLevelPermissionsGroup(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseServerLevelPermissionsGroup(input string) (*ServerLevelPermissionsGroup, error) { - vals := map[string]ServerLevelPermissionsGroup{ - "default": ServerLevelPermissionsGroupDefault, - "migrationfrommysqltoazuredbformysql": ServerLevelPermissionsGroupMigrationFromMySQLToAzureDBForMySQL, - "migrationfromsqlservertoazuredb": ServerLevelPermissionsGroupMigrationFromSqlServerToAzureDB, - "migrationfromsqlservertoazuremi": ServerLevelPermissionsGroupMigrationFromSqlServerToAzureMI, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ServerLevelPermissionsGroup(input) - return &out, nil -} - -type SqlSourcePlatform string - -const ( - SqlSourcePlatformSqlOnPrem SqlSourcePlatform = "SqlOnPrem" -) - -func PossibleValuesForSqlSourcePlatform() []string { - return []string{ - string(SqlSourcePlatformSqlOnPrem), - } -} - -func (s *SqlSourcePlatform) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSqlSourcePlatform(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSqlSourcePlatform(input string) (*SqlSourcePlatform, error) { - vals := map[string]SqlSourcePlatform{ - "sqlonprem": SqlSourcePlatformSqlOnPrem, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SqlSourcePlatform(input) - return &out, nil -} - -type SsisMigrationOverwriteOption string - -const ( - SsisMigrationOverwriteOptionIgnore SsisMigrationOverwriteOption = "Ignore" - SsisMigrationOverwriteOptionOverwrite SsisMigrationOverwriteOption = "Overwrite" -) - -func PossibleValuesForSsisMigrationOverwriteOption() []string { - return []string{ - string(SsisMigrationOverwriteOptionIgnore), - string(SsisMigrationOverwriteOptionOverwrite), - } -} - -func (s *SsisMigrationOverwriteOption) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSsisMigrationOverwriteOption(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSsisMigrationOverwriteOption(input string) (*SsisMigrationOverwriteOption, error) { - vals := map[string]SsisMigrationOverwriteOption{ - "ignore": SsisMigrationOverwriteOptionIgnore, - "overwrite": SsisMigrationOverwriteOptionOverwrite, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SsisMigrationOverwriteOption(input) - return &out, nil -} - -type SsisStoreType string - -const ( - SsisStoreTypeSsisCatalog SsisStoreType = "SsisCatalog" -) - -func PossibleValuesForSsisStoreType() []string { - return []string{ - string(SsisStoreTypeSsisCatalog), - } -} - -func (s *SsisStoreType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSsisStoreType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSsisStoreType(input string) (*SsisStoreType, error) { - vals := map[string]SsisStoreType{ - "ssiscatalog": SsisStoreTypeSsisCatalog, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SsisStoreType(input) - return &out, nil -} - -type TaskState string - -const ( - TaskStateCanceled TaskState = "Canceled" - TaskStateFailed TaskState = "Failed" - TaskStateFailedInputValidation TaskState = "FailedInputValidation" - TaskStateFaulted TaskState = "Faulted" - TaskStateQueued TaskState = "Queued" - TaskStateRunning TaskState = "Running" - TaskStateSucceeded TaskState = "Succeeded" - TaskStateUnknown TaskState = "Unknown" -) - -func PossibleValuesForTaskState() []string { - return []string{ - string(TaskStateCanceled), - string(TaskStateFailed), - string(TaskStateFailedInputValidation), - string(TaskStateFaulted), - string(TaskStateQueued), - string(TaskStateRunning), - string(TaskStateSucceeded), - string(TaskStateUnknown), - } -} - -func (s *TaskState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTaskState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTaskState(input string) (*TaskState, error) { - vals := map[string]TaskState{ - "canceled": TaskStateCanceled, - "failed": TaskStateFailed, - "failedinputvalidation": TaskStateFailedInputValidation, - "faulted": TaskStateFaulted, - "queued": TaskStateQueued, - "running": TaskStateRunning, - "succeeded": TaskStateSucceeded, - "unknown": TaskStateUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TaskState(input) - return &out, nil -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_azureactivedirectoryapp.go b/resource-manager/datamigration/2021-06-30/tasks/model_azureactivedirectoryapp.go deleted file mode 100644 index f196d14046f..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_azureactivedirectoryapp.go +++ /dev/null @@ -1,10 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureActiveDirectoryApp struct { - AppKey string `json:"appKey"` - ApplicationId string `json:"applicationId"` - TenantId string `json:"tenantId"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_blobshare.go b/resource-manager/datamigration/2021-06-30/tasks/model_blobshare.go deleted file mode 100644 index a75509b425c..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_blobshare.go +++ /dev/null @@ -1,8 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BlobShare struct { - SasUri string `json:"sasUri"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_commandproperties.go b/resource-manager/datamigration/2021-06-30/tasks/model_commandproperties.go deleted file mode 100644 index f50210ba776..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_commandproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CommandProperties struct { - CommandType string `json:"commandType"` - Errors *[]ODataError `json:"errors,omitempty"` - State *CommandState `json:"state,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_connectioninfo.go b/resource-manager/datamigration/2021-06-30/tasks/model_connectioninfo.go deleted file mode 100644 index 49ce5022017..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_connectioninfo.go +++ /dev/null @@ -1,85 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "MiSqlConnectionInfo") { - var out MiSqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MiSqlConnectionInfo: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "MySqlConnectionInfo") { - var out MySqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MySqlConnectionInfo: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "OracleConnectionInfo") { - var out OracleConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into OracleConnectionInfo: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "PostgreSqlConnectionInfo") { - var out PostgreSqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into PostgreSqlConnectionInfo: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "SqlConnectionInfo") { - var out SqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_connecttomongodbtaskproperties.go b/resource-manager/datamigration/2021-06-30/tasks/model_connecttomongodbtaskproperties.go deleted file mode 100644 index 4ee43c089a1..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_connecttomongodbtaskproperties.go +++ /dev/null @@ -1,46 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = ConnectToMongoDbTaskProperties{} - -type ConnectToMongoDbTaskProperties struct { - Input *MongoDbConnectionInfo `json:"input,omitempty"` - Output *[]MongoDbClusterInfo `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - ClientData *map[string]string `json:"clientData,omitempty"` - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = ConnectToMongoDbTaskProperties{} - -func (s ConnectToMongoDbTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper ConnectToMongoDbTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ConnectToMongoDbTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectToMongoDbTaskProperties: %+v", err) - } - decoded["taskType"] = "Connect.MongoDb" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ConnectToMongoDbTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_connecttosourcemysqltaskinput.go b/resource-manager/datamigration/2021-06-30/tasks/model_connecttosourcemysqltaskinput.go deleted file mode 100644 index ac9b49576fe..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_connecttosourcemysqltaskinput.go +++ /dev/null @@ -1,11 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToSourceMySqlTaskInput struct { - CheckPermissionsGroup *ServerLevelPermissionsGroup `json:"checkPermissionsGroup,omitempty"` - IsOfflineMigration *bool `json:"isOfflineMigration,omitempty"` - SourceConnectionInfo MySqlConnectionInfo `json:"sourceConnectionInfo"` - TargetPlatform *MySqlTargetPlatformType `json:"targetPlatform,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_connecttosourcemysqltaskproperties.go b/resource-manager/datamigration/2021-06-30/tasks/model_connecttosourcemysqltaskproperties.go deleted file mode 100644 index 61cbec4ca8f..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_connecttosourcemysqltaskproperties.go +++ /dev/null @@ -1,46 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = ConnectToSourceMySqlTaskProperties{} - -type ConnectToSourceMySqlTaskProperties struct { - Input *ConnectToSourceMySqlTaskInput `json:"input,omitempty"` - Output *[]ConnectToSourceNonSqlTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - ClientData *map[string]string `json:"clientData,omitempty"` - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = ConnectToSourceMySqlTaskProperties{} - -func (s ConnectToSourceMySqlTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper ConnectToSourceMySqlTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ConnectToSourceMySqlTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectToSourceMySqlTaskProperties: %+v", err) - } - decoded["taskType"] = "ConnectToSource.MySql" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ConnectToSourceMySqlTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_connecttosourcenonsqltaskoutput.go b/resource-manager/datamigration/2021-06-30/tasks/model_connecttosourcenonsqltaskoutput.go deleted file mode 100644 index d7078078fdb..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_connecttosourcenonsqltaskoutput.go +++ /dev/null @@ -1,12 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToSourceNonSqlTaskOutput struct { - Databases *[]string `json:"databases,omitempty"` - Id *string `json:"id,omitempty"` - ServerProperties *ServerProperties `json:"serverProperties,omitempty"` - SourceServerBrandVersion *string `json:"sourceServerBrandVersion,omitempty"` - ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_connecttosourceoraclesynctaskinput.go b/resource-manager/datamigration/2021-06-30/tasks/model_connecttosourceoraclesynctaskinput.go deleted file mode 100644 index 6790f2b74d1..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_connecttosourceoraclesynctaskinput.go +++ /dev/null @@ -1,8 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToSourceOracleSyncTaskInput struct { - SourceConnectionInfo OracleConnectionInfo `json:"sourceConnectionInfo"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_connecttosourceoraclesynctaskoutput.go b/resource-manager/datamigration/2021-06-30/tasks/model_connecttosourceoraclesynctaskoutput.go deleted file mode 100644 index 15e91993ee0..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_connecttosourceoraclesynctaskoutput.go +++ /dev/null @@ -1,11 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToSourceOracleSyncTaskOutput struct { - Databases *[]string `json:"databases,omitempty"` - SourceServerBrandVersion *string `json:"sourceServerBrandVersion,omitempty"` - SourceServerVersion *string `json:"sourceServerVersion,omitempty"` - ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_connecttosourceoraclesynctaskproperties.go b/resource-manager/datamigration/2021-06-30/tasks/model_connecttosourceoraclesynctaskproperties.go deleted file mode 100644 index 6a55a30dd01..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_connecttosourceoraclesynctaskproperties.go +++ /dev/null @@ -1,46 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = ConnectToSourceOracleSyncTaskProperties{} - -type ConnectToSourceOracleSyncTaskProperties struct { - Input *ConnectToSourceOracleSyncTaskInput `json:"input,omitempty"` - Output *[]ConnectToSourceOracleSyncTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - ClientData *map[string]string `json:"clientData,omitempty"` - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = ConnectToSourceOracleSyncTaskProperties{} - -func (s ConnectToSourceOracleSyncTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper ConnectToSourceOracleSyncTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ConnectToSourceOracleSyncTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectToSourceOracleSyncTaskProperties: %+v", err) - } - decoded["taskType"] = "ConnectToSource.Oracle.Sync" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ConnectToSourceOracleSyncTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_connecttosourcepostgresqlsynctaskinput.go b/resource-manager/datamigration/2021-06-30/tasks/model_connecttosourcepostgresqlsynctaskinput.go deleted file mode 100644 index 99a4f14a71c..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_connecttosourcepostgresqlsynctaskinput.go +++ /dev/null @@ -1,8 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToSourcePostgreSqlSyncTaskInput struct { - SourceConnectionInfo PostgreSqlConnectionInfo `json:"sourceConnectionInfo"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_connecttosourcepostgresqlsynctaskoutput.go b/resource-manager/datamigration/2021-06-30/tasks/model_connecttosourcepostgresqlsynctaskoutput.go deleted file mode 100644 index 63361b475e4..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_connecttosourcepostgresqlsynctaskoutput.go +++ /dev/null @@ -1,12 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToSourcePostgreSqlSyncTaskOutput struct { - Databases *[]string `json:"databases,omitempty"` - Id *string `json:"id,omitempty"` - SourceServerBrandVersion *string `json:"sourceServerBrandVersion,omitempty"` - SourceServerVersion *string `json:"sourceServerVersion,omitempty"` - ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_connecttosourcepostgresqlsynctaskproperties.go b/resource-manager/datamigration/2021-06-30/tasks/model_connecttosourcepostgresqlsynctaskproperties.go deleted file mode 100644 index c7ca6a24276..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_connecttosourcepostgresqlsynctaskproperties.go +++ /dev/null @@ -1,46 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = ConnectToSourcePostgreSqlSyncTaskProperties{} - -type ConnectToSourcePostgreSqlSyncTaskProperties struct { - Input *ConnectToSourcePostgreSqlSyncTaskInput `json:"input,omitempty"` - Output *[]ConnectToSourcePostgreSqlSyncTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - ClientData *map[string]string `json:"clientData,omitempty"` - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = ConnectToSourcePostgreSqlSyncTaskProperties{} - -func (s ConnectToSourcePostgreSqlSyncTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper ConnectToSourcePostgreSqlSyncTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ConnectToSourcePostgreSqlSyncTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectToSourcePostgreSqlSyncTaskProperties: %+v", err) - } - decoded["taskType"] = "ConnectToSource.PostgreSql.Sync" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ConnectToSourcePostgreSqlSyncTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_connecttosourcesqlserversynctaskproperties.go b/resource-manager/datamigration/2021-06-30/tasks/model_connecttosourcesqlserversynctaskproperties.go deleted file mode 100644 index 7b4f23aaa12..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_connecttosourcesqlserversynctaskproperties.go +++ /dev/null @@ -1,46 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = ConnectToSourceSqlServerSyncTaskProperties{} - -type ConnectToSourceSqlServerSyncTaskProperties struct { - Input *ConnectToSourceSqlServerTaskInput `json:"input,omitempty"` - Output *[]ConnectToSourceSqlServerTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - ClientData *map[string]string `json:"clientData,omitempty"` - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = ConnectToSourceSqlServerSyncTaskProperties{} - -func (s ConnectToSourceSqlServerSyncTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper ConnectToSourceSqlServerSyncTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ConnectToSourceSqlServerSyncTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectToSourceSqlServerSyncTaskProperties: %+v", err) - } - decoded["taskType"] = "ConnectToSource.SqlServer.Sync" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ConnectToSourceSqlServerSyncTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_connecttosourcesqlservertaskinput.go b/resource-manager/datamigration/2021-06-30/tasks/model_connecttosourcesqlservertaskinput.go deleted file mode 100644 index 09400cb0c15..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_connecttosourcesqlservertaskinput.go +++ /dev/null @@ -1,14 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToSourceSqlServerTaskInput struct { - CheckPermissionsGroup *ServerLevelPermissionsGroup `json:"checkPermissionsGroup,omitempty"` - CollectAgentJobs *bool `json:"collectAgentJobs,omitempty"` - CollectDatabases *bool `json:"collectDatabases,omitempty"` - CollectLogins *bool `json:"collectLogins,omitempty"` - CollectTdeCertificateInfo *bool `json:"collectTdeCertificateInfo,omitempty"` - SourceConnectionInfo SqlConnectionInfo `json:"sourceConnectionInfo"` - ValidateSsisCatalogOnly *bool `json:"validateSsisCatalogOnly,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_connecttosourcesqlservertaskoutput.go b/resource-manager/datamigration/2021-06-30/tasks/model_connecttosourcesqlservertaskoutput.go deleted file mode 100644 index 666fe288389..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_connecttosourcesqlservertaskoutput.go +++ /dev/null @@ -1,9 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToSourceSqlServerTaskOutput struct { - Id *string `json:"id,omitempty"` - ResultType string `json:"resultType"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_connecttosourcesqlservertaskproperties.go b/resource-manager/datamigration/2021-06-30/tasks/model_connecttosourcesqlservertaskproperties.go deleted file mode 100644 index 05dfcccfb82..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_connecttosourcesqlservertaskproperties.go +++ /dev/null @@ -1,46 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = ConnectToSourceSqlServerTaskProperties{} - -type ConnectToSourceSqlServerTaskProperties struct { - Input *ConnectToSourceSqlServerTaskInput `json:"input,omitempty"` - Output *[]ConnectToSourceSqlServerTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - ClientData *map[string]string `json:"clientData,omitempty"` - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = ConnectToSourceSqlServerTaskProperties{} - -func (s ConnectToSourceSqlServerTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper ConnectToSourceSqlServerTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ConnectToSourceSqlServerTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectToSourceSqlServerTaskProperties: %+v", err) - } - decoded["taskType"] = "ConnectToSource.SqlServer" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ConnectToSourceSqlServerTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetazuredbformysqltaskinput.go b/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetazuredbformysqltaskinput.go deleted file mode 100644 index e0c7ab82541..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetazuredbformysqltaskinput.go +++ /dev/null @@ -1,10 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToTargetAzureDbForMySqlTaskInput struct { - IsOfflineMigration *bool `json:"isOfflineMigration,omitempty"` - SourceConnectionInfo MySqlConnectionInfo `json:"sourceConnectionInfo"` - TargetConnectionInfo MySqlConnectionInfo `json:"targetConnectionInfo"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetazuredbformysqltaskoutput.go b/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetazuredbformysqltaskoutput.go deleted file mode 100644 index 0c5557b5791..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetazuredbformysqltaskoutput.go +++ /dev/null @@ -1,12 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToTargetAzureDbForMySqlTaskOutput struct { - Databases *[]string `json:"databases,omitempty"` - Id *string `json:"id,omitempty"` - ServerVersion *string `json:"serverVersion,omitempty"` - TargetServerBrandVersion *string `json:"targetServerBrandVersion,omitempty"` - ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetazuredbformysqltaskproperties.go b/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetazuredbformysqltaskproperties.go deleted file mode 100644 index 8019c6329e1..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetazuredbformysqltaskproperties.go +++ /dev/null @@ -1,46 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = ConnectToTargetAzureDbForMySqlTaskProperties{} - -type ConnectToTargetAzureDbForMySqlTaskProperties struct { - Input *ConnectToTargetAzureDbForMySqlTaskInput `json:"input,omitempty"` - Output *[]ConnectToTargetAzureDbForMySqlTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - ClientData *map[string]string `json:"clientData,omitempty"` - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = ConnectToTargetAzureDbForMySqlTaskProperties{} - -func (s ConnectToTargetAzureDbForMySqlTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper ConnectToTargetAzureDbForMySqlTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ConnectToTargetAzureDbForMySqlTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectToTargetAzureDbForMySqlTaskProperties: %+v", err) - } - decoded["taskType"] = "ConnectToTarget.AzureDbForMySql" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ConnectToTargetAzureDbForMySqlTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetazuredbforpostgresqlsynctaskinput.go b/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetazuredbforpostgresqlsynctaskinput.go deleted file mode 100644 index 6cd64736d9c..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetazuredbforpostgresqlsynctaskinput.go +++ /dev/null @@ -1,9 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToTargetAzureDbForPostgreSqlSyncTaskInput struct { - SourceConnectionInfo PostgreSqlConnectionInfo `json:"sourceConnectionInfo"` - TargetConnectionInfo PostgreSqlConnectionInfo `json:"targetConnectionInfo"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetazuredbforpostgresqlsynctaskoutput.go b/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetazuredbforpostgresqlsynctaskoutput.go deleted file mode 100644 index 8c8f92cd67f..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetazuredbforpostgresqlsynctaskoutput.go +++ /dev/null @@ -1,12 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToTargetAzureDbForPostgreSqlSyncTaskOutput struct { - Databases *[]string `json:"databases,omitempty"` - Id *string `json:"id,omitempty"` - TargetServerBrandVersion *string `json:"targetServerBrandVersion,omitempty"` - TargetServerVersion *string `json:"targetServerVersion,omitempty"` - ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetazuredbforpostgresqlsynctaskproperties.go b/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetazuredbforpostgresqlsynctaskproperties.go deleted file mode 100644 index 44aad2462be..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetazuredbforpostgresqlsynctaskproperties.go +++ /dev/null @@ -1,46 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties{} - -type ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties struct { - Input *ConnectToTargetAzureDbForPostgreSqlSyncTaskInput `json:"input,omitempty"` - Output *[]ConnectToTargetAzureDbForPostgreSqlSyncTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - ClientData *map[string]string `json:"clientData,omitempty"` - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties{} - -func (s ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties: %+v", err) - } - decoded["taskType"] = "ConnectToTarget.AzureDbForPostgreSql.Sync" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetoracleazuredbforpostgresqlsynctaskinput.go b/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetoracleazuredbforpostgresqlsynctaskinput.go deleted file mode 100644 index 719b6532081..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetoracleazuredbforpostgresqlsynctaskinput.go +++ /dev/null @@ -1,8 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskInput struct { - TargetConnectionInfo PostgreSqlConnectionInfo `json:"targetConnectionInfo"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetoracleazuredbforpostgresqlsynctaskoutput.go b/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetoracleazuredbforpostgresqlsynctaskoutput.go deleted file mode 100644 index d47fcfd5637..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetoracleazuredbforpostgresqlsynctaskoutput.go +++ /dev/null @@ -1,12 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutput struct { - DatabaseSchemaMap *[]ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutputDatabaseSchemaMapInlined `json:"databaseSchemaMap,omitempty"` - Databases *[]string `json:"databases,omitempty"` - TargetServerBrandVersion *string `json:"targetServerBrandVersion,omitempty"` - TargetServerVersion *string `json:"targetServerVersion,omitempty"` - ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetoracleazuredbforpostgresqlsynctaskoutputdatabaseschemamapinlined.go b/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetoracleazuredbforpostgresqlsynctaskoutputdatabaseschemamapinlined.go deleted file mode 100644 index 1c9d47dec21..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetoracleazuredbforpostgresqlsynctaskoutputdatabaseschemamapinlined.go +++ /dev/null @@ -1,9 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutputDatabaseSchemaMapInlined struct { - Database *string `json:"database,omitempty"` - Schemas *[]string `json:"schemas,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetoracleazuredbforpostgresqlsynctaskproperties.go b/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetoracleazuredbforpostgresqlsynctaskproperties.go deleted file mode 100644 index de9e932a952..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetoracleazuredbforpostgresqlsynctaskproperties.go +++ /dev/null @@ -1,46 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties{} - -type ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties struct { - Input *ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskInput `json:"input,omitempty"` - Output *[]ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - ClientData *map[string]string `json:"clientData,omitempty"` - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties{} - -func (s ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties: %+v", err) - } - decoded["taskType"] = "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetsqldbtaskinput.go b/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetsqldbtaskinput.go deleted file mode 100644 index 0fc73fcd682..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetsqldbtaskinput.go +++ /dev/null @@ -1,8 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToTargetSqlDbTaskInput struct { - TargetConnectionInfo SqlConnectionInfo `json:"targetConnectionInfo"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetsqldbtaskoutput.go b/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetsqldbtaskoutput.go deleted file mode 100644 index 7e46e237e5d..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetsqldbtaskoutput.go +++ /dev/null @@ -1,11 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToTargetSqlDbTaskOutput struct { - Databases *map[string]string `json:"databases,omitempty"` - Id *string `json:"id,omitempty"` - TargetServerBrandVersion *string `json:"targetServerBrandVersion,omitempty"` - TargetServerVersion *string `json:"targetServerVersion,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetsqldbtaskproperties.go b/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetsqldbtaskproperties.go deleted file mode 100644 index 25ba3117e86..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetsqldbtaskproperties.go +++ /dev/null @@ -1,46 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = ConnectToTargetSqlDbTaskProperties{} - -type ConnectToTargetSqlDbTaskProperties struct { - Input *ConnectToTargetSqlDbTaskInput `json:"input,omitempty"` - Output *[]ConnectToTargetSqlDbTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - ClientData *map[string]string `json:"clientData,omitempty"` - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = ConnectToTargetSqlDbTaskProperties{} - -func (s ConnectToTargetSqlDbTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper ConnectToTargetSqlDbTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ConnectToTargetSqlDbTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectToTargetSqlDbTaskProperties: %+v", err) - } - decoded["taskType"] = "ConnectToTarget.SqlDb" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ConnectToTargetSqlDbTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetsqlmisynctaskinput.go b/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetsqlmisynctaskinput.go deleted file mode 100644 index 86bb118337b..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetsqlmisynctaskinput.go +++ /dev/null @@ -1,9 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToTargetSqlMISyncTaskInput struct { - AzureApp AzureActiveDirectoryApp `json:"azureApp"` - TargetConnectionInfo MiSqlConnectionInfo `json:"targetConnectionInfo"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetsqlmisynctaskoutput.go b/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetsqlmisynctaskoutput.go deleted file mode 100644 index e665b3d42c1..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetsqlmisynctaskoutput.go +++ /dev/null @@ -1,10 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToTargetSqlMISyncTaskOutput struct { - TargetServerBrandVersion *string `json:"targetServerBrandVersion,omitempty"` - TargetServerVersion *string `json:"targetServerVersion,omitempty"` - ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetsqlmisynctaskproperties.go b/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetsqlmisynctaskproperties.go deleted file mode 100644 index e6d929fe148..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetsqlmisynctaskproperties.go +++ /dev/null @@ -1,46 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = ConnectToTargetSqlMISyncTaskProperties{} - -type ConnectToTargetSqlMISyncTaskProperties struct { - Input *ConnectToTargetSqlMISyncTaskInput `json:"input,omitempty"` - Output *[]ConnectToTargetSqlMISyncTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - ClientData *map[string]string `json:"clientData,omitempty"` - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = ConnectToTargetSqlMISyncTaskProperties{} - -func (s ConnectToTargetSqlMISyncTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper ConnectToTargetSqlMISyncTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ConnectToTargetSqlMISyncTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectToTargetSqlMISyncTaskProperties: %+v", err) - } - decoded["taskType"] = "ConnectToTarget.AzureSqlDbMI.Sync.LRS" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ConnectToTargetSqlMISyncTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetsqlmitaskinput.go b/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetsqlmitaskinput.go deleted file mode 100644 index b5dcd40c19c..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetsqlmitaskinput.go +++ /dev/null @@ -1,11 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToTargetSqlMITaskInput struct { - CollectAgentJobs *bool `json:"collectAgentJobs,omitempty"` - CollectLogins *bool `json:"collectLogins,omitempty"` - TargetConnectionInfo SqlConnectionInfo `json:"targetConnectionInfo"` - ValidateSsisCatalogOnly *bool `json:"validateSsisCatalogOnly,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetsqlmitaskoutput.go b/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetsqlmitaskoutput.go deleted file mode 100644 index 894c9289fd6..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetsqlmitaskoutput.go +++ /dev/null @@ -1,13 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToTargetSqlMITaskOutput struct { - AgentJobs *[]string `json:"agentJobs,omitempty"` - Id *string `json:"id,omitempty"` - Logins *[]string `json:"logins,omitempty"` - TargetServerBrandVersion *string `json:"targetServerBrandVersion,omitempty"` - TargetServerVersion *string `json:"targetServerVersion,omitempty"` - ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetsqlmitaskproperties.go b/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetsqlmitaskproperties.go deleted file mode 100644 index 1e2f58fd3b3..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetsqlmitaskproperties.go +++ /dev/null @@ -1,46 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = ConnectToTargetSqlMITaskProperties{} - -type ConnectToTargetSqlMITaskProperties struct { - Input *ConnectToTargetSqlMITaskInput `json:"input,omitempty"` - Output *[]ConnectToTargetSqlMITaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - ClientData *map[string]string `json:"clientData,omitempty"` - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = ConnectToTargetSqlMITaskProperties{} - -func (s ConnectToTargetSqlMITaskProperties) MarshalJSON() ([]byte, error) { - type wrapper ConnectToTargetSqlMITaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ConnectToTargetSqlMITaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectToTargetSqlMITaskProperties: %+v", err) - } - decoded["taskType"] = "ConnectToTarget.AzureSqlDbMI" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ConnectToTargetSqlMITaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetsqlsqldbsynctaskinput.go b/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetsqlsqldbsynctaskinput.go deleted file mode 100644 index 637c8086f37..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetsqlsqldbsynctaskinput.go +++ /dev/null @@ -1,9 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectToTargetSqlSqlDbSyncTaskInput struct { - SourceConnectionInfo SqlConnectionInfo `json:"sourceConnectionInfo"` - TargetConnectionInfo SqlConnectionInfo `json:"targetConnectionInfo"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetsqlsqldbsynctaskproperties.go b/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetsqlsqldbsynctaskproperties.go deleted file mode 100644 index b3508820f99..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_connecttotargetsqlsqldbsynctaskproperties.go +++ /dev/null @@ -1,46 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = ConnectToTargetSqlSqlDbSyncTaskProperties{} - -type ConnectToTargetSqlSqlDbSyncTaskProperties struct { - Input *ConnectToTargetSqlSqlDbSyncTaskInput `json:"input,omitempty"` - Output *[]ConnectToTargetSqlDbTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - ClientData *map[string]string `json:"clientData,omitempty"` - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = ConnectToTargetSqlSqlDbSyncTaskProperties{} - -func (s ConnectToTargetSqlSqlDbSyncTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper ConnectToTargetSqlSqlDbSyncTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ConnectToTargetSqlSqlDbSyncTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectToTargetSqlSqlDbSyncTaskProperties: %+v", err) - } - decoded["taskType"] = "ConnectToTarget.SqlDb.Sync" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ConnectToTargetSqlSqlDbSyncTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_databasebackupinfo.go b/resource-manager/datamigration/2021-06-30/tasks/model_databasebackupinfo.go deleted file mode 100644 index 37a9f645c21..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_databasebackupinfo.go +++ /dev/null @@ -1,33 +0,0 @@ -package tasks - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DatabaseBackupInfo struct { - BackupFiles *[]string `json:"backupFiles,omitempty"` - BackupFinishDate *string `json:"backupFinishDate,omitempty"` - BackupType *BackupType `json:"backupType,omitempty"` - DatabaseName *string `json:"databaseName,omitempty"` - FamilyCount *int64 `json:"familyCount,omitempty"` - IsCompressed *bool `json:"isCompressed,omitempty"` - IsDamaged *bool `json:"isDamaged,omitempty"` - Position *int64 `json:"position,omitempty"` -} - -func (o *DatabaseBackupInfo) GetBackupFinishDateAsTime() (*time.Time, error) { - if o.BackupFinishDate == nil { - return nil, nil - } - return dates.ParseAsFormat(o.BackupFinishDate, "2006-01-02T15:04:05Z07:00") -} - -func (o *DatabaseBackupInfo) SetBackupFinishDateAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.BackupFinishDate = &formatted -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_databasetable.go b/resource-manager/datamigration/2021-06-30/tasks/model_databasetable.go deleted file mode 100644 index 376f8dd076f..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_databasetable.go +++ /dev/null @@ -1,9 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DatabaseTable struct { - HasRows *bool `json:"hasRows,omitempty"` - Name *string `json:"name,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_fileshare.go b/resource-manager/datamigration/2021-06-30/tasks/model_fileshare.go deleted file mode 100644 index da67496582e..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_fileshare.go +++ /dev/null @@ -1,10 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FileShare struct { - Password *string `json:"password,omitempty"` - Path string `json:"path"` - UserName *string `json:"userName,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_gettdecertificatessqltaskinput.go b/resource-manager/datamigration/2021-06-30/tasks/model_gettdecertificatessqltaskinput.go deleted file mode 100644 index 7c175551282..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_gettdecertificatessqltaskinput.go +++ /dev/null @@ -1,10 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetTdeCertificatesSqlTaskInput struct { - BackupFileShare FileShare `json:"backupFileShare"` - ConnectionInfo SqlConnectionInfo `json:"connectionInfo"` - SelectedCertificates []SelectedCertificateInput `json:"selectedCertificates"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_gettdecertificatessqltaskoutput.go b/resource-manager/datamigration/2021-06-30/tasks/model_gettdecertificatessqltaskoutput.go deleted file mode 100644 index fa7b19f788a..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_gettdecertificatessqltaskoutput.go +++ /dev/null @@ -1,9 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetTdeCertificatesSqlTaskOutput struct { - Base64EncodedCertificates *map[string][]string `json:"base64EncodedCertificates,omitempty"` - ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_gettdecertificatessqltaskproperties.go b/resource-manager/datamigration/2021-06-30/tasks/model_gettdecertificatessqltaskproperties.go deleted file mode 100644 index 859fb846146..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_gettdecertificatessqltaskproperties.go +++ /dev/null @@ -1,46 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = GetTdeCertificatesSqlTaskProperties{} - -type GetTdeCertificatesSqlTaskProperties struct { - Input *GetTdeCertificatesSqlTaskInput `json:"input,omitempty"` - Output *[]GetTdeCertificatesSqlTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - ClientData *map[string]string `json:"clientData,omitempty"` - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = GetTdeCertificatesSqlTaskProperties{} - -func (s GetTdeCertificatesSqlTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper GetTdeCertificatesSqlTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling GetTdeCertificatesSqlTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling GetTdeCertificatesSqlTaskProperties: %+v", err) - } - decoded["taskType"] = "GetTDECertificates.Sql" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling GetTdeCertificatesSqlTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_getusertablesmysqltaskinput.go b/resource-manager/datamigration/2021-06-30/tasks/model_getusertablesmysqltaskinput.go deleted file mode 100644 index 9d3f6c62246..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_getusertablesmysqltaskinput.go +++ /dev/null @@ -1,9 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetUserTablesMySqlTaskInput struct { - ConnectionInfo MySqlConnectionInfo `json:"connectionInfo"` - SelectedDatabases []string `json:"selectedDatabases"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_getusertablesmysqltaskoutput.go b/resource-manager/datamigration/2021-06-30/tasks/model_getusertablesmysqltaskoutput.go deleted file mode 100644 index 2039b0cbf02..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_getusertablesmysqltaskoutput.go +++ /dev/null @@ -1,10 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetUserTablesMySqlTaskOutput struct { - DatabasesToTables *map[string][]DatabaseTable `json:"databasesToTables,omitempty"` - Id *string `json:"id,omitempty"` - ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_getusertablesmysqltaskproperties.go b/resource-manager/datamigration/2021-06-30/tasks/model_getusertablesmysqltaskproperties.go deleted file mode 100644 index 261edbb798c..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_getusertablesmysqltaskproperties.go +++ /dev/null @@ -1,46 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = GetUserTablesMySqlTaskProperties{} - -type GetUserTablesMySqlTaskProperties struct { - Input *GetUserTablesMySqlTaskInput `json:"input,omitempty"` - Output *[]GetUserTablesMySqlTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - ClientData *map[string]string `json:"clientData,omitempty"` - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = GetUserTablesMySqlTaskProperties{} - -func (s GetUserTablesMySqlTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper GetUserTablesMySqlTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling GetUserTablesMySqlTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling GetUserTablesMySqlTaskProperties: %+v", err) - } - decoded["taskType"] = "GetUserTablesMySql" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling GetUserTablesMySqlTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_getusertablesoracletaskinput.go b/resource-manager/datamigration/2021-06-30/tasks/model_getusertablesoracletaskinput.go deleted file mode 100644 index 7ec08a1a1ef..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_getusertablesoracletaskinput.go +++ /dev/null @@ -1,9 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetUserTablesOracleTaskInput struct { - ConnectionInfo OracleConnectionInfo `json:"connectionInfo"` - SelectedSchemas []string `json:"selectedSchemas"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_getusertablesoracletaskoutput.go b/resource-manager/datamigration/2021-06-30/tasks/model_getusertablesoracletaskoutput.go deleted file mode 100644 index cac6f2e1271..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_getusertablesoracletaskoutput.go +++ /dev/null @@ -1,10 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetUserTablesOracleTaskOutput struct { - SchemaName *string `json:"schemaName,omitempty"` - Tables *[]DatabaseTable `json:"tables,omitempty"` - ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_getusertablesoracletaskproperties.go b/resource-manager/datamigration/2021-06-30/tasks/model_getusertablesoracletaskproperties.go deleted file mode 100644 index f06433fe4ea..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_getusertablesoracletaskproperties.go +++ /dev/null @@ -1,46 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = GetUserTablesOracleTaskProperties{} - -type GetUserTablesOracleTaskProperties struct { - Input *GetUserTablesOracleTaskInput `json:"input,omitempty"` - Output *[]GetUserTablesOracleTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - ClientData *map[string]string `json:"clientData,omitempty"` - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = GetUserTablesOracleTaskProperties{} - -func (s GetUserTablesOracleTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper GetUserTablesOracleTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling GetUserTablesOracleTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling GetUserTablesOracleTaskProperties: %+v", err) - } - decoded["taskType"] = "GetUserTablesOracle" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling GetUserTablesOracleTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_getusertablespostgresqltaskinput.go b/resource-manager/datamigration/2021-06-30/tasks/model_getusertablespostgresqltaskinput.go deleted file mode 100644 index 520f2f2e199..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_getusertablespostgresqltaskinput.go +++ /dev/null @@ -1,9 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetUserTablesPostgreSqlTaskInput struct { - ConnectionInfo PostgreSqlConnectionInfo `json:"connectionInfo"` - SelectedDatabases []string `json:"selectedDatabases"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_getusertablespostgresqltaskoutput.go b/resource-manager/datamigration/2021-06-30/tasks/model_getusertablespostgresqltaskoutput.go deleted file mode 100644 index 0fbb8cd05f8..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_getusertablespostgresqltaskoutput.go +++ /dev/null @@ -1,10 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetUserTablesPostgreSqlTaskOutput struct { - DatabaseName *string `json:"databaseName,omitempty"` - Tables *[]DatabaseTable `json:"tables,omitempty"` - ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_getusertablespostgresqltaskproperties.go b/resource-manager/datamigration/2021-06-30/tasks/model_getusertablespostgresqltaskproperties.go deleted file mode 100644 index 3a97346cb4b..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_getusertablespostgresqltaskproperties.go +++ /dev/null @@ -1,46 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = GetUserTablesPostgreSqlTaskProperties{} - -type GetUserTablesPostgreSqlTaskProperties struct { - Input *GetUserTablesPostgreSqlTaskInput `json:"input,omitempty"` - Output *[]GetUserTablesPostgreSqlTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - ClientData *map[string]string `json:"clientData,omitempty"` - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = GetUserTablesPostgreSqlTaskProperties{} - -func (s GetUserTablesPostgreSqlTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper GetUserTablesPostgreSqlTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling GetUserTablesPostgreSqlTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling GetUserTablesPostgreSqlTaskProperties: %+v", err) - } - decoded["taskType"] = "GetUserTablesPostgreSql" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling GetUserTablesPostgreSqlTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_getusertablessqlsynctaskinput.go b/resource-manager/datamigration/2021-06-30/tasks/model_getusertablessqlsynctaskinput.go deleted file mode 100644 index 69d3b718205..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_getusertablessqlsynctaskinput.go +++ /dev/null @@ -1,11 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetUserTablesSqlSyncTaskInput struct { - SelectedSourceDatabases []string `json:"selectedSourceDatabases"` - SelectedTargetDatabases []string `json:"selectedTargetDatabases"` - SourceConnectionInfo SqlConnectionInfo `json:"sourceConnectionInfo"` - TargetConnectionInfo SqlConnectionInfo `json:"targetConnectionInfo"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_getusertablessqlsynctaskoutput.go b/resource-manager/datamigration/2021-06-30/tasks/model_getusertablessqlsynctaskoutput.go deleted file mode 100644 index 03355fb9da2..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_getusertablessqlsynctaskoutput.go +++ /dev/null @@ -1,11 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetUserTablesSqlSyncTaskOutput struct { - DatabasesToSourceTables *map[string][]DatabaseTable `json:"databasesToSourceTables,omitempty"` - DatabasesToTargetTables *map[string][]DatabaseTable `json:"databasesToTargetTables,omitempty"` - TableValidationErrors *map[string][]string `json:"tableValidationErrors,omitempty"` - ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_getusertablessqlsynctaskproperties.go b/resource-manager/datamigration/2021-06-30/tasks/model_getusertablessqlsynctaskproperties.go deleted file mode 100644 index b9439d1862d..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_getusertablessqlsynctaskproperties.go +++ /dev/null @@ -1,46 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = GetUserTablesSqlSyncTaskProperties{} - -type GetUserTablesSqlSyncTaskProperties struct { - Input *GetUserTablesSqlSyncTaskInput `json:"input,omitempty"` - Output *[]GetUserTablesSqlSyncTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - ClientData *map[string]string `json:"clientData,omitempty"` - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = GetUserTablesSqlSyncTaskProperties{} - -func (s GetUserTablesSqlSyncTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper GetUserTablesSqlSyncTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling GetUserTablesSqlSyncTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling GetUserTablesSqlSyncTaskProperties: %+v", err) - } - decoded["taskType"] = "GetUserTables.AzureSqlDb.Sync" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling GetUserTablesSqlSyncTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_getusertablessqltaskinput.go b/resource-manager/datamigration/2021-06-30/tasks/model_getusertablessqltaskinput.go deleted file mode 100644 index 9ccaf0fcfff..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_getusertablessqltaskinput.go +++ /dev/null @@ -1,9 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetUserTablesSqlTaskInput struct { - ConnectionInfo SqlConnectionInfo `json:"connectionInfo"` - SelectedDatabases []string `json:"selectedDatabases"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_getusertablessqltaskoutput.go b/resource-manager/datamigration/2021-06-30/tasks/model_getusertablessqltaskoutput.go deleted file mode 100644 index 8935f098488..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_getusertablessqltaskoutput.go +++ /dev/null @@ -1,10 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetUserTablesSqlTaskOutput struct { - DatabasesToTables *map[string][]DatabaseTable `json:"databasesToTables,omitempty"` - Id *string `json:"id,omitempty"` - ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_getusertablessqltaskproperties.go b/resource-manager/datamigration/2021-06-30/tasks/model_getusertablessqltaskproperties.go deleted file mode 100644 index eba29df9d0d..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_getusertablessqltaskproperties.go +++ /dev/null @@ -1,46 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = GetUserTablesSqlTaskProperties{} - -type GetUserTablesSqlTaskProperties struct { - Input *GetUserTablesSqlTaskInput `json:"input,omitempty"` - Output *[]GetUserTablesSqlTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - ClientData *map[string]string `json:"clientData,omitempty"` - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = GetUserTablesSqlTaskProperties{} - -func (s GetUserTablesSqlTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper GetUserTablesSqlTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling GetUserTablesSqlTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling GetUserTablesSqlTaskProperties: %+v", err) - } - decoded["taskType"] = "GetUserTables.Sql" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling GetUserTablesSqlTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_migratemongodbtaskproperties.go b/resource-manager/datamigration/2021-06-30/tasks/model_migratemongodbtaskproperties.go deleted file mode 100644 index e033ce5c7bd..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_migratemongodbtaskproperties.go +++ /dev/null @@ -1,85 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = MigrateMongoDbTaskProperties{} - -type MigrateMongoDbTaskProperties struct { - Input *MongoDbMigrationSettings `json:"input,omitempty"` - Output *[]MongoDbProgress `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - ClientData *map[string]string `json:"clientData,omitempty"` - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = MigrateMongoDbTaskProperties{} - -func (s MigrateMongoDbTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper MigrateMongoDbTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateMongoDbTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateMongoDbTaskProperties: %+v", err) - } - decoded["taskType"] = "Migrate.MongoDb" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateMongoDbTaskProperties: %+v", err) - } - - return encoded, nil -} - -var _ json.Unmarshaler = &MigrateMongoDbTaskProperties{} - -func (s *MigrateMongoDbTaskProperties) UnmarshalJSON(bytes []byte) error { - type alias MigrateMongoDbTaskProperties - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into MigrateMongoDbTaskProperties: %+v", err) - } - - s.ClientData = decoded.ClientData - s.Commands = decoded.Commands - s.Errors = decoded.Errors - s.Input = decoded.Input - s.State = decoded.State - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling MigrateMongoDbTaskProperties into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["output"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling Output into list []json.RawMessage: %+v", err) - } - - output := make([]MongoDbProgress, 0) - for i, val := range listTemp { - impl, err := unmarshalMongoDbProgressImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'Output' for 'MigrateMongoDbTaskProperties': %+v", i, err) - } - output = append(output, impl) - } - s.Output = &output - } - return nil -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_migratemysqlazuredbformysqlofflinedatabaseinput.go b/resource-manager/datamigration/2021-06-30/tasks/model_migratemysqlazuredbformysqlofflinedatabaseinput.go deleted file mode 100644 index 43290078a5f..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_migratemysqlazuredbformysqlofflinedatabaseinput.go +++ /dev/null @@ -1,10 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateMySqlAzureDbForMySqlOfflineDatabaseInput struct { - Name *string `json:"name,omitempty"` - TableMap *map[string]string `json:"tableMap,omitempty"` - TargetDatabaseName *string `json:"targetDatabaseName,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_migratemysqlazuredbformysqlofflinetaskinput.go b/resource-manager/datamigration/2021-06-30/tasks/model_migratemysqlazuredbformysqlofflinetaskinput.go deleted file mode 100644 index e25163b0fcb..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_migratemysqlazuredbformysqlofflinetaskinput.go +++ /dev/null @@ -1,31 +0,0 @@ -package tasks - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateMySqlAzureDbForMySqlOfflineTaskInput struct { - MakeSourceServerReadOnly *bool `json:"makeSourceServerReadOnly,omitempty"` - OptionalAgentSettings *map[string]string `json:"optionalAgentSettings,omitempty"` - SelectedDatabases []MigrateMySqlAzureDbForMySqlOfflineDatabaseInput `json:"selectedDatabases"` - SourceConnectionInfo MySqlConnectionInfo `json:"sourceConnectionInfo"` - StartedOn *string `json:"startedOn,omitempty"` - TargetConnectionInfo MySqlConnectionInfo `json:"targetConnectionInfo"` -} - -func (o *MigrateMySqlAzureDbForMySqlOfflineTaskInput) GetStartedOnAsTime() (*time.Time, error) { - if o.StartedOn == nil { - return nil, nil - } - return dates.ParseAsFormat(o.StartedOn, "2006-01-02T15:04:05Z07:00") -} - -func (o *MigrateMySqlAzureDbForMySqlOfflineTaskInput) SetStartedOnAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.StartedOn = &formatted -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_migratemysqlazuredbformysqlofflinetaskoutput.go b/resource-manager/datamigration/2021-06-30/tasks/model_migratemysqlazuredbformysqlofflinetaskoutput.go deleted file mode 100644 index bbac0b45234..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_migratemysqlazuredbformysqlofflinetaskoutput.go +++ /dev/null @@ -1,9 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateMySqlAzureDbForMySqlOfflineTaskOutput struct { - Id *string `json:"id,omitempty"` - ResultType string `json:"resultType"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_migratemysqlazuredbformysqlofflinetaskproperties.go b/resource-manager/datamigration/2021-06-30/tasks/model_migratemysqlazuredbformysqlofflinetaskproperties.go deleted file mode 100644 index 29d782e23c2..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_migratemysqlazuredbformysqlofflinetaskproperties.go +++ /dev/null @@ -1,46 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = MigrateMySqlAzureDbForMySqlOfflineTaskProperties{} - -type MigrateMySqlAzureDbForMySqlOfflineTaskProperties struct { - Input *MigrateMySqlAzureDbForMySqlOfflineTaskInput `json:"input,omitempty"` - Output *[]MigrateMySqlAzureDbForMySqlOfflineTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - ClientData *map[string]string `json:"clientData,omitempty"` - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = MigrateMySqlAzureDbForMySqlOfflineTaskProperties{} - -func (s MigrateMySqlAzureDbForMySqlOfflineTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper MigrateMySqlAzureDbForMySqlOfflineTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateMySqlAzureDbForMySqlOfflineTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateMySqlAzureDbForMySqlOfflineTaskProperties: %+v", err) - } - decoded["taskType"] = "Migrate.MySql.AzureDbForMySql" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateMySqlAzureDbForMySqlOfflineTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_migratemysqlazuredbformysqlsyncdatabaseinput.go b/resource-manager/datamigration/2021-06-30/tasks/model_migratemysqlazuredbformysqlsyncdatabaseinput.go deleted file mode 100644 index 4ea772ad421..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_migratemysqlazuredbformysqlsyncdatabaseinput.go +++ /dev/null @@ -1,13 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateMySqlAzureDbForMySqlSyncDatabaseInput struct { - MigrationSetting *map[string]string `json:"migrationSetting,omitempty"` - Name *string `json:"name,omitempty"` - SourceSetting *map[string]string `json:"sourceSetting,omitempty"` - TableMap *map[string]string `json:"tableMap,omitempty"` - TargetDatabaseName *string `json:"targetDatabaseName,omitempty"` - TargetSetting *map[string]string `json:"targetSetting,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_migratemysqlazuredbformysqlsynctaskinput.go b/resource-manager/datamigration/2021-06-30/tasks/model_migratemysqlazuredbformysqlsynctaskinput.go deleted file mode 100644 index 03e7cbb7354..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_migratemysqlazuredbformysqlsynctaskinput.go +++ /dev/null @@ -1,10 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateMySqlAzureDbForMySqlSyncTaskInput struct { - SelectedDatabases []MigrateMySqlAzureDbForMySqlSyncDatabaseInput `json:"selectedDatabases"` - SourceConnectionInfo MySqlConnectionInfo `json:"sourceConnectionInfo"` - TargetConnectionInfo MySqlConnectionInfo `json:"targetConnectionInfo"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_migratemysqlazuredbformysqlsynctaskoutput.go b/resource-manager/datamigration/2021-06-30/tasks/model_migratemysqlazuredbformysqlsynctaskoutput.go deleted file mode 100644 index 2c3e3a18f82..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_migratemysqlazuredbformysqlsynctaskoutput.go +++ /dev/null @@ -1,9 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateMySqlAzureDbForMySqlSyncTaskOutput struct { - Id *string `json:"id,omitempty"` - ResultType string `json:"resultType"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_migratemysqlazuredbformysqlsynctaskproperties.go b/resource-manager/datamigration/2021-06-30/tasks/model_migratemysqlazuredbformysqlsynctaskproperties.go deleted file mode 100644 index 925d4c36b71..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_migratemysqlazuredbformysqlsynctaskproperties.go +++ /dev/null @@ -1,46 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = MigrateMySqlAzureDbForMySqlSyncTaskProperties{} - -type MigrateMySqlAzureDbForMySqlSyncTaskProperties struct { - Input *MigrateMySqlAzureDbForMySqlSyncTaskInput `json:"input,omitempty"` - Output *[]MigrateMySqlAzureDbForMySqlSyncTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - ClientData *map[string]string `json:"clientData,omitempty"` - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = MigrateMySqlAzureDbForMySqlSyncTaskProperties{} - -func (s MigrateMySqlAzureDbForMySqlSyncTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper MigrateMySqlAzureDbForMySqlSyncTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateMySqlAzureDbForMySqlSyncTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateMySqlAzureDbForMySqlSyncTaskProperties: %+v", err) - } - decoded["taskType"] = "Migrate.MySql.AzureDbForMySql.Sync" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateMySqlAzureDbForMySqlSyncTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_migrateoracleazuredbforpostgresqlsynctaskproperties.go b/resource-manager/datamigration/2021-06-30/tasks/model_migrateoracleazuredbforpostgresqlsynctaskproperties.go deleted file mode 100644 index 4409301a0ff..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_migrateoracleazuredbforpostgresqlsynctaskproperties.go +++ /dev/null @@ -1,46 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = MigrateOracleAzureDbForPostgreSqlSyncTaskProperties{} - -type MigrateOracleAzureDbForPostgreSqlSyncTaskProperties struct { - Input *MigrateOracleAzureDbPostgreSqlSyncTaskInput `json:"input,omitempty"` - Output *[]MigrateOracleAzureDbPostgreSqlSyncTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - ClientData *map[string]string `json:"clientData,omitempty"` - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = MigrateOracleAzureDbForPostgreSqlSyncTaskProperties{} - -func (s MigrateOracleAzureDbForPostgreSqlSyncTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper MigrateOracleAzureDbForPostgreSqlSyncTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateOracleAzureDbForPostgreSqlSyncTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateOracleAzureDbForPostgreSqlSyncTaskProperties: %+v", err) - } - decoded["taskType"] = "Migrate.Oracle.AzureDbForPostgreSql.Sync" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateOracleAzureDbForPostgreSqlSyncTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_migrateoracleazuredbpostgresqlsyncdatabaseinput.go b/resource-manager/datamigration/2021-06-30/tasks/model_migrateoracleazuredbpostgresqlsyncdatabaseinput.go deleted file mode 100644 index 3bb5d73e671..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_migrateoracleazuredbpostgresqlsyncdatabaseinput.go +++ /dev/null @@ -1,15 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateOracleAzureDbPostgreSqlSyncDatabaseInput struct { - CaseManipulation *string `json:"caseManipulation,omitempty"` - MigrationSetting *map[string]string `json:"migrationSetting,omitempty"` - Name *string `json:"name,omitempty"` - SchemaName *string `json:"schemaName,omitempty"` - SourceSetting *map[string]string `json:"sourceSetting,omitempty"` - TableMap *map[string]string `json:"tableMap,omitempty"` - TargetDatabaseName *string `json:"targetDatabaseName,omitempty"` - TargetSetting *map[string]string `json:"targetSetting,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_migrateoracleazuredbpostgresqlsynctaskinput.go b/resource-manager/datamigration/2021-06-30/tasks/model_migrateoracleazuredbpostgresqlsynctaskinput.go deleted file mode 100644 index 0d116456bfa..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_migrateoracleazuredbpostgresqlsynctaskinput.go +++ /dev/null @@ -1,10 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateOracleAzureDbPostgreSqlSyncTaskInput struct { - SelectedDatabases []MigrateOracleAzureDbPostgreSqlSyncDatabaseInput `json:"selectedDatabases"` - SourceConnectionInfo OracleConnectionInfo `json:"sourceConnectionInfo"` - TargetConnectionInfo PostgreSqlConnectionInfo `json:"targetConnectionInfo"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_migrateoracleazuredbpostgresqlsynctaskoutput.go b/resource-manager/datamigration/2021-06-30/tasks/model_migrateoracleazuredbpostgresqlsynctaskoutput.go deleted file mode 100644 index 83887bb4f43..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_migrateoracleazuredbpostgresqlsynctaskoutput.go +++ /dev/null @@ -1,9 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateOracleAzureDbPostgreSqlSyncTaskOutput struct { - Id *string `json:"id,omitempty"` - ResultType string `json:"resultType"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_migratepostgresqlazuredbforpostgresqlsyncdatabaseinput.go b/resource-manager/datamigration/2021-06-30/tasks/model_migratepostgresqlazuredbforpostgresqlsyncdatabaseinput.go deleted file mode 100644 index 4db24e3b517..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_migratepostgresqlazuredbforpostgresqlsyncdatabaseinput.go +++ /dev/null @@ -1,13 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput struct { - MigrationSetting *map[string]string `json:"migrationSetting,omitempty"` - Name *string `json:"name,omitempty"` - SelectedTables *[]MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseTableInput `json:"selectedTables,omitempty"` - SourceSetting *map[string]string `json:"sourceSetting,omitempty"` - TargetDatabaseName *string `json:"targetDatabaseName,omitempty"` - TargetSetting *map[string]string `json:"targetSetting,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_migratepostgresqlazuredbforpostgresqlsyncdatabasetableinput.go b/resource-manager/datamigration/2021-06-30/tasks/model_migratepostgresqlazuredbforpostgresqlsyncdatabasetableinput.go deleted file mode 100644 index 65d99ad522b..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_migratepostgresqlazuredbforpostgresqlsyncdatabasetableinput.go +++ /dev/null @@ -1,8 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseTableInput struct { - Name *string `json:"name,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_migratepostgresqlazuredbforpostgresqlsynctaskinput.go b/resource-manager/datamigration/2021-06-30/tasks/model_migratepostgresqlazuredbforpostgresqlsynctaskinput.go deleted file mode 100644 index 444ba866696..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_migratepostgresqlazuredbforpostgresqlsynctaskinput.go +++ /dev/null @@ -1,10 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput struct { - SelectedDatabases []MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput `json:"selectedDatabases"` - SourceConnectionInfo PostgreSqlConnectionInfo `json:"sourceConnectionInfo"` - TargetConnectionInfo PostgreSqlConnectionInfo `json:"targetConnectionInfo"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_migratepostgresqlazuredbforpostgresqlsynctaskoutput.go b/resource-manager/datamigration/2021-06-30/tasks/model_migratepostgresqlazuredbforpostgresqlsynctaskoutput.go deleted file mode 100644 index 1ae06709c7d..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_migratepostgresqlazuredbforpostgresqlsynctaskoutput.go +++ /dev/null @@ -1,9 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput struct { - Id *string `json:"id,omitempty"` - ResultType string `json:"resultType"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_migratepostgresqlazuredbforpostgresqlsynctaskproperties.go b/resource-manager/datamigration/2021-06-30/tasks/model_migratepostgresqlazuredbforpostgresqlsynctaskproperties.go deleted file mode 100644 index cd6de396fcf..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_migratepostgresqlazuredbforpostgresqlsynctaskproperties.go +++ /dev/null @@ -1,46 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties{} - -type MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties struct { - Input *MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput `json:"input,omitempty"` - Output *[]MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - ClientData *map[string]string `json:"clientData,omitempty"` - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties{} - -func (s MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties: %+v", err) - } - decoded["taskType"] = "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_migratesqlserversqldbdatabaseinput.go b/resource-manager/datamigration/2021-06-30/tasks/model_migratesqlserversqldbdatabaseinput.go deleted file mode 100644 index 01ce0dc4a5c..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_migratesqlserversqldbdatabaseinput.go +++ /dev/null @@ -1,11 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateSqlServerSqlDbDatabaseInput struct { - MakeSourceDbReadOnly *bool `json:"makeSourceDbReadOnly,omitempty"` - Name *string `json:"name,omitempty"` - TableMap *map[string]string `json:"tableMap,omitempty"` - TargetDatabaseName *string `json:"targetDatabaseName,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_migratesqlserversqldbsyncdatabaseinput.go b/resource-manager/datamigration/2021-06-30/tasks/model_migratesqlserversqldbsyncdatabaseinput.go deleted file mode 100644 index 98f5ca4bd52..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_migratesqlserversqldbsyncdatabaseinput.go +++ /dev/null @@ -1,15 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateSqlServerSqlDbSyncDatabaseInput struct { - Id *string `json:"id,omitempty"` - MigrationSetting *map[string]string `json:"migrationSetting,omitempty"` - Name *string `json:"name,omitempty"` - SchemaName *string `json:"schemaName,omitempty"` - SourceSetting *map[string]string `json:"sourceSetting,omitempty"` - TableMap *map[string]string `json:"tableMap,omitempty"` - TargetDatabaseName *string `json:"targetDatabaseName,omitempty"` - TargetSetting *map[string]string `json:"targetSetting,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_migratesqlserversqldbsynctaskinput.go b/resource-manager/datamigration/2021-06-30/tasks/model_migratesqlserversqldbsynctaskinput.go deleted file mode 100644 index ca6a23e3bd6..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_migratesqlserversqldbsynctaskinput.go +++ /dev/null @@ -1,11 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateSqlServerSqlDbSyncTaskInput struct { - SelectedDatabases []MigrateSqlServerSqlDbSyncDatabaseInput `json:"selectedDatabases"` - SourceConnectionInfo SqlConnectionInfo `json:"sourceConnectionInfo"` - TargetConnectionInfo SqlConnectionInfo `json:"targetConnectionInfo"` - ValidationOptions *MigrationValidationOptions `json:"validationOptions,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_migratesqlserversqldbsynctaskoutput.go b/resource-manager/datamigration/2021-06-30/tasks/model_migratesqlserversqldbsynctaskoutput.go deleted file mode 100644 index 67df15e1e79..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_migratesqlserversqldbsynctaskoutput.go +++ /dev/null @@ -1,9 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateSqlServerSqlDbSyncTaskOutput struct { - Id *string `json:"id,omitempty"` - ResultType string `json:"resultType"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_migratesqlserversqldbsynctaskproperties.go b/resource-manager/datamigration/2021-06-30/tasks/model_migratesqlserversqldbsynctaskproperties.go deleted file mode 100644 index dbe67f49a3d..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_migratesqlserversqldbsynctaskproperties.go +++ /dev/null @@ -1,46 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = MigrateSqlServerSqlDbSyncTaskProperties{} - -type MigrateSqlServerSqlDbSyncTaskProperties struct { - Input *MigrateSqlServerSqlDbSyncTaskInput `json:"input,omitempty"` - Output *[]MigrateSqlServerSqlDbSyncTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - ClientData *map[string]string `json:"clientData,omitempty"` - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = MigrateSqlServerSqlDbSyncTaskProperties{} - -func (s MigrateSqlServerSqlDbSyncTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper MigrateSqlServerSqlDbSyncTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSqlServerSqlDbSyncTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlDbSyncTaskProperties: %+v", err) - } - decoded["taskType"] = "Migrate.SqlServer.AzureSqlDb.Sync" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSqlServerSqlDbSyncTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_migratesqlserversqldbtaskinput.go b/resource-manager/datamigration/2021-06-30/tasks/model_migratesqlserversqldbtaskinput.go deleted file mode 100644 index 49ebfe93536..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_migratesqlserversqldbtaskinput.go +++ /dev/null @@ -1,11 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateSqlServerSqlDbTaskInput struct { - SelectedDatabases []MigrateSqlServerSqlDbDatabaseInput `json:"selectedDatabases"` - SourceConnectionInfo SqlConnectionInfo `json:"sourceConnectionInfo"` - TargetConnectionInfo SqlConnectionInfo `json:"targetConnectionInfo"` - ValidationOptions *MigrationValidationOptions `json:"validationOptions,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_migratesqlserversqldbtaskoutput.go b/resource-manager/datamigration/2021-06-30/tasks/model_migratesqlserversqldbtaskoutput.go deleted file mode 100644 index 353515ba42d..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_migratesqlserversqldbtaskoutput.go +++ /dev/null @@ -1,9 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateSqlServerSqlDbTaskOutput struct { - Id *string `json:"id,omitempty"` - ResultType string `json:"resultType"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_migratesqlserversqldbtaskproperties.go b/resource-manager/datamigration/2021-06-30/tasks/model_migratesqlserversqldbtaskproperties.go deleted file mode 100644 index 73dc3374c05..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_migratesqlserversqldbtaskproperties.go +++ /dev/null @@ -1,46 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = MigrateSqlServerSqlDbTaskProperties{} - -type MigrateSqlServerSqlDbTaskProperties struct { - Input *MigrateSqlServerSqlDbTaskInput `json:"input,omitempty"` - Output *[]MigrateSqlServerSqlDbTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - ClientData *map[string]string `json:"clientData,omitempty"` - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = MigrateSqlServerSqlDbTaskProperties{} - -func (s MigrateSqlServerSqlDbTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper MigrateSqlServerSqlDbTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSqlServerSqlDbTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlDbTaskProperties: %+v", err) - } - decoded["taskType"] = "Migrate.SqlServer.SqlDb" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSqlServerSqlDbTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_migratesqlserversqlmidatabaseinput.go b/resource-manager/datamigration/2021-06-30/tasks/model_migratesqlserversqlmidatabaseinput.go deleted file mode 100644 index 849382e3671..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_migratesqlserversqlmidatabaseinput.go +++ /dev/null @@ -1,11 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateSqlServerSqlMIDatabaseInput struct { - BackupFilePaths *[]string `json:"backupFilePaths,omitempty"` - BackupFileShare *FileShare `json:"backupFileShare,omitempty"` - Name string `json:"name"` - RestoreDatabaseName string `json:"restoreDatabaseName"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_migratesqlserversqlmisynctaskoutput.go b/resource-manager/datamigration/2021-06-30/tasks/model_migratesqlserversqlmisynctaskoutput.go deleted file mode 100644 index acb5b19fbf9..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_migratesqlserversqlmisynctaskoutput.go +++ /dev/null @@ -1,9 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateSqlServerSqlMISyncTaskOutput struct { - Id *string `json:"id,omitempty"` - ResultType string `json:"resultType"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_migratesqlserversqlmisynctaskproperties.go b/resource-manager/datamigration/2021-06-30/tasks/model_migratesqlserversqlmisynctaskproperties.go deleted file mode 100644 index a83b1533194..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_migratesqlserversqlmisynctaskproperties.go +++ /dev/null @@ -1,46 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = MigrateSqlServerSqlMISyncTaskProperties{} - -type MigrateSqlServerSqlMISyncTaskProperties struct { - Input *SqlServerSqlMISyncTaskInput `json:"input,omitempty"` - Output *[]MigrateSqlServerSqlMISyncTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - ClientData *map[string]string `json:"clientData,omitempty"` - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = MigrateSqlServerSqlMISyncTaskProperties{} - -func (s MigrateSqlServerSqlMISyncTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper MigrateSqlServerSqlMISyncTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSqlServerSqlMISyncTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlMISyncTaskProperties: %+v", err) - } - decoded["taskType"] = "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSqlServerSqlMISyncTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_migratesqlserversqlmitaskinput.go b/resource-manager/datamigration/2021-06-30/tasks/model_migratesqlserversqlmitaskinput.go deleted file mode 100644 index 1ab8ecf8a44..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_migratesqlserversqlmitaskinput.go +++ /dev/null @@ -1,16 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateSqlServerSqlMITaskInput struct { - AadDomainName *string `json:"aadDomainName,omitempty"` - BackupBlobShare BlobShare `json:"backupBlobShare"` - BackupFileShare *FileShare `json:"backupFileShare,omitempty"` - BackupMode *BackupMode `json:"backupMode,omitempty"` - SelectedAgentJobs *[]string `json:"selectedAgentJobs,omitempty"` - SelectedDatabases []MigrateSqlServerSqlMIDatabaseInput `json:"selectedDatabases"` - SelectedLogins *[]string `json:"selectedLogins,omitempty"` - SourceConnectionInfo SqlConnectionInfo `json:"sourceConnectionInfo"` - TargetConnectionInfo SqlConnectionInfo `json:"targetConnectionInfo"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_migratesqlserversqlmitaskoutput.go b/resource-manager/datamigration/2021-06-30/tasks/model_migratesqlserversqlmitaskoutput.go deleted file mode 100644 index a0bfe102f76..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_migratesqlserversqlmitaskoutput.go +++ /dev/null @@ -1,9 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateSqlServerSqlMITaskOutput struct { - Id *string `json:"id,omitempty"` - ResultType string `json:"resultType"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_migratesqlserversqlmitaskproperties.go b/resource-manager/datamigration/2021-06-30/tasks/model_migratesqlserversqlmitaskproperties.go deleted file mode 100644 index 4b20dbf2fd8..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_migratesqlserversqlmitaskproperties.go +++ /dev/null @@ -1,46 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = MigrateSqlServerSqlMITaskProperties{} - -type MigrateSqlServerSqlMITaskProperties struct { - Input *MigrateSqlServerSqlMITaskInput `json:"input,omitempty"` - Output *[]MigrateSqlServerSqlMITaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - ClientData *map[string]string `json:"clientData,omitempty"` - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = MigrateSqlServerSqlMITaskProperties{} - -func (s MigrateSqlServerSqlMITaskProperties) MarshalJSON() ([]byte, error) { - type wrapper MigrateSqlServerSqlMITaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSqlServerSqlMITaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSqlServerSqlMITaskProperties: %+v", err) - } - decoded["taskType"] = "Migrate.SqlServer.AzureSqlDbMI" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSqlServerSqlMITaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_migratessistaskinput.go b/resource-manager/datamigration/2021-06-30/tasks/model_migratessistaskinput.go deleted file mode 100644 index 7fdb8ac0955..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_migratessistaskinput.go +++ /dev/null @@ -1,10 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateSsisTaskInput struct { - SourceConnectionInfo SqlConnectionInfo `json:"sourceConnectionInfo"` - SsisMigrationInfo SsisMigrationInfo `json:"ssisMigrationInfo"` - TargetConnectionInfo SqlConnectionInfo `json:"targetConnectionInfo"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_migratessistaskoutput.go b/resource-manager/datamigration/2021-06-30/tasks/model_migratessistaskoutput.go deleted file mode 100644 index a7d74119b1e..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_migratessistaskoutput.go +++ /dev/null @@ -1,9 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrateSsisTaskOutput struct { - Id *string `json:"id,omitempty"` - ResultType string `json:"resultType"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_migratessistaskproperties.go b/resource-manager/datamigration/2021-06-30/tasks/model_migratessistaskproperties.go deleted file mode 100644 index f52f0bdc5b6..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_migratessistaskproperties.go +++ /dev/null @@ -1,46 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = MigrateSsisTaskProperties{} - -type MigrateSsisTaskProperties struct { - Input *MigrateSsisTaskInput `json:"input,omitempty"` - Output *[]MigrateSsisTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - ClientData *map[string]string `json:"clientData,omitempty"` - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = MigrateSsisTaskProperties{} - -func (s MigrateSsisTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper MigrateSsisTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MigrateSsisTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MigrateSsisTaskProperties: %+v", err) - } - decoded["taskType"] = "Migrate.Ssis" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MigrateSsisTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_migrationvalidationoptions.go b/resource-manager/datamigration/2021-06-30/tasks/model_migrationvalidationoptions.go deleted file mode 100644 index b980854b09c..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_migrationvalidationoptions.go +++ /dev/null @@ -1,10 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrationValidationOptions struct { - EnableDataIntegrityValidation *bool `json:"enableDataIntegrityValidation,omitempty"` - EnableQueryAnalysisValidation *bool `json:"enableQueryAnalysisValidation,omitempty"` - EnableSchemaValidation *bool `json:"enableSchemaValidation,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_misqlconnectioninfo.go b/resource-manager/datamigration/2021-06-30/tasks/model_misqlconnectioninfo.go deleted file mode 100644 index c586fcfe4ea..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_misqlconnectioninfo.go +++ /dev/null @@ -1,43 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = MiSqlConnectionInfo{} - -type MiSqlConnectionInfo struct { - ManagedInstanceResourceId string `json:"managedInstanceResourceId"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = MiSqlConnectionInfo{} - -func (s MiSqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper MiSqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MiSqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MiSqlConnectionInfo: %+v", err) - } - decoded["type"] = "MiSqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MiSqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_mongodbclusterinfo.go b/resource-manager/datamigration/2021-06-30/tasks/model_mongodbclusterinfo.go deleted file mode 100644 index 399c20215eb..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_mongodbclusterinfo.go +++ /dev/null @@ -1,11 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MongoDbClusterInfo struct { - Databases []MongoDbDatabaseInfo `json:"databases"` - SupportsSharding bool `json:"supportsSharding"` - Type MongoDbClusterType `json:"type"` - Version string `json:"version"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_mongodbcollectioninfo.go b/resource-manager/datamigration/2021-06-30/tasks/model_mongodbcollectioninfo.go deleted file mode 100644 index 03da5a8c9c2..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_mongodbcollectioninfo.go +++ /dev/null @@ -1,19 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MongoDbCollectionInfo struct { - AverageDocumentSize int64 `json:"averageDocumentSize"` - DataSize int64 `json:"dataSize"` - DatabaseName string `json:"databaseName"` - DocumentCount int64 `json:"documentCount"` - IsCapped bool `json:"isCapped"` - IsSystemCollection bool `json:"isSystemCollection"` - IsView bool `json:"isView"` - Name string `json:"name"` - QualifiedName string `json:"qualifiedName"` - ShardKey *MongoDbShardKeyInfo `json:"shardKey,omitempty"` - SupportsSharding bool `json:"supportsSharding"` - ViewOf *string `json:"viewOf,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_mongodbcollectionprogress.go b/resource-manager/datamigration/2021-06-30/tasks/model_mongodbcollectionprogress.go deleted file mode 100644 index 39159fc7d26..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_mongodbcollectionprogress.go +++ /dev/null @@ -1,80 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MongoDbProgress = MongoDbCollectionProgress{} - -type MongoDbCollectionProgress struct { - - // Fields inherited from MongoDbProgress - BytesCopied int64 `json:"bytesCopied"` - DocumentsCopied int64 `json:"documentsCopied"` - ElapsedTime string `json:"elapsedTime"` - Errors map[string]MongoDbError `json:"errors"` - EventsPending int64 `json:"eventsPending"` - EventsReplayed int64 `json:"eventsReplayed"` - LastEventTime *string `json:"lastEventTime,omitempty"` - LastReplayTime *string `json:"lastReplayTime,omitempty"` - Name *string `json:"name,omitempty"` - QualifiedName *string `json:"qualifiedName,omitempty"` - State MongoDbMigrationState `json:"state"` - TotalBytes int64 `json:"totalBytes"` - TotalDocuments int64 `json:"totalDocuments"` -} - -func (o *MongoDbCollectionProgress) GetLastEventTimeAsTime() (*time.Time, error) { - if o.LastEventTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastEventTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *MongoDbCollectionProgress) SetLastEventTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastEventTime = &formatted -} - -func (o *MongoDbCollectionProgress) GetLastReplayTimeAsTime() (*time.Time, error) { - if o.LastReplayTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastReplayTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *MongoDbCollectionProgress) SetLastReplayTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastReplayTime = &formatted -} - -var _ json.Marshaler = MongoDbCollectionProgress{} - -func (s MongoDbCollectionProgress) MarshalJSON() ([]byte, error) { - type wrapper MongoDbCollectionProgress - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MongoDbCollectionProgress: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MongoDbCollectionProgress: %+v", err) - } - decoded["resultType"] = "Collection" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MongoDbCollectionProgress: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_mongodbcollectionsettings.go b/resource-manager/datamigration/2021-06-30/tasks/model_mongodbcollectionsettings.go deleted file mode 100644 index 10c63233a6d..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_mongodbcollectionsettings.go +++ /dev/null @@ -1,10 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MongoDbCollectionSettings struct { - CanDelete *bool `json:"canDelete,omitempty"` - ShardKey *MongoDbShardKeySetting `json:"shardKey,omitempty"` - TargetRUs *int64 `json:"targetRUs,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_mongodbconnectioninfo.go b/resource-manager/datamigration/2021-06-30/tasks/model_mongodbconnectioninfo.go deleted file mode 100644 index f5e40610cfa..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_mongodbconnectioninfo.go +++ /dev/null @@ -1,11 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MongoDbConnectionInfo struct { - ConnectionString string `json:"connectionString"` - Password *string `json:"password,omitempty"` - Type string `json:"type"` - UserName *string `json:"userName,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_mongodbdatabaseinfo.go b/resource-manager/datamigration/2021-06-30/tasks/model_mongodbdatabaseinfo.go deleted file mode 100644 index dd8ea9673c8..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_mongodbdatabaseinfo.go +++ /dev/null @@ -1,14 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MongoDbDatabaseInfo struct { - AverageDocumentSize int64 `json:"averageDocumentSize"` - Collections []MongoDbCollectionInfo `json:"collections"` - DataSize int64 `json:"dataSize"` - DocumentCount int64 `json:"documentCount"` - Name string `json:"name"` - QualifiedName string `json:"qualifiedName"` - SupportsSharding bool `json:"supportsSharding"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_mongodbdatabaseprogress.go b/resource-manager/datamigration/2021-06-30/tasks/model_mongodbdatabaseprogress.go deleted file mode 100644 index 51b0748aaef..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_mongodbdatabaseprogress.go +++ /dev/null @@ -1,128 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MongoDbProgress = MongoDbDatabaseProgress{} - -type MongoDbDatabaseProgress struct { - Collections *map[string]MongoDbProgress `json:"collections,omitempty"` - - // Fields inherited from MongoDbProgress - BytesCopied int64 `json:"bytesCopied"` - DocumentsCopied int64 `json:"documentsCopied"` - ElapsedTime string `json:"elapsedTime"` - Errors map[string]MongoDbError `json:"errors"` - EventsPending int64 `json:"eventsPending"` - EventsReplayed int64 `json:"eventsReplayed"` - LastEventTime *string `json:"lastEventTime,omitempty"` - LastReplayTime *string `json:"lastReplayTime,omitempty"` - Name *string `json:"name,omitempty"` - QualifiedName *string `json:"qualifiedName,omitempty"` - State MongoDbMigrationState `json:"state"` - TotalBytes int64 `json:"totalBytes"` - TotalDocuments int64 `json:"totalDocuments"` -} - -func (o *MongoDbDatabaseProgress) GetLastEventTimeAsTime() (*time.Time, error) { - if o.LastEventTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastEventTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *MongoDbDatabaseProgress) SetLastEventTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastEventTime = &formatted -} - -func (o *MongoDbDatabaseProgress) GetLastReplayTimeAsTime() (*time.Time, error) { - if o.LastReplayTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastReplayTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *MongoDbDatabaseProgress) SetLastReplayTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastReplayTime = &formatted -} - -var _ json.Marshaler = MongoDbDatabaseProgress{} - -func (s MongoDbDatabaseProgress) MarshalJSON() ([]byte, error) { - type wrapper MongoDbDatabaseProgress - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MongoDbDatabaseProgress: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MongoDbDatabaseProgress: %+v", err) - } - decoded["resultType"] = "Database" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MongoDbDatabaseProgress: %+v", err) - } - - return encoded, nil -} - -var _ json.Unmarshaler = &MongoDbDatabaseProgress{} - -func (s *MongoDbDatabaseProgress) UnmarshalJSON(bytes []byte) error { - type alias MongoDbDatabaseProgress - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into MongoDbDatabaseProgress: %+v", err) - } - - s.BytesCopied = decoded.BytesCopied - s.DocumentsCopied = decoded.DocumentsCopied - s.ElapsedTime = decoded.ElapsedTime - s.Errors = decoded.Errors - s.EventsPending = decoded.EventsPending - s.EventsReplayed = decoded.EventsReplayed - s.LastEventTime = decoded.LastEventTime - s.LastReplayTime = decoded.LastReplayTime - s.Name = decoded.Name - s.QualifiedName = decoded.QualifiedName - s.State = decoded.State - s.TotalBytes = decoded.TotalBytes - s.TotalDocuments = decoded.TotalDocuments - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling MongoDbDatabaseProgress into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["collections"]; ok { - var dictionaryTemp map[string]json.RawMessage - if err := json.Unmarshal(v, &dictionaryTemp); err != nil { - return fmt.Errorf("unmarshaling Collections into dictionary map[string]json.RawMessage: %+v", err) - } - - output := make(map[string]MongoDbProgress) - for key, val := range dictionaryTemp { - impl, err := unmarshalMongoDbProgressImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling key %q field 'Collections' for 'MongoDbDatabaseProgress': %+v", key, err) - } - output[key] = impl - } - s.Collections = &output - } - return nil -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_mongodbdatabasesettings.go b/resource-manager/datamigration/2021-06-30/tasks/model_mongodbdatabasesettings.go deleted file mode 100644 index 5b1e406eefd..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_mongodbdatabasesettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MongoDbDatabaseSettings struct { - Collections map[string]MongoDbCollectionSettings `json:"collections"` - TargetRUs *int64 `json:"targetRUs,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_mongodberror.go b/resource-manager/datamigration/2021-06-30/tasks/model_mongodberror.go deleted file mode 100644 index 8dd572c8abf..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_mongodberror.go +++ /dev/null @@ -1,11 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MongoDbError struct { - Code *string `json:"code,omitempty"` - Count *int64 `json:"count,omitempty"` - Message *string `json:"message,omitempty"` - Type *MongoDbErrorType `json:"type,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_mongodbmigrationprogress.go b/resource-manager/datamigration/2021-06-30/tasks/model_mongodbmigrationprogress.go deleted file mode 100644 index b8bd018da31..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_mongodbmigrationprogress.go +++ /dev/null @@ -1,81 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ MongoDbProgress = MongoDbMigrationProgress{} - -type MongoDbMigrationProgress struct { - Databases *map[string]MongoDbDatabaseProgress `json:"databases,omitempty"` - - // Fields inherited from MongoDbProgress - BytesCopied int64 `json:"bytesCopied"` - DocumentsCopied int64 `json:"documentsCopied"` - ElapsedTime string `json:"elapsedTime"` - Errors map[string]MongoDbError `json:"errors"` - EventsPending int64 `json:"eventsPending"` - EventsReplayed int64 `json:"eventsReplayed"` - LastEventTime *string `json:"lastEventTime,omitempty"` - LastReplayTime *string `json:"lastReplayTime,omitempty"` - Name *string `json:"name,omitempty"` - QualifiedName *string `json:"qualifiedName,omitempty"` - State MongoDbMigrationState `json:"state"` - TotalBytes int64 `json:"totalBytes"` - TotalDocuments int64 `json:"totalDocuments"` -} - -func (o *MongoDbMigrationProgress) GetLastEventTimeAsTime() (*time.Time, error) { - if o.LastEventTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastEventTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *MongoDbMigrationProgress) SetLastEventTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastEventTime = &formatted -} - -func (o *MongoDbMigrationProgress) GetLastReplayTimeAsTime() (*time.Time, error) { - if o.LastReplayTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastReplayTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *MongoDbMigrationProgress) SetLastReplayTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastReplayTime = &formatted -} - -var _ json.Marshaler = MongoDbMigrationProgress{} - -func (s MongoDbMigrationProgress) MarshalJSON() ([]byte, error) { - type wrapper MongoDbMigrationProgress - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MongoDbMigrationProgress: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MongoDbMigrationProgress: %+v", err) - } - decoded["resultType"] = "Migration" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MongoDbMigrationProgress: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_mongodbmigrationsettings.go b/resource-manager/datamigration/2021-06-30/tasks/model_mongodbmigrationsettings.go deleted file mode 100644 index 88155ffbc8f..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_mongodbmigrationsettings.go +++ /dev/null @@ -1,13 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MongoDbMigrationSettings struct { - BoostRUs *int64 `json:"boostRUs,omitempty"` - Databases map[string]MongoDbDatabaseSettings `json:"databases"` - Replication *MongoDbReplication `json:"replication,omitempty"` - Source MongoDbConnectionInfo `json:"source"` - Target MongoDbConnectionInfo `json:"target"` - Throttling *MongoDbThrottlingSettings `json:"throttling,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_mongodbprogress.go b/resource-manager/datamigration/2021-06-30/tasks/model_mongodbprogress.go deleted file mode 100644 index 4617308946a..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_mongodbprogress.go +++ /dev/null @@ -1,69 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MongoDbProgress interface { -} - -// RawMongoDbProgressImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawMongoDbProgressImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalMongoDbProgressImplementation(input []byte) (MongoDbProgress, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling MongoDbProgress into map[string]interface: %+v", err) - } - - value, ok := temp["resultType"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "Collection") { - var out MongoDbCollectionProgress - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MongoDbCollectionProgress: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Database") { - var out MongoDbDatabaseProgress - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MongoDbDatabaseProgress: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Migration") { - var out MongoDbMigrationProgress - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MongoDbMigrationProgress: %+v", err) - } - return out, nil - } - - out := RawMongoDbProgressImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_mongodbshardkeyfield.go b/resource-manager/datamigration/2021-06-30/tasks/model_mongodbshardkeyfield.go deleted file mode 100644 index 5f3dd41df2c..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_mongodbshardkeyfield.go +++ /dev/null @@ -1,9 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MongoDbShardKeyField struct { - Name string `json:"name"` - Order MongoDbShardKeyOrder `json:"order"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_mongodbshardkeyinfo.go b/resource-manager/datamigration/2021-06-30/tasks/model_mongodbshardkeyinfo.go deleted file mode 100644 index be7831724d3..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_mongodbshardkeyinfo.go +++ /dev/null @@ -1,9 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MongoDbShardKeyInfo struct { - Fields []MongoDbShardKeyField `json:"fields"` - IsUnique bool `json:"isUnique"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_mongodbshardkeysetting.go b/resource-manager/datamigration/2021-06-30/tasks/model_mongodbshardkeysetting.go deleted file mode 100644 index b51d8e57fc0..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_mongodbshardkeysetting.go +++ /dev/null @@ -1,9 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MongoDbShardKeySetting struct { - Fields []MongoDbShardKeyField `json:"fields"` - IsUnique bool `json:"isUnique"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_mongodbthrottlingsettings.go b/resource-manager/datamigration/2021-06-30/tasks/model_mongodbthrottlingsettings.go deleted file mode 100644 index baec5017e45..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_mongodbthrottlingsettings.go +++ /dev/null @@ -1,10 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MongoDbThrottlingSettings struct { - MaxParallelism *int64 `json:"maxParallelism,omitempty"` - MinFreeCPU *int64 `json:"minFreeCpu,omitempty"` - MinFreeMemoryMb *int64 `json:"minFreeMemoryMb,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_mysqlconnectioninfo.go b/resource-manager/datamigration/2021-06-30/tasks/model_mysqlconnectioninfo.go deleted file mode 100644 index 1b9551bd60c..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_mysqlconnectioninfo.go +++ /dev/null @@ -1,45 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = MySqlConnectionInfo{} - -type MySqlConnectionInfo struct { - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Port int64 `json:"port"` - ServerName string `json:"serverName"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = MySqlConnectionInfo{} - -func (s MySqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper MySqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MySqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MySqlConnectionInfo: %+v", err) - } - decoded["type"] = "MySqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MySqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_odataerror.go b/resource-manager/datamigration/2021-06-30/tasks/model_odataerror.go deleted file mode 100644 index 2f8011acd66..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_odataerror.go +++ /dev/null @@ -1,10 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ODataError struct { - Code *string `json:"code,omitempty"` - Details *[]ODataError `json:"details,omitempty"` - Message *string `json:"message,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_oracleconnectioninfo.go b/resource-manager/datamigration/2021-06-30/tasks/model_oracleconnectioninfo.go deleted file mode 100644 index 432cce54fe9..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_oracleconnectioninfo.go +++ /dev/null @@ -1,43 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = OracleConnectionInfo{} - -type OracleConnectionInfo struct { - DataSource string `json:"dataSource"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = OracleConnectionInfo{} - -func (s OracleConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper OracleConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling OracleConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling OracleConnectionInfo: %+v", err) - } - decoded["type"] = "OracleConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling OracleConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_postgresqlconnectioninfo.go b/resource-manager/datamigration/2021-06-30/tasks/model_postgresqlconnectioninfo.go deleted file mode 100644 index 91b7f33d51b..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_postgresqlconnectioninfo.go +++ /dev/null @@ -1,47 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = PostgreSqlConnectionInfo{} - -type PostgreSqlConnectionInfo struct { - DatabaseName *string `json:"databaseName,omitempty"` - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Port int64 `json:"port"` - ServerName string `json:"serverName"` - TrustServerCertificate *bool `json:"trustServerCertificate,omitempty"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = PostgreSqlConnectionInfo{} - -func (s PostgreSqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper PostgreSqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling PostgreSqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling PostgreSqlConnectionInfo: %+v", err) - } - decoded["type"] = "PostgreSqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling PostgreSqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_projecttaskproperties.go b/resource-manager/datamigration/2021-06-30/tasks/model_projecttaskproperties.go deleted file mode 100644 index 2ab2e5f5a90..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_projecttaskproperties.go +++ /dev/null @@ -1,317 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProjectTaskProperties interface { -} - -// RawProjectTaskPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawProjectTaskPropertiesImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalProjectTaskPropertiesImplementation(input []byte) (ProjectTaskProperties, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ProjectTaskProperties into map[string]interface: %+v", err) - } - - value, ok := temp["taskType"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "Connect.MongoDb") { - var out ConnectToMongoDbTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ConnectToMongoDbTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "ConnectToSource.MySql") { - var out ConnectToSourceMySqlTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ConnectToSourceMySqlTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "ConnectToSource.Oracle.Sync") { - var out ConnectToSourceOracleSyncTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ConnectToSourceOracleSyncTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "ConnectToSource.PostgreSql.Sync") { - var out ConnectToSourcePostgreSqlSyncTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ConnectToSourcePostgreSqlSyncTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "ConnectToSource.SqlServer.Sync") { - var out ConnectToSourceSqlServerSyncTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ConnectToSourceSqlServerSyncTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "ConnectToSource.SqlServer") { - var out ConnectToSourceSqlServerTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ConnectToSourceSqlServerTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "ConnectToTarget.AzureDbForMySql") { - var out ConnectToTargetAzureDbForMySqlTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ConnectToTargetAzureDbForMySqlTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "ConnectToTarget.AzureDbForPostgreSql.Sync") { - var out ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync") { - var out ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "ConnectToTarget.SqlDb") { - var out ConnectToTargetSqlDbTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ConnectToTargetSqlDbTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "ConnectToTarget.AzureSqlDbMI.Sync.LRS") { - var out ConnectToTargetSqlMISyncTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ConnectToTargetSqlMISyncTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "ConnectToTarget.AzureSqlDbMI") { - var out ConnectToTargetSqlMITaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ConnectToTargetSqlMITaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "ConnectToTarget.SqlDb.Sync") { - var out ConnectToTargetSqlSqlDbSyncTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ConnectToTargetSqlSqlDbSyncTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "GetTDECertificates.Sql") { - var out GetTdeCertificatesSqlTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into GetTdeCertificatesSqlTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "GetUserTablesMySql") { - var out GetUserTablesMySqlTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into GetUserTablesMySqlTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "GetUserTablesOracle") { - var out GetUserTablesOracleTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into GetUserTablesOracleTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "GetUserTablesPostgreSql") { - var out GetUserTablesPostgreSqlTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into GetUserTablesPostgreSqlTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "GetUserTables.AzureSqlDb.Sync") { - var out GetUserTablesSqlSyncTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into GetUserTablesSqlSyncTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "GetUserTables.Sql") { - var out GetUserTablesSqlTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into GetUserTablesSqlTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Migrate.MongoDb") { - var out MigrateMongoDbTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateMongoDbTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Migrate.MySql.AzureDbForMySql") { - var out MigrateMySqlAzureDbForMySqlOfflineTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateMySqlAzureDbForMySqlOfflineTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Migrate.MySql.AzureDbForMySql.Sync") { - var out MigrateMySqlAzureDbForMySqlSyncTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateMySqlAzureDbForMySqlSyncTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Migrate.Oracle.AzureDbForPostgreSql.Sync") { - var out MigrateOracleAzureDbForPostgreSqlSyncTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateOracleAzureDbForPostgreSqlSyncTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2") { - var out MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Migrate.SqlServer.AzureSqlDb.Sync") { - var out MigrateSqlServerSqlDbSyncTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSqlServerSqlDbSyncTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Migrate.SqlServer.SqlDb") { - var out MigrateSqlServerSqlDbTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSqlServerSqlDbTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS") { - var out MigrateSqlServerSqlMISyncTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSqlServerSqlMISyncTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Migrate.SqlServer.AzureSqlDbMI") { - var out MigrateSqlServerSqlMITaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSqlServerSqlMITaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Migrate.Ssis") { - var out MigrateSsisTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MigrateSsisTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "ValidateMigrationInput.SqlServer.SqlDb.Sync") { - var out ValidateMigrationInputSqlServerSqlDbSyncTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ValidateMigrationInputSqlServerSqlDbSyncTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS") { - var out ValidateMigrationInputSqlServerSqlMISyncTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ValidateMigrationInputSqlServerSqlMISyncTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "ValidateMigrationInput.SqlServer.AzureSqlDbMI") { - var out ValidateMigrationInputSqlServerSqlMITaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ValidateMigrationInputSqlServerSqlMITaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Validate.MongoDb") { - var out ValidateMongoDbTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ValidateMongoDbTaskProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Validate.Oracle.AzureDbPostgreSql.Sync") { - var out ValidateOracleAzureDbForPostgreSqlSyncTaskProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ValidateOracleAzureDbForPostgreSqlSyncTaskProperties: %+v", err) - } - return out, nil - } - - out := RawProjectTaskPropertiesImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_reportableexception.go b/resource-manager/datamigration/2021-06-30/tasks/model_reportableexception.go deleted file mode 100644 index af7199acb7c..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_reportableexception.go +++ /dev/null @@ -1,13 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ReportableException struct { - ActionableMessage *string `json:"actionableMessage,omitempty"` - FilePath *string `json:"filePath,omitempty"` - HResult *int64 `json:"hResult,omitempty"` - LineNumber *string `json:"lineNumber,omitempty"` - Message *string `json:"message,omitempty"` - StackTrace *string `json:"stackTrace,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_selectedcertificateinput.go b/resource-manager/datamigration/2021-06-30/tasks/model_selectedcertificateinput.go deleted file mode 100644 index 22a4a9a8296..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_selectedcertificateinput.go +++ /dev/null @@ -1,9 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SelectedCertificateInput struct { - CertificateName string `json:"certificateName"` - Password string `json:"password"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_serverproperties.go b/resource-manager/datamigration/2021-06-30/tasks/model_serverproperties.go deleted file mode 100644 index d982bde33ed..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_serverproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServerProperties struct { - ServerDatabaseCount *int64 `json:"serverDatabaseCount,omitempty"` - ServerEdition *string `json:"serverEdition,omitempty"` - ServerName *string `json:"serverName,omitempty"` - ServerOperatingSystemVersion *string `json:"serverOperatingSystemVersion,omitempty"` - ServerPlatform *string `json:"serverPlatform,omitempty"` - ServerVersion *string `json:"serverVersion,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_sqlconnectioninfo.go b/resource-manager/datamigration/2021-06-30/tasks/model_sqlconnectioninfo.go deleted file mode 100644 index b0666fec396..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_sqlconnectioninfo.go +++ /dev/null @@ -1,48 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = SqlConnectionInfo{} - -type SqlConnectionInfo struct { - AdditionalSettings *string `json:"additionalSettings,omitempty"` - Authentication *AuthenticationType `json:"authentication,omitempty"` - DataSource string `json:"dataSource"` - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Platform *SqlSourcePlatform `json:"platform,omitempty"` - TrustServerCertificate *bool `json:"trustServerCertificate,omitempty"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = SqlConnectionInfo{} - -func (s SqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper SqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SqlConnectionInfo: %+v", err) - } - decoded["type"] = "SqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_sqlserversqlmisynctaskinput.go b/resource-manager/datamigration/2021-06-30/tasks/model_sqlserversqlmisynctaskinput.go deleted file mode 100644 index 516f879e3b9..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_sqlserversqlmisynctaskinput.go +++ /dev/null @@ -1,13 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SqlServerSqlMISyncTaskInput struct { - AzureApp AzureActiveDirectoryApp `json:"azureApp"` - BackupFileShare *FileShare `json:"backupFileShare,omitempty"` - SelectedDatabases []MigrateSqlServerSqlMIDatabaseInput `json:"selectedDatabases"` - SourceConnectionInfo SqlConnectionInfo `json:"sourceConnectionInfo"` - StorageResourceId string `json:"storageResourceId"` - TargetConnectionInfo MiSqlConnectionInfo `json:"targetConnectionInfo"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_ssismigrationinfo.go b/resource-manager/datamigration/2021-06-30/tasks/model_ssismigrationinfo.go deleted file mode 100644 index a3d46b9ad45..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_ssismigrationinfo.go +++ /dev/null @@ -1,10 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SsisMigrationInfo struct { - EnvironmentOverwriteOption *SsisMigrationOverwriteOption `json:"environmentOverwriteOption,omitempty"` - ProjectOverwriteOption *SsisMigrationOverwriteOption `json:"projectOverwriteOption,omitempty"` - SsisStoreType *SsisStoreType `json:"ssisStoreType,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_validatemigrationinputsqlserversqldbsynctaskproperties.go b/resource-manager/datamigration/2021-06-30/tasks/model_validatemigrationinputsqlserversqldbsynctaskproperties.go deleted file mode 100644 index 79607baa21a..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_validatemigrationinputsqlserversqldbsynctaskproperties.go +++ /dev/null @@ -1,46 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = ValidateMigrationInputSqlServerSqlDbSyncTaskProperties{} - -type ValidateMigrationInputSqlServerSqlDbSyncTaskProperties struct { - Input *ValidateSyncMigrationInputSqlServerTaskInput `json:"input,omitempty"` - Output *[]ValidateSyncMigrationInputSqlServerTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - ClientData *map[string]string `json:"clientData,omitempty"` - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = ValidateMigrationInputSqlServerSqlDbSyncTaskProperties{} - -func (s ValidateMigrationInputSqlServerSqlDbSyncTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper ValidateMigrationInputSqlServerSqlDbSyncTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ValidateMigrationInputSqlServerSqlDbSyncTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ValidateMigrationInputSqlServerSqlDbSyncTaskProperties: %+v", err) - } - decoded["taskType"] = "ValidateMigrationInput.SqlServer.SqlDb.Sync" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ValidateMigrationInputSqlServerSqlDbSyncTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_validatemigrationinputsqlserversqlmisynctaskoutput.go b/resource-manager/datamigration/2021-06-30/tasks/model_validatemigrationinputsqlserversqlmisynctaskoutput.go deleted file mode 100644 index 7bac34b7470..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_validatemigrationinputsqlserversqlmisynctaskoutput.go +++ /dev/null @@ -1,10 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ValidateMigrationInputSqlServerSqlMISyncTaskOutput struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_validatemigrationinputsqlserversqlmisynctaskproperties.go b/resource-manager/datamigration/2021-06-30/tasks/model_validatemigrationinputsqlserversqlmisynctaskproperties.go deleted file mode 100644 index 99c62688ad2..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_validatemigrationinputsqlserversqlmisynctaskproperties.go +++ /dev/null @@ -1,46 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = ValidateMigrationInputSqlServerSqlMISyncTaskProperties{} - -type ValidateMigrationInputSqlServerSqlMISyncTaskProperties struct { - Input *SqlServerSqlMISyncTaskInput `json:"input,omitempty"` - Output *[]ValidateMigrationInputSqlServerSqlMISyncTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - ClientData *map[string]string `json:"clientData,omitempty"` - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = ValidateMigrationInputSqlServerSqlMISyncTaskProperties{} - -func (s ValidateMigrationInputSqlServerSqlMISyncTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper ValidateMigrationInputSqlServerSqlMISyncTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ValidateMigrationInputSqlServerSqlMISyncTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ValidateMigrationInputSqlServerSqlMISyncTaskProperties: %+v", err) - } - decoded["taskType"] = "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ValidateMigrationInputSqlServerSqlMISyncTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_validatemigrationinputsqlserversqlmitaskinput.go b/resource-manager/datamigration/2021-06-30/tasks/model_validatemigrationinputsqlserversqlmitaskinput.go deleted file mode 100644 index 55e06bd2eea..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_validatemigrationinputsqlserversqlmitaskinput.go +++ /dev/null @@ -1,14 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ValidateMigrationInputSqlServerSqlMITaskInput struct { - BackupBlobShare BlobShare `json:"backupBlobShare"` - BackupFileShare *FileShare `json:"backupFileShare,omitempty"` - BackupMode *BackupMode `json:"backupMode,omitempty"` - SelectedDatabases []MigrateSqlServerSqlMIDatabaseInput `json:"selectedDatabases"` - SelectedLogins *[]string `json:"selectedLogins,omitempty"` - SourceConnectionInfo SqlConnectionInfo `json:"sourceConnectionInfo"` - TargetConnectionInfo SqlConnectionInfo `json:"targetConnectionInfo"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_validatemigrationinputsqlserversqlmitaskoutput.go b/resource-manager/datamigration/2021-06-30/tasks/model_validatemigrationinputsqlserversqlmitaskoutput.go deleted file mode 100644 index 79fa5454c8e..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_validatemigrationinputsqlserversqlmitaskoutput.go +++ /dev/null @@ -1,15 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ValidateMigrationInputSqlServerSqlMITaskOutput struct { - BackupFolderErrors *[]ReportableException `json:"backupFolderErrors,omitempty"` - BackupShareCredentialsErrors *[]ReportableException `json:"backupShareCredentialsErrors,omitempty"` - BackupStorageAccountErrors *[]ReportableException `json:"backupStorageAccountErrors,omitempty"` - DatabaseBackupInfo *DatabaseBackupInfo `json:"databaseBackupInfo,omitempty"` - ExistingBackupErrors *[]ReportableException `json:"existingBackupErrors,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - RestoreDatabaseNameErrors *[]ReportableException `json:"restoreDatabaseNameErrors,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_validatemigrationinputsqlserversqlmitaskproperties.go b/resource-manager/datamigration/2021-06-30/tasks/model_validatemigrationinputsqlserversqlmitaskproperties.go deleted file mode 100644 index 33b231a7821..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_validatemigrationinputsqlserversqlmitaskproperties.go +++ /dev/null @@ -1,46 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = ValidateMigrationInputSqlServerSqlMITaskProperties{} - -type ValidateMigrationInputSqlServerSqlMITaskProperties struct { - Input *ValidateMigrationInputSqlServerSqlMITaskInput `json:"input,omitempty"` - Output *[]ValidateMigrationInputSqlServerSqlMITaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - ClientData *map[string]string `json:"clientData,omitempty"` - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = ValidateMigrationInputSqlServerSqlMITaskProperties{} - -func (s ValidateMigrationInputSqlServerSqlMITaskProperties) MarshalJSON() ([]byte, error) { - type wrapper ValidateMigrationInputSqlServerSqlMITaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ValidateMigrationInputSqlServerSqlMITaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ValidateMigrationInputSqlServerSqlMITaskProperties: %+v", err) - } - decoded["taskType"] = "ValidateMigrationInput.SqlServer.AzureSqlDbMI" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ValidateMigrationInputSqlServerSqlMITaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_validatemongodbtaskproperties.go b/resource-manager/datamigration/2021-06-30/tasks/model_validatemongodbtaskproperties.go deleted file mode 100644 index fc746cd2e54..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_validatemongodbtaskproperties.go +++ /dev/null @@ -1,46 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = ValidateMongoDbTaskProperties{} - -type ValidateMongoDbTaskProperties struct { - Input *MongoDbMigrationSettings `json:"input,omitempty"` - Output *[]MongoDbMigrationProgress `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - ClientData *map[string]string `json:"clientData,omitempty"` - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = ValidateMongoDbTaskProperties{} - -func (s ValidateMongoDbTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper ValidateMongoDbTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ValidateMongoDbTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ValidateMongoDbTaskProperties: %+v", err) - } - decoded["taskType"] = "Validate.MongoDb" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ValidateMongoDbTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_validateoracleazuredbforpostgresqlsynctaskproperties.go b/resource-manager/datamigration/2021-06-30/tasks/model_validateoracleazuredbforpostgresqlsynctaskproperties.go deleted file mode 100644 index d11c9c16338..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_validateoracleazuredbforpostgresqlsynctaskproperties.go +++ /dev/null @@ -1,46 +0,0 @@ -package tasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ProjectTaskProperties = ValidateOracleAzureDbForPostgreSqlSyncTaskProperties{} - -type ValidateOracleAzureDbForPostgreSqlSyncTaskProperties struct { - Input *MigrateOracleAzureDbPostgreSqlSyncTaskInput `json:"input,omitempty"` - Output *[]ValidateOracleAzureDbPostgreSqlSyncTaskOutput `json:"output,omitempty"` - - // Fields inherited from ProjectTaskProperties - ClientData *map[string]string `json:"clientData,omitempty"` - Commands *[]CommandProperties `json:"commands,omitempty"` - Errors *[]ODataError `json:"errors,omitempty"` - State *TaskState `json:"state,omitempty"` -} - -var _ json.Marshaler = ValidateOracleAzureDbForPostgreSqlSyncTaskProperties{} - -func (s ValidateOracleAzureDbForPostgreSqlSyncTaskProperties) MarshalJSON() ([]byte, error) { - type wrapper ValidateOracleAzureDbForPostgreSqlSyncTaskProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ValidateOracleAzureDbForPostgreSqlSyncTaskProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ValidateOracleAzureDbForPostgreSqlSyncTaskProperties: %+v", err) - } - decoded["taskType"] = "Validate.Oracle.AzureDbPostgreSql.Sync" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ValidateOracleAzureDbForPostgreSqlSyncTaskProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_validateoracleazuredbpostgresqlsynctaskoutput.go b/resource-manager/datamigration/2021-06-30/tasks/model_validateoracleazuredbpostgresqlsynctaskoutput.go deleted file mode 100644 index 950aff55304..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_validateoracleazuredbpostgresqlsynctaskoutput.go +++ /dev/null @@ -1,8 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ValidateOracleAzureDbPostgreSqlSyncTaskOutput struct { - ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_validatesyncmigrationinputsqlservertaskinput.go b/resource-manager/datamigration/2021-06-30/tasks/model_validatesyncmigrationinputsqlservertaskinput.go deleted file mode 100644 index 1455cc820af..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_validatesyncmigrationinputsqlservertaskinput.go +++ /dev/null @@ -1,10 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ValidateSyncMigrationInputSqlServerTaskInput struct { - SelectedDatabases []MigrateSqlServerSqlDbSyncDatabaseInput `json:"selectedDatabases"` - SourceConnectionInfo SqlConnectionInfo `json:"sourceConnectionInfo"` - TargetConnectionInfo SqlConnectionInfo `json:"targetConnectionInfo"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/model_validatesyncmigrationinputsqlservertaskoutput.go b/resource-manager/datamigration/2021-06-30/tasks/model_validatesyncmigrationinputsqlservertaskoutput.go deleted file mode 100644 index a0b2fa6e508..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/model_validatesyncmigrationinputsqlservertaskoutput.go +++ /dev/null @@ -1,10 +0,0 @@ -package tasks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ValidateSyncMigrationInputSqlServerTaskOutput struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - ValidationErrors *[]ReportableException `json:"validationErrors,omitempty"` -} diff --git a/resource-manager/datamigration/2021-06-30/tasks/version.go b/resource-manager/datamigration/2021-06-30/tasks/version.go deleted file mode 100644 index d10814c3f41..00000000000 --- a/resource-manager/datamigration/2021-06-30/tasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package tasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-06-30" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/tasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2021-06-30/taskscommons/README.md b/resource-manager/datamigration/2021-06-30/taskscommons/README.md deleted file mode 100644 index 2205d5feaeb..00000000000 --- a/resource-manager/datamigration/2021-06-30/taskscommons/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/taskscommons` Documentation - -The `taskscommons` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2021-06-30`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/taskscommons" -``` - - -### Client Initialization - -```go -client := taskscommons.NewTasksCommonsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2021-06-30/taskscommons/client.go b/resource-manager/datamigration/2021-06-30/taskscommons/client.go deleted file mode 100644 index cb4dd522708..00000000000 --- a/resource-manager/datamigration/2021-06-30/taskscommons/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package taskscommons - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TasksCommonsClient struct { - Client *resourcemanager.Client -} - -func NewTasksCommonsClientWithBaseURI(sdkApi sdkEnv.Api) (*TasksCommonsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "taskscommons", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating TasksCommonsClient: %+v", err) - } - - return &TasksCommonsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2021-06-30/taskscommons/constants.go b/resource-manager/datamigration/2021-06-30/taskscommons/constants.go deleted file mode 100644 index 0e216c13f29..00000000000 --- a/resource-manager/datamigration/2021-06-30/taskscommons/constants.go +++ /dev/null @@ -1,98 +0,0 @@ -package taskscommons - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthenticationType string - -const ( - AuthenticationTypeActiveDirectoryIntegrated AuthenticationType = "ActiveDirectoryIntegrated" - AuthenticationTypeActiveDirectoryPassword AuthenticationType = "ActiveDirectoryPassword" - AuthenticationTypeNone AuthenticationType = "None" - AuthenticationTypeSqlAuthentication AuthenticationType = "SqlAuthentication" - AuthenticationTypeWindowsAuthentication AuthenticationType = "WindowsAuthentication" -) - -func PossibleValuesForAuthenticationType() []string { - return []string{ - string(AuthenticationTypeActiveDirectoryIntegrated), - string(AuthenticationTypeActiveDirectoryPassword), - string(AuthenticationTypeNone), - string(AuthenticationTypeSqlAuthentication), - string(AuthenticationTypeWindowsAuthentication), - } -} - -func (s *AuthenticationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAuthenticationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAuthenticationType(input string) (*AuthenticationType, error) { - vals := map[string]AuthenticationType{ - "activedirectoryintegrated": AuthenticationTypeActiveDirectoryIntegrated, - "activedirectorypassword": AuthenticationTypeActiveDirectoryPassword, - "none": AuthenticationTypeNone, - "sqlauthentication": AuthenticationTypeSqlAuthentication, - "windowsauthentication": AuthenticationTypeWindowsAuthentication, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AuthenticationType(input) - return &out, nil -} - -type SqlSourcePlatform string - -const ( - SqlSourcePlatformSqlOnPrem SqlSourcePlatform = "SqlOnPrem" -) - -func PossibleValuesForSqlSourcePlatform() []string { - return []string{ - string(SqlSourcePlatformSqlOnPrem), - } -} - -func (s *SqlSourcePlatform) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSqlSourcePlatform(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSqlSourcePlatform(input string) (*SqlSourcePlatform, error) { - vals := map[string]SqlSourcePlatform{ - "sqlonprem": SqlSourcePlatformSqlOnPrem, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SqlSourcePlatform(input) - return &out, nil -} diff --git a/resource-manager/datamigration/2021-06-30/taskscommons/model_connectioninfo.go b/resource-manager/datamigration/2021-06-30/taskscommons/model_connectioninfo.go deleted file mode 100644 index 77e0eec1f8d..00000000000 --- a/resource-manager/datamigration/2021-06-30/taskscommons/model_connectioninfo.go +++ /dev/null @@ -1,61 +0,0 @@ -package taskscommons - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "MiSqlConnectionInfo") { - var out MiSqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MiSqlConnectionInfo: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "SqlConnectionInfo") { - var out SqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2021-06-30/taskscommons/model_misqlconnectioninfo.go b/resource-manager/datamigration/2021-06-30/taskscommons/model_misqlconnectioninfo.go deleted file mode 100644 index af902bfe2c3..00000000000 --- a/resource-manager/datamigration/2021-06-30/taskscommons/model_misqlconnectioninfo.go +++ /dev/null @@ -1,43 +0,0 @@ -package taskscommons - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = MiSqlConnectionInfo{} - -type MiSqlConnectionInfo struct { - ManagedInstanceResourceId string `json:"managedInstanceResourceId"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = MiSqlConnectionInfo{} - -func (s MiSqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper MiSqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MiSqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MiSqlConnectionInfo: %+v", err) - } - decoded["type"] = "MiSqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MiSqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/taskscommons/model_sqlconnectioninfo.go b/resource-manager/datamigration/2021-06-30/taskscommons/model_sqlconnectioninfo.go deleted file mode 100644 index a20bc39ebe1..00000000000 --- a/resource-manager/datamigration/2021-06-30/taskscommons/model_sqlconnectioninfo.go +++ /dev/null @@ -1,48 +0,0 @@ -package taskscommons - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = SqlConnectionInfo{} - -type SqlConnectionInfo struct { - AdditionalSettings *string `json:"additionalSettings,omitempty"` - Authentication *AuthenticationType `json:"authentication,omitempty"` - DataSource string `json:"dataSource"` - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Platform *SqlSourcePlatform `json:"platform,omitempty"` - TrustServerCertificate *bool `json:"trustServerCertificate,omitempty"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = SqlConnectionInfo{} - -func (s SqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper SqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SqlConnectionInfo: %+v", err) - } - decoded["type"] = "SqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/taskscommons/version.go b/resource-manager/datamigration/2021-06-30/taskscommons/version.go deleted file mode 100644 index eae781f82a5..00000000000 --- a/resource-manager/datamigration/2021-06-30/taskscommons/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package taskscommons - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-06-30" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/taskscommons/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2021-06-30/validatemigrationinputsqlserversqlmisynctasks/README.md b/resource-manager/datamigration/2021-06-30/validatemigrationinputsqlserversqlmisynctasks/README.md deleted file mode 100644 index db86b14cd98..00000000000 --- a/resource-manager/datamigration/2021-06-30/validatemigrationinputsqlserversqlmisynctasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/validatemigrationinputsqlserversqlmisynctasks` Documentation - -The `validatemigrationinputsqlserversqlmisynctasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2021-06-30`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/validatemigrationinputsqlserversqlmisynctasks" -``` - - -### Client Initialization - -```go -client := validatemigrationinputsqlserversqlmisynctasks.NewValidateMigrationInputSqlServerSqlMiSyncTasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2021-06-30/validatemigrationinputsqlserversqlmisynctasks/client.go b/resource-manager/datamigration/2021-06-30/validatemigrationinputsqlserversqlmisynctasks/client.go deleted file mode 100644 index efd9480d513..00000000000 --- a/resource-manager/datamigration/2021-06-30/validatemigrationinputsqlserversqlmisynctasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package validatemigrationinputsqlserversqlmisynctasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ValidateMigrationInputSqlServerSqlMiSyncTasksClient struct { - Client *resourcemanager.Client -} - -func NewValidateMigrationInputSqlServerSqlMiSyncTasksClientWithBaseURI(sdkApi sdkEnv.Api) (*ValidateMigrationInputSqlServerSqlMiSyncTasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "validatemigrationinputsqlserversqlmisynctasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ValidateMigrationInputSqlServerSqlMiSyncTasksClient: %+v", err) - } - - return &ValidateMigrationInputSqlServerSqlMiSyncTasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2021-06-30/validatemigrationinputsqlserversqlmisynctasks/constants.go b/resource-manager/datamigration/2021-06-30/validatemigrationinputsqlserversqlmisynctasks/constants.go deleted file mode 100644 index 4b4f4f10180..00000000000 --- a/resource-manager/datamigration/2021-06-30/validatemigrationinputsqlserversqlmisynctasks/constants.go +++ /dev/null @@ -1,98 +0,0 @@ -package validatemigrationinputsqlserversqlmisynctasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthenticationType string - -const ( - AuthenticationTypeActiveDirectoryIntegrated AuthenticationType = "ActiveDirectoryIntegrated" - AuthenticationTypeActiveDirectoryPassword AuthenticationType = "ActiveDirectoryPassword" - AuthenticationTypeNone AuthenticationType = "None" - AuthenticationTypeSqlAuthentication AuthenticationType = "SqlAuthentication" - AuthenticationTypeWindowsAuthentication AuthenticationType = "WindowsAuthentication" -) - -func PossibleValuesForAuthenticationType() []string { - return []string{ - string(AuthenticationTypeActiveDirectoryIntegrated), - string(AuthenticationTypeActiveDirectoryPassword), - string(AuthenticationTypeNone), - string(AuthenticationTypeSqlAuthentication), - string(AuthenticationTypeWindowsAuthentication), - } -} - -func (s *AuthenticationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAuthenticationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAuthenticationType(input string) (*AuthenticationType, error) { - vals := map[string]AuthenticationType{ - "activedirectoryintegrated": AuthenticationTypeActiveDirectoryIntegrated, - "activedirectorypassword": AuthenticationTypeActiveDirectoryPassword, - "none": AuthenticationTypeNone, - "sqlauthentication": AuthenticationTypeSqlAuthentication, - "windowsauthentication": AuthenticationTypeWindowsAuthentication, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AuthenticationType(input) - return &out, nil -} - -type SqlSourcePlatform string - -const ( - SqlSourcePlatformSqlOnPrem SqlSourcePlatform = "SqlOnPrem" -) - -func PossibleValuesForSqlSourcePlatform() []string { - return []string{ - string(SqlSourcePlatformSqlOnPrem), - } -} - -func (s *SqlSourcePlatform) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSqlSourcePlatform(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSqlSourcePlatform(input string) (*SqlSourcePlatform, error) { - vals := map[string]SqlSourcePlatform{ - "sqlonprem": SqlSourcePlatformSqlOnPrem, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SqlSourcePlatform(input) - return &out, nil -} diff --git a/resource-manager/datamigration/2021-06-30/validatemigrationinputsqlserversqlmisynctasks/model_connectioninfo.go b/resource-manager/datamigration/2021-06-30/validatemigrationinputsqlserversqlmisynctasks/model_connectioninfo.go deleted file mode 100644 index f9e6da0fbf7..00000000000 --- a/resource-manager/datamigration/2021-06-30/validatemigrationinputsqlserversqlmisynctasks/model_connectioninfo.go +++ /dev/null @@ -1,61 +0,0 @@ -package validatemigrationinputsqlserversqlmisynctasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "MiSqlConnectionInfo") { - var out MiSqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MiSqlConnectionInfo: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "SqlConnectionInfo") { - var out SqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2021-06-30/validatemigrationinputsqlserversqlmisynctasks/model_misqlconnectioninfo.go b/resource-manager/datamigration/2021-06-30/validatemigrationinputsqlserversqlmisynctasks/model_misqlconnectioninfo.go deleted file mode 100644 index 0e2e5e9fdda..00000000000 --- a/resource-manager/datamigration/2021-06-30/validatemigrationinputsqlserversqlmisynctasks/model_misqlconnectioninfo.go +++ /dev/null @@ -1,43 +0,0 @@ -package validatemigrationinputsqlserversqlmisynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = MiSqlConnectionInfo{} - -type MiSqlConnectionInfo struct { - ManagedInstanceResourceId string `json:"managedInstanceResourceId"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = MiSqlConnectionInfo{} - -func (s MiSqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper MiSqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MiSqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MiSqlConnectionInfo: %+v", err) - } - decoded["type"] = "MiSqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MiSqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/validatemigrationinputsqlserversqlmisynctasks/model_sqlconnectioninfo.go b/resource-manager/datamigration/2021-06-30/validatemigrationinputsqlserversqlmisynctasks/model_sqlconnectioninfo.go deleted file mode 100644 index a44f563fedd..00000000000 --- a/resource-manager/datamigration/2021-06-30/validatemigrationinputsqlserversqlmisynctasks/model_sqlconnectioninfo.go +++ /dev/null @@ -1,48 +0,0 @@ -package validatemigrationinputsqlserversqlmisynctasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = SqlConnectionInfo{} - -type SqlConnectionInfo struct { - AdditionalSettings *string `json:"additionalSettings,omitempty"` - Authentication *AuthenticationType `json:"authentication,omitempty"` - DataSource string `json:"dataSource"` - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Platform *SqlSourcePlatform `json:"platform,omitempty"` - TrustServerCertificate *bool `json:"trustServerCertificate,omitempty"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = SqlConnectionInfo{} - -func (s SqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper SqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SqlConnectionInfo: %+v", err) - } - decoded["type"] = "SqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/validatemigrationinputsqlserversqlmisynctasks/version.go b/resource-manager/datamigration/2021-06-30/validatemigrationinputsqlserversqlmisynctasks/version.go deleted file mode 100644 index 3f64accdbb5..00000000000 --- a/resource-manager/datamigration/2021-06-30/validatemigrationinputsqlserversqlmisynctasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package validatemigrationinputsqlserversqlmisynctasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-06-30" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/validatemigrationinputsqlserversqlmisynctasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2021-06-30/validatemigrationinputsqlserversqlmitasks/README.md b/resource-manager/datamigration/2021-06-30/validatemigrationinputsqlserversqlmitasks/README.md deleted file mode 100644 index edc7dc28a75..00000000000 --- a/resource-manager/datamigration/2021-06-30/validatemigrationinputsqlserversqlmitasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/validatemigrationinputsqlserversqlmitasks` Documentation - -The `validatemigrationinputsqlserversqlmitasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2021-06-30`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/validatemigrationinputsqlserversqlmitasks" -``` - - -### Client Initialization - -```go -client := validatemigrationinputsqlserversqlmitasks.NewValidateMigrationInputSqlServerSqlMITasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2021-06-30/validatemigrationinputsqlserversqlmitasks/client.go b/resource-manager/datamigration/2021-06-30/validatemigrationinputsqlserversqlmitasks/client.go deleted file mode 100644 index a26585d76f0..00000000000 --- a/resource-manager/datamigration/2021-06-30/validatemigrationinputsqlserversqlmitasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package validatemigrationinputsqlserversqlmitasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ValidateMigrationInputSqlServerSqlMITasksClient struct { - Client *resourcemanager.Client -} - -func NewValidateMigrationInputSqlServerSqlMITasksClientWithBaseURI(sdkApi sdkEnv.Api) (*ValidateMigrationInputSqlServerSqlMITasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "validatemigrationinputsqlserversqlmitasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ValidateMigrationInputSqlServerSqlMITasksClient: %+v", err) - } - - return &ValidateMigrationInputSqlServerSqlMITasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2021-06-30/validatemigrationinputsqlserversqlmitasks/constants.go b/resource-manager/datamigration/2021-06-30/validatemigrationinputsqlserversqlmitasks/constants.go deleted file mode 100644 index b2b6ef7e22c..00000000000 --- a/resource-manager/datamigration/2021-06-30/validatemigrationinputsqlserversqlmitasks/constants.go +++ /dev/null @@ -1,98 +0,0 @@ -package validatemigrationinputsqlserversqlmitasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthenticationType string - -const ( - AuthenticationTypeActiveDirectoryIntegrated AuthenticationType = "ActiveDirectoryIntegrated" - AuthenticationTypeActiveDirectoryPassword AuthenticationType = "ActiveDirectoryPassword" - AuthenticationTypeNone AuthenticationType = "None" - AuthenticationTypeSqlAuthentication AuthenticationType = "SqlAuthentication" - AuthenticationTypeWindowsAuthentication AuthenticationType = "WindowsAuthentication" -) - -func PossibleValuesForAuthenticationType() []string { - return []string{ - string(AuthenticationTypeActiveDirectoryIntegrated), - string(AuthenticationTypeActiveDirectoryPassword), - string(AuthenticationTypeNone), - string(AuthenticationTypeSqlAuthentication), - string(AuthenticationTypeWindowsAuthentication), - } -} - -func (s *AuthenticationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAuthenticationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAuthenticationType(input string) (*AuthenticationType, error) { - vals := map[string]AuthenticationType{ - "activedirectoryintegrated": AuthenticationTypeActiveDirectoryIntegrated, - "activedirectorypassword": AuthenticationTypeActiveDirectoryPassword, - "none": AuthenticationTypeNone, - "sqlauthentication": AuthenticationTypeSqlAuthentication, - "windowsauthentication": AuthenticationTypeWindowsAuthentication, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AuthenticationType(input) - return &out, nil -} - -type SqlSourcePlatform string - -const ( - SqlSourcePlatformSqlOnPrem SqlSourcePlatform = "SqlOnPrem" -) - -func PossibleValuesForSqlSourcePlatform() []string { - return []string{ - string(SqlSourcePlatformSqlOnPrem), - } -} - -func (s *SqlSourcePlatform) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSqlSourcePlatform(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSqlSourcePlatform(input string) (*SqlSourcePlatform, error) { - vals := map[string]SqlSourcePlatform{ - "sqlonprem": SqlSourcePlatformSqlOnPrem, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SqlSourcePlatform(input) - return &out, nil -} diff --git a/resource-manager/datamigration/2021-06-30/validatemigrationinputsqlserversqlmitasks/model_connectioninfo.go b/resource-manager/datamigration/2021-06-30/validatemigrationinputsqlserversqlmitasks/model_connectioninfo.go deleted file mode 100644 index e0710ab0076..00000000000 --- a/resource-manager/datamigration/2021-06-30/validatemigrationinputsqlserversqlmitasks/model_connectioninfo.go +++ /dev/null @@ -1,53 +0,0 @@ -package validatemigrationinputsqlserversqlmitasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "SqlConnectionInfo") { - var out SqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2021-06-30/validatemigrationinputsqlserversqlmitasks/model_sqlconnectioninfo.go b/resource-manager/datamigration/2021-06-30/validatemigrationinputsqlserversqlmitasks/model_sqlconnectioninfo.go deleted file mode 100644 index b9250672b97..00000000000 --- a/resource-manager/datamigration/2021-06-30/validatemigrationinputsqlserversqlmitasks/model_sqlconnectioninfo.go +++ /dev/null @@ -1,48 +0,0 @@ -package validatemigrationinputsqlserversqlmitasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = SqlConnectionInfo{} - -type SqlConnectionInfo struct { - AdditionalSettings *string `json:"additionalSettings,omitempty"` - Authentication *AuthenticationType `json:"authentication,omitempty"` - DataSource string `json:"dataSource"` - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Platform *SqlSourcePlatform `json:"platform,omitempty"` - TrustServerCertificate *bool `json:"trustServerCertificate,omitempty"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = SqlConnectionInfo{} - -func (s SqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper SqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SqlConnectionInfo: %+v", err) - } - decoded["type"] = "SqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/validatemigrationinputsqlserversqlmitasks/version.go b/resource-manager/datamigration/2021-06-30/validatemigrationinputsqlserversqlmitasks/version.go deleted file mode 100644 index 4d57c2c4d8e..00000000000 --- a/resource-manager/datamigration/2021-06-30/validatemigrationinputsqlserversqlmitasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package validatemigrationinputsqlserversqlmitasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-06-30" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/validatemigrationinputsqlserversqlmitasks/%s", defaultApiVersion) -} diff --git a/resource-manager/datamigration/2021-06-30/validatesyncmigrationinputsqlservertasks/README.md b/resource-manager/datamigration/2021-06-30/validatesyncmigrationinputsqlservertasks/README.md deleted file mode 100644 index a8cbee4e14e..00000000000 --- a/resource-manager/datamigration/2021-06-30/validatesyncmigrationinputsqlservertasks/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/validatesyncmigrationinputsqlservertasks` Documentation - -The `validatesyncmigrationinputsqlservertasks` SDK allows for interaction with the Azure Resource Manager Service `datamigration` (API Version `2021-06-30`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/validatesyncmigrationinputsqlservertasks" -``` - - -### Client Initialization - -```go -client := validatesyncmigrationinputsqlservertasks.NewValidateSyncMigrationInputSqlServerTasksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/datamigration/2021-06-30/validatesyncmigrationinputsqlservertasks/client.go b/resource-manager/datamigration/2021-06-30/validatesyncmigrationinputsqlservertasks/client.go deleted file mode 100644 index 5b213635314..00000000000 --- a/resource-manager/datamigration/2021-06-30/validatesyncmigrationinputsqlservertasks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package validatesyncmigrationinputsqlservertasks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ValidateSyncMigrationInputSqlServerTasksClient struct { - Client *resourcemanager.Client -} - -func NewValidateSyncMigrationInputSqlServerTasksClientWithBaseURI(sdkApi sdkEnv.Api) (*ValidateSyncMigrationInputSqlServerTasksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "validatesyncmigrationinputsqlservertasks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ValidateSyncMigrationInputSqlServerTasksClient: %+v", err) - } - - return &ValidateSyncMigrationInputSqlServerTasksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/datamigration/2021-06-30/validatesyncmigrationinputsqlservertasks/constants.go b/resource-manager/datamigration/2021-06-30/validatesyncmigrationinputsqlservertasks/constants.go deleted file mode 100644 index c5e9e2edd3f..00000000000 --- a/resource-manager/datamigration/2021-06-30/validatesyncmigrationinputsqlservertasks/constants.go +++ /dev/null @@ -1,98 +0,0 @@ -package validatesyncmigrationinputsqlservertasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthenticationType string - -const ( - AuthenticationTypeActiveDirectoryIntegrated AuthenticationType = "ActiveDirectoryIntegrated" - AuthenticationTypeActiveDirectoryPassword AuthenticationType = "ActiveDirectoryPassword" - AuthenticationTypeNone AuthenticationType = "None" - AuthenticationTypeSqlAuthentication AuthenticationType = "SqlAuthentication" - AuthenticationTypeWindowsAuthentication AuthenticationType = "WindowsAuthentication" -) - -func PossibleValuesForAuthenticationType() []string { - return []string{ - string(AuthenticationTypeActiveDirectoryIntegrated), - string(AuthenticationTypeActiveDirectoryPassword), - string(AuthenticationTypeNone), - string(AuthenticationTypeSqlAuthentication), - string(AuthenticationTypeWindowsAuthentication), - } -} - -func (s *AuthenticationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAuthenticationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAuthenticationType(input string) (*AuthenticationType, error) { - vals := map[string]AuthenticationType{ - "activedirectoryintegrated": AuthenticationTypeActiveDirectoryIntegrated, - "activedirectorypassword": AuthenticationTypeActiveDirectoryPassword, - "none": AuthenticationTypeNone, - "sqlauthentication": AuthenticationTypeSqlAuthentication, - "windowsauthentication": AuthenticationTypeWindowsAuthentication, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AuthenticationType(input) - return &out, nil -} - -type SqlSourcePlatform string - -const ( - SqlSourcePlatformSqlOnPrem SqlSourcePlatform = "SqlOnPrem" -) - -func PossibleValuesForSqlSourcePlatform() []string { - return []string{ - string(SqlSourcePlatformSqlOnPrem), - } -} - -func (s *SqlSourcePlatform) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSqlSourcePlatform(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSqlSourcePlatform(input string) (*SqlSourcePlatform, error) { - vals := map[string]SqlSourcePlatform{ - "sqlonprem": SqlSourcePlatformSqlOnPrem, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SqlSourcePlatform(input) - return &out, nil -} diff --git a/resource-manager/datamigration/2021-06-30/validatesyncmigrationinputsqlservertasks/model_connectioninfo.go b/resource-manager/datamigration/2021-06-30/validatesyncmigrationinputsqlservertasks/model_connectioninfo.go deleted file mode 100644 index 7268c60c9dc..00000000000 --- a/resource-manager/datamigration/2021-06-30/validatesyncmigrationinputsqlservertasks/model_connectioninfo.go +++ /dev/null @@ -1,53 +0,0 @@ -package validatesyncmigrationinputsqlservertasks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionInfo interface { -} - -// RawConnectionInfoImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawConnectionInfoImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ConnectionInfo into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "SqlConnectionInfo") { - var out SqlConnectionInfo - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SqlConnectionInfo: %+v", err) - } - return out, nil - } - - out := RawConnectionInfoImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/datamigration/2021-06-30/validatesyncmigrationinputsqlservertasks/model_sqlconnectioninfo.go b/resource-manager/datamigration/2021-06-30/validatesyncmigrationinputsqlservertasks/model_sqlconnectioninfo.go deleted file mode 100644 index 2483b37f663..00000000000 --- a/resource-manager/datamigration/2021-06-30/validatesyncmigrationinputsqlservertasks/model_sqlconnectioninfo.go +++ /dev/null @@ -1,48 +0,0 @@ -package validatesyncmigrationinputsqlservertasks - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ConnectionInfo = SqlConnectionInfo{} - -type SqlConnectionInfo struct { - AdditionalSettings *string `json:"additionalSettings,omitempty"` - Authentication *AuthenticationType `json:"authentication,omitempty"` - DataSource string `json:"dataSource"` - EncryptConnection *bool `json:"encryptConnection,omitempty"` - Platform *SqlSourcePlatform `json:"platform,omitempty"` - TrustServerCertificate *bool `json:"trustServerCertificate,omitempty"` - - // Fields inherited from ConnectionInfo - Password *string `json:"password,omitempty"` - UserName *string `json:"userName,omitempty"` -} - -var _ json.Marshaler = SqlConnectionInfo{} - -func (s SqlConnectionInfo) MarshalJSON() ([]byte, error) { - type wrapper SqlConnectionInfo - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SqlConnectionInfo: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SqlConnectionInfo: %+v", err) - } - decoded["type"] = "SqlConnectionInfo" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SqlConnectionInfo: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/datamigration/2021-06-30/validatesyncmigrationinputsqlservertasks/version.go b/resource-manager/datamigration/2021-06-30/validatesyncmigrationinputsqlservertasks/version.go deleted file mode 100644 index 8572181c492..00000000000 --- a/resource-manager/datamigration/2021-06-30/validatesyncmigrationinputsqlservertasks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package validatesyncmigrationinputsqlservertasks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2021-06-30" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/validatesyncmigrationinputsqlservertasks/%s", defaultApiVersion) -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/client.go b/resource-manager/securityinsights/2022-10-01-preview/client.go index 971158b59e8..be711fbeca3 100644 --- a/resource-manager/securityinsights/2022-10-01-preview/client.go +++ b/resource-manager/securityinsights/2022-10-01-preview/client.go @@ -21,7 +21,6 @@ import ( "github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/entities" "github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/entityqueries" "github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/entityrelations" - "github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/entitytypes" "github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/fileimports" "github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/incidentalerts" "github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/incidentbookmarks" @@ -61,7 +60,6 @@ type Client struct { Entities *entities.EntitiesClient EntityQueries *entityqueries.EntityQueriesClient EntityRelations *entityrelations.EntityRelationsClient - EntityTypes *entitytypes.EntityTypesClient FileImports *fileimports.FileImportsClient IncidentAlerts *incidentalerts.IncidentAlertsClient IncidentBookmarks *incidentbookmarks.IncidentBookmarksClient @@ -174,12 +172,6 @@ func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanag } configureFunc(entityRelationsClient.Client) - entityTypesClient, err := entitytypes.NewEntityTypesClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building EntityTypes client: %+v", err) - } - configureFunc(entityTypesClient.Client) - fileImportsClient, err := fileimports.NewFileImportsClientWithBaseURI(sdkApi) if err != nil { return nil, fmt.Errorf("building FileImports client: %+v", err) @@ -310,7 +302,6 @@ func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanag Entities: entitiesClient, EntityQueries: entityQueriesClient, EntityRelations: entityRelationsClient, - EntityTypes: entityTypesClient, FileImports: fileImportsClient, IncidentAlerts: incidentAlertsClient, IncidentBookmarks: incidentBookmarksClient, diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/README.md b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/README.md deleted file mode 100644 index 5ad5c5c4d91..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/entitytypes` Documentation - -The `entitytypes` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-10-01-preview`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/entitytypes" -``` - - -### Client Initialization - -```go -client := entitytypes.NewEntityTypesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/client.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/client.go deleted file mode 100644 index bcdd09e4029..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package entitytypes - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EntityTypesClient struct { - Client *resourcemanager.Client -} - -func NewEntityTypesClientWithBaseURI(sdkApi sdkEnv.Api) (*EntityTypesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "entitytypes", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating EntityTypesClient: %+v", err) - } - - return &EntityTypesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/constants.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/constants.go deleted file mode 100644 index 83bedfbe6a8..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/constants.go +++ /dev/null @@ -1,1030 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AlertSeverity string - -const ( - AlertSeverityHigh AlertSeverity = "High" - AlertSeverityInformational AlertSeverity = "Informational" - AlertSeverityLow AlertSeverity = "Low" - AlertSeverityMedium AlertSeverity = "Medium" -) - -func PossibleValuesForAlertSeverity() []string { - return []string{ - string(AlertSeverityHigh), - string(AlertSeverityInformational), - string(AlertSeverityLow), - string(AlertSeverityMedium), - } -} - -func (s *AlertSeverity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAlertSeverity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAlertSeverity(input string) (*AlertSeverity, error) { - vals := map[string]AlertSeverity{ - "high": AlertSeverityHigh, - "informational": AlertSeverityInformational, - "low": AlertSeverityLow, - "medium": AlertSeverityMedium, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AlertSeverity(input) - return &out, nil -} - -type AlertStatus string - -const ( - AlertStatusDismissed AlertStatus = "Dismissed" - AlertStatusInProgress AlertStatus = "InProgress" - AlertStatusNew AlertStatus = "New" - AlertStatusResolved AlertStatus = "Resolved" - AlertStatusUnknown AlertStatus = "Unknown" -) - -func PossibleValuesForAlertStatus() []string { - return []string{ - string(AlertStatusDismissed), - string(AlertStatusInProgress), - string(AlertStatusNew), - string(AlertStatusResolved), - string(AlertStatusUnknown), - } -} - -func (s *AlertStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAlertStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAlertStatus(input string) (*AlertStatus, error) { - vals := map[string]AlertStatus{ - "dismissed": AlertStatusDismissed, - "inprogress": AlertStatusInProgress, - "new": AlertStatusNew, - "resolved": AlertStatusResolved, - "unknown": AlertStatusUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AlertStatus(input) - return &out, nil -} - -type AntispamMailDirection string - -const ( - AntispamMailDirectionInbound AntispamMailDirection = "Inbound" - AntispamMailDirectionIntraorg AntispamMailDirection = "Intraorg" - AntispamMailDirectionOutbound AntispamMailDirection = "Outbound" - AntispamMailDirectionUnknown AntispamMailDirection = "Unknown" -) - -func PossibleValuesForAntispamMailDirection() []string { - return []string{ - string(AntispamMailDirectionInbound), - string(AntispamMailDirectionIntraorg), - string(AntispamMailDirectionOutbound), - string(AntispamMailDirectionUnknown), - } -} - -func (s *AntispamMailDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAntispamMailDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAntispamMailDirection(input string) (*AntispamMailDirection, error) { - vals := map[string]AntispamMailDirection{ - "inbound": AntispamMailDirectionInbound, - "intraorg": AntispamMailDirectionIntraorg, - "outbound": AntispamMailDirectionOutbound, - "unknown": AntispamMailDirectionUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AntispamMailDirection(input) - return &out, nil -} - -type AttackTactic string - -const ( - AttackTacticCollection AttackTactic = "Collection" - AttackTacticCommandAndControl AttackTactic = "CommandAndControl" - AttackTacticCredentialAccess AttackTactic = "CredentialAccess" - AttackTacticDefenseEvasion AttackTactic = "DefenseEvasion" - AttackTacticDiscovery AttackTactic = "Discovery" - AttackTacticExecution AttackTactic = "Execution" - AttackTacticExfiltration AttackTactic = "Exfiltration" - AttackTacticImpact AttackTactic = "Impact" - AttackTacticImpairProcessControl AttackTactic = "ImpairProcessControl" - AttackTacticInhibitResponseFunction AttackTactic = "InhibitResponseFunction" - AttackTacticInitialAccess AttackTactic = "InitialAccess" - AttackTacticLateralMovement AttackTactic = "LateralMovement" - AttackTacticPersistence AttackTactic = "Persistence" - AttackTacticPreAttack AttackTactic = "PreAttack" - AttackTacticPrivilegeEscalation AttackTactic = "PrivilegeEscalation" - AttackTacticReconnaissance AttackTactic = "Reconnaissance" - AttackTacticResourceDevelopment AttackTactic = "ResourceDevelopment" -) - -func PossibleValuesForAttackTactic() []string { - return []string{ - string(AttackTacticCollection), - string(AttackTacticCommandAndControl), - string(AttackTacticCredentialAccess), - string(AttackTacticDefenseEvasion), - string(AttackTacticDiscovery), - string(AttackTacticExecution), - string(AttackTacticExfiltration), - string(AttackTacticImpact), - string(AttackTacticImpairProcessControl), - string(AttackTacticInhibitResponseFunction), - string(AttackTacticInitialAccess), - string(AttackTacticLateralMovement), - string(AttackTacticPersistence), - string(AttackTacticPreAttack), - string(AttackTacticPrivilegeEscalation), - string(AttackTacticReconnaissance), - string(AttackTacticResourceDevelopment), - } -} - -func (s *AttackTactic) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAttackTactic(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAttackTactic(input string) (*AttackTactic, error) { - vals := map[string]AttackTactic{ - "collection": AttackTacticCollection, - "commandandcontrol": AttackTacticCommandAndControl, - "credentialaccess": AttackTacticCredentialAccess, - "defenseevasion": AttackTacticDefenseEvasion, - "discovery": AttackTacticDiscovery, - "execution": AttackTacticExecution, - "exfiltration": AttackTacticExfiltration, - "impact": AttackTacticImpact, - "impairprocesscontrol": AttackTacticImpairProcessControl, - "inhibitresponsefunction": AttackTacticInhibitResponseFunction, - "initialaccess": AttackTacticInitialAccess, - "lateralmovement": AttackTacticLateralMovement, - "persistence": AttackTacticPersistence, - "preattack": AttackTacticPreAttack, - "privilegeescalation": AttackTacticPrivilegeEscalation, - "reconnaissance": AttackTacticReconnaissance, - "resourcedevelopment": AttackTacticResourceDevelopment, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AttackTactic(input) - return &out, nil -} - -type ConfidenceLevel string - -const ( - ConfidenceLevelHigh ConfidenceLevel = "High" - ConfidenceLevelLow ConfidenceLevel = "Low" - ConfidenceLevelUnknown ConfidenceLevel = "Unknown" -) - -func PossibleValuesForConfidenceLevel() []string { - return []string{ - string(ConfidenceLevelHigh), - string(ConfidenceLevelLow), - string(ConfidenceLevelUnknown), - } -} - -func (s *ConfidenceLevel) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseConfidenceLevel(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseConfidenceLevel(input string) (*ConfidenceLevel, error) { - vals := map[string]ConfidenceLevel{ - "high": ConfidenceLevelHigh, - "low": ConfidenceLevelLow, - "unknown": ConfidenceLevelUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ConfidenceLevel(input) - return &out, nil -} - -type ConfidenceScoreStatus string - -const ( - ConfidenceScoreStatusFinal ConfidenceScoreStatus = "Final" - ConfidenceScoreStatusInProcess ConfidenceScoreStatus = "InProcess" - ConfidenceScoreStatusNotApplicable ConfidenceScoreStatus = "NotApplicable" - ConfidenceScoreStatusNotFinal ConfidenceScoreStatus = "NotFinal" -) - -func PossibleValuesForConfidenceScoreStatus() []string { - return []string{ - string(ConfidenceScoreStatusFinal), - string(ConfidenceScoreStatusInProcess), - string(ConfidenceScoreStatusNotApplicable), - string(ConfidenceScoreStatusNotFinal), - } -} - -func (s *ConfidenceScoreStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseConfidenceScoreStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseConfidenceScoreStatus(input string) (*ConfidenceScoreStatus, error) { - vals := map[string]ConfidenceScoreStatus{ - "final": ConfidenceScoreStatusFinal, - "inprocess": ConfidenceScoreStatusInProcess, - "notapplicable": ConfidenceScoreStatusNotApplicable, - "notfinal": ConfidenceScoreStatusNotFinal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ConfidenceScoreStatus(input) - return &out, nil -} - -type CreatedByType string - -const ( - CreatedByTypeApplication CreatedByType = "Application" - CreatedByTypeKey CreatedByType = "Key" - CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" - CreatedByTypeUser CreatedByType = "User" -) - -func PossibleValuesForCreatedByType() []string { - return []string{ - string(CreatedByTypeApplication), - string(CreatedByTypeKey), - string(CreatedByTypeManagedIdentity), - string(CreatedByTypeUser), - } -} - -func (s *CreatedByType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseCreatedByType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseCreatedByType(input string) (*CreatedByType, error) { - vals := map[string]CreatedByType{ - "application": CreatedByTypeApplication, - "key": CreatedByTypeKey, - "managedidentity": CreatedByTypeManagedIdentity, - "user": CreatedByTypeUser, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := CreatedByType(input) - return &out, nil -} - -type DeliveryAction string - -const ( - DeliveryActionBlocked DeliveryAction = "Blocked" - DeliveryActionDelivered DeliveryAction = "Delivered" - DeliveryActionDeliveredAsSpam DeliveryAction = "DeliveredAsSpam" - DeliveryActionReplaced DeliveryAction = "Replaced" - DeliveryActionUnknown DeliveryAction = "Unknown" -) - -func PossibleValuesForDeliveryAction() []string { - return []string{ - string(DeliveryActionBlocked), - string(DeliveryActionDelivered), - string(DeliveryActionDeliveredAsSpam), - string(DeliveryActionReplaced), - string(DeliveryActionUnknown), - } -} - -func (s *DeliveryAction) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeliveryAction(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeliveryAction(input string) (*DeliveryAction, error) { - vals := map[string]DeliveryAction{ - "blocked": DeliveryActionBlocked, - "delivered": DeliveryActionDelivered, - "deliveredasspam": DeliveryActionDeliveredAsSpam, - "replaced": DeliveryActionReplaced, - "unknown": DeliveryActionUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeliveryAction(input) - return &out, nil -} - -type DeliveryLocation string - -const ( - DeliveryLocationDeletedFolder DeliveryLocation = "DeletedFolder" - DeliveryLocationDropped DeliveryLocation = "Dropped" - DeliveryLocationExternal DeliveryLocation = "External" - DeliveryLocationFailed DeliveryLocation = "Failed" - DeliveryLocationForwarded DeliveryLocation = "Forwarded" - DeliveryLocationInbox DeliveryLocation = "Inbox" - DeliveryLocationJunkFolder DeliveryLocation = "JunkFolder" - DeliveryLocationQuarantine DeliveryLocation = "Quarantine" - DeliveryLocationUnknown DeliveryLocation = "Unknown" -) - -func PossibleValuesForDeliveryLocation() []string { - return []string{ - string(DeliveryLocationDeletedFolder), - string(DeliveryLocationDropped), - string(DeliveryLocationExternal), - string(DeliveryLocationFailed), - string(DeliveryLocationForwarded), - string(DeliveryLocationInbox), - string(DeliveryLocationJunkFolder), - string(DeliveryLocationQuarantine), - string(DeliveryLocationUnknown), - } -} - -func (s *DeliveryLocation) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeliveryLocation(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeliveryLocation(input string) (*DeliveryLocation, error) { - vals := map[string]DeliveryLocation{ - "deletedfolder": DeliveryLocationDeletedFolder, - "dropped": DeliveryLocationDropped, - "external": DeliveryLocationExternal, - "failed": DeliveryLocationFailed, - "forwarded": DeliveryLocationForwarded, - "inbox": DeliveryLocationInbox, - "junkfolder": DeliveryLocationJunkFolder, - "quarantine": DeliveryLocationQuarantine, - "unknown": DeliveryLocationUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeliveryLocation(input) - return &out, nil -} - -type DeviceImportance string - -const ( - DeviceImportanceHigh DeviceImportance = "High" - DeviceImportanceLow DeviceImportance = "Low" - DeviceImportanceNormal DeviceImportance = "Normal" - DeviceImportanceUnknown DeviceImportance = "Unknown" -) - -func PossibleValuesForDeviceImportance() []string { - return []string{ - string(DeviceImportanceHigh), - string(DeviceImportanceLow), - string(DeviceImportanceNormal), - string(DeviceImportanceUnknown), - } -} - -func (s *DeviceImportance) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeviceImportance(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeviceImportance(input string) (*DeviceImportance, error) { - vals := map[string]DeviceImportance{ - "high": DeviceImportanceHigh, - "low": DeviceImportanceLow, - "normal": DeviceImportanceNormal, - "unknown": DeviceImportanceUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeviceImportance(input) - return &out, nil -} - -type ElevationToken string - -const ( - ElevationTokenDefault ElevationToken = "Default" - ElevationTokenFull ElevationToken = "Full" - ElevationTokenLimited ElevationToken = "Limited" -) - -func PossibleValuesForElevationToken() []string { - return []string{ - string(ElevationTokenDefault), - string(ElevationTokenFull), - string(ElevationTokenLimited), - } -} - -func (s *ElevationToken) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseElevationToken(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseElevationToken(input string) (*ElevationToken, error) { - vals := map[string]ElevationToken{ - "default": ElevationTokenDefault, - "full": ElevationTokenFull, - "limited": ElevationTokenLimited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ElevationToken(input) - return &out, nil -} - -type EntityKind string - -const ( - EntityKindAccount EntityKind = "Account" - EntityKindAzureResource EntityKind = "AzureResource" - EntityKindBookmark EntityKind = "Bookmark" - EntityKindCloudApplication EntityKind = "CloudApplication" - EntityKindDnsResolution EntityKind = "DnsResolution" - EntityKindFile EntityKind = "File" - EntityKindFileHash EntityKind = "FileHash" - EntityKindHost EntityKind = "Host" - EntityKindIP EntityKind = "Ip" - EntityKindIoTDevice EntityKind = "IoTDevice" - EntityKindMailCluster EntityKind = "MailCluster" - EntityKindMailMessage EntityKind = "MailMessage" - EntityKindMailbox EntityKind = "Mailbox" - EntityKindMalware EntityKind = "Malware" - EntityKindNic EntityKind = "Nic" - EntityKindProcess EntityKind = "Process" - EntityKindRegistryKey EntityKind = "RegistryKey" - EntityKindRegistryValue EntityKind = "RegistryValue" - EntityKindSecurityAlert EntityKind = "SecurityAlert" - EntityKindSecurityGroup EntityKind = "SecurityGroup" - EntityKindSubmissionMail EntityKind = "SubmissionMail" - EntityKindUrl EntityKind = "Url" -) - -func PossibleValuesForEntityKind() []string { - return []string{ - string(EntityKindAccount), - string(EntityKindAzureResource), - string(EntityKindBookmark), - string(EntityKindCloudApplication), - string(EntityKindDnsResolution), - string(EntityKindFile), - string(EntityKindFileHash), - string(EntityKindHost), - string(EntityKindIP), - string(EntityKindIoTDevice), - string(EntityKindMailCluster), - string(EntityKindMailMessage), - string(EntityKindMailbox), - string(EntityKindMalware), - string(EntityKindNic), - string(EntityKindProcess), - string(EntityKindRegistryKey), - string(EntityKindRegistryValue), - string(EntityKindSecurityAlert), - string(EntityKindSecurityGroup), - string(EntityKindSubmissionMail), - string(EntityKindUrl), - } -} - -func (s *EntityKind) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseEntityKind(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseEntityKind(input string) (*EntityKind, error) { - vals := map[string]EntityKind{ - "account": EntityKindAccount, - "azureresource": EntityKindAzureResource, - "bookmark": EntityKindBookmark, - "cloudapplication": EntityKindCloudApplication, - "dnsresolution": EntityKindDnsResolution, - "file": EntityKindFile, - "filehash": EntityKindFileHash, - "host": EntityKindHost, - "ip": EntityKindIP, - "iotdevice": EntityKindIoTDevice, - "mailcluster": EntityKindMailCluster, - "mailmessage": EntityKindMailMessage, - "mailbox": EntityKindMailbox, - "malware": EntityKindMalware, - "nic": EntityKindNic, - "process": EntityKindProcess, - "registrykey": EntityKindRegistryKey, - "registryvalue": EntityKindRegistryValue, - "securityalert": EntityKindSecurityAlert, - "securitygroup": EntityKindSecurityGroup, - "submissionmail": EntityKindSubmissionMail, - "url": EntityKindUrl, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := EntityKind(input) - return &out, nil -} - -type FileHashAlgorithm string - -const ( - FileHashAlgorithmMDFive FileHashAlgorithm = "MD5" - FileHashAlgorithmSHAOne FileHashAlgorithm = "SHA1" - FileHashAlgorithmSHATwoFiveSix FileHashAlgorithm = "SHA256" - FileHashAlgorithmSHATwoFiveSixAC FileHashAlgorithm = "SHA256AC" - FileHashAlgorithmUnknown FileHashAlgorithm = "Unknown" -) - -func PossibleValuesForFileHashAlgorithm() []string { - return []string{ - string(FileHashAlgorithmMDFive), - string(FileHashAlgorithmSHAOne), - string(FileHashAlgorithmSHATwoFiveSix), - string(FileHashAlgorithmSHATwoFiveSixAC), - string(FileHashAlgorithmUnknown), - } -} - -func (s *FileHashAlgorithm) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFileHashAlgorithm(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFileHashAlgorithm(input string) (*FileHashAlgorithm, error) { - vals := map[string]FileHashAlgorithm{ - "md5": FileHashAlgorithmMDFive, - "sha1": FileHashAlgorithmSHAOne, - "sha256": FileHashAlgorithmSHATwoFiveSix, - "sha256ac": FileHashAlgorithmSHATwoFiveSixAC, - "unknown": FileHashAlgorithmUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FileHashAlgorithm(input) - return &out, nil -} - -type IncidentSeverity string - -const ( - IncidentSeverityHigh IncidentSeverity = "High" - IncidentSeverityInformational IncidentSeverity = "Informational" - IncidentSeverityLow IncidentSeverity = "Low" - IncidentSeverityMedium IncidentSeverity = "Medium" -) - -func PossibleValuesForIncidentSeverity() []string { - return []string{ - string(IncidentSeverityHigh), - string(IncidentSeverityInformational), - string(IncidentSeverityLow), - string(IncidentSeverityMedium), - } -} - -func (s *IncidentSeverity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIncidentSeverity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIncidentSeverity(input string) (*IncidentSeverity, error) { - vals := map[string]IncidentSeverity{ - "high": IncidentSeverityHigh, - "informational": IncidentSeverityInformational, - "low": IncidentSeverityLow, - "medium": IncidentSeverityMedium, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IncidentSeverity(input) - return &out, nil -} - -type KillChainIntent string - -const ( - KillChainIntentCollection KillChainIntent = "Collection" - KillChainIntentCommandAndControl KillChainIntent = "CommandAndControl" - KillChainIntentCredentialAccess KillChainIntent = "CredentialAccess" - KillChainIntentDefenseEvasion KillChainIntent = "DefenseEvasion" - KillChainIntentDiscovery KillChainIntent = "Discovery" - KillChainIntentExecution KillChainIntent = "Execution" - KillChainIntentExfiltration KillChainIntent = "Exfiltration" - KillChainIntentExploitation KillChainIntent = "Exploitation" - KillChainIntentImpact KillChainIntent = "Impact" - KillChainIntentLateralMovement KillChainIntent = "LateralMovement" - KillChainIntentPersistence KillChainIntent = "Persistence" - KillChainIntentPrivilegeEscalation KillChainIntent = "PrivilegeEscalation" - KillChainIntentProbing KillChainIntent = "Probing" - KillChainIntentUnknown KillChainIntent = "Unknown" -) - -func PossibleValuesForKillChainIntent() []string { - return []string{ - string(KillChainIntentCollection), - string(KillChainIntentCommandAndControl), - string(KillChainIntentCredentialAccess), - string(KillChainIntentDefenseEvasion), - string(KillChainIntentDiscovery), - string(KillChainIntentExecution), - string(KillChainIntentExfiltration), - string(KillChainIntentExploitation), - string(KillChainIntentImpact), - string(KillChainIntentLateralMovement), - string(KillChainIntentPersistence), - string(KillChainIntentPrivilegeEscalation), - string(KillChainIntentProbing), - string(KillChainIntentUnknown), - } -} - -func (s *KillChainIntent) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseKillChainIntent(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseKillChainIntent(input string) (*KillChainIntent, error) { - vals := map[string]KillChainIntent{ - "collection": KillChainIntentCollection, - "commandandcontrol": KillChainIntentCommandAndControl, - "credentialaccess": KillChainIntentCredentialAccess, - "defenseevasion": KillChainIntentDefenseEvasion, - "discovery": KillChainIntentDiscovery, - "execution": KillChainIntentExecution, - "exfiltration": KillChainIntentExfiltration, - "exploitation": KillChainIntentExploitation, - "impact": KillChainIntentImpact, - "lateralmovement": KillChainIntentLateralMovement, - "persistence": KillChainIntentPersistence, - "privilegeescalation": KillChainIntentPrivilegeEscalation, - "probing": KillChainIntentProbing, - "unknown": KillChainIntentUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := KillChainIntent(input) - return &out, nil -} - -type OSFamily string - -const ( - OSFamilyAndroid OSFamily = "Android" - OSFamilyIOS OSFamily = "IOS" - OSFamilyLinux OSFamily = "Linux" - OSFamilyUnknown OSFamily = "Unknown" - OSFamilyWindows OSFamily = "Windows" -) - -func PossibleValuesForOSFamily() []string { - return []string{ - string(OSFamilyAndroid), - string(OSFamilyIOS), - string(OSFamilyLinux), - string(OSFamilyUnknown), - string(OSFamilyWindows), - } -} - -func (s *OSFamily) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseOSFamily(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseOSFamily(input string) (*OSFamily, error) { - vals := map[string]OSFamily{ - "android": OSFamilyAndroid, - "ios": OSFamilyIOS, - "linux": OSFamilyLinux, - "unknown": OSFamilyUnknown, - "windows": OSFamilyWindows, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := OSFamily(input) - return &out, nil -} - -type RegistryHive string - -const ( - RegistryHiveHKEYA RegistryHive = "HKEY_A" - RegistryHiveHKEYCLASSESROOT RegistryHive = "HKEY_CLASSES_ROOT" - RegistryHiveHKEYCURRENTCONFIG RegistryHive = "HKEY_CURRENT_CONFIG" - RegistryHiveHKEYCURRENTUSER RegistryHive = "HKEY_CURRENT_USER" - RegistryHiveHKEYCURRENTUSERLOCALSETTINGS RegistryHive = "HKEY_CURRENT_USER_LOCAL_SETTINGS" - RegistryHiveHKEYLOCALMACHINE RegistryHive = "HKEY_LOCAL_MACHINE" - RegistryHiveHKEYPERFORMANCEDATA RegistryHive = "HKEY_PERFORMANCE_DATA" - RegistryHiveHKEYPERFORMANCENLSTEXT RegistryHive = "HKEY_PERFORMANCE_NLSTEXT" - RegistryHiveHKEYPERFORMANCETEXT RegistryHive = "HKEY_PERFORMANCE_TEXT" - RegistryHiveHKEYUSERS RegistryHive = "HKEY_USERS" -) - -func PossibleValuesForRegistryHive() []string { - return []string{ - string(RegistryHiveHKEYA), - string(RegistryHiveHKEYCLASSESROOT), - string(RegistryHiveHKEYCURRENTCONFIG), - string(RegistryHiveHKEYCURRENTUSER), - string(RegistryHiveHKEYCURRENTUSERLOCALSETTINGS), - string(RegistryHiveHKEYLOCALMACHINE), - string(RegistryHiveHKEYPERFORMANCEDATA), - string(RegistryHiveHKEYPERFORMANCENLSTEXT), - string(RegistryHiveHKEYPERFORMANCETEXT), - string(RegistryHiveHKEYUSERS), - } -} - -func (s *RegistryHive) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRegistryHive(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRegistryHive(input string) (*RegistryHive, error) { - vals := map[string]RegistryHive{ - "hkey_a": RegistryHiveHKEYA, - "hkey_classes_root": RegistryHiveHKEYCLASSESROOT, - "hkey_current_config": RegistryHiveHKEYCURRENTCONFIG, - "hkey_current_user": RegistryHiveHKEYCURRENTUSER, - "hkey_current_user_local_settings": RegistryHiveHKEYCURRENTUSERLOCALSETTINGS, - "hkey_local_machine": RegistryHiveHKEYLOCALMACHINE, - "hkey_performance_data": RegistryHiveHKEYPERFORMANCEDATA, - "hkey_performance_nlstext": RegistryHiveHKEYPERFORMANCENLSTEXT, - "hkey_performance_text": RegistryHiveHKEYPERFORMANCETEXT, - "hkey_users": RegistryHiveHKEYUSERS, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RegistryHive(input) - return &out, nil -} - -type RegistryValueKind string - -const ( - RegistryValueKindBinary RegistryValueKind = "Binary" - RegistryValueKindDWord RegistryValueKind = "DWord" - RegistryValueKindExpandString RegistryValueKind = "ExpandString" - RegistryValueKindMultiString RegistryValueKind = "MultiString" - RegistryValueKindNone RegistryValueKind = "None" - RegistryValueKindQWord RegistryValueKind = "QWord" - RegistryValueKindString RegistryValueKind = "String" - RegistryValueKindUnknown RegistryValueKind = "Unknown" -) - -func PossibleValuesForRegistryValueKind() []string { - return []string{ - string(RegistryValueKindBinary), - string(RegistryValueKindDWord), - string(RegistryValueKindExpandString), - string(RegistryValueKindMultiString), - string(RegistryValueKindNone), - string(RegistryValueKindQWord), - string(RegistryValueKindString), - string(RegistryValueKindUnknown), - } -} - -func (s *RegistryValueKind) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRegistryValueKind(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRegistryValueKind(input string) (*RegistryValueKind, error) { - vals := map[string]RegistryValueKind{ - "binary": RegistryValueKindBinary, - "dword": RegistryValueKindDWord, - "expandstring": RegistryValueKindExpandString, - "multistring": RegistryValueKindMultiString, - "none": RegistryValueKindNone, - "qword": RegistryValueKindQWord, - "string": RegistryValueKindString, - "unknown": RegistryValueKindUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RegistryValueKind(input) - return &out, nil -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_accountentity.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_accountentity.go deleted file mode 100644 index 36622cda50b..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_accountentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = AccountEntity{} - -type AccountEntity struct { - Properties *AccountEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = AccountEntity{} - -func (s AccountEntity) MarshalJSON() ([]byte, error) { - type wrapper AccountEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling AccountEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling AccountEntity: %+v", err) - } - decoded["kind"] = "Account" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling AccountEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_accountentityproperties.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_accountentityproperties.go deleted file mode 100644 index 95fb7cc52ad..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_accountentityproperties.go +++ /dev/null @@ -1,21 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AccountEntityProperties struct { - AadTenantId *string `json:"aadTenantId,omitempty"` - AadUserId *string `json:"aadUserId,omitempty"` - AccountName *string `json:"accountName,omitempty"` - AdditionalData *map[string]interface{} `json:"additionalData,omitempty"` - DisplayName *string `json:"displayName,omitempty"` - DnsDomain *string `json:"dnsDomain,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HostEntityId *string `json:"hostEntityId,omitempty"` - IsDomainJoined *bool `json:"isDomainJoined,omitempty"` - NtDomain *string `json:"ntDomain,omitempty"` - ObjectGuid *string `json:"objectGuid,omitempty"` - Puid *string `json:"puid,omitempty"` - Sid *string `json:"sid,omitempty"` - UpnSuffix *string `json:"upnSuffix,omitempty"` -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_azureresourceentity.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_azureresourceentity.go deleted file mode 100644 index 6947a9b96e5..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_azureresourceentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = AzureResourceEntity{} - -type AzureResourceEntity struct { - Properties *AzureResourceEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = AzureResourceEntity{} - -func (s AzureResourceEntity) MarshalJSON() ([]byte, error) { - type wrapper AzureResourceEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling AzureResourceEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling AzureResourceEntity: %+v", err) - } - decoded["kind"] = "AzureResource" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling AzureResourceEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_azureresourceentityproperties.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_azureresourceentityproperties.go deleted file mode 100644 index db2fe348b06..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_azureresourceentityproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureResourceEntityProperties struct { - AdditionalData *map[string]interface{} `json:"additionalData,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - ResourceId *string `json:"resourceId,omitempty"` - SubscriptionId *string `json:"subscriptionId,omitempty"` -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_cloudapplicationentity.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_cloudapplicationentity.go deleted file mode 100644 index 73b7fb5b308..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_cloudapplicationentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = CloudApplicationEntity{} - -type CloudApplicationEntity struct { - Properties *CloudApplicationEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = CloudApplicationEntity{} - -func (s CloudApplicationEntity) MarshalJSON() ([]byte, error) { - type wrapper CloudApplicationEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling CloudApplicationEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling CloudApplicationEntity: %+v", err) - } - decoded["kind"] = "CloudApplication" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling CloudApplicationEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_cloudapplicationentityproperties.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_cloudapplicationentityproperties.go deleted file mode 100644 index 8b2d40b573f..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_cloudapplicationentityproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CloudApplicationEntityProperties struct { - AdditionalData *map[string]interface{} `json:"additionalData,omitempty"` - AppId *int64 `json:"appId,omitempty"` - AppName *string `json:"appName,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - InstanceName *string `json:"instanceName,omitempty"` -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_dnsentity.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_dnsentity.go deleted file mode 100644 index 81c3c0dac5b..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_dnsentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = DnsEntity{} - -type DnsEntity struct { - Properties *DnsEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = DnsEntity{} - -func (s DnsEntity) MarshalJSON() ([]byte, error) { - type wrapper DnsEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling DnsEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling DnsEntity: %+v", err) - } - decoded["kind"] = "DnsResolution" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling DnsEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_dnsentityproperties.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_dnsentityproperties.go deleted file mode 100644 index fa580d56344..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_dnsentityproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DnsEntityProperties struct { - AdditionalData *map[string]interface{} `json:"additionalData,omitempty"` - DnsServerIPEntityId *string `json:"dnsServerIpEntityId,omitempty"` - DomainName *string `json:"domainName,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HostIPAddressEntityId *string `json:"hostIpAddressEntityId,omitempty"` - IPAddressEntityIds *[]string `json:"ipAddressEntityIds,omitempty"` -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_entity.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_entity.go deleted file mode 100644 index 1af3c4d08f9..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_entity.go +++ /dev/null @@ -1,221 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Entity interface { -} - -// RawEntityImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawEntityImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalEntityImplementation(input []byte) (Entity, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling Entity into map[string]interface: %+v", err) - } - - value, ok := temp["kind"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "Account") { - var out AccountEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into AccountEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "AzureResource") { - var out AzureResourceEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into AzureResourceEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "CloudApplication") { - var out CloudApplicationEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into CloudApplicationEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "DnsResolution") { - var out DnsEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into DnsEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "File") { - var out FileEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into FileEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "FileHash") { - var out FileHashEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into FileHashEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Host") { - var out HostEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into HostEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Bookmark") { - var out HuntingBookmark - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into HuntingBookmark: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Ip") { - var out IPEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into IPEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "IoTDevice") { - var out IoTDeviceEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into IoTDeviceEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "MailCluster") { - var out MailClusterEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MailClusterEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "MailMessage") { - var out MailMessageEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MailMessageEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Mailbox") { - var out MailboxEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MailboxEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Malware") { - var out MalwareEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MalwareEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Nic") { - var out NicEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into NicEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Process") { - var out ProcessEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ProcessEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "RegistryKey") { - var out RegistryKeyEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into RegistryKeyEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "RegistryValue") { - var out RegistryValueEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into RegistryValueEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "SecurityAlert") { - var out SecurityAlert - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SecurityAlert: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "SecurityGroup") { - var out SecurityGroupEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SecurityGroupEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "SubmissionMail") { - var out SubmissionMailEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SubmissionMailEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Url") { - var out UrlEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into UrlEntity: %+v", err) - } - return out, nil - } - - out := RawEntityImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_fileentity.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_fileentity.go deleted file mode 100644 index 98411b9b140..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_fileentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = FileEntity{} - -type FileEntity struct { - Properties *FileEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = FileEntity{} - -func (s FileEntity) MarshalJSON() ([]byte, error) { - type wrapper FileEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling FileEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling FileEntity: %+v", err) - } - decoded["kind"] = "File" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling FileEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_fileentityproperties.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_fileentityproperties.go deleted file mode 100644 index 257ffb1ba04..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_fileentityproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FileEntityProperties struct { - AdditionalData *map[string]interface{} `json:"additionalData,omitempty"` - Directory *string `json:"directory,omitempty"` - FileHashEntityIds *[]string `json:"fileHashEntityIds,omitempty"` - FileName *string `json:"fileName,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HostEntityId *string `json:"hostEntityId,omitempty"` -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_filehashentity.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_filehashentity.go deleted file mode 100644 index bf05183c64b..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_filehashentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = FileHashEntity{} - -type FileHashEntity struct { - Properties *FileHashEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = FileHashEntity{} - -func (s FileHashEntity) MarshalJSON() ([]byte, error) { - type wrapper FileHashEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling FileHashEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling FileHashEntity: %+v", err) - } - decoded["kind"] = "FileHash" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling FileHashEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_filehashentityproperties.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_filehashentityproperties.go deleted file mode 100644 index d8097218e1d..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_filehashentityproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FileHashEntityProperties struct { - AdditionalData *map[string]interface{} `json:"additionalData,omitempty"` - Algorithm *FileHashAlgorithm `json:"algorithm,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HashValue *string `json:"hashValue,omitempty"` -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_geolocation.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_geolocation.go deleted file mode 100644 index 53a44e73dcd..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_geolocation.go +++ /dev/null @@ -1,14 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GeoLocation struct { - Asn *int64 `json:"asn,omitempty"` - City *string `json:"city,omitempty"` - CountryCode *string `json:"countryCode,omitempty"` - CountryName *string `json:"countryName,omitempty"` - Latitude *float64 `json:"latitude,omitempty"` - Longitude *float64 `json:"longitude,omitempty"` - State *string `json:"state,omitempty"` -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_hostentity.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_hostentity.go deleted file mode 100644 index 90b206a2d15..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_hostentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = HostEntity{} - -type HostEntity struct { - Properties *HostEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = HostEntity{} - -func (s HostEntity) MarshalJSON() ([]byte, error) { - type wrapper HostEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling HostEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling HostEntity: %+v", err) - } - decoded["kind"] = "Host" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling HostEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_hostentityproperties.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_hostentityproperties.go deleted file mode 100644 index aeff0d09403..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_hostentityproperties.go +++ /dev/null @@ -1,18 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HostEntityProperties struct { - AdditionalData *map[string]interface{} `json:"additionalData,omitempty"` - AzureID *string `json:"azureID,omitempty"` - DnsDomain *string `json:"dnsDomain,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HostName *string `json:"hostName,omitempty"` - IsDomainJoined *bool `json:"isDomainJoined,omitempty"` - NetBiosName *string `json:"netBiosName,omitempty"` - NtDomain *string `json:"ntDomain,omitempty"` - OmsAgentID *string `json:"omsAgentID,omitempty"` - OsFamily *OSFamily `json:"osFamily,omitempty"` - OsVersion *string `json:"osVersion,omitempty"` -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_huntingbookmark.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_huntingbookmark.go deleted file mode 100644 index e86ba910de6..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_huntingbookmark.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = HuntingBookmark{} - -type HuntingBookmark struct { - Properties *HuntingBookmarkProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = HuntingBookmark{} - -func (s HuntingBookmark) MarshalJSON() ([]byte, error) { - type wrapper HuntingBookmark - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling HuntingBookmark: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling HuntingBookmark: %+v", err) - } - decoded["kind"] = "Bookmark" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling HuntingBookmark: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_huntingbookmarkproperties.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_huntingbookmarkproperties.go deleted file mode 100644 index 5ebc3ac122f..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_huntingbookmarkproperties.go +++ /dev/null @@ -1,62 +0,0 @@ -package entitytypes - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HuntingBookmarkProperties struct { - AdditionalData *map[string]interface{} `json:"additionalData,omitempty"` - Created *string `json:"created,omitempty"` - CreatedBy *UserInfo `json:"createdBy,omitempty"` - DisplayName string `json:"displayName"` - EventTime *string `json:"eventTime,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - IncidentInfo *IncidentInfo `json:"incidentInfo,omitempty"` - Labels *[]string `json:"labels,omitempty"` - Notes *string `json:"notes,omitempty"` - Query string `json:"query"` - QueryResult *string `json:"queryResult,omitempty"` - Updated *string `json:"updated,omitempty"` - UpdatedBy *UserInfo `json:"updatedBy,omitempty"` -} - -func (o *HuntingBookmarkProperties) GetCreatedAsTime() (*time.Time, error) { - if o.Created == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Created, "2006-01-02T15:04:05Z07:00") -} - -func (o *HuntingBookmarkProperties) SetCreatedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Created = &formatted -} - -func (o *HuntingBookmarkProperties) GetEventTimeAsTime() (*time.Time, error) { - if o.EventTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.EventTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *HuntingBookmarkProperties) SetEventTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.EventTime = &formatted -} - -func (o *HuntingBookmarkProperties) GetUpdatedAsTime() (*time.Time, error) { - if o.Updated == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Updated, "2006-01-02T15:04:05Z07:00") -} - -func (o *HuntingBookmarkProperties) SetUpdatedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Updated = &formatted -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_incidentinfo.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_incidentinfo.go deleted file mode 100644 index 80d014f5289..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_incidentinfo.go +++ /dev/null @@ -1,11 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IncidentInfo struct { - IncidentId *string `json:"incidentId,omitempty"` - RelationName *string `json:"relationName,omitempty"` - Severity *IncidentSeverity `json:"severity,omitempty"` - Title *string `json:"title,omitempty"` -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_iotdeviceentity.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_iotdeviceentity.go deleted file mode 100644 index 3828d0cf7d2..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_iotdeviceentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = IoTDeviceEntity{} - -type IoTDeviceEntity struct { - Properties *IoTDeviceEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = IoTDeviceEntity{} - -func (s IoTDeviceEntity) MarshalJSON() ([]byte, error) { - type wrapper IoTDeviceEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling IoTDeviceEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling IoTDeviceEntity: %+v", err) - } - decoded["kind"] = "IoTDevice" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling IoTDeviceEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_iotdeviceentityproperties.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_iotdeviceentityproperties.go deleted file mode 100644 index 4cd3953b37d..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_iotdeviceentityproperties.go +++ /dev/null @@ -1,37 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IoTDeviceEntityProperties struct { - AdditionalData *map[string]interface{} `json:"additionalData,omitempty"` - DeviceId *string `json:"deviceId,omitempty"` - DeviceName *string `json:"deviceName,omitempty"` - DeviceSubType *string `json:"deviceSubType,omitempty"` - DeviceType *string `json:"deviceType,omitempty"` - EdgeId *string `json:"edgeId,omitempty"` - FirmwareVersion *string `json:"firmwareVersion,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HostEntityId *string `json:"hostEntityId,omitempty"` - IPAddressEntityId *string `json:"ipAddressEntityId,omitempty"` - Importance *DeviceImportance `json:"importance,omitempty"` - IotHubEntityId *string `json:"iotHubEntityId,omitempty"` - IotSecurityAgentId *string `json:"iotSecurityAgentId,omitempty"` - IsAuthorized *bool `json:"isAuthorized,omitempty"` - IsProgramming *bool `json:"isProgramming,omitempty"` - IsScanner *bool `json:"isScanner,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - Model *string `json:"model,omitempty"` - NicEntityIds *[]string `json:"nicEntityIds,omitempty"` - OperatingSystem *string `json:"operatingSystem,omitempty"` - Owners *[]string `json:"owners,omitempty"` - Protocols *[]string `json:"protocols,omitempty"` - PurdueLayer *string `json:"purdueLayer,omitempty"` - Sensor *string `json:"sensor,omitempty"` - SerialNumber *string `json:"serialNumber,omitempty"` - Site *string `json:"site,omitempty"` - Source *string `json:"source,omitempty"` - ThreatIntelligence *[]ThreatIntelligence `json:"threatIntelligence,omitempty"` - Vendor *string `json:"vendor,omitempty"` - Zone *string `json:"zone,omitempty"` -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_ipentity.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_ipentity.go deleted file mode 100644 index e062bf2295a..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_ipentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = IPEntity{} - -type IPEntity struct { - Properties *IPEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = IPEntity{} - -func (s IPEntity) MarshalJSON() ([]byte, error) { - type wrapper IPEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling IPEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling IPEntity: %+v", err) - } - decoded["kind"] = "Ip" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling IPEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_ipentityproperties.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_ipentityproperties.go deleted file mode 100644 index b0cf7442a43..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_ipentityproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPEntityProperties struct { - AdditionalData *map[string]interface{} `json:"additionalData,omitempty"` - Address *string `json:"address,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - Location *GeoLocation `json:"location,omitempty"` - ThreatIntelligence *[]ThreatIntelligence `json:"threatIntelligence,omitempty"` -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_mailboxentity.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_mailboxentity.go deleted file mode 100644 index 57dee77697e..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_mailboxentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = MailboxEntity{} - -type MailboxEntity struct { - Properties *MailboxEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = MailboxEntity{} - -func (s MailboxEntity) MarshalJSON() ([]byte, error) { - type wrapper MailboxEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MailboxEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MailboxEntity: %+v", err) - } - decoded["kind"] = "Mailbox" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MailboxEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_mailboxentityproperties.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_mailboxentityproperties.go deleted file mode 100644 index 8d1b787b9c9..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_mailboxentityproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MailboxEntityProperties struct { - AdditionalData *map[string]interface{} `json:"additionalData,omitempty"` - DisplayName *string `json:"displayName,omitempty"` - ExternalDirectoryObjectId *string `json:"externalDirectoryObjectId,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - MailboxPrimaryAddress *string `json:"mailboxPrimaryAddress,omitempty"` - Upn *string `json:"upn,omitempty"` -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_mailclusterentity.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_mailclusterentity.go deleted file mode 100644 index afa0db447b6..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_mailclusterentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = MailClusterEntity{} - -type MailClusterEntity struct { - Properties *MailClusterEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = MailClusterEntity{} - -func (s MailClusterEntity) MarshalJSON() ([]byte, error) { - type wrapper MailClusterEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MailClusterEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MailClusterEntity: %+v", err) - } - decoded["kind"] = "MailCluster" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MailClusterEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_mailclusterentityproperties.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_mailclusterentityproperties.go deleted file mode 100644 index 6b6724b72a7..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_mailclusterentityproperties.go +++ /dev/null @@ -1,66 +0,0 @@ -package entitytypes - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MailClusterEntityProperties struct { - AdditionalData *map[string]interface{} `json:"additionalData,omitempty"` - ClusterGroup *string `json:"clusterGroup,omitempty"` - ClusterQueryEndTime *string `json:"clusterQueryEndTime,omitempty"` - ClusterQueryStartTime *string `json:"clusterQueryStartTime,omitempty"` - ClusterSourceIdentifier *string `json:"clusterSourceIdentifier,omitempty"` - ClusterSourceType *string `json:"clusterSourceType,omitempty"` - CountByDeliveryStatus *interface{} `json:"countByDeliveryStatus,omitempty"` - CountByProtectionStatus *interface{} `json:"countByProtectionStatus,omitempty"` - CountByThreatType *interface{} `json:"countByThreatType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - IsVolumeAnomaly *bool `json:"isVolumeAnomaly,omitempty"` - MailCount *int64 `json:"mailCount,omitempty"` - NetworkMessageIds *[]string `json:"networkMessageIds,omitempty"` - Query *string `json:"query,omitempty"` - QueryTime *string `json:"queryTime,omitempty"` - Source *string `json:"source,omitempty"` - Threats *[]string `json:"threats,omitempty"` -} - -func (o *MailClusterEntityProperties) GetClusterQueryEndTimeAsTime() (*time.Time, error) { - if o.ClusterQueryEndTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.ClusterQueryEndTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *MailClusterEntityProperties) SetClusterQueryEndTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.ClusterQueryEndTime = &formatted -} - -func (o *MailClusterEntityProperties) GetClusterQueryStartTimeAsTime() (*time.Time, error) { - if o.ClusterQueryStartTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.ClusterQueryStartTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *MailClusterEntityProperties) SetClusterQueryStartTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.ClusterQueryStartTime = &formatted -} - -func (o *MailClusterEntityProperties) GetQueryTimeAsTime() (*time.Time, error) { - if o.QueryTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.QueryTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *MailClusterEntityProperties) SetQueryTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.QueryTime = &formatted -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_mailmessageentity.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_mailmessageentity.go deleted file mode 100644 index e0fef66bf3b..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_mailmessageentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = MailMessageEntity{} - -type MailMessageEntity struct { - Properties *MailMessageEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = MailMessageEntity{} - -func (s MailMessageEntity) MarshalJSON() ([]byte, error) { - type wrapper MailMessageEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MailMessageEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MailMessageEntity: %+v", err) - } - decoded["kind"] = "MailMessage" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MailMessageEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_mailmessageentityproperties.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_mailmessageentityproperties.go deleted file mode 100644 index 48c4bfe7c77..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_mailmessageentityproperties.go +++ /dev/null @@ -1,52 +0,0 @@ -package entitytypes - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MailMessageEntityProperties struct { - AdditionalData *map[string]interface{} `json:"additionalData,omitempty"` - AntispamDirection *AntispamMailDirection `json:"antispamDirection,omitempty"` - BodyFingerprintBin1 *int64 `json:"bodyFingerprintBin1,omitempty"` - BodyFingerprintBin2 *int64 `json:"bodyFingerprintBin2,omitempty"` - BodyFingerprintBin3 *int64 `json:"bodyFingerprintBin3,omitempty"` - BodyFingerprintBin4 *int64 `json:"bodyFingerprintBin4,omitempty"` - BodyFingerprintBin5 *int64 `json:"bodyFingerprintBin5,omitempty"` - DeliveryAction *DeliveryAction `json:"deliveryAction,omitempty"` - DeliveryLocation *DeliveryLocation `json:"deliveryLocation,omitempty"` - FileEntityIds *[]string `json:"fileEntityIds,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - InternetMessageId *string `json:"internetMessageId,omitempty"` - Language *string `json:"language,omitempty"` - NetworkMessageId *string `json:"networkMessageId,omitempty"` - P1Sender *string `json:"p1Sender,omitempty"` - P1SenderDisplayName *string `json:"p1SenderDisplayName,omitempty"` - P1SenderDomain *string `json:"p1SenderDomain,omitempty"` - P2Sender *string `json:"p2Sender,omitempty"` - P2SenderDisplayName *string `json:"p2SenderDisplayName,omitempty"` - P2SenderDomain *string `json:"p2SenderDomain,omitempty"` - ReceiveDate *string `json:"receiveDate,omitempty"` - Recipient *string `json:"recipient,omitempty"` - SenderIP *string `json:"senderIP,omitempty"` - Subject *string `json:"subject,omitempty"` - ThreatDetectionMethods *[]string `json:"threatDetectionMethods,omitempty"` - Threats *[]string `json:"threats,omitempty"` - Urls *[]string `json:"urls,omitempty"` -} - -func (o *MailMessageEntityProperties) GetReceiveDateAsTime() (*time.Time, error) { - if o.ReceiveDate == nil { - return nil, nil - } - return dates.ParseAsFormat(o.ReceiveDate, "2006-01-02T15:04:05Z07:00") -} - -func (o *MailMessageEntityProperties) SetReceiveDateAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.ReceiveDate = &formatted -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_malwareentity.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_malwareentity.go deleted file mode 100644 index 01b3f9cda92..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_malwareentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = MalwareEntity{} - -type MalwareEntity struct { - Properties *MalwareEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = MalwareEntity{} - -func (s MalwareEntity) MarshalJSON() ([]byte, error) { - type wrapper MalwareEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MalwareEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MalwareEntity: %+v", err) - } - decoded["kind"] = "Malware" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MalwareEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_malwareentityproperties.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_malwareentityproperties.go deleted file mode 100644 index 99a3529f02f..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_malwareentityproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MalwareEntityProperties struct { - AdditionalData *map[string]interface{} `json:"additionalData,omitempty"` - Category *string `json:"category,omitempty"` - FileEntityIds *[]string `json:"fileEntityIds,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - MalwareName *string `json:"malwareName,omitempty"` - ProcessEntityIds *[]string `json:"processEntityIds,omitempty"` -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_nicentity.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_nicentity.go deleted file mode 100644 index 8dfa514edcb..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_nicentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = NicEntity{} - -type NicEntity struct { - Properties *NicEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = NicEntity{} - -func (s NicEntity) MarshalJSON() ([]byte, error) { - type wrapper NicEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling NicEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling NicEntity: %+v", err) - } - decoded["kind"] = "Nic" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling NicEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_nicentityproperties.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_nicentityproperties.go deleted file mode 100644 index 41b9e710031..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_nicentityproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NicEntityProperties struct { - AdditionalData *map[string]interface{} `json:"additionalData,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - IPAddressEntityId *string `json:"ipAddressEntityId,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - Vlans *[]string `json:"vlans,omitempty"` -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_processentity.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_processentity.go deleted file mode 100644 index b3d0be74fd8..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_processentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = ProcessEntity{} - -type ProcessEntity struct { - Properties *ProcessEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = ProcessEntity{} - -func (s ProcessEntity) MarshalJSON() ([]byte, error) { - type wrapper ProcessEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ProcessEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ProcessEntity: %+v", err) - } - decoded["kind"] = "Process" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ProcessEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_processentityproperties.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_processentityproperties.go deleted file mode 100644 index 49e9b63fe4a..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_processentityproperties.go +++ /dev/null @@ -1,36 +0,0 @@ -package entitytypes - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProcessEntityProperties struct { - AccountEntityId *string `json:"accountEntityId,omitempty"` - AdditionalData *map[string]interface{} `json:"additionalData,omitempty"` - CommandLine *string `json:"commandLine,omitempty"` - CreationTimeUtc *string `json:"creationTimeUtc,omitempty"` - ElevationToken *ElevationToken `json:"elevationToken,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HostEntityId *string `json:"hostEntityId,omitempty"` - HostLogonSessionEntityId *string `json:"hostLogonSessionEntityId,omitempty"` - ImageFileEntityId *string `json:"imageFileEntityId,omitempty"` - ParentProcessEntityId *string `json:"parentProcessEntityId,omitempty"` - ProcessId *string `json:"processId,omitempty"` -} - -func (o *ProcessEntityProperties) GetCreationTimeUtcAsTime() (*time.Time, error) { - if o.CreationTimeUtc == nil { - return nil, nil - } - return dates.ParseAsFormat(o.CreationTimeUtc, "2006-01-02T15:04:05Z07:00") -} - -func (o *ProcessEntityProperties) SetCreationTimeUtcAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.CreationTimeUtc = &formatted -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_registrykeyentity.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_registrykeyentity.go deleted file mode 100644 index bef73eb2c5b..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_registrykeyentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = RegistryKeyEntity{} - -type RegistryKeyEntity struct { - Properties *RegistryKeyEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = RegistryKeyEntity{} - -func (s RegistryKeyEntity) MarshalJSON() ([]byte, error) { - type wrapper RegistryKeyEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling RegistryKeyEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling RegistryKeyEntity: %+v", err) - } - decoded["kind"] = "RegistryKey" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling RegistryKeyEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_registrykeyentityproperties.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_registrykeyentityproperties.go deleted file mode 100644 index f91f75ea021..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_registrykeyentityproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RegistryKeyEntityProperties struct { - AdditionalData *map[string]interface{} `json:"additionalData,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - Hive *RegistryHive `json:"hive,omitempty"` - Key *string `json:"key,omitempty"` -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_registryvalueentity.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_registryvalueentity.go deleted file mode 100644 index 45599924191..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_registryvalueentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = RegistryValueEntity{} - -type RegistryValueEntity struct { - Properties *RegistryValueEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = RegistryValueEntity{} - -func (s RegistryValueEntity) MarshalJSON() ([]byte, error) { - type wrapper RegistryValueEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling RegistryValueEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling RegistryValueEntity: %+v", err) - } - decoded["kind"] = "RegistryValue" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling RegistryValueEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_registryvalueentityproperties.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_registryvalueentityproperties.go deleted file mode 100644 index c368632a1d3..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_registryvalueentityproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RegistryValueEntityProperties struct { - AdditionalData *map[string]interface{} `json:"additionalData,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - KeyEntityId *string `json:"keyEntityId,omitempty"` - ValueData *string `json:"valueData,omitempty"` - ValueName *string `json:"valueName,omitempty"` - ValueType *RegistryValueKind `json:"valueType,omitempty"` -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_securityalert.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_securityalert.go deleted file mode 100644 index cfda2671eec..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_securityalert.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = SecurityAlert{} - -type SecurityAlert struct { - Properties *SecurityAlertProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = SecurityAlert{} - -func (s SecurityAlert) MarshalJSON() ([]byte, error) { - type wrapper SecurityAlert - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SecurityAlert: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SecurityAlert: %+v", err) - } - decoded["kind"] = "SecurityAlert" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SecurityAlert: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_securityalertproperties.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_securityalertproperties.go deleted file mode 100644 index 105a41b9daf..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_securityalertproperties.go +++ /dev/null @@ -1,88 +0,0 @@ -package entitytypes - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityAlertProperties struct { - AdditionalData *map[string]interface{} `json:"additionalData,omitempty"` - AlertDisplayName *string `json:"alertDisplayName,omitempty"` - AlertLink *string `json:"alertLink,omitempty"` - AlertType *string `json:"alertType,omitempty"` - CompromisedEntity *string `json:"compromisedEntity,omitempty"` - ConfidenceLevel *ConfidenceLevel `json:"confidenceLevel,omitempty"` - ConfidenceReasons *[]SecurityAlertPropertiesConfidenceReasonsInlined `json:"confidenceReasons,omitempty"` - ConfidenceScore *float64 `json:"confidenceScore,omitempty"` - ConfidenceScoreStatus *ConfidenceScoreStatus `json:"confidenceScoreStatus,omitempty"` - Description *string `json:"description,omitempty"` - EndTimeUtc *string `json:"endTimeUtc,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - Intent *KillChainIntent `json:"intent,omitempty"` - ProcessingEndTime *string `json:"processingEndTime,omitempty"` - ProductComponentName *string `json:"productComponentName,omitempty"` - ProductName *string `json:"productName,omitempty"` - ProductVersion *string `json:"productVersion,omitempty"` - ProviderAlertId *string `json:"providerAlertId,omitempty"` - RemediationSteps *[]string `json:"remediationSteps,omitempty"` - ResourceIdentifiers *[]interface{} `json:"resourceIdentifiers,omitempty"` - Severity *AlertSeverity `json:"severity,omitempty"` - StartTimeUtc *string `json:"startTimeUtc,omitempty"` - Status *AlertStatus `json:"status,omitempty"` - SystemAlertId *string `json:"systemAlertId,omitempty"` - Tactics *[]AttackTactic `json:"tactics,omitempty"` - TimeGenerated *string `json:"timeGenerated,omitempty"` - VendorName *string `json:"vendorName,omitempty"` -} - -func (o *SecurityAlertProperties) GetEndTimeUtcAsTime() (*time.Time, error) { - if o.EndTimeUtc == nil { - return nil, nil - } - return dates.ParseAsFormat(o.EndTimeUtc, "2006-01-02T15:04:05Z07:00") -} - -func (o *SecurityAlertProperties) SetEndTimeUtcAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.EndTimeUtc = &formatted -} - -func (o *SecurityAlertProperties) GetProcessingEndTimeAsTime() (*time.Time, error) { - if o.ProcessingEndTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.ProcessingEndTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *SecurityAlertProperties) SetProcessingEndTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.ProcessingEndTime = &formatted -} - -func (o *SecurityAlertProperties) GetStartTimeUtcAsTime() (*time.Time, error) { - if o.StartTimeUtc == nil { - return nil, nil - } - return dates.ParseAsFormat(o.StartTimeUtc, "2006-01-02T15:04:05Z07:00") -} - -func (o *SecurityAlertProperties) SetStartTimeUtcAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.StartTimeUtc = &formatted -} - -func (o *SecurityAlertProperties) GetTimeGeneratedAsTime() (*time.Time, error) { - if o.TimeGenerated == nil { - return nil, nil - } - return dates.ParseAsFormat(o.TimeGenerated, "2006-01-02T15:04:05Z07:00") -} - -func (o *SecurityAlertProperties) SetTimeGeneratedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.TimeGenerated = &formatted -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_securityalertpropertiesconfidencereasonsinlined.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_securityalertpropertiesconfidencereasonsinlined.go deleted file mode 100644 index 1560939747b..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_securityalertpropertiesconfidencereasonsinlined.go +++ /dev/null @@ -1,9 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityAlertPropertiesConfidenceReasonsInlined struct { - Reason *string `json:"reason,omitempty"` - ReasonType *string `json:"reasonType,omitempty"` -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_securitygroupentity.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_securitygroupentity.go deleted file mode 100644 index 71a694b6c72..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_securitygroupentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = SecurityGroupEntity{} - -type SecurityGroupEntity struct { - Properties *SecurityGroupEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = SecurityGroupEntity{} - -func (s SecurityGroupEntity) MarshalJSON() ([]byte, error) { - type wrapper SecurityGroupEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SecurityGroupEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SecurityGroupEntity: %+v", err) - } - decoded["kind"] = "SecurityGroup" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SecurityGroupEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_securitygroupentityproperties.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_securitygroupentityproperties.go deleted file mode 100644 index 458b2ccbfb1..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_securitygroupentityproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityGroupEntityProperties struct { - AdditionalData *map[string]interface{} `json:"additionalData,omitempty"` - DistinguishedName *string `json:"distinguishedName,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - ObjectGuid *string `json:"objectGuid,omitempty"` - Sid *string `json:"sid,omitempty"` -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_submissionmailentity.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_submissionmailentity.go deleted file mode 100644 index ff1c9193b12..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_submissionmailentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = SubmissionMailEntity{} - -type SubmissionMailEntity struct { - Properties *SubmissionMailEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = SubmissionMailEntity{} - -func (s SubmissionMailEntity) MarshalJSON() ([]byte, error) { - type wrapper SubmissionMailEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SubmissionMailEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SubmissionMailEntity: %+v", err) - } - decoded["kind"] = "SubmissionMail" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SubmissionMailEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_submissionmailentityproperties.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_submissionmailentityproperties.go deleted file mode 100644 index f28988a5d5b..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_submissionmailentityproperties.go +++ /dev/null @@ -1,49 +0,0 @@ -package entitytypes - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubmissionMailEntityProperties struct { - AdditionalData *map[string]interface{} `json:"additionalData,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - NetworkMessageId *string `json:"networkMessageId,omitempty"` - Recipient *string `json:"recipient,omitempty"` - ReportType *string `json:"reportType,omitempty"` - Sender *string `json:"sender,omitempty"` - SenderIP *string `json:"senderIp,omitempty"` - Subject *string `json:"subject,omitempty"` - SubmissionDate *string `json:"submissionDate,omitempty"` - SubmissionId *string `json:"submissionId,omitempty"` - Submitter *string `json:"submitter,omitempty"` - Timestamp *string `json:"timestamp,omitempty"` -} - -func (o *SubmissionMailEntityProperties) GetSubmissionDateAsTime() (*time.Time, error) { - if o.SubmissionDate == nil { - return nil, nil - } - return dates.ParseAsFormat(o.SubmissionDate, "2006-01-02T15:04:05Z07:00") -} - -func (o *SubmissionMailEntityProperties) SetSubmissionDateAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.SubmissionDate = &formatted -} - -func (o *SubmissionMailEntityProperties) GetTimestampAsTime() (*time.Time, error) { - if o.Timestamp == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Timestamp, "2006-01-02T15:04:05Z07:00") -} - -func (o *SubmissionMailEntityProperties) SetTimestampAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Timestamp = &formatted -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_systemdata.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_systemdata.go deleted file mode 100644 index 862ee7fdbaf..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_systemdata.go +++ /dev/null @@ -1,43 +0,0 @@ -package entitytypes - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SystemData struct { - CreatedAt *string `json:"createdAt,omitempty"` - CreatedBy *string `json:"createdBy,omitempty"` - CreatedByType *CreatedByType `json:"createdByType,omitempty"` - LastModifiedAt *string `json:"lastModifiedAt,omitempty"` - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` - LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"` -} - -func (o *SystemData) GetCreatedAtAsTime() (*time.Time, error) { - if o.CreatedAt == nil { - return nil, nil - } - return dates.ParseAsFormat(o.CreatedAt, "2006-01-02T15:04:05Z07:00") -} - -func (o *SystemData) SetCreatedAtAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.CreatedAt = &formatted -} - -func (o *SystemData) GetLastModifiedAtAsTime() (*time.Time, error) { - if o.LastModifiedAt == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastModifiedAt, "2006-01-02T15:04:05Z07:00") -} - -func (o *SystemData) SetLastModifiedAtAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastModifiedAt = &formatted -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_threatintelligence.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_threatintelligence.go deleted file mode 100644 index e225a18045c..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_threatintelligence.go +++ /dev/null @@ -1,13 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ThreatIntelligence struct { - Confidence *float64 `json:"confidence,omitempty"` - ProviderName *string `json:"providerName,omitempty"` - ReportLink *string `json:"reportLink,omitempty"` - ThreatDescription *string `json:"threatDescription,omitempty"` - ThreatName *string `json:"threatName,omitempty"` - ThreatType *string `json:"threatType,omitempty"` -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_urlentity.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_urlentity.go deleted file mode 100644 index a6d90352180..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_urlentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = UrlEntity{} - -type UrlEntity struct { - Properties *UrlEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = UrlEntity{} - -func (s UrlEntity) MarshalJSON() ([]byte, error) { - type wrapper UrlEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling UrlEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling UrlEntity: %+v", err) - } - decoded["kind"] = "Url" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling UrlEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_urlentityproperties.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_urlentityproperties.go deleted file mode 100644 index 2d3b7085055..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_urlentityproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UrlEntityProperties struct { - AdditionalData *map[string]interface{} `json:"additionalData,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - Url *string `json:"url,omitempty"` -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_userinfo.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_userinfo.go deleted file mode 100644 index 9b6d8135aea..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/model_userinfo.go +++ /dev/null @@ -1,10 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UserInfo struct { - Email *string `json:"email,omitempty"` - Name *string `json:"name,omitempty"` - ObjectId *string `json:"objectId,omitempty"` -} diff --git a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/version.go b/resource-manager/securityinsights/2022-10-01-preview/entitytypes/version.go deleted file mode 100644 index 0805f4e603a..00000000000 --- a/resource-manager/securityinsights/2022-10-01-preview/entitytypes/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package entitytypes - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-10-01-preview" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/entitytypes/%s", defaultApiVersion) -} diff --git a/resource-manager/securityinsights/2022-11-01/client.go b/resource-manager/securityinsights/2022-11-01/client.go index 3f51706d094..281d70a6eca 100644 --- a/resource-manager/securityinsights/2022-11-01/client.go +++ b/resource-manager/securityinsights/2022-11-01/client.go @@ -12,7 +12,6 @@ import ( "github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/automationrules" "github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/bookmarks" "github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/dataconnectors" - "github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/entitytypes" "github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/incidentalerts" "github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/incidentbookmarks" "github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/incidentcomments" @@ -35,7 +34,6 @@ type Client struct { AutomationRules *automationrules.AutomationRulesClient Bookmarks *bookmarks.BookmarksClient DataConnectors *dataconnectors.DataConnectorsClient - EntityTypes *entitytypes.EntityTypesClient IncidentAlerts *incidentalerts.IncidentAlertsClient IncidentBookmarks *incidentbookmarks.IncidentBookmarksClient IncidentComments *incidentcomments.IncidentCommentsClient @@ -86,12 +84,6 @@ func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanag } configureFunc(dataConnectorsClient.Client) - entityTypesClient, err := entitytypes.NewEntityTypesClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building EntityTypes client: %+v", err) - } - configureFunc(entityTypesClient.Client) - incidentAlertsClient, err := incidentalerts.NewIncidentAlertsClientWithBaseURI(sdkApi) if err != nil { return nil, fmt.Errorf("building IncidentAlerts client: %+v", err) @@ -165,7 +157,6 @@ func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanag AutomationRules: automationRulesClient, Bookmarks: bookmarksClient, DataConnectors: dataConnectorsClient, - EntityTypes: entityTypesClient, IncidentAlerts: incidentAlertsClient, IncidentBookmarks: incidentBookmarksClient, IncidentComments: incidentCommentsClient, diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/README.md b/resource-manager/securityinsights/2022-11-01/entitytypes/README.md deleted file mode 100644 index 4109f071b82..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/entitytypes` Documentation - -The `entitytypes` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-11-01/entitytypes" -``` - - -### Client Initialization - -```go -client := entitytypes.NewEntityTypesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/client.go b/resource-manager/securityinsights/2022-11-01/entitytypes/client.go deleted file mode 100644 index bcdd09e4029..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package entitytypes - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EntityTypesClient struct { - Client *resourcemanager.Client -} - -func NewEntityTypesClientWithBaseURI(sdkApi sdkEnv.Api) (*EntityTypesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "entitytypes", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating EntityTypesClient: %+v", err) - } - - return &EntityTypesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/constants.go b/resource-manager/securityinsights/2022-11-01/entitytypes/constants.go deleted file mode 100644 index 2f194a6f29d..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/constants.go +++ /dev/null @@ -1,980 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AlertSeverity string - -const ( - AlertSeverityHigh AlertSeverity = "High" - AlertSeverityInformational AlertSeverity = "Informational" - AlertSeverityLow AlertSeverity = "Low" - AlertSeverityMedium AlertSeverity = "Medium" -) - -func PossibleValuesForAlertSeverity() []string { - return []string{ - string(AlertSeverityHigh), - string(AlertSeverityInformational), - string(AlertSeverityLow), - string(AlertSeverityMedium), - } -} - -func (s *AlertSeverity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAlertSeverity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAlertSeverity(input string) (*AlertSeverity, error) { - vals := map[string]AlertSeverity{ - "high": AlertSeverityHigh, - "informational": AlertSeverityInformational, - "low": AlertSeverityLow, - "medium": AlertSeverityMedium, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AlertSeverity(input) - return &out, nil -} - -type AlertStatus string - -const ( - AlertStatusDismissed AlertStatus = "Dismissed" - AlertStatusInProgress AlertStatus = "InProgress" - AlertStatusNew AlertStatus = "New" - AlertStatusResolved AlertStatus = "Resolved" - AlertStatusUnknown AlertStatus = "Unknown" -) - -func PossibleValuesForAlertStatus() []string { - return []string{ - string(AlertStatusDismissed), - string(AlertStatusInProgress), - string(AlertStatusNew), - string(AlertStatusResolved), - string(AlertStatusUnknown), - } -} - -func (s *AlertStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAlertStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAlertStatus(input string) (*AlertStatus, error) { - vals := map[string]AlertStatus{ - "dismissed": AlertStatusDismissed, - "inprogress": AlertStatusInProgress, - "new": AlertStatusNew, - "resolved": AlertStatusResolved, - "unknown": AlertStatusUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AlertStatus(input) - return &out, nil -} - -type AntispamMailDirection string - -const ( - AntispamMailDirectionInbound AntispamMailDirection = "Inbound" - AntispamMailDirectionIntraorg AntispamMailDirection = "Intraorg" - AntispamMailDirectionOutbound AntispamMailDirection = "Outbound" - AntispamMailDirectionUnknown AntispamMailDirection = "Unknown" -) - -func PossibleValuesForAntispamMailDirection() []string { - return []string{ - string(AntispamMailDirectionInbound), - string(AntispamMailDirectionIntraorg), - string(AntispamMailDirectionOutbound), - string(AntispamMailDirectionUnknown), - } -} - -func (s *AntispamMailDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAntispamMailDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAntispamMailDirection(input string) (*AntispamMailDirection, error) { - vals := map[string]AntispamMailDirection{ - "inbound": AntispamMailDirectionInbound, - "intraorg": AntispamMailDirectionIntraorg, - "outbound": AntispamMailDirectionOutbound, - "unknown": AntispamMailDirectionUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AntispamMailDirection(input) - return &out, nil -} - -type AttackTactic string - -const ( - AttackTacticCollection AttackTactic = "Collection" - AttackTacticCommandAndControl AttackTactic = "CommandAndControl" - AttackTacticCredentialAccess AttackTactic = "CredentialAccess" - AttackTacticDefenseEvasion AttackTactic = "DefenseEvasion" - AttackTacticDiscovery AttackTactic = "Discovery" - AttackTacticExecution AttackTactic = "Execution" - AttackTacticExfiltration AttackTactic = "Exfiltration" - AttackTacticImpact AttackTactic = "Impact" - AttackTacticImpairProcessControl AttackTactic = "ImpairProcessControl" - AttackTacticInhibitResponseFunction AttackTactic = "InhibitResponseFunction" - AttackTacticInitialAccess AttackTactic = "InitialAccess" - AttackTacticLateralMovement AttackTactic = "LateralMovement" - AttackTacticPersistence AttackTactic = "Persistence" - AttackTacticPreAttack AttackTactic = "PreAttack" - AttackTacticPrivilegeEscalation AttackTactic = "PrivilegeEscalation" - AttackTacticReconnaissance AttackTactic = "Reconnaissance" - AttackTacticResourceDevelopment AttackTactic = "ResourceDevelopment" -) - -func PossibleValuesForAttackTactic() []string { - return []string{ - string(AttackTacticCollection), - string(AttackTacticCommandAndControl), - string(AttackTacticCredentialAccess), - string(AttackTacticDefenseEvasion), - string(AttackTacticDiscovery), - string(AttackTacticExecution), - string(AttackTacticExfiltration), - string(AttackTacticImpact), - string(AttackTacticImpairProcessControl), - string(AttackTacticInhibitResponseFunction), - string(AttackTacticInitialAccess), - string(AttackTacticLateralMovement), - string(AttackTacticPersistence), - string(AttackTacticPreAttack), - string(AttackTacticPrivilegeEscalation), - string(AttackTacticReconnaissance), - string(AttackTacticResourceDevelopment), - } -} - -func (s *AttackTactic) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAttackTactic(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAttackTactic(input string) (*AttackTactic, error) { - vals := map[string]AttackTactic{ - "collection": AttackTacticCollection, - "commandandcontrol": AttackTacticCommandAndControl, - "credentialaccess": AttackTacticCredentialAccess, - "defenseevasion": AttackTacticDefenseEvasion, - "discovery": AttackTacticDiscovery, - "execution": AttackTacticExecution, - "exfiltration": AttackTacticExfiltration, - "impact": AttackTacticImpact, - "impairprocesscontrol": AttackTacticImpairProcessControl, - "inhibitresponsefunction": AttackTacticInhibitResponseFunction, - "initialaccess": AttackTacticInitialAccess, - "lateralmovement": AttackTacticLateralMovement, - "persistence": AttackTacticPersistence, - "preattack": AttackTacticPreAttack, - "privilegeescalation": AttackTacticPrivilegeEscalation, - "reconnaissance": AttackTacticReconnaissance, - "resourcedevelopment": AttackTacticResourceDevelopment, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AttackTactic(input) - return &out, nil -} - -type ConfidenceLevel string - -const ( - ConfidenceLevelHigh ConfidenceLevel = "High" - ConfidenceLevelLow ConfidenceLevel = "Low" - ConfidenceLevelUnknown ConfidenceLevel = "Unknown" -) - -func PossibleValuesForConfidenceLevel() []string { - return []string{ - string(ConfidenceLevelHigh), - string(ConfidenceLevelLow), - string(ConfidenceLevelUnknown), - } -} - -func (s *ConfidenceLevel) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseConfidenceLevel(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseConfidenceLevel(input string) (*ConfidenceLevel, error) { - vals := map[string]ConfidenceLevel{ - "high": ConfidenceLevelHigh, - "low": ConfidenceLevelLow, - "unknown": ConfidenceLevelUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ConfidenceLevel(input) - return &out, nil -} - -type ConfidenceScoreStatus string - -const ( - ConfidenceScoreStatusFinal ConfidenceScoreStatus = "Final" - ConfidenceScoreStatusInProcess ConfidenceScoreStatus = "InProcess" - ConfidenceScoreStatusNotApplicable ConfidenceScoreStatus = "NotApplicable" - ConfidenceScoreStatusNotFinal ConfidenceScoreStatus = "NotFinal" -) - -func PossibleValuesForConfidenceScoreStatus() []string { - return []string{ - string(ConfidenceScoreStatusFinal), - string(ConfidenceScoreStatusInProcess), - string(ConfidenceScoreStatusNotApplicable), - string(ConfidenceScoreStatusNotFinal), - } -} - -func (s *ConfidenceScoreStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseConfidenceScoreStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseConfidenceScoreStatus(input string) (*ConfidenceScoreStatus, error) { - vals := map[string]ConfidenceScoreStatus{ - "final": ConfidenceScoreStatusFinal, - "inprocess": ConfidenceScoreStatusInProcess, - "notapplicable": ConfidenceScoreStatusNotApplicable, - "notfinal": ConfidenceScoreStatusNotFinal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ConfidenceScoreStatus(input) - return &out, nil -} - -type CreatedByType string - -const ( - CreatedByTypeApplication CreatedByType = "Application" - CreatedByTypeKey CreatedByType = "Key" - CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" - CreatedByTypeUser CreatedByType = "User" -) - -func PossibleValuesForCreatedByType() []string { - return []string{ - string(CreatedByTypeApplication), - string(CreatedByTypeKey), - string(CreatedByTypeManagedIdentity), - string(CreatedByTypeUser), - } -} - -func (s *CreatedByType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseCreatedByType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseCreatedByType(input string) (*CreatedByType, error) { - vals := map[string]CreatedByType{ - "application": CreatedByTypeApplication, - "key": CreatedByTypeKey, - "managedidentity": CreatedByTypeManagedIdentity, - "user": CreatedByTypeUser, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := CreatedByType(input) - return &out, nil -} - -type DeliveryAction string - -const ( - DeliveryActionBlocked DeliveryAction = "Blocked" - DeliveryActionDelivered DeliveryAction = "Delivered" - DeliveryActionDeliveredAsSpam DeliveryAction = "DeliveredAsSpam" - DeliveryActionReplaced DeliveryAction = "Replaced" - DeliveryActionUnknown DeliveryAction = "Unknown" -) - -func PossibleValuesForDeliveryAction() []string { - return []string{ - string(DeliveryActionBlocked), - string(DeliveryActionDelivered), - string(DeliveryActionDeliveredAsSpam), - string(DeliveryActionReplaced), - string(DeliveryActionUnknown), - } -} - -func (s *DeliveryAction) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeliveryAction(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeliveryAction(input string) (*DeliveryAction, error) { - vals := map[string]DeliveryAction{ - "blocked": DeliveryActionBlocked, - "delivered": DeliveryActionDelivered, - "deliveredasspam": DeliveryActionDeliveredAsSpam, - "replaced": DeliveryActionReplaced, - "unknown": DeliveryActionUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeliveryAction(input) - return &out, nil -} - -type DeliveryLocation string - -const ( - DeliveryLocationDeletedFolder DeliveryLocation = "DeletedFolder" - DeliveryLocationDropped DeliveryLocation = "Dropped" - DeliveryLocationExternal DeliveryLocation = "External" - DeliveryLocationFailed DeliveryLocation = "Failed" - DeliveryLocationForwarded DeliveryLocation = "Forwarded" - DeliveryLocationInbox DeliveryLocation = "Inbox" - DeliveryLocationJunkFolder DeliveryLocation = "JunkFolder" - DeliveryLocationQuarantine DeliveryLocation = "Quarantine" - DeliveryLocationUnknown DeliveryLocation = "Unknown" -) - -func PossibleValuesForDeliveryLocation() []string { - return []string{ - string(DeliveryLocationDeletedFolder), - string(DeliveryLocationDropped), - string(DeliveryLocationExternal), - string(DeliveryLocationFailed), - string(DeliveryLocationForwarded), - string(DeliveryLocationInbox), - string(DeliveryLocationJunkFolder), - string(DeliveryLocationQuarantine), - string(DeliveryLocationUnknown), - } -} - -func (s *DeliveryLocation) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeliveryLocation(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeliveryLocation(input string) (*DeliveryLocation, error) { - vals := map[string]DeliveryLocation{ - "deletedfolder": DeliveryLocationDeletedFolder, - "dropped": DeliveryLocationDropped, - "external": DeliveryLocationExternal, - "failed": DeliveryLocationFailed, - "forwarded": DeliveryLocationForwarded, - "inbox": DeliveryLocationInbox, - "junkfolder": DeliveryLocationJunkFolder, - "quarantine": DeliveryLocationQuarantine, - "unknown": DeliveryLocationUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeliveryLocation(input) - return &out, nil -} - -type ElevationToken string - -const ( - ElevationTokenDefault ElevationToken = "Default" - ElevationTokenFull ElevationToken = "Full" - ElevationTokenLimited ElevationToken = "Limited" -) - -func PossibleValuesForElevationToken() []string { - return []string{ - string(ElevationTokenDefault), - string(ElevationTokenFull), - string(ElevationTokenLimited), - } -} - -func (s *ElevationToken) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseElevationToken(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseElevationToken(input string) (*ElevationToken, error) { - vals := map[string]ElevationToken{ - "default": ElevationTokenDefault, - "full": ElevationTokenFull, - "limited": ElevationTokenLimited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ElevationToken(input) - return &out, nil -} - -type EntityKindEnum string - -const ( - EntityKindEnumAccount EntityKindEnum = "Account" - EntityKindEnumAzureResource EntityKindEnum = "AzureResource" - EntityKindEnumBookmark EntityKindEnum = "Bookmark" - EntityKindEnumCloudApplication EntityKindEnum = "CloudApplication" - EntityKindEnumDnsResolution EntityKindEnum = "DnsResolution" - EntityKindEnumFile EntityKindEnum = "File" - EntityKindEnumFileHash EntityKindEnum = "FileHash" - EntityKindEnumHost EntityKindEnum = "Host" - EntityKindEnumIP EntityKindEnum = "Ip" - EntityKindEnumIoTDevice EntityKindEnum = "IoTDevice" - EntityKindEnumMailCluster EntityKindEnum = "MailCluster" - EntityKindEnumMailMessage EntityKindEnum = "MailMessage" - EntityKindEnumMailbox EntityKindEnum = "Mailbox" - EntityKindEnumMalware EntityKindEnum = "Malware" - EntityKindEnumProcess EntityKindEnum = "Process" - EntityKindEnumRegistryKey EntityKindEnum = "RegistryKey" - EntityKindEnumRegistryValue EntityKindEnum = "RegistryValue" - EntityKindEnumSecurityAlert EntityKindEnum = "SecurityAlert" - EntityKindEnumSecurityGroup EntityKindEnum = "SecurityGroup" - EntityKindEnumSubmissionMail EntityKindEnum = "SubmissionMail" - EntityKindEnumUrl EntityKindEnum = "Url" -) - -func PossibleValuesForEntityKindEnum() []string { - return []string{ - string(EntityKindEnumAccount), - string(EntityKindEnumAzureResource), - string(EntityKindEnumBookmark), - string(EntityKindEnumCloudApplication), - string(EntityKindEnumDnsResolution), - string(EntityKindEnumFile), - string(EntityKindEnumFileHash), - string(EntityKindEnumHost), - string(EntityKindEnumIP), - string(EntityKindEnumIoTDevice), - string(EntityKindEnumMailCluster), - string(EntityKindEnumMailMessage), - string(EntityKindEnumMailbox), - string(EntityKindEnumMalware), - string(EntityKindEnumProcess), - string(EntityKindEnumRegistryKey), - string(EntityKindEnumRegistryValue), - string(EntityKindEnumSecurityAlert), - string(EntityKindEnumSecurityGroup), - string(EntityKindEnumSubmissionMail), - string(EntityKindEnumUrl), - } -} - -func (s *EntityKindEnum) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseEntityKindEnum(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseEntityKindEnum(input string) (*EntityKindEnum, error) { - vals := map[string]EntityKindEnum{ - "account": EntityKindEnumAccount, - "azureresource": EntityKindEnumAzureResource, - "bookmark": EntityKindEnumBookmark, - "cloudapplication": EntityKindEnumCloudApplication, - "dnsresolution": EntityKindEnumDnsResolution, - "file": EntityKindEnumFile, - "filehash": EntityKindEnumFileHash, - "host": EntityKindEnumHost, - "ip": EntityKindEnumIP, - "iotdevice": EntityKindEnumIoTDevice, - "mailcluster": EntityKindEnumMailCluster, - "mailmessage": EntityKindEnumMailMessage, - "mailbox": EntityKindEnumMailbox, - "malware": EntityKindEnumMalware, - "process": EntityKindEnumProcess, - "registrykey": EntityKindEnumRegistryKey, - "registryvalue": EntityKindEnumRegistryValue, - "securityalert": EntityKindEnumSecurityAlert, - "securitygroup": EntityKindEnumSecurityGroup, - "submissionmail": EntityKindEnumSubmissionMail, - "url": EntityKindEnumUrl, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := EntityKindEnum(input) - return &out, nil -} - -type FileHashAlgorithm string - -const ( - FileHashAlgorithmMDFive FileHashAlgorithm = "MD5" - FileHashAlgorithmSHAOne FileHashAlgorithm = "SHA1" - FileHashAlgorithmSHATwoFiveSix FileHashAlgorithm = "SHA256" - FileHashAlgorithmSHATwoFiveSixAC FileHashAlgorithm = "SHA256AC" - FileHashAlgorithmUnknown FileHashAlgorithm = "Unknown" -) - -func PossibleValuesForFileHashAlgorithm() []string { - return []string{ - string(FileHashAlgorithmMDFive), - string(FileHashAlgorithmSHAOne), - string(FileHashAlgorithmSHATwoFiveSix), - string(FileHashAlgorithmSHATwoFiveSixAC), - string(FileHashAlgorithmUnknown), - } -} - -func (s *FileHashAlgorithm) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFileHashAlgorithm(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFileHashAlgorithm(input string) (*FileHashAlgorithm, error) { - vals := map[string]FileHashAlgorithm{ - "md5": FileHashAlgorithmMDFive, - "sha1": FileHashAlgorithmSHAOne, - "sha256": FileHashAlgorithmSHATwoFiveSix, - "sha256ac": FileHashAlgorithmSHATwoFiveSixAC, - "unknown": FileHashAlgorithmUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FileHashAlgorithm(input) - return &out, nil -} - -type IncidentSeverity string - -const ( - IncidentSeverityHigh IncidentSeverity = "High" - IncidentSeverityInformational IncidentSeverity = "Informational" - IncidentSeverityLow IncidentSeverity = "Low" - IncidentSeverityMedium IncidentSeverity = "Medium" -) - -func PossibleValuesForIncidentSeverity() []string { - return []string{ - string(IncidentSeverityHigh), - string(IncidentSeverityInformational), - string(IncidentSeverityLow), - string(IncidentSeverityMedium), - } -} - -func (s *IncidentSeverity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIncidentSeverity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIncidentSeverity(input string) (*IncidentSeverity, error) { - vals := map[string]IncidentSeverity{ - "high": IncidentSeverityHigh, - "informational": IncidentSeverityInformational, - "low": IncidentSeverityLow, - "medium": IncidentSeverityMedium, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IncidentSeverity(input) - return &out, nil -} - -type KillChainIntent string - -const ( - KillChainIntentCollection KillChainIntent = "Collection" - KillChainIntentCommandAndControl KillChainIntent = "CommandAndControl" - KillChainIntentCredentialAccess KillChainIntent = "CredentialAccess" - KillChainIntentDefenseEvasion KillChainIntent = "DefenseEvasion" - KillChainIntentDiscovery KillChainIntent = "Discovery" - KillChainIntentExecution KillChainIntent = "Execution" - KillChainIntentExfiltration KillChainIntent = "Exfiltration" - KillChainIntentExploitation KillChainIntent = "Exploitation" - KillChainIntentImpact KillChainIntent = "Impact" - KillChainIntentLateralMovement KillChainIntent = "LateralMovement" - KillChainIntentPersistence KillChainIntent = "Persistence" - KillChainIntentPrivilegeEscalation KillChainIntent = "PrivilegeEscalation" - KillChainIntentProbing KillChainIntent = "Probing" - KillChainIntentUnknown KillChainIntent = "Unknown" -) - -func PossibleValuesForKillChainIntent() []string { - return []string{ - string(KillChainIntentCollection), - string(KillChainIntentCommandAndControl), - string(KillChainIntentCredentialAccess), - string(KillChainIntentDefenseEvasion), - string(KillChainIntentDiscovery), - string(KillChainIntentExecution), - string(KillChainIntentExfiltration), - string(KillChainIntentExploitation), - string(KillChainIntentImpact), - string(KillChainIntentLateralMovement), - string(KillChainIntentPersistence), - string(KillChainIntentPrivilegeEscalation), - string(KillChainIntentProbing), - string(KillChainIntentUnknown), - } -} - -func (s *KillChainIntent) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseKillChainIntent(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseKillChainIntent(input string) (*KillChainIntent, error) { - vals := map[string]KillChainIntent{ - "collection": KillChainIntentCollection, - "commandandcontrol": KillChainIntentCommandAndControl, - "credentialaccess": KillChainIntentCredentialAccess, - "defenseevasion": KillChainIntentDefenseEvasion, - "discovery": KillChainIntentDiscovery, - "execution": KillChainIntentExecution, - "exfiltration": KillChainIntentExfiltration, - "exploitation": KillChainIntentExploitation, - "impact": KillChainIntentImpact, - "lateralmovement": KillChainIntentLateralMovement, - "persistence": KillChainIntentPersistence, - "privilegeescalation": KillChainIntentPrivilegeEscalation, - "probing": KillChainIntentProbing, - "unknown": KillChainIntentUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := KillChainIntent(input) - return &out, nil -} - -type OSFamily string - -const ( - OSFamilyAndroid OSFamily = "Android" - OSFamilyIOS OSFamily = "IOS" - OSFamilyLinux OSFamily = "Linux" - OSFamilyUnknown OSFamily = "Unknown" - OSFamilyWindows OSFamily = "Windows" -) - -func PossibleValuesForOSFamily() []string { - return []string{ - string(OSFamilyAndroid), - string(OSFamilyIOS), - string(OSFamilyLinux), - string(OSFamilyUnknown), - string(OSFamilyWindows), - } -} - -func (s *OSFamily) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseOSFamily(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseOSFamily(input string) (*OSFamily, error) { - vals := map[string]OSFamily{ - "android": OSFamilyAndroid, - "ios": OSFamilyIOS, - "linux": OSFamilyLinux, - "unknown": OSFamilyUnknown, - "windows": OSFamilyWindows, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := OSFamily(input) - return &out, nil -} - -type RegistryHive string - -const ( - RegistryHiveHKEYA RegistryHive = "HKEY_A" - RegistryHiveHKEYCLASSESROOT RegistryHive = "HKEY_CLASSES_ROOT" - RegistryHiveHKEYCURRENTCONFIG RegistryHive = "HKEY_CURRENT_CONFIG" - RegistryHiveHKEYCURRENTUSER RegistryHive = "HKEY_CURRENT_USER" - RegistryHiveHKEYCURRENTUSERLOCALSETTINGS RegistryHive = "HKEY_CURRENT_USER_LOCAL_SETTINGS" - RegistryHiveHKEYLOCALMACHINE RegistryHive = "HKEY_LOCAL_MACHINE" - RegistryHiveHKEYPERFORMANCEDATA RegistryHive = "HKEY_PERFORMANCE_DATA" - RegistryHiveHKEYPERFORMANCENLSTEXT RegistryHive = "HKEY_PERFORMANCE_NLSTEXT" - RegistryHiveHKEYPERFORMANCETEXT RegistryHive = "HKEY_PERFORMANCE_TEXT" - RegistryHiveHKEYUSERS RegistryHive = "HKEY_USERS" -) - -func PossibleValuesForRegistryHive() []string { - return []string{ - string(RegistryHiveHKEYA), - string(RegistryHiveHKEYCLASSESROOT), - string(RegistryHiveHKEYCURRENTCONFIG), - string(RegistryHiveHKEYCURRENTUSER), - string(RegistryHiveHKEYCURRENTUSERLOCALSETTINGS), - string(RegistryHiveHKEYLOCALMACHINE), - string(RegistryHiveHKEYPERFORMANCEDATA), - string(RegistryHiveHKEYPERFORMANCENLSTEXT), - string(RegistryHiveHKEYPERFORMANCETEXT), - string(RegistryHiveHKEYUSERS), - } -} - -func (s *RegistryHive) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRegistryHive(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRegistryHive(input string) (*RegistryHive, error) { - vals := map[string]RegistryHive{ - "hkey_a": RegistryHiveHKEYA, - "hkey_classes_root": RegistryHiveHKEYCLASSESROOT, - "hkey_current_config": RegistryHiveHKEYCURRENTCONFIG, - "hkey_current_user": RegistryHiveHKEYCURRENTUSER, - "hkey_current_user_local_settings": RegistryHiveHKEYCURRENTUSERLOCALSETTINGS, - "hkey_local_machine": RegistryHiveHKEYLOCALMACHINE, - "hkey_performance_data": RegistryHiveHKEYPERFORMANCEDATA, - "hkey_performance_nlstext": RegistryHiveHKEYPERFORMANCENLSTEXT, - "hkey_performance_text": RegistryHiveHKEYPERFORMANCETEXT, - "hkey_users": RegistryHiveHKEYUSERS, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RegistryHive(input) - return &out, nil -} - -type RegistryValueKind string - -const ( - RegistryValueKindBinary RegistryValueKind = "Binary" - RegistryValueKindDWord RegistryValueKind = "DWord" - RegistryValueKindExpandString RegistryValueKind = "ExpandString" - RegistryValueKindMultiString RegistryValueKind = "MultiString" - RegistryValueKindNone RegistryValueKind = "None" - RegistryValueKindQWord RegistryValueKind = "QWord" - RegistryValueKindString RegistryValueKind = "String" - RegistryValueKindUnknown RegistryValueKind = "Unknown" -) - -func PossibleValuesForRegistryValueKind() []string { - return []string{ - string(RegistryValueKindBinary), - string(RegistryValueKindDWord), - string(RegistryValueKindExpandString), - string(RegistryValueKindMultiString), - string(RegistryValueKindNone), - string(RegistryValueKindQWord), - string(RegistryValueKindString), - string(RegistryValueKindUnknown), - } -} - -func (s *RegistryValueKind) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRegistryValueKind(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRegistryValueKind(input string) (*RegistryValueKind, error) { - vals := map[string]RegistryValueKind{ - "binary": RegistryValueKindBinary, - "dword": RegistryValueKindDWord, - "expandstring": RegistryValueKindExpandString, - "multistring": RegistryValueKindMultiString, - "none": RegistryValueKindNone, - "qword": RegistryValueKindQWord, - "string": RegistryValueKindString, - "unknown": RegistryValueKindUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RegistryValueKind(input) - return &out, nil -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_accountentity.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_accountentity.go deleted file mode 100644 index 36622cda50b..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_accountentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = AccountEntity{} - -type AccountEntity struct { - Properties *AccountEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = AccountEntity{} - -func (s AccountEntity) MarshalJSON() ([]byte, error) { - type wrapper AccountEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling AccountEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling AccountEntity: %+v", err) - } - decoded["kind"] = "Account" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling AccountEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_accountentityproperties.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_accountentityproperties.go deleted file mode 100644 index 95fb7cc52ad..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_accountentityproperties.go +++ /dev/null @@ -1,21 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AccountEntityProperties struct { - AadTenantId *string `json:"aadTenantId,omitempty"` - AadUserId *string `json:"aadUserId,omitempty"` - AccountName *string `json:"accountName,omitempty"` - AdditionalData *map[string]interface{} `json:"additionalData,omitempty"` - DisplayName *string `json:"displayName,omitempty"` - DnsDomain *string `json:"dnsDomain,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HostEntityId *string `json:"hostEntityId,omitempty"` - IsDomainJoined *bool `json:"isDomainJoined,omitempty"` - NtDomain *string `json:"ntDomain,omitempty"` - ObjectGuid *string `json:"objectGuid,omitempty"` - Puid *string `json:"puid,omitempty"` - Sid *string `json:"sid,omitempty"` - UpnSuffix *string `json:"upnSuffix,omitempty"` -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_azureresourceentity.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_azureresourceentity.go deleted file mode 100644 index 6947a9b96e5..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_azureresourceentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = AzureResourceEntity{} - -type AzureResourceEntity struct { - Properties *AzureResourceEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = AzureResourceEntity{} - -func (s AzureResourceEntity) MarshalJSON() ([]byte, error) { - type wrapper AzureResourceEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling AzureResourceEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling AzureResourceEntity: %+v", err) - } - decoded["kind"] = "AzureResource" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling AzureResourceEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_azureresourceentityproperties.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_azureresourceentityproperties.go deleted file mode 100644 index db2fe348b06..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_azureresourceentityproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureResourceEntityProperties struct { - AdditionalData *map[string]interface{} `json:"additionalData,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - ResourceId *string `json:"resourceId,omitempty"` - SubscriptionId *string `json:"subscriptionId,omitempty"` -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_cloudapplicationentity.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_cloudapplicationentity.go deleted file mode 100644 index 73b7fb5b308..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_cloudapplicationentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = CloudApplicationEntity{} - -type CloudApplicationEntity struct { - Properties *CloudApplicationEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = CloudApplicationEntity{} - -func (s CloudApplicationEntity) MarshalJSON() ([]byte, error) { - type wrapper CloudApplicationEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling CloudApplicationEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling CloudApplicationEntity: %+v", err) - } - decoded["kind"] = "CloudApplication" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling CloudApplicationEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_cloudapplicationentityproperties.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_cloudapplicationentityproperties.go deleted file mode 100644 index 8b2d40b573f..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_cloudapplicationentityproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CloudApplicationEntityProperties struct { - AdditionalData *map[string]interface{} `json:"additionalData,omitempty"` - AppId *int64 `json:"appId,omitempty"` - AppName *string `json:"appName,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - InstanceName *string `json:"instanceName,omitempty"` -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_dnsentity.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_dnsentity.go deleted file mode 100644 index 81c3c0dac5b..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_dnsentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = DnsEntity{} - -type DnsEntity struct { - Properties *DnsEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = DnsEntity{} - -func (s DnsEntity) MarshalJSON() ([]byte, error) { - type wrapper DnsEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling DnsEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling DnsEntity: %+v", err) - } - decoded["kind"] = "DnsResolution" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling DnsEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_dnsentityproperties.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_dnsentityproperties.go deleted file mode 100644 index fa580d56344..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_dnsentityproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DnsEntityProperties struct { - AdditionalData *map[string]interface{} `json:"additionalData,omitempty"` - DnsServerIPEntityId *string `json:"dnsServerIpEntityId,omitempty"` - DomainName *string `json:"domainName,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HostIPAddressEntityId *string `json:"hostIpAddressEntityId,omitempty"` - IPAddressEntityIds *[]string `json:"ipAddressEntityIds,omitempty"` -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_entity.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_entity.go deleted file mode 100644 index e648085f87e..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_entity.go +++ /dev/null @@ -1,213 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Entity interface { -} - -// RawEntityImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawEntityImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalEntityImplementation(input []byte) (Entity, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling Entity into map[string]interface: %+v", err) - } - - value, ok := temp["kind"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "Account") { - var out AccountEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into AccountEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "AzureResource") { - var out AzureResourceEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into AzureResourceEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "CloudApplication") { - var out CloudApplicationEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into CloudApplicationEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "DnsResolution") { - var out DnsEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into DnsEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "File") { - var out FileEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into FileEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "FileHash") { - var out FileHashEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into FileHashEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Host") { - var out HostEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into HostEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Bookmark") { - var out HuntingBookmark - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into HuntingBookmark: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Ip") { - var out IPEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into IPEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "IoTDevice") { - var out IoTDeviceEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into IoTDeviceEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "MailCluster") { - var out MailClusterEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MailClusterEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "MailMessage") { - var out MailMessageEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MailMessageEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Mailbox") { - var out MailboxEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MailboxEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Malware") { - var out MalwareEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MalwareEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Process") { - var out ProcessEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ProcessEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "RegistryKey") { - var out RegistryKeyEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into RegistryKeyEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "RegistryValue") { - var out RegistryValueEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into RegistryValueEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "SecurityAlert") { - var out SecurityAlert - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SecurityAlert: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "SecurityGroup") { - var out SecurityGroupEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SecurityGroupEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "SubmissionMail") { - var out SubmissionMailEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SubmissionMailEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Url") { - var out UrlEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into UrlEntity: %+v", err) - } - return out, nil - } - - out := RawEntityImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_fileentity.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_fileentity.go deleted file mode 100644 index 98411b9b140..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_fileentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = FileEntity{} - -type FileEntity struct { - Properties *FileEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = FileEntity{} - -func (s FileEntity) MarshalJSON() ([]byte, error) { - type wrapper FileEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling FileEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling FileEntity: %+v", err) - } - decoded["kind"] = "File" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling FileEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_fileentityproperties.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_fileentityproperties.go deleted file mode 100644 index 257ffb1ba04..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_fileentityproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FileEntityProperties struct { - AdditionalData *map[string]interface{} `json:"additionalData,omitempty"` - Directory *string `json:"directory,omitempty"` - FileHashEntityIds *[]string `json:"fileHashEntityIds,omitempty"` - FileName *string `json:"fileName,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HostEntityId *string `json:"hostEntityId,omitempty"` -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_filehashentity.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_filehashentity.go deleted file mode 100644 index bf05183c64b..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_filehashentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = FileHashEntity{} - -type FileHashEntity struct { - Properties *FileHashEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = FileHashEntity{} - -func (s FileHashEntity) MarshalJSON() ([]byte, error) { - type wrapper FileHashEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling FileHashEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling FileHashEntity: %+v", err) - } - decoded["kind"] = "FileHash" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling FileHashEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_filehashentityproperties.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_filehashentityproperties.go deleted file mode 100644 index d8097218e1d..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_filehashentityproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FileHashEntityProperties struct { - AdditionalData *map[string]interface{} `json:"additionalData,omitempty"` - Algorithm *FileHashAlgorithm `json:"algorithm,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HashValue *string `json:"hashValue,omitempty"` -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_geolocation.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_geolocation.go deleted file mode 100644 index 53a44e73dcd..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_geolocation.go +++ /dev/null @@ -1,14 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GeoLocation struct { - Asn *int64 `json:"asn,omitempty"` - City *string `json:"city,omitempty"` - CountryCode *string `json:"countryCode,omitempty"` - CountryName *string `json:"countryName,omitempty"` - Latitude *float64 `json:"latitude,omitempty"` - Longitude *float64 `json:"longitude,omitempty"` - State *string `json:"state,omitempty"` -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_hostentity.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_hostentity.go deleted file mode 100644 index 90b206a2d15..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_hostentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = HostEntity{} - -type HostEntity struct { - Properties *HostEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = HostEntity{} - -func (s HostEntity) MarshalJSON() ([]byte, error) { - type wrapper HostEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling HostEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling HostEntity: %+v", err) - } - decoded["kind"] = "Host" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling HostEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_hostentityproperties.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_hostentityproperties.go deleted file mode 100644 index aeff0d09403..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_hostentityproperties.go +++ /dev/null @@ -1,18 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HostEntityProperties struct { - AdditionalData *map[string]interface{} `json:"additionalData,omitempty"` - AzureID *string `json:"azureID,omitempty"` - DnsDomain *string `json:"dnsDomain,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HostName *string `json:"hostName,omitempty"` - IsDomainJoined *bool `json:"isDomainJoined,omitempty"` - NetBiosName *string `json:"netBiosName,omitempty"` - NtDomain *string `json:"ntDomain,omitempty"` - OmsAgentID *string `json:"omsAgentID,omitempty"` - OsFamily *OSFamily `json:"osFamily,omitempty"` - OsVersion *string `json:"osVersion,omitempty"` -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_huntingbookmark.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_huntingbookmark.go deleted file mode 100644 index e86ba910de6..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_huntingbookmark.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = HuntingBookmark{} - -type HuntingBookmark struct { - Properties *HuntingBookmarkProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = HuntingBookmark{} - -func (s HuntingBookmark) MarshalJSON() ([]byte, error) { - type wrapper HuntingBookmark - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling HuntingBookmark: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling HuntingBookmark: %+v", err) - } - decoded["kind"] = "Bookmark" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling HuntingBookmark: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_huntingbookmarkproperties.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_huntingbookmarkproperties.go deleted file mode 100644 index 5ebc3ac122f..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_huntingbookmarkproperties.go +++ /dev/null @@ -1,62 +0,0 @@ -package entitytypes - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HuntingBookmarkProperties struct { - AdditionalData *map[string]interface{} `json:"additionalData,omitempty"` - Created *string `json:"created,omitempty"` - CreatedBy *UserInfo `json:"createdBy,omitempty"` - DisplayName string `json:"displayName"` - EventTime *string `json:"eventTime,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - IncidentInfo *IncidentInfo `json:"incidentInfo,omitempty"` - Labels *[]string `json:"labels,omitempty"` - Notes *string `json:"notes,omitempty"` - Query string `json:"query"` - QueryResult *string `json:"queryResult,omitempty"` - Updated *string `json:"updated,omitempty"` - UpdatedBy *UserInfo `json:"updatedBy,omitempty"` -} - -func (o *HuntingBookmarkProperties) GetCreatedAsTime() (*time.Time, error) { - if o.Created == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Created, "2006-01-02T15:04:05Z07:00") -} - -func (o *HuntingBookmarkProperties) SetCreatedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Created = &formatted -} - -func (o *HuntingBookmarkProperties) GetEventTimeAsTime() (*time.Time, error) { - if o.EventTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.EventTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *HuntingBookmarkProperties) SetEventTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.EventTime = &formatted -} - -func (o *HuntingBookmarkProperties) GetUpdatedAsTime() (*time.Time, error) { - if o.Updated == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Updated, "2006-01-02T15:04:05Z07:00") -} - -func (o *HuntingBookmarkProperties) SetUpdatedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Updated = &formatted -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_incidentinfo.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_incidentinfo.go deleted file mode 100644 index 80d014f5289..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_incidentinfo.go +++ /dev/null @@ -1,11 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IncidentInfo struct { - IncidentId *string `json:"incidentId,omitempty"` - RelationName *string `json:"relationName,omitempty"` - Severity *IncidentSeverity `json:"severity,omitempty"` - Title *string `json:"title,omitempty"` -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_iotdeviceentity.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_iotdeviceentity.go deleted file mode 100644 index 3828d0cf7d2..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_iotdeviceentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = IoTDeviceEntity{} - -type IoTDeviceEntity struct { - Properties *IoTDeviceEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = IoTDeviceEntity{} - -func (s IoTDeviceEntity) MarshalJSON() ([]byte, error) { - type wrapper IoTDeviceEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling IoTDeviceEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling IoTDeviceEntity: %+v", err) - } - decoded["kind"] = "IoTDevice" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling IoTDeviceEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_iotdeviceentityproperties.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_iotdeviceentityproperties.go deleted file mode 100644 index f6619ce0b99..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_iotdeviceentityproperties.go +++ /dev/null @@ -1,26 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IoTDeviceEntityProperties struct { - AdditionalData *map[string]interface{} `json:"additionalData,omitempty"` - DeviceId *string `json:"deviceId,omitempty"` - DeviceName *string `json:"deviceName,omitempty"` - DeviceType *string `json:"deviceType,omitempty"` - EdgeId *string `json:"edgeId,omitempty"` - FirmwareVersion *string `json:"firmwareVersion,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HostEntityId *string `json:"hostEntityId,omitempty"` - IPAddressEntityId *string `json:"ipAddressEntityId,omitempty"` - IotHubEntityId *string `json:"iotHubEntityId,omitempty"` - IotSecurityAgentId *string `json:"iotSecurityAgentId,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - Model *string `json:"model,omitempty"` - OperatingSystem *string `json:"operatingSystem,omitempty"` - Protocols *[]string `json:"protocols,omitempty"` - SerialNumber *string `json:"serialNumber,omitempty"` - Source *string `json:"source,omitempty"` - ThreatIntelligence *[]ThreatIntelligence `json:"threatIntelligence,omitempty"` - Vendor *string `json:"vendor,omitempty"` -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_ipentity.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_ipentity.go deleted file mode 100644 index e062bf2295a..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_ipentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = IPEntity{} - -type IPEntity struct { - Properties *IPEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = IPEntity{} - -func (s IPEntity) MarshalJSON() ([]byte, error) { - type wrapper IPEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling IPEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling IPEntity: %+v", err) - } - decoded["kind"] = "Ip" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling IPEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_ipentityproperties.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_ipentityproperties.go deleted file mode 100644 index b0cf7442a43..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_ipentityproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPEntityProperties struct { - AdditionalData *map[string]interface{} `json:"additionalData,omitempty"` - Address *string `json:"address,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - Location *GeoLocation `json:"location,omitempty"` - ThreatIntelligence *[]ThreatIntelligence `json:"threatIntelligence,omitempty"` -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_mailboxentity.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_mailboxentity.go deleted file mode 100644 index 57dee77697e..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_mailboxentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = MailboxEntity{} - -type MailboxEntity struct { - Properties *MailboxEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = MailboxEntity{} - -func (s MailboxEntity) MarshalJSON() ([]byte, error) { - type wrapper MailboxEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MailboxEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MailboxEntity: %+v", err) - } - decoded["kind"] = "Mailbox" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MailboxEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_mailboxentityproperties.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_mailboxentityproperties.go deleted file mode 100644 index 8d1b787b9c9..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_mailboxentityproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MailboxEntityProperties struct { - AdditionalData *map[string]interface{} `json:"additionalData,omitempty"` - DisplayName *string `json:"displayName,omitempty"` - ExternalDirectoryObjectId *string `json:"externalDirectoryObjectId,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - MailboxPrimaryAddress *string `json:"mailboxPrimaryAddress,omitempty"` - Upn *string `json:"upn,omitempty"` -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_mailclusterentity.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_mailclusterentity.go deleted file mode 100644 index afa0db447b6..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_mailclusterentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = MailClusterEntity{} - -type MailClusterEntity struct { - Properties *MailClusterEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = MailClusterEntity{} - -func (s MailClusterEntity) MarshalJSON() ([]byte, error) { - type wrapper MailClusterEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MailClusterEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MailClusterEntity: %+v", err) - } - decoded["kind"] = "MailCluster" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MailClusterEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_mailclusterentityproperties.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_mailclusterentityproperties.go deleted file mode 100644 index 6b6724b72a7..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_mailclusterentityproperties.go +++ /dev/null @@ -1,66 +0,0 @@ -package entitytypes - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MailClusterEntityProperties struct { - AdditionalData *map[string]interface{} `json:"additionalData,omitempty"` - ClusterGroup *string `json:"clusterGroup,omitempty"` - ClusterQueryEndTime *string `json:"clusterQueryEndTime,omitempty"` - ClusterQueryStartTime *string `json:"clusterQueryStartTime,omitempty"` - ClusterSourceIdentifier *string `json:"clusterSourceIdentifier,omitempty"` - ClusterSourceType *string `json:"clusterSourceType,omitempty"` - CountByDeliveryStatus *interface{} `json:"countByDeliveryStatus,omitempty"` - CountByProtectionStatus *interface{} `json:"countByProtectionStatus,omitempty"` - CountByThreatType *interface{} `json:"countByThreatType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - IsVolumeAnomaly *bool `json:"isVolumeAnomaly,omitempty"` - MailCount *int64 `json:"mailCount,omitempty"` - NetworkMessageIds *[]string `json:"networkMessageIds,omitempty"` - Query *string `json:"query,omitempty"` - QueryTime *string `json:"queryTime,omitempty"` - Source *string `json:"source,omitempty"` - Threats *[]string `json:"threats,omitempty"` -} - -func (o *MailClusterEntityProperties) GetClusterQueryEndTimeAsTime() (*time.Time, error) { - if o.ClusterQueryEndTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.ClusterQueryEndTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *MailClusterEntityProperties) SetClusterQueryEndTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.ClusterQueryEndTime = &formatted -} - -func (o *MailClusterEntityProperties) GetClusterQueryStartTimeAsTime() (*time.Time, error) { - if o.ClusterQueryStartTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.ClusterQueryStartTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *MailClusterEntityProperties) SetClusterQueryStartTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.ClusterQueryStartTime = &formatted -} - -func (o *MailClusterEntityProperties) GetQueryTimeAsTime() (*time.Time, error) { - if o.QueryTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.QueryTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *MailClusterEntityProperties) SetQueryTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.QueryTime = &formatted -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_mailmessageentity.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_mailmessageentity.go deleted file mode 100644 index e0fef66bf3b..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_mailmessageentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = MailMessageEntity{} - -type MailMessageEntity struct { - Properties *MailMessageEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = MailMessageEntity{} - -func (s MailMessageEntity) MarshalJSON() ([]byte, error) { - type wrapper MailMessageEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MailMessageEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MailMessageEntity: %+v", err) - } - decoded["kind"] = "MailMessage" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MailMessageEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_mailmessageentityproperties.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_mailmessageentityproperties.go deleted file mode 100644 index 48c4bfe7c77..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_mailmessageentityproperties.go +++ /dev/null @@ -1,52 +0,0 @@ -package entitytypes - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MailMessageEntityProperties struct { - AdditionalData *map[string]interface{} `json:"additionalData,omitempty"` - AntispamDirection *AntispamMailDirection `json:"antispamDirection,omitempty"` - BodyFingerprintBin1 *int64 `json:"bodyFingerprintBin1,omitempty"` - BodyFingerprintBin2 *int64 `json:"bodyFingerprintBin2,omitempty"` - BodyFingerprintBin3 *int64 `json:"bodyFingerprintBin3,omitempty"` - BodyFingerprintBin4 *int64 `json:"bodyFingerprintBin4,omitempty"` - BodyFingerprintBin5 *int64 `json:"bodyFingerprintBin5,omitempty"` - DeliveryAction *DeliveryAction `json:"deliveryAction,omitempty"` - DeliveryLocation *DeliveryLocation `json:"deliveryLocation,omitempty"` - FileEntityIds *[]string `json:"fileEntityIds,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - InternetMessageId *string `json:"internetMessageId,omitempty"` - Language *string `json:"language,omitempty"` - NetworkMessageId *string `json:"networkMessageId,omitempty"` - P1Sender *string `json:"p1Sender,omitempty"` - P1SenderDisplayName *string `json:"p1SenderDisplayName,omitempty"` - P1SenderDomain *string `json:"p1SenderDomain,omitempty"` - P2Sender *string `json:"p2Sender,omitempty"` - P2SenderDisplayName *string `json:"p2SenderDisplayName,omitempty"` - P2SenderDomain *string `json:"p2SenderDomain,omitempty"` - ReceiveDate *string `json:"receiveDate,omitempty"` - Recipient *string `json:"recipient,omitempty"` - SenderIP *string `json:"senderIP,omitempty"` - Subject *string `json:"subject,omitempty"` - ThreatDetectionMethods *[]string `json:"threatDetectionMethods,omitempty"` - Threats *[]string `json:"threats,omitempty"` - Urls *[]string `json:"urls,omitempty"` -} - -func (o *MailMessageEntityProperties) GetReceiveDateAsTime() (*time.Time, error) { - if o.ReceiveDate == nil { - return nil, nil - } - return dates.ParseAsFormat(o.ReceiveDate, "2006-01-02T15:04:05Z07:00") -} - -func (o *MailMessageEntityProperties) SetReceiveDateAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.ReceiveDate = &formatted -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_malwareentity.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_malwareentity.go deleted file mode 100644 index 01b3f9cda92..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_malwareentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = MalwareEntity{} - -type MalwareEntity struct { - Properties *MalwareEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = MalwareEntity{} - -func (s MalwareEntity) MarshalJSON() ([]byte, error) { - type wrapper MalwareEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MalwareEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MalwareEntity: %+v", err) - } - decoded["kind"] = "Malware" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MalwareEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_malwareentityproperties.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_malwareentityproperties.go deleted file mode 100644 index 99a3529f02f..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_malwareentityproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MalwareEntityProperties struct { - AdditionalData *map[string]interface{} `json:"additionalData,omitempty"` - Category *string `json:"category,omitempty"` - FileEntityIds *[]string `json:"fileEntityIds,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - MalwareName *string `json:"malwareName,omitempty"` - ProcessEntityIds *[]string `json:"processEntityIds,omitempty"` -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_processentity.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_processentity.go deleted file mode 100644 index b3d0be74fd8..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_processentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = ProcessEntity{} - -type ProcessEntity struct { - Properties *ProcessEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = ProcessEntity{} - -func (s ProcessEntity) MarshalJSON() ([]byte, error) { - type wrapper ProcessEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ProcessEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ProcessEntity: %+v", err) - } - decoded["kind"] = "Process" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ProcessEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_processentityproperties.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_processentityproperties.go deleted file mode 100644 index 49e9b63fe4a..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_processentityproperties.go +++ /dev/null @@ -1,36 +0,0 @@ -package entitytypes - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProcessEntityProperties struct { - AccountEntityId *string `json:"accountEntityId,omitempty"` - AdditionalData *map[string]interface{} `json:"additionalData,omitempty"` - CommandLine *string `json:"commandLine,omitempty"` - CreationTimeUtc *string `json:"creationTimeUtc,omitempty"` - ElevationToken *ElevationToken `json:"elevationToken,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HostEntityId *string `json:"hostEntityId,omitempty"` - HostLogonSessionEntityId *string `json:"hostLogonSessionEntityId,omitempty"` - ImageFileEntityId *string `json:"imageFileEntityId,omitempty"` - ParentProcessEntityId *string `json:"parentProcessEntityId,omitempty"` - ProcessId *string `json:"processId,omitempty"` -} - -func (o *ProcessEntityProperties) GetCreationTimeUtcAsTime() (*time.Time, error) { - if o.CreationTimeUtc == nil { - return nil, nil - } - return dates.ParseAsFormat(o.CreationTimeUtc, "2006-01-02T15:04:05Z07:00") -} - -func (o *ProcessEntityProperties) SetCreationTimeUtcAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.CreationTimeUtc = &formatted -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_registrykeyentity.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_registrykeyentity.go deleted file mode 100644 index bef73eb2c5b..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_registrykeyentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = RegistryKeyEntity{} - -type RegistryKeyEntity struct { - Properties *RegistryKeyEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = RegistryKeyEntity{} - -func (s RegistryKeyEntity) MarshalJSON() ([]byte, error) { - type wrapper RegistryKeyEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling RegistryKeyEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling RegistryKeyEntity: %+v", err) - } - decoded["kind"] = "RegistryKey" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling RegistryKeyEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_registrykeyentityproperties.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_registrykeyentityproperties.go deleted file mode 100644 index f91f75ea021..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_registrykeyentityproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RegistryKeyEntityProperties struct { - AdditionalData *map[string]interface{} `json:"additionalData,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - Hive *RegistryHive `json:"hive,omitempty"` - Key *string `json:"key,omitempty"` -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_registryvalueentity.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_registryvalueentity.go deleted file mode 100644 index 45599924191..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_registryvalueentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = RegistryValueEntity{} - -type RegistryValueEntity struct { - Properties *RegistryValueEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = RegistryValueEntity{} - -func (s RegistryValueEntity) MarshalJSON() ([]byte, error) { - type wrapper RegistryValueEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling RegistryValueEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling RegistryValueEntity: %+v", err) - } - decoded["kind"] = "RegistryValue" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling RegistryValueEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_registryvalueentityproperties.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_registryvalueentityproperties.go deleted file mode 100644 index c368632a1d3..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_registryvalueentityproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RegistryValueEntityProperties struct { - AdditionalData *map[string]interface{} `json:"additionalData,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - KeyEntityId *string `json:"keyEntityId,omitempty"` - ValueData *string `json:"valueData,omitempty"` - ValueName *string `json:"valueName,omitempty"` - ValueType *RegistryValueKind `json:"valueType,omitempty"` -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_securityalert.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_securityalert.go deleted file mode 100644 index cfda2671eec..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_securityalert.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = SecurityAlert{} - -type SecurityAlert struct { - Properties *SecurityAlertProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = SecurityAlert{} - -func (s SecurityAlert) MarshalJSON() ([]byte, error) { - type wrapper SecurityAlert - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SecurityAlert: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SecurityAlert: %+v", err) - } - decoded["kind"] = "SecurityAlert" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SecurityAlert: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_securityalertproperties.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_securityalertproperties.go deleted file mode 100644 index 105a41b9daf..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_securityalertproperties.go +++ /dev/null @@ -1,88 +0,0 @@ -package entitytypes - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityAlertProperties struct { - AdditionalData *map[string]interface{} `json:"additionalData,omitempty"` - AlertDisplayName *string `json:"alertDisplayName,omitempty"` - AlertLink *string `json:"alertLink,omitempty"` - AlertType *string `json:"alertType,omitempty"` - CompromisedEntity *string `json:"compromisedEntity,omitempty"` - ConfidenceLevel *ConfidenceLevel `json:"confidenceLevel,omitempty"` - ConfidenceReasons *[]SecurityAlertPropertiesConfidenceReasonsInlined `json:"confidenceReasons,omitempty"` - ConfidenceScore *float64 `json:"confidenceScore,omitempty"` - ConfidenceScoreStatus *ConfidenceScoreStatus `json:"confidenceScoreStatus,omitempty"` - Description *string `json:"description,omitempty"` - EndTimeUtc *string `json:"endTimeUtc,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - Intent *KillChainIntent `json:"intent,omitempty"` - ProcessingEndTime *string `json:"processingEndTime,omitempty"` - ProductComponentName *string `json:"productComponentName,omitempty"` - ProductName *string `json:"productName,omitempty"` - ProductVersion *string `json:"productVersion,omitempty"` - ProviderAlertId *string `json:"providerAlertId,omitempty"` - RemediationSteps *[]string `json:"remediationSteps,omitempty"` - ResourceIdentifiers *[]interface{} `json:"resourceIdentifiers,omitempty"` - Severity *AlertSeverity `json:"severity,omitempty"` - StartTimeUtc *string `json:"startTimeUtc,omitempty"` - Status *AlertStatus `json:"status,omitempty"` - SystemAlertId *string `json:"systemAlertId,omitempty"` - Tactics *[]AttackTactic `json:"tactics,omitempty"` - TimeGenerated *string `json:"timeGenerated,omitempty"` - VendorName *string `json:"vendorName,omitempty"` -} - -func (o *SecurityAlertProperties) GetEndTimeUtcAsTime() (*time.Time, error) { - if o.EndTimeUtc == nil { - return nil, nil - } - return dates.ParseAsFormat(o.EndTimeUtc, "2006-01-02T15:04:05Z07:00") -} - -func (o *SecurityAlertProperties) SetEndTimeUtcAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.EndTimeUtc = &formatted -} - -func (o *SecurityAlertProperties) GetProcessingEndTimeAsTime() (*time.Time, error) { - if o.ProcessingEndTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.ProcessingEndTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *SecurityAlertProperties) SetProcessingEndTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.ProcessingEndTime = &formatted -} - -func (o *SecurityAlertProperties) GetStartTimeUtcAsTime() (*time.Time, error) { - if o.StartTimeUtc == nil { - return nil, nil - } - return dates.ParseAsFormat(o.StartTimeUtc, "2006-01-02T15:04:05Z07:00") -} - -func (o *SecurityAlertProperties) SetStartTimeUtcAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.StartTimeUtc = &formatted -} - -func (o *SecurityAlertProperties) GetTimeGeneratedAsTime() (*time.Time, error) { - if o.TimeGenerated == nil { - return nil, nil - } - return dates.ParseAsFormat(o.TimeGenerated, "2006-01-02T15:04:05Z07:00") -} - -func (o *SecurityAlertProperties) SetTimeGeneratedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.TimeGenerated = &formatted -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_securityalertpropertiesconfidencereasonsinlined.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_securityalertpropertiesconfidencereasonsinlined.go deleted file mode 100644 index 1560939747b..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_securityalertpropertiesconfidencereasonsinlined.go +++ /dev/null @@ -1,9 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityAlertPropertiesConfidenceReasonsInlined struct { - Reason *string `json:"reason,omitempty"` - ReasonType *string `json:"reasonType,omitempty"` -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_securitygroupentity.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_securitygroupentity.go deleted file mode 100644 index 71a694b6c72..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_securitygroupentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = SecurityGroupEntity{} - -type SecurityGroupEntity struct { - Properties *SecurityGroupEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = SecurityGroupEntity{} - -func (s SecurityGroupEntity) MarshalJSON() ([]byte, error) { - type wrapper SecurityGroupEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SecurityGroupEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SecurityGroupEntity: %+v", err) - } - decoded["kind"] = "SecurityGroup" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SecurityGroupEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_securitygroupentityproperties.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_securitygroupentityproperties.go deleted file mode 100644 index 458b2ccbfb1..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_securitygroupentityproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityGroupEntityProperties struct { - AdditionalData *map[string]interface{} `json:"additionalData,omitempty"` - DistinguishedName *string `json:"distinguishedName,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - ObjectGuid *string `json:"objectGuid,omitempty"` - Sid *string `json:"sid,omitempty"` -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_submissionmailentity.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_submissionmailentity.go deleted file mode 100644 index ff1c9193b12..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_submissionmailentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = SubmissionMailEntity{} - -type SubmissionMailEntity struct { - Properties *SubmissionMailEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = SubmissionMailEntity{} - -func (s SubmissionMailEntity) MarshalJSON() ([]byte, error) { - type wrapper SubmissionMailEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SubmissionMailEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SubmissionMailEntity: %+v", err) - } - decoded["kind"] = "SubmissionMail" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SubmissionMailEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_submissionmailentityproperties.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_submissionmailentityproperties.go deleted file mode 100644 index f28988a5d5b..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_submissionmailentityproperties.go +++ /dev/null @@ -1,49 +0,0 @@ -package entitytypes - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubmissionMailEntityProperties struct { - AdditionalData *map[string]interface{} `json:"additionalData,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - NetworkMessageId *string `json:"networkMessageId,omitempty"` - Recipient *string `json:"recipient,omitempty"` - ReportType *string `json:"reportType,omitempty"` - Sender *string `json:"sender,omitempty"` - SenderIP *string `json:"senderIp,omitempty"` - Subject *string `json:"subject,omitempty"` - SubmissionDate *string `json:"submissionDate,omitempty"` - SubmissionId *string `json:"submissionId,omitempty"` - Submitter *string `json:"submitter,omitempty"` - Timestamp *string `json:"timestamp,omitempty"` -} - -func (o *SubmissionMailEntityProperties) GetSubmissionDateAsTime() (*time.Time, error) { - if o.SubmissionDate == nil { - return nil, nil - } - return dates.ParseAsFormat(o.SubmissionDate, "2006-01-02T15:04:05Z07:00") -} - -func (o *SubmissionMailEntityProperties) SetSubmissionDateAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.SubmissionDate = &formatted -} - -func (o *SubmissionMailEntityProperties) GetTimestampAsTime() (*time.Time, error) { - if o.Timestamp == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Timestamp, "2006-01-02T15:04:05Z07:00") -} - -func (o *SubmissionMailEntityProperties) SetTimestampAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Timestamp = &formatted -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_systemdata.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_systemdata.go deleted file mode 100644 index 862ee7fdbaf..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_systemdata.go +++ /dev/null @@ -1,43 +0,0 @@ -package entitytypes - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SystemData struct { - CreatedAt *string `json:"createdAt,omitempty"` - CreatedBy *string `json:"createdBy,omitempty"` - CreatedByType *CreatedByType `json:"createdByType,omitempty"` - LastModifiedAt *string `json:"lastModifiedAt,omitempty"` - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` - LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"` -} - -func (o *SystemData) GetCreatedAtAsTime() (*time.Time, error) { - if o.CreatedAt == nil { - return nil, nil - } - return dates.ParseAsFormat(o.CreatedAt, "2006-01-02T15:04:05Z07:00") -} - -func (o *SystemData) SetCreatedAtAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.CreatedAt = &formatted -} - -func (o *SystemData) GetLastModifiedAtAsTime() (*time.Time, error) { - if o.LastModifiedAt == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastModifiedAt, "2006-01-02T15:04:05Z07:00") -} - -func (o *SystemData) SetLastModifiedAtAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastModifiedAt = &formatted -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_threatintelligence.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_threatintelligence.go deleted file mode 100644 index e225a18045c..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_threatintelligence.go +++ /dev/null @@ -1,13 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ThreatIntelligence struct { - Confidence *float64 `json:"confidence,omitempty"` - ProviderName *string `json:"providerName,omitempty"` - ReportLink *string `json:"reportLink,omitempty"` - ThreatDescription *string `json:"threatDescription,omitempty"` - ThreatName *string `json:"threatName,omitempty"` - ThreatType *string `json:"threatType,omitempty"` -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_urlentity.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_urlentity.go deleted file mode 100644 index a6d90352180..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_urlentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = UrlEntity{} - -type UrlEntity struct { - Properties *UrlEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = UrlEntity{} - -func (s UrlEntity) MarshalJSON() ([]byte, error) { - type wrapper UrlEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling UrlEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling UrlEntity: %+v", err) - } - decoded["kind"] = "Url" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling UrlEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_urlentityproperties.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_urlentityproperties.go deleted file mode 100644 index 2d3b7085055..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_urlentityproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UrlEntityProperties struct { - AdditionalData *map[string]interface{} `json:"additionalData,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - Url *string `json:"url,omitempty"` -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/model_userinfo.go b/resource-manager/securityinsights/2022-11-01/entitytypes/model_userinfo.go deleted file mode 100644 index 9b6d8135aea..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/model_userinfo.go +++ /dev/null @@ -1,10 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UserInfo struct { - Email *string `json:"email,omitempty"` - Name *string `json:"name,omitempty"` - ObjectId *string `json:"objectId,omitempty"` -} diff --git a/resource-manager/securityinsights/2022-11-01/entitytypes/version.go b/resource-manager/securityinsights/2022-11-01/entitytypes/version.go deleted file mode 100644 index 8037114c2ac..00000000000 --- a/resource-manager/securityinsights/2022-11-01/entitytypes/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package entitytypes - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/entitytypes/%s", defaultApiVersion) -} diff --git a/resource-manager/securityinsights/2023-02-01/client.go b/resource-manager/securityinsights/2023-02-01/client.go index 28bc3c65176..e7b1ceafa62 100644 --- a/resource-manager/securityinsights/2023-02-01/client.go +++ b/resource-manager/securityinsights/2023-02-01/client.go @@ -12,7 +12,6 @@ import ( "github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-02-01/automationrules" "github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-02-01/bookmarks" "github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-02-01/dataconnectors" - "github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-02-01/entitytypes" "github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-02-01/incidentalerts" "github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-02-01/incidentbookmarks" "github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-02-01/incidentcomments" @@ -36,7 +35,6 @@ type Client struct { AutomationRules *automationrules.AutomationRulesClient Bookmarks *bookmarks.BookmarksClient DataConnectors *dataconnectors.DataConnectorsClient - EntityTypes *entitytypes.EntityTypesClient IncidentAlerts *incidentalerts.IncidentAlertsClient IncidentBookmarks *incidentbookmarks.IncidentBookmarksClient IncidentComments *incidentcomments.IncidentCommentsClient @@ -88,12 +86,6 @@ func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanag } configureFunc(dataConnectorsClient.Client) - entityTypesClient, err := entitytypes.NewEntityTypesClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building EntityTypes client: %+v", err) - } - configureFunc(entityTypesClient.Client) - incidentAlertsClient, err := incidentalerts.NewIncidentAlertsClientWithBaseURI(sdkApi) if err != nil { return nil, fmt.Errorf("building IncidentAlerts client: %+v", err) @@ -173,7 +165,6 @@ func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanag AutomationRules: automationRulesClient, Bookmarks: bookmarksClient, DataConnectors: dataConnectorsClient, - EntityTypes: entityTypesClient, IncidentAlerts: incidentAlertsClient, IncidentBookmarks: incidentBookmarksClient, IncidentComments: incidentCommentsClient, diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/README.md b/resource-manager/securityinsights/2023-02-01/entitytypes/README.md deleted file mode 100644 index 28e927515f3..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-02-01/entitytypes` Documentation - -The `entitytypes` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2023-02-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-02-01/entitytypes" -``` - - -### Client Initialization - -```go -client := entitytypes.NewEntityTypesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/client.go b/resource-manager/securityinsights/2023-02-01/entitytypes/client.go deleted file mode 100644 index bcdd09e4029..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package entitytypes - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EntityTypesClient struct { - Client *resourcemanager.Client -} - -func NewEntityTypesClientWithBaseURI(sdkApi sdkEnv.Api) (*EntityTypesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "entitytypes", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating EntityTypesClient: %+v", err) - } - - return &EntityTypesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/constants.go b/resource-manager/securityinsights/2023-02-01/entitytypes/constants.go deleted file mode 100644 index 2f194a6f29d..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/constants.go +++ /dev/null @@ -1,980 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AlertSeverity string - -const ( - AlertSeverityHigh AlertSeverity = "High" - AlertSeverityInformational AlertSeverity = "Informational" - AlertSeverityLow AlertSeverity = "Low" - AlertSeverityMedium AlertSeverity = "Medium" -) - -func PossibleValuesForAlertSeverity() []string { - return []string{ - string(AlertSeverityHigh), - string(AlertSeverityInformational), - string(AlertSeverityLow), - string(AlertSeverityMedium), - } -} - -func (s *AlertSeverity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAlertSeverity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAlertSeverity(input string) (*AlertSeverity, error) { - vals := map[string]AlertSeverity{ - "high": AlertSeverityHigh, - "informational": AlertSeverityInformational, - "low": AlertSeverityLow, - "medium": AlertSeverityMedium, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AlertSeverity(input) - return &out, nil -} - -type AlertStatus string - -const ( - AlertStatusDismissed AlertStatus = "Dismissed" - AlertStatusInProgress AlertStatus = "InProgress" - AlertStatusNew AlertStatus = "New" - AlertStatusResolved AlertStatus = "Resolved" - AlertStatusUnknown AlertStatus = "Unknown" -) - -func PossibleValuesForAlertStatus() []string { - return []string{ - string(AlertStatusDismissed), - string(AlertStatusInProgress), - string(AlertStatusNew), - string(AlertStatusResolved), - string(AlertStatusUnknown), - } -} - -func (s *AlertStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAlertStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAlertStatus(input string) (*AlertStatus, error) { - vals := map[string]AlertStatus{ - "dismissed": AlertStatusDismissed, - "inprogress": AlertStatusInProgress, - "new": AlertStatusNew, - "resolved": AlertStatusResolved, - "unknown": AlertStatusUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AlertStatus(input) - return &out, nil -} - -type AntispamMailDirection string - -const ( - AntispamMailDirectionInbound AntispamMailDirection = "Inbound" - AntispamMailDirectionIntraorg AntispamMailDirection = "Intraorg" - AntispamMailDirectionOutbound AntispamMailDirection = "Outbound" - AntispamMailDirectionUnknown AntispamMailDirection = "Unknown" -) - -func PossibleValuesForAntispamMailDirection() []string { - return []string{ - string(AntispamMailDirectionInbound), - string(AntispamMailDirectionIntraorg), - string(AntispamMailDirectionOutbound), - string(AntispamMailDirectionUnknown), - } -} - -func (s *AntispamMailDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAntispamMailDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAntispamMailDirection(input string) (*AntispamMailDirection, error) { - vals := map[string]AntispamMailDirection{ - "inbound": AntispamMailDirectionInbound, - "intraorg": AntispamMailDirectionIntraorg, - "outbound": AntispamMailDirectionOutbound, - "unknown": AntispamMailDirectionUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AntispamMailDirection(input) - return &out, nil -} - -type AttackTactic string - -const ( - AttackTacticCollection AttackTactic = "Collection" - AttackTacticCommandAndControl AttackTactic = "CommandAndControl" - AttackTacticCredentialAccess AttackTactic = "CredentialAccess" - AttackTacticDefenseEvasion AttackTactic = "DefenseEvasion" - AttackTacticDiscovery AttackTactic = "Discovery" - AttackTacticExecution AttackTactic = "Execution" - AttackTacticExfiltration AttackTactic = "Exfiltration" - AttackTacticImpact AttackTactic = "Impact" - AttackTacticImpairProcessControl AttackTactic = "ImpairProcessControl" - AttackTacticInhibitResponseFunction AttackTactic = "InhibitResponseFunction" - AttackTacticInitialAccess AttackTactic = "InitialAccess" - AttackTacticLateralMovement AttackTactic = "LateralMovement" - AttackTacticPersistence AttackTactic = "Persistence" - AttackTacticPreAttack AttackTactic = "PreAttack" - AttackTacticPrivilegeEscalation AttackTactic = "PrivilegeEscalation" - AttackTacticReconnaissance AttackTactic = "Reconnaissance" - AttackTacticResourceDevelopment AttackTactic = "ResourceDevelopment" -) - -func PossibleValuesForAttackTactic() []string { - return []string{ - string(AttackTacticCollection), - string(AttackTacticCommandAndControl), - string(AttackTacticCredentialAccess), - string(AttackTacticDefenseEvasion), - string(AttackTacticDiscovery), - string(AttackTacticExecution), - string(AttackTacticExfiltration), - string(AttackTacticImpact), - string(AttackTacticImpairProcessControl), - string(AttackTacticInhibitResponseFunction), - string(AttackTacticInitialAccess), - string(AttackTacticLateralMovement), - string(AttackTacticPersistence), - string(AttackTacticPreAttack), - string(AttackTacticPrivilegeEscalation), - string(AttackTacticReconnaissance), - string(AttackTacticResourceDevelopment), - } -} - -func (s *AttackTactic) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAttackTactic(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAttackTactic(input string) (*AttackTactic, error) { - vals := map[string]AttackTactic{ - "collection": AttackTacticCollection, - "commandandcontrol": AttackTacticCommandAndControl, - "credentialaccess": AttackTacticCredentialAccess, - "defenseevasion": AttackTacticDefenseEvasion, - "discovery": AttackTacticDiscovery, - "execution": AttackTacticExecution, - "exfiltration": AttackTacticExfiltration, - "impact": AttackTacticImpact, - "impairprocesscontrol": AttackTacticImpairProcessControl, - "inhibitresponsefunction": AttackTacticInhibitResponseFunction, - "initialaccess": AttackTacticInitialAccess, - "lateralmovement": AttackTacticLateralMovement, - "persistence": AttackTacticPersistence, - "preattack": AttackTacticPreAttack, - "privilegeescalation": AttackTacticPrivilegeEscalation, - "reconnaissance": AttackTacticReconnaissance, - "resourcedevelopment": AttackTacticResourceDevelopment, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AttackTactic(input) - return &out, nil -} - -type ConfidenceLevel string - -const ( - ConfidenceLevelHigh ConfidenceLevel = "High" - ConfidenceLevelLow ConfidenceLevel = "Low" - ConfidenceLevelUnknown ConfidenceLevel = "Unknown" -) - -func PossibleValuesForConfidenceLevel() []string { - return []string{ - string(ConfidenceLevelHigh), - string(ConfidenceLevelLow), - string(ConfidenceLevelUnknown), - } -} - -func (s *ConfidenceLevel) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseConfidenceLevel(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseConfidenceLevel(input string) (*ConfidenceLevel, error) { - vals := map[string]ConfidenceLevel{ - "high": ConfidenceLevelHigh, - "low": ConfidenceLevelLow, - "unknown": ConfidenceLevelUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ConfidenceLevel(input) - return &out, nil -} - -type ConfidenceScoreStatus string - -const ( - ConfidenceScoreStatusFinal ConfidenceScoreStatus = "Final" - ConfidenceScoreStatusInProcess ConfidenceScoreStatus = "InProcess" - ConfidenceScoreStatusNotApplicable ConfidenceScoreStatus = "NotApplicable" - ConfidenceScoreStatusNotFinal ConfidenceScoreStatus = "NotFinal" -) - -func PossibleValuesForConfidenceScoreStatus() []string { - return []string{ - string(ConfidenceScoreStatusFinal), - string(ConfidenceScoreStatusInProcess), - string(ConfidenceScoreStatusNotApplicable), - string(ConfidenceScoreStatusNotFinal), - } -} - -func (s *ConfidenceScoreStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseConfidenceScoreStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseConfidenceScoreStatus(input string) (*ConfidenceScoreStatus, error) { - vals := map[string]ConfidenceScoreStatus{ - "final": ConfidenceScoreStatusFinal, - "inprocess": ConfidenceScoreStatusInProcess, - "notapplicable": ConfidenceScoreStatusNotApplicable, - "notfinal": ConfidenceScoreStatusNotFinal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ConfidenceScoreStatus(input) - return &out, nil -} - -type CreatedByType string - -const ( - CreatedByTypeApplication CreatedByType = "Application" - CreatedByTypeKey CreatedByType = "Key" - CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" - CreatedByTypeUser CreatedByType = "User" -) - -func PossibleValuesForCreatedByType() []string { - return []string{ - string(CreatedByTypeApplication), - string(CreatedByTypeKey), - string(CreatedByTypeManagedIdentity), - string(CreatedByTypeUser), - } -} - -func (s *CreatedByType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseCreatedByType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseCreatedByType(input string) (*CreatedByType, error) { - vals := map[string]CreatedByType{ - "application": CreatedByTypeApplication, - "key": CreatedByTypeKey, - "managedidentity": CreatedByTypeManagedIdentity, - "user": CreatedByTypeUser, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := CreatedByType(input) - return &out, nil -} - -type DeliveryAction string - -const ( - DeliveryActionBlocked DeliveryAction = "Blocked" - DeliveryActionDelivered DeliveryAction = "Delivered" - DeliveryActionDeliveredAsSpam DeliveryAction = "DeliveredAsSpam" - DeliveryActionReplaced DeliveryAction = "Replaced" - DeliveryActionUnknown DeliveryAction = "Unknown" -) - -func PossibleValuesForDeliveryAction() []string { - return []string{ - string(DeliveryActionBlocked), - string(DeliveryActionDelivered), - string(DeliveryActionDeliveredAsSpam), - string(DeliveryActionReplaced), - string(DeliveryActionUnknown), - } -} - -func (s *DeliveryAction) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeliveryAction(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeliveryAction(input string) (*DeliveryAction, error) { - vals := map[string]DeliveryAction{ - "blocked": DeliveryActionBlocked, - "delivered": DeliveryActionDelivered, - "deliveredasspam": DeliveryActionDeliveredAsSpam, - "replaced": DeliveryActionReplaced, - "unknown": DeliveryActionUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeliveryAction(input) - return &out, nil -} - -type DeliveryLocation string - -const ( - DeliveryLocationDeletedFolder DeliveryLocation = "DeletedFolder" - DeliveryLocationDropped DeliveryLocation = "Dropped" - DeliveryLocationExternal DeliveryLocation = "External" - DeliveryLocationFailed DeliveryLocation = "Failed" - DeliveryLocationForwarded DeliveryLocation = "Forwarded" - DeliveryLocationInbox DeliveryLocation = "Inbox" - DeliveryLocationJunkFolder DeliveryLocation = "JunkFolder" - DeliveryLocationQuarantine DeliveryLocation = "Quarantine" - DeliveryLocationUnknown DeliveryLocation = "Unknown" -) - -func PossibleValuesForDeliveryLocation() []string { - return []string{ - string(DeliveryLocationDeletedFolder), - string(DeliveryLocationDropped), - string(DeliveryLocationExternal), - string(DeliveryLocationFailed), - string(DeliveryLocationForwarded), - string(DeliveryLocationInbox), - string(DeliveryLocationJunkFolder), - string(DeliveryLocationQuarantine), - string(DeliveryLocationUnknown), - } -} - -func (s *DeliveryLocation) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeliveryLocation(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeliveryLocation(input string) (*DeliveryLocation, error) { - vals := map[string]DeliveryLocation{ - "deletedfolder": DeliveryLocationDeletedFolder, - "dropped": DeliveryLocationDropped, - "external": DeliveryLocationExternal, - "failed": DeliveryLocationFailed, - "forwarded": DeliveryLocationForwarded, - "inbox": DeliveryLocationInbox, - "junkfolder": DeliveryLocationJunkFolder, - "quarantine": DeliveryLocationQuarantine, - "unknown": DeliveryLocationUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeliveryLocation(input) - return &out, nil -} - -type ElevationToken string - -const ( - ElevationTokenDefault ElevationToken = "Default" - ElevationTokenFull ElevationToken = "Full" - ElevationTokenLimited ElevationToken = "Limited" -) - -func PossibleValuesForElevationToken() []string { - return []string{ - string(ElevationTokenDefault), - string(ElevationTokenFull), - string(ElevationTokenLimited), - } -} - -func (s *ElevationToken) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseElevationToken(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseElevationToken(input string) (*ElevationToken, error) { - vals := map[string]ElevationToken{ - "default": ElevationTokenDefault, - "full": ElevationTokenFull, - "limited": ElevationTokenLimited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ElevationToken(input) - return &out, nil -} - -type EntityKindEnum string - -const ( - EntityKindEnumAccount EntityKindEnum = "Account" - EntityKindEnumAzureResource EntityKindEnum = "AzureResource" - EntityKindEnumBookmark EntityKindEnum = "Bookmark" - EntityKindEnumCloudApplication EntityKindEnum = "CloudApplication" - EntityKindEnumDnsResolution EntityKindEnum = "DnsResolution" - EntityKindEnumFile EntityKindEnum = "File" - EntityKindEnumFileHash EntityKindEnum = "FileHash" - EntityKindEnumHost EntityKindEnum = "Host" - EntityKindEnumIP EntityKindEnum = "Ip" - EntityKindEnumIoTDevice EntityKindEnum = "IoTDevice" - EntityKindEnumMailCluster EntityKindEnum = "MailCluster" - EntityKindEnumMailMessage EntityKindEnum = "MailMessage" - EntityKindEnumMailbox EntityKindEnum = "Mailbox" - EntityKindEnumMalware EntityKindEnum = "Malware" - EntityKindEnumProcess EntityKindEnum = "Process" - EntityKindEnumRegistryKey EntityKindEnum = "RegistryKey" - EntityKindEnumRegistryValue EntityKindEnum = "RegistryValue" - EntityKindEnumSecurityAlert EntityKindEnum = "SecurityAlert" - EntityKindEnumSecurityGroup EntityKindEnum = "SecurityGroup" - EntityKindEnumSubmissionMail EntityKindEnum = "SubmissionMail" - EntityKindEnumUrl EntityKindEnum = "Url" -) - -func PossibleValuesForEntityKindEnum() []string { - return []string{ - string(EntityKindEnumAccount), - string(EntityKindEnumAzureResource), - string(EntityKindEnumBookmark), - string(EntityKindEnumCloudApplication), - string(EntityKindEnumDnsResolution), - string(EntityKindEnumFile), - string(EntityKindEnumFileHash), - string(EntityKindEnumHost), - string(EntityKindEnumIP), - string(EntityKindEnumIoTDevice), - string(EntityKindEnumMailCluster), - string(EntityKindEnumMailMessage), - string(EntityKindEnumMailbox), - string(EntityKindEnumMalware), - string(EntityKindEnumProcess), - string(EntityKindEnumRegistryKey), - string(EntityKindEnumRegistryValue), - string(EntityKindEnumSecurityAlert), - string(EntityKindEnumSecurityGroup), - string(EntityKindEnumSubmissionMail), - string(EntityKindEnumUrl), - } -} - -func (s *EntityKindEnum) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseEntityKindEnum(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseEntityKindEnum(input string) (*EntityKindEnum, error) { - vals := map[string]EntityKindEnum{ - "account": EntityKindEnumAccount, - "azureresource": EntityKindEnumAzureResource, - "bookmark": EntityKindEnumBookmark, - "cloudapplication": EntityKindEnumCloudApplication, - "dnsresolution": EntityKindEnumDnsResolution, - "file": EntityKindEnumFile, - "filehash": EntityKindEnumFileHash, - "host": EntityKindEnumHost, - "ip": EntityKindEnumIP, - "iotdevice": EntityKindEnumIoTDevice, - "mailcluster": EntityKindEnumMailCluster, - "mailmessage": EntityKindEnumMailMessage, - "mailbox": EntityKindEnumMailbox, - "malware": EntityKindEnumMalware, - "process": EntityKindEnumProcess, - "registrykey": EntityKindEnumRegistryKey, - "registryvalue": EntityKindEnumRegistryValue, - "securityalert": EntityKindEnumSecurityAlert, - "securitygroup": EntityKindEnumSecurityGroup, - "submissionmail": EntityKindEnumSubmissionMail, - "url": EntityKindEnumUrl, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := EntityKindEnum(input) - return &out, nil -} - -type FileHashAlgorithm string - -const ( - FileHashAlgorithmMDFive FileHashAlgorithm = "MD5" - FileHashAlgorithmSHAOne FileHashAlgorithm = "SHA1" - FileHashAlgorithmSHATwoFiveSix FileHashAlgorithm = "SHA256" - FileHashAlgorithmSHATwoFiveSixAC FileHashAlgorithm = "SHA256AC" - FileHashAlgorithmUnknown FileHashAlgorithm = "Unknown" -) - -func PossibleValuesForFileHashAlgorithm() []string { - return []string{ - string(FileHashAlgorithmMDFive), - string(FileHashAlgorithmSHAOne), - string(FileHashAlgorithmSHATwoFiveSix), - string(FileHashAlgorithmSHATwoFiveSixAC), - string(FileHashAlgorithmUnknown), - } -} - -func (s *FileHashAlgorithm) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFileHashAlgorithm(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFileHashAlgorithm(input string) (*FileHashAlgorithm, error) { - vals := map[string]FileHashAlgorithm{ - "md5": FileHashAlgorithmMDFive, - "sha1": FileHashAlgorithmSHAOne, - "sha256": FileHashAlgorithmSHATwoFiveSix, - "sha256ac": FileHashAlgorithmSHATwoFiveSixAC, - "unknown": FileHashAlgorithmUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FileHashAlgorithm(input) - return &out, nil -} - -type IncidentSeverity string - -const ( - IncidentSeverityHigh IncidentSeverity = "High" - IncidentSeverityInformational IncidentSeverity = "Informational" - IncidentSeverityLow IncidentSeverity = "Low" - IncidentSeverityMedium IncidentSeverity = "Medium" -) - -func PossibleValuesForIncidentSeverity() []string { - return []string{ - string(IncidentSeverityHigh), - string(IncidentSeverityInformational), - string(IncidentSeverityLow), - string(IncidentSeverityMedium), - } -} - -func (s *IncidentSeverity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIncidentSeverity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIncidentSeverity(input string) (*IncidentSeverity, error) { - vals := map[string]IncidentSeverity{ - "high": IncidentSeverityHigh, - "informational": IncidentSeverityInformational, - "low": IncidentSeverityLow, - "medium": IncidentSeverityMedium, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IncidentSeverity(input) - return &out, nil -} - -type KillChainIntent string - -const ( - KillChainIntentCollection KillChainIntent = "Collection" - KillChainIntentCommandAndControl KillChainIntent = "CommandAndControl" - KillChainIntentCredentialAccess KillChainIntent = "CredentialAccess" - KillChainIntentDefenseEvasion KillChainIntent = "DefenseEvasion" - KillChainIntentDiscovery KillChainIntent = "Discovery" - KillChainIntentExecution KillChainIntent = "Execution" - KillChainIntentExfiltration KillChainIntent = "Exfiltration" - KillChainIntentExploitation KillChainIntent = "Exploitation" - KillChainIntentImpact KillChainIntent = "Impact" - KillChainIntentLateralMovement KillChainIntent = "LateralMovement" - KillChainIntentPersistence KillChainIntent = "Persistence" - KillChainIntentPrivilegeEscalation KillChainIntent = "PrivilegeEscalation" - KillChainIntentProbing KillChainIntent = "Probing" - KillChainIntentUnknown KillChainIntent = "Unknown" -) - -func PossibleValuesForKillChainIntent() []string { - return []string{ - string(KillChainIntentCollection), - string(KillChainIntentCommandAndControl), - string(KillChainIntentCredentialAccess), - string(KillChainIntentDefenseEvasion), - string(KillChainIntentDiscovery), - string(KillChainIntentExecution), - string(KillChainIntentExfiltration), - string(KillChainIntentExploitation), - string(KillChainIntentImpact), - string(KillChainIntentLateralMovement), - string(KillChainIntentPersistence), - string(KillChainIntentPrivilegeEscalation), - string(KillChainIntentProbing), - string(KillChainIntentUnknown), - } -} - -func (s *KillChainIntent) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseKillChainIntent(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseKillChainIntent(input string) (*KillChainIntent, error) { - vals := map[string]KillChainIntent{ - "collection": KillChainIntentCollection, - "commandandcontrol": KillChainIntentCommandAndControl, - "credentialaccess": KillChainIntentCredentialAccess, - "defenseevasion": KillChainIntentDefenseEvasion, - "discovery": KillChainIntentDiscovery, - "execution": KillChainIntentExecution, - "exfiltration": KillChainIntentExfiltration, - "exploitation": KillChainIntentExploitation, - "impact": KillChainIntentImpact, - "lateralmovement": KillChainIntentLateralMovement, - "persistence": KillChainIntentPersistence, - "privilegeescalation": KillChainIntentPrivilegeEscalation, - "probing": KillChainIntentProbing, - "unknown": KillChainIntentUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := KillChainIntent(input) - return &out, nil -} - -type OSFamily string - -const ( - OSFamilyAndroid OSFamily = "Android" - OSFamilyIOS OSFamily = "IOS" - OSFamilyLinux OSFamily = "Linux" - OSFamilyUnknown OSFamily = "Unknown" - OSFamilyWindows OSFamily = "Windows" -) - -func PossibleValuesForOSFamily() []string { - return []string{ - string(OSFamilyAndroid), - string(OSFamilyIOS), - string(OSFamilyLinux), - string(OSFamilyUnknown), - string(OSFamilyWindows), - } -} - -func (s *OSFamily) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseOSFamily(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseOSFamily(input string) (*OSFamily, error) { - vals := map[string]OSFamily{ - "android": OSFamilyAndroid, - "ios": OSFamilyIOS, - "linux": OSFamilyLinux, - "unknown": OSFamilyUnknown, - "windows": OSFamilyWindows, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := OSFamily(input) - return &out, nil -} - -type RegistryHive string - -const ( - RegistryHiveHKEYA RegistryHive = "HKEY_A" - RegistryHiveHKEYCLASSESROOT RegistryHive = "HKEY_CLASSES_ROOT" - RegistryHiveHKEYCURRENTCONFIG RegistryHive = "HKEY_CURRENT_CONFIG" - RegistryHiveHKEYCURRENTUSER RegistryHive = "HKEY_CURRENT_USER" - RegistryHiveHKEYCURRENTUSERLOCALSETTINGS RegistryHive = "HKEY_CURRENT_USER_LOCAL_SETTINGS" - RegistryHiveHKEYLOCALMACHINE RegistryHive = "HKEY_LOCAL_MACHINE" - RegistryHiveHKEYPERFORMANCEDATA RegistryHive = "HKEY_PERFORMANCE_DATA" - RegistryHiveHKEYPERFORMANCENLSTEXT RegistryHive = "HKEY_PERFORMANCE_NLSTEXT" - RegistryHiveHKEYPERFORMANCETEXT RegistryHive = "HKEY_PERFORMANCE_TEXT" - RegistryHiveHKEYUSERS RegistryHive = "HKEY_USERS" -) - -func PossibleValuesForRegistryHive() []string { - return []string{ - string(RegistryHiveHKEYA), - string(RegistryHiveHKEYCLASSESROOT), - string(RegistryHiveHKEYCURRENTCONFIG), - string(RegistryHiveHKEYCURRENTUSER), - string(RegistryHiveHKEYCURRENTUSERLOCALSETTINGS), - string(RegistryHiveHKEYLOCALMACHINE), - string(RegistryHiveHKEYPERFORMANCEDATA), - string(RegistryHiveHKEYPERFORMANCENLSTEXT), - string(RegistryHiveHKEYPERFORMANCETEXT), - string(RegistryHiveHKEYUSERS), - } -} - -func (s *RegistryHive) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRegistryHive(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRegistryHive(input string) (*RegistryHive, error) { - vals := map[string]RegistryHive{ - "hkey_a": RegistryHiveHKEYA, - "hkey_classes_root": RegistryHiveHKEYCLASSESROOT, - "hkey_current_config": RegistryHiveHKEYCURRENTCONFIG, - "hkey_current_user": RegistryHiveHKEYCURRENTUSER, - "hkey_current_user_local_settings": RegistryHiveHKEYCURRENTUSERLOCALSETTINGS, - "hkey_local_machine": RegistryHiveHKEYLOCALMACHINE, - "hkey_performance_data": RegistryHiveHKEYPERFORMANCEDATA, - "hkey_performance_nlstext": RegistryHiveHKEYPERFORMANCENLSTEXT, - "hkey_performance_text": RegistryHiveHKEYPERFORMANCETEXT, - "hkey_users": RegistryHiveHKEYUSERS, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RegistryHive(input) - return &out, nil -} - -type RegistryValueKind string - -const ( - RegistryValueKindBinary RegistryValueKind = "Binary" - RegistryValueKindDWord RegistryValueKind = "DWord" - RegistryValueKindExpandString RegistryValueKind = "ExpandString" - RegistryValueKindMultiString RegistryValueKind = "MultiString" - RegistryValueKindNone RegistryValueKind = "None" - RegistryValueKindQWord RegistryValueKind = "QWord" - RegistryValueKindString RegistryValueKind = "String" - RegistryValueKindUnknown RegistryValueKind = "Unknown" -) - -func PossibleValuesForRegistryValueKind() []string { - return []string{ - string(RegistryValueKindBinary), - string(RegistryValueKindDWord), - string(RegistryValueKindExpandString), - string(RegistryValueKindMultiString), - string(RegistryValueKindNone), - string(RegistryValueKindQWord), - string(RegistryValueKindString), - string(RegistryValueKindUnknown), - } -} - -func (s *RegistryValueKind) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRegistryValueKind(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRegistryValueKind(input string) (*RegistryValueKind, error) { - vals := map[string]RegistryValueKind{ - "binary": RegistryValueKindBinary, - "dword": RegistryValueKindDWord, - "expandstring": RegistryValueKindExpandString, - "multistring": RegistryValueKindMultiString, - "none": RegistryValueKindNone, - "qword": RegistryValueKindQWord, - "string": RegistryValueKindString, - "unknown": RegistryValueKindUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RegistryValueKind(input) - return &out, nil -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_accountentity.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_accountentity.go deleted file mode 100644 index 36622cda50b..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_accountentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = AccountEntity{} - -type AccountEntity struct { - Properties *AccountEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = AccountEntity{} - -func (s AccountEntity) MarshalJSON() ([]byte, error) { - type wrapper AccountEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling AccountEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling AccountEntity: %+v", err) - } - decoded["kind"] = "Account" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling AccountEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_accountentityproperties.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_accountentityproperties.go deleted file mode 100644 index d59392c8918..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_accountentityproperties.go +++ /dev/null @@ -1,21 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AccountEntityProperties struct { - AadTenantId *string `json:"aadTenantId,omitempty"` - AadUserId *string `json:"aadUserId,omitempty"` - AccountName *string `json:"accountName,omitempty"` - AdditionalData *interface{} `json:"additionalData,omitempty"` - DisplayName *string `json:"displayName,omitempty"` - DnsDomain *string `json:"dnsDomain,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HostEntityId *string `json:"hostEntityId,omitempty"` - IsDomainJoined *bool `json:"isDomainJoined,omitempty"` - NtDomain *string `json:"ntDomain,omitempty"` - ObjectGuid *string `json:"objectGuid,omitempty"` - Puid *string `json:"puid,omitempty"` - Sid *string `json:"sid,omitempty"` - UpnSuffix *string `json:"upnSuffix,omitempty"` -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_azureresourceentity.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_azureresourceentity.go deleted file mode 100644 index 6947a9b96e5..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_azureresourceentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = AzureResourceEntity{} - -type AzureResourceEntity struct { - Properties *AzureResourceEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = AzureResourceEntity{} - -func (s AzureResourceEntity) MarshalJSON() ([]byte, error) { - type wrapper AzureResourceEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling AzureResourceEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling AzureResourceEntity: %+v", err) - } - decoded["kind"] = "AzureResource" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling AzureResourceEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_azureresourceentityproperties.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_azureresourceentityproperties.go deleted file mode 100644 index 1a5a228d002..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_azureresourceentityproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureResourceEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - ResourceId *string `json:"resourceId,omitempty"` - SubscriptionId *string `json:"subscriptionId,omitempty"` -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_cloudapplicationentity.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_cloudapplicationentity.go deleted file mode 100644 index 73b7fb5b308..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_cloudapplicationentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = CloudApplicationEntity{} - -type CloudApplicationEntity struct { - Properties *CloudApplicationEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = CloudApplicationEntity{} - -func (s CloudApplicationEntity) MarshalJSON() ([]byte, error) { - type wrapper CloudApplicationEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling CloudApplicationEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling CloudApplicationEntity: %+v", err) - } - decoded["kind"] = "CloudApplication" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling CloudApplicationEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_cloudapplicationentityproperties.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_cloudapplicationentityproperties.go deleted file mode 100644 index a2cda4314d2..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_cloudapplicationentityproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CloudApplicationEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - AppId *int64 `json:"appId,omitempty"` - AppName *string `json:"appName,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - InstanceName *string `json:"instanceName,omitempty"` -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_dnsentity.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_dnsentity.go deleted file mode 100644 index 81c3c0dac5b..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_dnsentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = DnsEntity{} - -type DnsEntity struct { - Properties *DnsEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = DnsEntity{} - -func (s DnsEntity) MarshalJSON() ([]byte, error) { - type wrapper DnsEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling DnsEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling DnsEntity: %+v", err) - } - decoded["kind"] = "DnsResolution" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling DnsEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_dnsentityproperties.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_dnsentityproperties.go deleted file mode 100644 index 4d342c95b9f..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_dnsentityproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DnsEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - DnsServerIPEntityId *string `json:"dnsServerIpEntityId,omitempty"` - DomainName *string `json:"domainName,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HostIPAddressEntityId *string `json:"hostIpAddressEntityId,omitempty"` - IPAddressEntityIds *[]string `json:"ipAddressEntityIds,omitempty"` -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_entity.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_entity.go deleted file mode 100644 index e648085f87e..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_entity.go +++ /dev/null @@ -1,213 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Entity interface { -} - -// RawEntityImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawEntityImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalEntityImplementation(input []byte) (Entity, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling Entity into map[string]interface: %+v", err) - } - - value, ok := temp["kind"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "Account") { - var out AccountEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into AccountEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "AzureResource") { - var out AzureResourceEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into AzureResourceEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "CloudApplication") { - var out CloudApplicationEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into CloudApplicationEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "DnsResolution") { - var out DnsEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into DnsEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "File") { - var out FileEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into FileEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "FileHash") { - var out FileHashEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into FileHashEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Host") { - var out HostEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into HostEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Bookmark") { - var out HuntingBookmark - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into HuntingBookmark: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Ip") { - var out IPEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into IPEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "IoTDevice") { - var out IoTDeviceEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into IoTDeviceEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "MailCluster") { - var out MailClusterEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MailClusterEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "MailMessage") { - var out MailMessageEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MailMessageEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Mailbox") { - var out MailboxEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MailboxEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Malware") { - var out MalwareEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MalwareEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Process") { - var out ProcessEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ProcessEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "RegistryKey") { - var out RegistryKeyEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into RegistryKeyEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "RegistryValue") { - var out RegistryValueEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into RegistryValueEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "SecurityAlert") { - var out SecurityAlert - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SecurityAlert: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "SecurityGroup") { - var out SecurityGroupEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SecurityGroupEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "SubmissionMail") { - var out SubmissionMailEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SubmissionMailEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Url") { - var out UrlEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into UrlEntity: %+v", err) - } - return out, nil - } - - out := RawEntityImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_fileentity.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_fileentity.go deleted file mode 100644 index 98411b9b140..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_fileentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = FileEntity{} - -type FileEntity struct { - Properties *FileEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = FileEntity{} - -func (s FileEntity) MarshalJSON() ([]byte, error) { - type wrapper FileEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling FileEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling FileEntity: %+v", err) - } - decoded["kind"] = "File" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling FileEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_fileentityproperties.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_fileentityproperties.go deleted file mode 100644 index 1de5b3a4472..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_fileentityproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FileEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - Directory *string `json:"directory,omitempty"` - FileHashEntityIds *[]string `json:"fileHashEntityIds,omitempty"` - FileName *string `json:"fileName,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HostEntityId *string `json:"hostEntityId,omitempty"` -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_filehashentity.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_filehashentity.go deleted file mode 100644 index bf05183c64b..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_filehashentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = FileHashEntity{} - -type FileHashEntity struct { - Properties *FileHashEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = FileHashEntity{} - -func (s FileHashEntity) MarshalJSON() ([]byte, error) { - type wrapper FileHashEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling FileHashEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling FileHashEntity: %+v", err) - } - decoded["kind"] = "FileHash" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling FileHashEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_filehashentityproperties.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_filehashentityproperties.go deleted file mode 100644 index ae614f05471..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_filehashentityproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FileHashEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - Algorithm *FileHashAlgorithm `json:"algorithm,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HashValue *string `json:"hashValue,omitempty"` -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_geolocation.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_geolocation.go deleted file mode 100644 index 53a44e73dcd..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_geolocation.go +++ /dev/null @@ -1,14 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GeoLocation struct { - Asn *int64 `json:"asn,omitempty"` - City *string `json:"city,omitempty"` - CountryCode *string `json:"countryCode,omitempty"` - CountryName *string `json:"countryName,omitempty"` - Latitude *float64 `json:"latitude,omitempty"` - Longitude *float64 `json:"longitude,omitempty"` - State *string `json:"state,omitempty"` -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_hostentity.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_hostentity.go deleted file mode 100644 index 90b206a2d15..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_hostentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = HostEntity{} - -type HostEntity struct { - Properties *HostEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = HostEntity{} - -func (s HostEntity) MarshalJSON() ([]byte, error) { - type wrapper HostEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling HostEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling HostEntity: %+v", err) - } - decoded["kind"] = "Host" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling HostEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_hostentityproperties.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_hostentityproperties.go deleted file mode 100644 index 225285eedf9..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_hostentityproperties.go +++ /dev/null @@ -1,18 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HostEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - AzureID *string `json:"azureID,omitempty"` - DnsDomain *string `json:"dnsDomain,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HostName *string `json:"hostName,omitempty"` - IsDomainJoined *bool `json:"isDomainJoined,omitempty"` - NetBiosName *string `json:"netBiosName,omitempty"` - NtDomain *string `json:"ntDomain,omitempty"` - OmsAgentID *string `json:"omsAgentID,omitempty"` - OsFamily *OSFamily `json:"osFamily,omitempty"` - OsVersion *string `json:"osVersion,omitempty"` -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_huntingbookmark.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_huntingbookmark.go deleted file mode 100644 index e86ba910de6..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_huntingbookmark.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = HuntingBookmark{} - -type HuntingBookmark struct { - Properties *HuntingBookmarkProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = HuntingBookmark{} - -func (s HuntingBookmark) MarshalJSON() ([]byte, error) { - type wrapper HuntingBookmark - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling HuntingBookmark: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling HuntingBookmark: %+v", err) - } - decoded["kind"] = "Bookmark" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling HuntingBookmark: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_huntingbookmarkproperties.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_huntingbookmarkproperties.go deleted file mode 100644 index 2136725d590..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_huntingbookmarkproperties.go +++ /dev/null @@ -1,62 +0,0 @@ -package entitytypes - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HuntingBookmarkProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - Created *string `json:"created,omitempty"` - CreatedBy *UserInfo `json:"createdBy,omitempty"` - DisplayName string `json:"displayName"` - EventTime *string `json:"eventTime,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - IncidentInfo *IncidentInfo `json:"incidentInfo,omitempty"` - Labels *[]string `json:"labels,omitempty"` - Notes *string `json:"notes,omitempty"` - Query string `json:"query"` - QueryResult *string `json:"queryResult,omitempty"` - Updated *string `json:"updated,omitempty"` - UpdatedBy *UserInfo `json:"updatedBy,omitempty"` -} - -func (o *HuntingBookmarkProperties) GetCreatedAsTime() (*time.Time, error) { - if o.Created == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Created, "2006-01-02T15:04:05Z07:00") -} - -func (o *HuntingBookmarkProperties) SetCreatedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Created = &formatted -} - -func (o *HuntingBookmarkProperties) GetEventTimeAsTime() (*time.Time, error) { - if o.EventTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.EventTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *HuntingBookmarkProperties) SetEventTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.EventTime = &formatted -} - -func (o *HuntingBookmarkProperties) GetUpdatedAsTime() (*time.Time, error) { - if o.Updated == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Updated, "2006-01-02T15:04:05Z07:00") -} - -func (o *HuntingBookmarkProperties) SetUpdatedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Updated = &formatted -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_incidentinfo.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_incidentinfo.go deleted file mode 100644 index 80d014f5289..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_incidentinfo.go +++ /dev/null @@ -1,11 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IncidentInfo struct { - IncidentId *string `json:"incidentId,omitempty"` - RelationName *string `json:"relationName,omitempty"` - Severity *IncidentSeverity `json:"severity,omitempty"` - Title *string `json:"title,omitempty"` -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_iotdeviceentity.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_iotdeviceentity.go deleted file mode 100644 index 3828d0cf7d2..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_iotdeviceentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = IoTDeviceEntity{} - -type IoTDeviceEntity struct { - Properties *IoTDeviceEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = IoTDeviceEntity{} - -func (s IoTDeviceEntity) MarshalJSON() ([]byte, error) { - type wrapper IoTDeviceEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling IoTDeviceEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling IoTDeviceEntity: %+v", err) - } - decoded["kind"] = "IoTDevice" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling IoTDeviceEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_iotdeviceentityproperties.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_iotdeviceentityproperties.go deleted file mode 100644 index 7f41e975a80..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_iotdeviceentityproperties.go +++ /dev/null @@ -1,26 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IoTDeviceEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - DeviceId *string `json:"deviceId,omitempty"` - DeviceName *string `json:"deviceName,omitempty"` - DeviceType *string `json:"deviceType,omitempty"` - EdgeId *string `json:"edgeId,omitempty"` - FirmwareVersion *string `json:"firmwareVersion,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HostEntityId *string `json:"hostEntityId,omitempty"` - IPAddressEntityId *string `json:"ipAddressEntityId,omitempty"` - IotHubEntityId *string `json:"iotHubEntityId,omitempty"` - IotSecurityAgentId *string `json:"iotSecurityAgentId,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - Model *string `json:"model,omitempty"` - OperatingSystem *string `json:"operatingSystem,omitempty"` - Protocols *[]string `json:"protocols,omitempty"` - SerialNumber *string `json:"serialNumber,omitempty"` - Source *string `json:"source,omitempty"` - ThreatIntelligence *[]ThreatIntelligence `json:"threatIntelligence,omitempty"` - Vendor *string `json:"vendor,omitempty"` -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_ipentity.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_ipentity.go deleted file mode 100644 index e062bf2295a..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_ipentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = IPEntity{} - -type IPEntity struct { - Properties *IPEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = IPEntity{} - -func (s IPEntity) MarshalJSON() ([]byte, error) { - type wrapper IPEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling IPEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling IPEntity: %+v", err) - } - decoded["kind"] = "Ip" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling IPEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_ipentityproperties.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_ipentityproperties.go deleted file mode 100644 index f9f2e884298..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_ipentityproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - Address *string `json:"address,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - Location *GeoLocation `json:"location,omitempty"` - ThreatIntelligence *[]ThreatIntelligence `json:"threatIntelligence,omitempty"` -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_mailboxentity.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_mailboxentity.go deleted file mode 100644 index 57dee77697e..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_mailboxentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = MailboxEntity{} - -type MailboxEntity struct { - Properties *MailboxEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = MailboxEntity{} - -func (s MailboxEntity) MarshalJSON() ([]byte, error) { - type wrapper MailboxEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MailboxEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MailboxEntity: %+v", err) - } - decoded["kind"] = "Mailbox" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MailboxEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_mailboxentityproperties.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_mailboxentityproperties.go deleted file mode 100644 index 8f17fb66eed..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_mailboxentityproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MailboxEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - DisplayName *string `json:"displayName,omitempty"` - ExternalDirectoryObjectId *string `json:"externalDirectoryObjectId,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - MailboxPrimaryAddress *string `json:"mailboxPrimaryAddress,omitempty"` - Upn *string `json:"upn,omitempty"` -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_mailclusterentity.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_mailclusterentity.go deleted file mode 100644 index afa0db447b6..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_mailclusterentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = MailClusterEntity{} - -type MailClusterEntity struct { - Properties *MailClusterEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = MailClusterEntity{} - -func (s MailClusterEntity) MarshalJSON() ([]byte, error) { - type wrapper MailClusterEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MailClusterEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MailClusterEntity: %+v", err) - } - decoded["kind"] = "MailCluster" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MailClusterEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_mailclusterentityproperties.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_mailclusterentityproperties.go deleted file mode 100644 index 74591a4d793..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_mailclusterentityproperties.go +++ /dev/null @@ -1,66 +0,0 @@ -package entitytypes - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MailClusterEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - ClusterGroup *string `json:"clusterGroup,omitempty"` - ClusterQueryEndTime *string `json:"clusterQueryEndTime,omitempty"` - ClusterQueryStartTime *string `json:"clusterQueryStartTime,omitempty"` - ClusterSourceIdentifier *string `json:"clusterSourceIdentifier,omitempty"` - ClusterSourceType *string `json:"clusterSourceType,omitempty"` - CountByDeliveryStatus *interface{} `json:"countByDeliveryStatus,omitempty"` - CountByProtectionStatus *interface{} `json:"countByProtectionStatus,omitempty"` - CountByThreatType *interface{} `json:"countByThreatType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - IsVolumeAnomaly *bool `json:"isVolumeAnomaly,omitempty"` - MailCount *int64 `json:"mailCount,omitempty"` - NetworkMessageIds *[]string `json:"networkMessageIds,omitempty"` - Query *string `json:"query,omitempty"` - QueryTime *string `json:"queryTime,omitempty"` - Source *string `json:"source,omitempty"` - Threats *[]string `json:"threats,omitempty"` -} - -func (o *MailClusterEntityProperties) GetClusterQueryEndTimeAsTime() (*time.Time, error) { - if o.ClusterQueryEndTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.ClusterQueryEndTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *MailClusterEntityProperties) SetClusterQueryEndTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.ClusterQueryEndTime = &formatted -} - -func (o *MailClusterEntityProperties) GetClusterQueryStartTimeAsTime() (*time.Time, error) { - if o.ClusterQueryStartTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.ClusterQueryStartTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *MailClusterEntityProperties) SetClusterQueryStartTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.ClusterQueryStartTime = &formatted -} - -func (o *MailClusterEntityProperties) GetQueryTimeAsTime() (*time.Time, error) { - if o.QueryTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.QueryTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *MailClusterEntityProperties) SetQueryTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.QueryTime = &formatted -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_mailmessageentity.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_mailmessageentity.go deleted file mode 100644 index e0fef66bf3b..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_mailmessageentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = MailMessageEntity{} - -type MailMessageEntity struct { - Properties *MailMessageEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = MailMessageEntity{} - -func (s MailMessageEntity) MarshalJSON() ([]byte, error) { - type wrapper MailMessageEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MailMessageEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MailMessageEntity: %+v", err) - } - decoded["kind"] = "MailMessage" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MailMessageEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_mailmessageentityproperties.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_mailmessageentityproperties.go deleted file mode 100644 index bb6d8e5f832..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_mailmessageentityproperties.go +++ /dev/null @@ -1,52 +0,0 @@ -package entitytypes - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MailMessageEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - AntispamDirection *AntispamMailDirection `json:"antispamDirection,omitempty"` - BodyFingerprintBin1 *int64 `json:"bodyFingerprintBin1,omitempty"` - BodyFingerprintBin2 *int64 `json:"bodyFingerprintBin2,omitempty"` - BodyFingerprintBin3 *int64 `json:"bodyFingerprintBin3,omitempty"` - BodyFingerprintBin4 *int64 `json:"bodyFingerprintBin4,omitempty"` - BodyFingerprintBin5 *int64 `json:"bodyFingerprintBin5,omitempty"` - DeliveryAction *DeliveryAction `json:"deliveryAction,omitempty"` - DeliveryLocation *DeliveryLocation `json:"deliveryLocation,omitempty"` - FileEntityIds *[]string `json:"fileEntityIds,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - InternetMessageId *string `json:"internetMessageId,omitempty"` - Language *string `json:"language,omitempty"` - NetworkMessageId *string `json:"networkMessageId,omitempty"` - P1Sender *string `json:"p1Sender,omitempty"` - P1SenderDisplayName *string `json:"p1SenderDisplayName,omitempty"` - P1SenderDomain *string `json:"p1SenderDomain,omitempty"` - P2Sender *string `json:"p2Sender,omitempty"` - P2SenderDisplayName *string `json:"p2SenderDisplayName,omitempty"` - P2SenderDomain *string `json:"p2SenderDomain,omitempty"` - ReceiveDate *string `json:"receiveDate,omitempty"` - Recipient *string `json:"recipient,omitempty"` - SenderIP *string `json:"senderIP,omitempty"` - Subject *string `json:"subject,omitempty"` - ThreatDetectionMethods *[]string `json:"threatDetectionMethods,omitempty"` - Threats *[]string `json:"threats,omitempty"` - Urls *[]string `json:"urls,omitempty"` -} - -func (o *MailMessageEntityProperties) GetReceiveDateAsTime() (*time.Time, error) { - if o.ReceiveDate == nil { - return nil, nil - } - return dates.ParseAsFormat(o.ReceiveDate, "2006-01-02T15:04:05Z07:00") -} - -func (o *MailMessageEntityProperties) SetReceiveDateAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.ReceiveDate = &formatted -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_malwareentity.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_malwareentity.go deleted file mode 100644 index 01b3f9cda92..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_malwareentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = MalwareEntity{} - -type MalwareEntity struct { - Properties *MalwareEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = MalwareEntity{} - -func (s MalwareEntity) MarshalJSON() ([]byte, error) { - type wrapper MalwareEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MalwareEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MalwareEntity: %+v", err) - } - decoded["kind"] = "Malware" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MalwareEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_malwareentityproperties.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_malwareentityproperties.go deleted file mode 100644 index 5ffe2f41d44..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_malwareentityproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MalwareEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - Category *string `json:"category,omitempty"` - FileEntityIds *[]string `json:"fileEntityIds,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - MalwareName *string `json:"malwareName,omitempty"` - ProcessEntityIds *[]string `json:"processEntityIds,omitempty"` -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_processentity.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_processentity.go deleted file mode 100644 index b3d0be74fd8..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_processentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = ProcessEntity{} - -type ProcessEntity struct { - Properties *ProcessEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = ProcessEntity{} - -func (s ProcessEntity) MarshalJSON() ([]byte, error) { - type wrapper ProcessEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ProcessEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ProcessEntity: %+v", err) - } - decoded["kind"] = "Process" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ProcessEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_processentityproperties.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_processentityproperties.go deleted file mode 100644 index 938f21cbd7d..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_processentityproperties.go +++ /dev/null @@ -1,36 +0,0 @@ -package entitytypes - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProcessEntityProperties struct { - AccountEntityId *string `json:"accountEntityId,omitempty"` - AdditionalData *interface{} `json:"additionalData,omitempty"` - CommandLine *string `json:"commandLine,omitempty"` - CreationTimeUtc *string `json:"creationTimeUtc,omitempty"` - ElevationToken *ElevationToken `json:"elevationToken,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HostEntityId *string `json:"hostEntityId,omitempty"` - HostLogonSessionEntityId *string `json:"hostLogonSessionEntityId,omitempty"` - ImageFileEntityId *string `json:"imageFileEntityId,omitempty"` - ParentProcessEntityId *string `json:"parentProcessEntityId,omitempty"` - ProcessId *string `json:"processId,omitempty"` -} - -func (o *ProcessEntityProperties) GetCreationTimeUtcAsTime() (*time.Time, error) { - if o.CreationTimeUtc == nil { - return nil, nil - } - return dates.ParseAsFormat(o.CreationTimeUtc, "2006-01-02T15:04:05Z07:00") -} - -func (o *ProcessEntityProperties) SetCreationTimeUtcAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.CreationTimeUtc = &formatted -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_registrykeyentity.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_registrykeyentity.go deleted file mode 100644 index bef73eb2c5b..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_registrykeyentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = RegistryKeyEntity{} - -type RegistryKeyEntity struct { - Properties *RegistryKeyEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = RegistryKeyEntity{} - -func (s RegistryKeyEntity) MarshalJSON() ([]byte, error) { - type wrapper RegistryKeyEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling RegistryKeyEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling RegistryKeyEntity: %+v", err) - } - decoded["kind"] = "RegistryKey" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling RegistryKeyEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_registrykeyentityproperties.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_registrykeyentityproperties.go deleted file mode 100644 index a8b04e821d5..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_registrykeyentityproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RegistryKeyEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - Hive *RegistryHive `json:"hive,omitempty"` - Key *string `json:"key,omitempty"` -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_registryvalueentity.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_registryvalueentity.go deleted file mode 100644 index 45599924191..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_registryvalueentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = RegistryValueEntity{} - -type RegistryValueEntity struct { - Properties *RegistryValueEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = RegistryValueEntity{} - -func (s RegistryValueEntity) MarshalJSON() ([]byte, error) { - type wrapper RegistryValueEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling RegistryValueEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling RegistryValueEntity: %+v", err) - } - decoded["kind"] = "RegistryValue" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling RegistryValueEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_registryvalueentityproperties.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_registryvalueentityproperties.go deleted file mode 100644 index 6a997b7d386..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_registryvalueentityproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RegistryValueEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - KeyEntityId *string `json:"keyEntityId,omitempty"` - ValueData *string `json:"valueData,omitempty"` - ValueName *string `json:"valueName,omitempty"` - ValueType *RegistryValueKind `json:"valueType,omitempty"` -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_securityalert.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_securityalert.go deleted file mode 100644 index cfda2671eec..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_securityalert.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = SecurityAlert{} - -type SecurityAlert struct { - Properties *SecurityAlertProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = SecurityAlert{} - -func (s SecurityAlert) MarshalJSON() ([]byte, error) { - type wrapper SecurityAlert - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SecurityAlert: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SecurityAlert: %+v", err) - } - decoded["kind"] = "SecurityAlert" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SecurityAlert: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_securityalertproperties.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_securityalertproperties.go deleted file mode 100644 index d596f63c80c..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_securityalertproperties.go +++ /dev/null @@ -1,88 +0,0 @@ -package entitytypes - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityAlertProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - AlertDisplayName *string `json:"alertDisplayName,omitempty"` - AlertLink *string `json:"alertLink,omitempty"` - AlertType *string `json:"alertType,omitempty"` - CompromisedEntity *string `json:"compromisedEntity,omitempty"` - ConfidenceLevel *ConfidenceLevel `json:"confidenceLevel,omitempty"` - ConfidenceReasons *[]SecurityAlertPropertiesConfidenceReasonsInlined `json:"confidenceReasons,omitempty"` - ConfidenceScore *float64 `json:"confidenceScore,omitempty"` - ConfidenceScoreStatus *ConfidenceScoreStatus `json:"confidenceScoreStatus,omitempty"` - Description *string `json:"description,omitempty"` - EndTimeUtc *string `json:"endTimeUtc,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - Intent *KillChainIntent `json:"intent,omitempty"` - ProcessingEndTime *string `json:"processingEndTime,omitempty"` - ProductComponentName *string `json:"productComponentName,omitempty"` - ProductName *string `json:"productName,omitempty"` - ProductVersion *string `json:"productVersion,omitempty"` - ProviderAlertId *string `json:"providerAlertId,omitempty"` - RemediationSteps *[]string `json:"remediationSteps,omitempty"` - ResourceIdentifiers *[]interface{} `json:"resourceIdentifiers,omitempty"` - Severity *AlertSeverity `json:"severity,omitempty"` - StartTimeUtc *string `json:"startTimeUtc,omitempty"` - Status *AlertStatus `json:"status,omitempty"` - SystemAlertId *string `json:"systemAlertId,omitempty"` - Tactics *[]AttackTactic `json:"tactics,omitempty"` - TimeGenerated *string `json:"timeGenerated,omitempty"` - VendorName *string `json:"vendorName,omitempty"` -} - -func (o *SecurityAlertProperties) GetEndTimeUtcAsTime() (*time.Time, error) { - if o.EndTimeUtc == nil { - return nil, nil - } - return dates.ParseAsFormat(o.EndTimeUtc, "2006-01-02T15:04:05Z07:00") -} - -func (o *SecurityAlertProperties) SetEndTimeUtcAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.EndTimeUtc = &formatted -} - -func (o *SecurityAlertProperties) GetProcessingEndTimeAsTime() (*time.Time, error) { - if o.ProcessingEndTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.ProcessingEndTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *SecurityAlertProperties) SetProcessingEndTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.ProcessingEndTime = &formatted -} - -func (o *SecurityAlertProperties) GetStartTimeUtcAsTime() (*time.Time, error) { - if o.StartTimeUtc == nil { - return nil, nil - } - return dates.ParseAsFormat(o.StartTimeUtc, "2006-01-02T15:04:05Z07:00") -} - -func (o *SecurityAlertProperties) SetStartTimeUtcAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.StartTimeUtc = &formatted -} - -func (o *SecurityAlertProperties) GetTimeGeneratedAsTime() (*time.Time, error) { - if o.TimeGenerated == nil { - return nil, nil - } - return dates.ParseAsFormat(o.TimeGenerated, "2006-01-02T15:04:05Z07:00") -} - -func (o *SecurityAlertProperties) SetTimeGeneratedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.TimeGenerated = &formatted -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_securityalertpropertiesconfidencereasonsinlined.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_securityalertpropertiesconfidencereasonsinlined.go deleted file mode 100644 index 1560939747b..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_securityalertpropertiesconfidencereasonsinlined.go +++ /dev/null @@ -1,9 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityAlertPropertiesConfidenceReasonsInlined struct { - Reason *string `json:"reason,omitempty"` - ReasonType *string `json:"reasonType,omitempty"` -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_securitygroupentity.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_securitygroupentity.go deleted file mode 100644 index 71a694b6c72..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_securitygroupentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = SecurityGroupEntity{} - -type SecurityGroupEntity struct { - Properties *SecurityGroupEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = SecurityGroupEntity{} - -func (s SecurityGroupEntity) MarshalJSON() ([]byte, error) { - type wrapper SecurityGroupEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SecurityGroupEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SecurityGroupEntity: %+v", err) - } - decoded["kind"] = "SecurityGroup" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SecurityGroupEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_securitygroupentityproperties.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_securitygroupentityproperties.go deleted file mode 100644 index cc6db78fdc1..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_securitygroupentityproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityGroupEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - DistinguishedName *string `json:"distinguishedName,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - ObjectGuid *string `json:"objectGuid,omitempty"` - Sid *string `json:"sid,omitempty"` -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_submissionmailentity.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_submissionmailentity.go deleted file mode 100644 index ff1c9193b12..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_submissionmailentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = SubmissionMailEntity{} - -type SubmissionMailEntity struct { - Properties *SubmissionMailEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = SubmissionMailEntity{} - -func (s SubmissionMailEntity) MarshalJSON() ([]byte, error) { - type wrapper SubmissionMailEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SubmissionMailEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SubmissionMailEntity: %+v", err) - } - decoded["kind"] = "SubmissionMail" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SubmissionMailEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_submissionmailentityproperties.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_submissionmailentityproperties.go deleted file mode 100644 index 1a340a95a76..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_submissionmailentityproperties.go +++ /dev/null @@ -1,49 +0,0 @@ -package entitytypes - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubmissionMailEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - NetworkMessageId *string `json:"networkMessageId,omitempty"` - Recipient *string `json:"recipient,omitempty"` - ReportType *string `json:"reportType,omitempty"` - Sender *string `json:"sender,omitempty"` - SenderIP *string `json:"senderIp,omitempty"` - Subject *string `json:"subject,omitempty"` - SubmissionDate *string `json:"submissionDate,omitempty"` - SubmissionId *string `json:"submissionId,omitempty"` - Submitter *string `json:"submitter,omitempty"` - Timestamp *string `json:"timestamp,omitempty"` -} - -func (o *SubmissionMailEntityProperties) GetSubmissionDateAsTime() (*time.Time, error) { - if o.SubmissionDate == nil { - return nil, nil - } - return dates.ParseAsFormat(o.SubmissionDate, "2006-01-02T15:04:05Z07:00") -} - -func (o *SubmissionMailEntityProperties) SetSubmissionDateAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.SubmissionDate = &formatted -} - -func (o *SubmissionMailEntityProperties) GetTimestampAsTime() (*time.Time, error) { - if o.Timestamp == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Timestamp, "2006-01-02T15:04:05Z07:00") -} - -func (o *SubmissionMailEntityProperties) SetTimestampAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Timestamp = &formatted -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_systemdata.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_systemdata.go deleted file mode 100644 index 862ee7fdbaf..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_systemdata.go +++ /dev/null @@ -1,43 +0,0 @@ -package entitytypes - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SystemData struct { - CreatedAt *string `json:"createdAt,omitempty"` - CreatedBy *string `json:"createdBy,omitempty"` - CreatedByType *CreatedByType `json:"createdByType,omitempty"` - LastModifiedAt *string `json:"lastModifiedAt,omitempty"` - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` - LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"` -} - -func (o *SystemData) GetCreatedAtAsTime() (*time.Time, error) { - if o.CreatedAt == nil { - return nil, nil - } - return dates.ParseAsFormat(o.CreatedAt, "2006-01-02T15:04:05Z07:00") -} - -func (o *SystemData) SetCreatedAtAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.CreatedAt = &formatted -} - -func (o *SystemData) GetLastModifiedAtAsTime() (*time.Time, error) { - if o.LastModifiedAt == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastModifiedAt, "2006-01-02T15:04:05Z07:00") -} - -func (o *SystemData) SetLastModifiedAtAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastModifiedAt = &formatted -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_threatintelligence.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_threatintelligence.go deleted file mode 100644 index e225a18045c..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_threatintelligence.go +++ /dev/null @@ -1,13 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ThreatIntelligence struct { - Confidence *float64 `json:"confidence,omitempty"` - ProviderName *string `json:"providerName,omitempty"` - ReportLink *string `json:"reportLink,omitempty"` - ThreatDescription *string `json:"threatDescription,omitempty"` - ThreatName *string `json:"threatName,omitempty"` - ThreatType *string `json:"threatType,omitempty"` -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_urlentity.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_urlentity.go deleted file mode 100644 index a6d90352180..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_urlentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = UrlEntity{} - -type UrlEntity struct { - Properties *UrlEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = UrlEntity{} - -func (s UrlEntity) MarshalJSON() ([]byte, error) { - type wrapper UrlEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling UrlEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling UrlEntity: %+v", err) - } - decoded["kind"] = "Url" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling UrlEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_urlentityproperties.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_urlentityproperties.go deleted file mode 100644 index 90cc56169cb..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_urlentityproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UrlEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - Url *string `json:"url,omitempty"` -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/model_userinfo.go b/resource-manager/securityinsights/2023-02-01/entitytypes/model_userinfo.go deleted file mode 100644 index 9b6d8135aea..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/model_userinfo.go +++ /dev/null @@ -1,10 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UserInfo struct { - Email *string `json:"email,omitempty"` - Name *string `json:"name,omitempty"` - ObjectId *string `json:"objectId,omitempty"` -} diff --git a/resource-manager/securityinsights/2023-02-01/entitytypes/version.go b/resource-manager/securityinsights/2023-02-01/entitytypes/version.go deleted file mode 100644 index 30651887ff9..00000000000 --- a/resource-manager/securityinsights/2023-02-01/entitytypes/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package entitytypes - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2023-02-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/entitytypes/%s", defaultApiVersion) -} diff --git a/resource-manager/securityinsights/2023-11-01/client.go b/resource-manager/securityinsights/2023-11-01/client.go index 849a24c81a2..6234cf19119 100644 --- a/resource-manager/securityinsights/2023-11-01/client.go +++ b/resource-manager/securityinsights/2023-11-01/client.go @@ -16,7 +16,6 @@ import ( "github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-11-01/contentproducttemplates" "github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-11-01/contenttemplates" "github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-11-01/dataconnectors" - "github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-11-01/entitytypes" "github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-11-01/incidentalerts" "github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-11-01/incidentbookmarks" "github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-11-01/incidentcomments" @@ -46,7 +45,6 @@ type Client struct { ContentProductTemplates *contentproducttemplates.ContentProductTemplatesClient ContentTemplates *contenttemplates.ContentTemplatesClient DataConnectors *dataconnectors.DataConnectorsClient - EntityTypes *entitytypes.EntityTypesClient IncidentAlerts *incidentalerts.IncidentAlertsClient IncidentBookmarks *incidentbookmarks.IncidentBookmarksClient IncidentComments *incidentcomments.IncidentCommentsClient @@ -124,12 +122,6 @@ func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanag } configureFunc(dataConnectorsClient.Client) - entityTypesClient, err := entitytypes.NewEntityTypesClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building EntityTypes client: %+v", err) - } - configureFunc(entityTypesClient.Client) - incidentAlertsClient, err := incidentalerts.NewIncidentAlertsClientWithBaseURI(sdkApi) if err != nil { return nil, fmt.Errorf("building IncidentAlerts client: %+v", err) @@ -225,7 +217,6 @@ func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanag ContentProductTemplates: contentProductTemplatesClient, ContentTemplates: contentTemplatesClient, DataConnectors: dataConnectorsClient, - EntityTypes: entityTypesClient, IncidentAlerts: incidentAlertsClient, IncidentBookmarks: incidentBookmarksClient, IncidentComments: incidentCommentsClient, diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/README.md b/resource-manager/securityinsights/2023-11-01/entitytypes/README.md deleted file mode 100644 index 224c348063e..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-11-01/entitytypes` Documentation - -The `entitytypes` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2023-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-11-01/entitytypes" -``` - - -### Client Initialization - -```go -client := entitytypes.NewEntityTypesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/client.go b/resource-manager/securityinsights/2023-11-01/entitytypes/client.go deleted file mode 100644 index bcdd09e4029..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package entitytypes - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EntityTypesClient struct { - Client *resourcemanager.Client -} - -func NewEntityTypesClientWithBaseURI(sdkApi sdkEnv.Api) (*EntityTypesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "entitytypes", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating EntityTypesClient: %+v", err) - } - - return &EntityTypesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/constants.go b/resource-manager/securityinsights/2023-11-01/entitytypes/constants.go deleted file mode 100644 index 2f194a6f29d..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/constants.go +++ /dev/null @@ -1,980 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AlertSeverity string - -const ( - AlertSeverityHigh AlertSeverity = "High" - AlertSeverityInformational AlertSeverity = "Informational" - AlertSeverityLow AlertSeverity = "Low" - AlertSeverityMedium AlertSeverity = "Medium" -) - -func PossibleValuesForAlertSeverity() []string { - return []string{ - string(AlertSeverityHigh), - string(AlertSeverityInformational), - string(AlertSeverityLow), - string(AlertSeverityMedium), - } -} - -func (s *AlertSeverity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAlertSeverity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAlertSeverity(input string) (*AlertSeverity, error) { - vals := map[string]AlertSeverity{ - "high": AlertSeverityHigh, - "informational": AlertSeverityInformational, - "low": AlertSeverityLow, - "medium": AlertSeverityMedium, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AlertSeverity(input) - return &out, nil -} - -type AlertStatus string - -const ( - AlertStatusDismissed AlertStatus = "Dismissed" - AlertStatusInProgress AlertStatus = "InProgress" - AlertStatusNew AlertStatus = "New" - AlertStatusResolved AlertStatus = "Resolved" - AlertStatusUnknown AlertStatus = "Unknown" -) - -func PossibleValuesForAlertStatus() []string { - return []string{ - string(AlertStatusDismissed), - string(AlertStatusInProgress), - string(AlertStatusNew), - string(AlertStatusResolved), - string(AlertStatusUnknown), - } -} - -func (s *AlertStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAlertStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAlertStatus(input string) (*AlertStatus, error) { - vals := map[string]AlertStatus{ - "dismissed": AlertStatusDismissed, - "inprogress": AlertStatusInProgress, - "new": AlertStatusNew, - "resolved": AlertStatusResolved, - "unknown": AlertStatusUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AlertStatus(input) - return &out, nil -} - -type AntispamMailDirection string - -const ( - AntispamMailDirectionInbound AntispamMailDirection = "Inbound" - AntispamMailDirectionIntraorg AntispamMailDirection = "Intraorg" - AntispamMailDirectionOutbound AntispamMailDirection = "Outbound" - AntispamMailDirectionUnknown AntispamMailDirection = "Unknown" -) - -func PossibleValuesForAntispamMailDirection() []string { - return []string{ - string(AntispamMailDirectionInbound), - string(AntispamMailDirectionIntraorg), - string(AntispamMailDirectionOutbound), - string(AntispamMailDirectionUnknown), - } -} - -func (s *AntispamMailDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAntispamMailDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAntispamMailDirection(input string) (*AntispamMailDirection, error) { - vals := map[string]AntispamMailDirection{ - "inbound": AntispamMailDirectionInbound, - "intraorg": AntispamMailDirectionIntraorg, - "outbound": AntispamMailDirectionOutbound, - "unknown": AntispamMailDirectionUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AntispamMailDirection(input) - return &out, nil -} - -type AttackTactic string - -const ( - AttackTacticCollection AttackTactic = "Collection" - AttackTacticCommandAndControl AttackTactic = "CommandAndControl" - AttackTacticCredentialAccess AttackTactic = "CredentialAccess" - AttackTacticDefenseEvasion AttackTactic = "DefenseEvasion" - AttackTacticDiscovery AttackTactic = "Discovery" - AttackTacticExecution AttackTactic = "Execution" - AttackTacticExfiltration AttackTactic = "Exfiltration" - AttackTacticImpact AttackTactic = "Impact" - AttackTacticImpairProcessControl AttackTactic = "ImpairProcessControl" - AttackTacticInhibitResponseFunction AttackTactic = "InhibitResponseFunction" - AttackTacticInitialAccess AttackTactic = "InitialAccess" - AttackTacticLateralMovement AttackTactic = "LateralMovement" - AttackTacticPersistence AttackTactic = "Persistence" - AttackTacticPreAttack AttackTactic = "PreAttack" - AttackTacticPrivilegeEscalation AttackTactic = "PrivilegeEscalation" - AttackTacticReconnaissance AttackTactic = "Reconnaissance" - AttackTacticResourceDevelopment AttackTactic = "ResourceDevelopment" -) - -func PossibleValuesForAttackTactic() []string { - return []string{ - string(AttackTacticCollection), - string(AttackTacticCommandAndControl), - string(AttackTacticCredentialAccess), - string(AttackTacticDefenseEvasion), - string(AttackTacticDiscovery), - string(AttackTacticExecution), - string(AttackTacticExfiltration), - string(AttackTacticImpact), - string(AttackTacticImpairProcessControl), - string(AttackTacticInhibitResponseFunction), - string(AttackTacticInitialAccess), - string(AttackTacticLateralMovement), - string(AttackTacticPersistence), - string(AttackTacticPreAttack), - string(AttackTacticPrivilegeEscalation), - string(AttackTacticReconnaissance), - string(AttackTacticResourceDevelopment), - } -} - -func (s *AttackTactic) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAttackTactic(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAttackTactic(input string) (*AttackTactic, error) { - vals := map[string]AttackTactic{ - "collection": AttackTacticCollection, - "commandandcontrol": AttackTacticCommandAndControl, - "credentialaccess": AttackTacticCredentialAccess, - "defenseevasion": AttackTacticDefenseEvasion, - "discovery": AttackTacticDiscovery, - "execution": AttackTacticExecution, - "exfiltration": AttackTacticExfiltration, - "impact": AttackTacticImpact, - "impairprocesscontrol": AttackTacticImpairProcessControl, - "inhibitresponsefunction": AttackTacticInhibitResponseFunction, - "initialaccess": AttackTacticInitialAccess, - "lateralmovement": AttackTacticLateralMovement, - "persistence": AttackTacticPersistence, - "preattack": AttackTacticPreAttack, - "privilegeescalation": AttackTacticPrivilegeEscalation, - "reconnaissance": AttackTacticReconnaissance, - "resourcedevelopment": AttackTacticResourceDevelopment, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AttackTactic(input) - return &out, nil -} - -type ConfidenceLevel string - -const ( - ConfidenceLevelHigh ConfidenceLevel = "High" - ConfidenceLevelLow ConfidenceLevel = "Low" - ConfidenceLevelUnknown ConfidenceLevel = "Unknown" -) - -func PossibleValuesForConfidenceLevel() []string { - return []string{ - string(ConfidenceLevelHigh), - string(ConfidenceLevelLow), - string(ConfidenceLevelUnknown), - } -} - -func (s *ConfidenceLevel) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseConfidenceLevel(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseConfidenceLevel(input string) (*ConfidenceLevel, error) { - vals := map[string]ConfidenceLevel{ - "high": ConfidenceLevelHigh, - "low": ConfidenceLevelLow, - "unknown": ConfidenceLevelUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ConfidenceLevel(input) - return &out, nil -} - -type ConfidenceScoreStatus string - -const ( - ConfidenceScoreStatusFinal ConfidenceScoreStatus = "Final" - ConfidenceScoreStatusInProcess ConfidenceScoreStatus = "InProcess" - ConfidenceScoreStatusNotApplicable ConfidenceScoreStatus = "NotApplicable" - ConfidenceScoreStatusNotFinal ConfidenceScoreStatus = "NotFinal" -) - -func PossibleValuesForConfidenceScoreStatus() []string { - return []string{ - string(ConfidenceScoreStatusFinal), - string(ConfidenceScoreStatusInProcess), - string(ConfidenceScoreStatusNotApplicable), - string(ConfidenceScoreStatusNotFinal), - } -} - -func (s *ConfidenceScoreStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseConfidenceScoreStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseConfidenceScoreStatus(input string) (*ConfidenceScoreStatus, error) { - vals := map[string]ConfidenceScoreStatus{ - "final": ConfidenceScoreStatusFinal, - "inprocess": ConfidenceScoreStatusInProcess, - "notapplicable": ConfidenceScoreStatusNotApplicable, - "notfinal": ConfidenceScoreStatusNotFinal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ConfidenceScoreStatus(input) - return &out, nil -} - -type CreatedByType string - -const ( - CreatedByTypeApplication CreatedByType = "Application" - CreatedByTypeKey CreatedByType = "Key" - CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" - CreatedByTypeUser CreatedByType = "User" -) - -func PossibleValuesForCreatedByType() []string { - return []string{ - string(CreatedByTypeApplication), - string(CreatedByTypeKey), - string(CreatedByTypeManagedIdentity), - string(CreatedByTypeUser), - } -} - -func (s *CreatedByType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseCreatedByType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseCreatedByType(input string) (*CreatedByType, error) { - vals := map[string]CreatedByType{ - "application": CreatedByTypeApplication, - "key": CreatedByTypeKey, - "managedidentity": CreatedByTypeManagedIdentity, - "user": CreatedByTypeUser, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := CreatedByType(input) - return &out, nil -} - -type DeliveryAction string - -const ( - DeliveryActionBlocked DeliveryAction = "Blocked" - DeliveryActionDelivered DeliveryAction = "Delivered" - DeliveryActionDeliveredAsSpam DeliveryAction = "DeliveredAsSpam" - DeliveryActionReplaced DeliveryAction = "Replaced" - DeliveryActionUnknown DeliveryAction = "Unknown" -) - -func PossibleValuesForDeliveryAction() []string { - return []string{ - string(DeliveryActionBlocked), - string(DeliveryActionDelivered), - string(DeliveryActionDeliveredAsSpam), - string(DeliveryActionReplaced), - string(DeliveryActionUnknown), - } -} - -func (s *DeliveryAction) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeliveryAction(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeliveryAction(input string) (*DeliveryAction, error) { - vals := map[string]DeliveryAction{ - "blocked": DeliveryActionBlocked, - "delivered": DeliveryActionDelivered, - "deliveredasspam": DeliveryActionDeliveredAsSpam, - "replaced": DeliveryActionReplaced, - "unknown": DeliveryActionUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeliveryAction(input) - return &out, nil -} - -type DeliveryLocation string - -const ( - DeliveryLocationDeletedFolder DeliveryLocation = "DeletedFolder" - DeliveryLocationDropped DeliveryLocation = "Dropped" - DeliveryLocationExternal DeliveryLocation = "External" - DeliveryLocationFailed DeliveryLocation = "Failed" - DeliveryLocationForwarded DeliveryLocation = "Forwarded" - DeliveryLocationInbox DeliveryLocation = "Inbox" - DeliveryLocationJunkFolder DeliveryLocation = "JunkFolder" - DeliveryLocationQuarantine DeliveryLocation = "Quarantine" - DeliveryLocationUnknown DeliveryLocation = "Unknown" -) - -func PossibleValuesForDeliveryLocation() []string { - return []string{ - string(DeliveryLocationDeletedFolder), - string(DeliveryLocationDropped), - string(DeliveryLocationExternal), - string(DeliveryLocationFailed), - string(DeliveryLocationForwarded), - string(DeliveryLocationInbox), - string(DeliveryLocationJunkFolder), - string(DeliveryLocationQuarantine), - string(DeliveryLocationUnknown), - } -} - -func (s *DeliveryLocation) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeliveryLocation(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeliveryLocation(input string) (*DeliveryLocation, error) { - vals := map[string]DeliveryLocation{ - "deletedfolder": DeliveryLocationDeletedFolder, - "dropped": DeliveryLocationDropped, - "external": DeliveryLocationExternal, - "failed": DeliveryLocationFailed, - "forwarded": DeliveryLocationForwarded, - "inbox": DeliveryLocationInbox, - "junkfolder": DeliveryLocationJunkFolder, - "quarantine": DeliveryLocationQuarantine, - "unknown": DeliveryLocationUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeliveryLocation(input) - return &out, nil -} - -type ElevationToken string - -const ( - ElevationTokenDefault ElevationToken = "Default" - ElevationTokenFull ElevationToken = "Full" - ElevationTokenLimited ElevationToken = "Limited" -) - -func PossibleValuesForElevationToken() []string { - return []string{ - string(ElevationTokenDefault), - string(ElevationTokenFull), - string(ElevationTokenLimited), - } -} - -func (s *ElevationToken) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseElevationToken(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseElevationToken(input string) (*ElevationToken, error) { - vals := map[string]ElevationToken{ - "default": ElevationTokenDefault, - "full": ElevationTokenFull, - "limited": ElevationTokenLimited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ElevationToken(input) - return &out, nil -} - -type EntityKindEnum string - -const ( - EntityKindEnumAccount EntityKindEnum = "Account" - EntityKindEnumAzureResource EntityKindEnum = "AzureResource" - EntityKindEnumBookmark EntityKindEnum = "Bookmark" - EntityKindEnumCloudApplication EntityKindEnum = "CloudApplication" - EntityKindEnumDnsResolution EntityKindEnum = "DnsResolution" - EntityKindEnumFile EntityKindEnum = "File" - EntityKindEnumFileHash EntityKindEnum = "FileHash" - EntityKindEnumHost EntityKindEnum = "Host" - EntityKindEnumIP EntityKindEnum = "Ip" - EntityKindEnumIoTDevice EntityKindEnum = "IoTDevice" - EntityKindEnumMailCluster EntityKindEnum = "MailCluster" - EntityKindEnumMailMessage EntityKindEnum = "MailMessage" - EntityKindEnumMailbox EntityKindEnum = "Mailbox" - EntityKindEnumMalware EntityKindEnum = "Malware" - EntityKindEnumProcess EntityKindEnum = "Process" - EntityKindEnumRegistryKey EntityKindEnum = "RegistryKey" - EntityKindEnumRegistryValue EntityKindEnum = "RegistryValue" - EntityKindEnumSecurityAlert EntityKindEnum = "SecurityAlert" - EntityKindEnumSecurityGroup EntityKindEnum = "SecurityGroup" - EntityKindEnumSubmissionMail EntityKindEnum = "SubmissionMail" - EntityKindEnumUrl EntityKindEnum = "Url" -) - -func PossibleValuesForEntityKindEnum() []string { - return []string{ - string(EntityKindEnumAccount), - string(EntityKindEnumAzureResource), - string(EntityKindEnumBookmark), - string(EntityKindEnumCloudApplication), - string(EntityKindEnumDnsResolution), - string(EntityKindEnumFile), - string(EntityKindEnumFileHash), - string(EntityKindEnumHost), - string(EntityKindEnumIP), - string(EntityKindEnumIoTDevice), - string(EntityKindEnumMailCluster), - string(EntityKindEnumMailMessage), - string(EntityKindEnumMailbox), - string(EntityKindEnumMalware), - string(EntityKindEnumProcess), - string(EntityKindEnumRegistryKey), - string(EntityKindEnumRegistryValue), - string(EntityKindEnumSecurityAlert), - string(EntityKindEnumSecurityGroup), - string(EntityKindEnumSubmissionMail), - string(EntityKindEnumUrl), - } -} - -func (s *EntityKindEnum) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseEntityKindEnum(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseEntityKindEnum(input string) (*EntityKindEnum, error) { - vals := map[string]EntityKindEnum{ - "account": EntityKindEnumAccount, - "azureresource": EntityKindEnumAzureResource, - "bookmark": EntityKindEnumBookmark, - "cloudapplication": EntityKindEnumCloudApplication, - "dnsresolution": EntityKindEnumDnsResolution, - "file": EntityKindEnumFile, - "filehash": EntityKindEnumFileHash, - "host": EntityKindEnumHost, - "ip": EntityKindEnumIP, - "iotdevice": EntityKindEnumIoTDevice, - "mailcluster": EntityKindEnumMailCluster, - "mailmessage": EntityKindEnumMailMessage, - "mailbox": EntityKindEnumMailbox, - "malware": EntityKindEnumMalware, - "process": EntityKindEnumProcess, - "registrykey": EntityKindEnumRegistryKey, - "registryvalue": EntityKindEnumRegistryValue, - "securityalert": EntityKindEnumSecurityAlert, - "securitygroup": EntityKindEnumSecurityGroup, - "submissionmail": EntityKindEnumSubmissionMail, - "url": EntityKindEnumUrl, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := EntityKindEnum(input) - return &out, nil -} - -type FileHashAlgorithm string - -const ( - FileHashAlgorithmMDFive FileHashAlgorithm = "MD5" - FileHashAlgorithmSHAOne FileHashAlgorithm = "SHA1" - FileHashAlgorithmSHATwoFiveSix FileHashAlgorithm = "SHA256" - FileHashAlgorithmSHATwoFiveSixAC FileHashAlgorithm = "SHA256AC" - FileHashAlgorithmUnknown FileHashAlgorithm = "Unknown" -) - -func PossibleValuesForFileHashAlgorithm() []string { - return []string{ - string(FileHashAlgorithmMDFive), - string(FileHashAlgorithmSHAOne), - string(FileHashAlgorithmSHATwoFiveSix), - string(FileHashAlgorithmSHATwoFiveSixAC), - string(FileHashAlgorithmUnknown), - } -} - -func (s *FileHashAlgorithm) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFileHashAlgorithm(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFileHashAlgorithm(input string) (*FileHashAlgorithm, error) { - vals := map[string]FileHashAlgorithm{ - "md5": FileHashAlgorithmMDFive, - "sha1": FileHashAlgorithmSHAOne, - "sha256": FileHashAlgorithmSHATwoFiveSix, - "sha256ac": FileHashAlgorithmSHATwoFiveSixAC, - "unknown": FileHashAlgorithmUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FileHashAlgorithm(input) - return &out, nil -} - -type IncidentSeverity string - -const ( - IncidentSeverityHigh IncidentSeverity = "High" - IncidentSeverityInformational IncidentSeverity = "Informational" - IncidentSeverityLow IncidentSeverity = "Low" - IncidentSeverityMedium IncidentSeverity = "Medium" -) - -func PossibleValuesForIncidentSeverity() []string { - return []string{ - string(IncidentSeverityHigh), - string(IncidentSeverityInformational), - string(IncidentSeverityLow), - string(IncidentSeverityMedium), - } -} - -func (s *IncidentSeverity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIncidentSeverity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIncidentSeverity(input string) (*IncidentSeverity, error) { - vals := map[string]IncidentSeverity{ - "high": IncidentSeverityHigh, - "informational": IncidentSeverityInformational, - "low": IncidentSeverityLow, - "medium": IncidentSeverityMedium, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IncidentSeverity(input) - return &out, nil -} - -type KillChainIntent string - -const ( - KillChainIntentCollection KillChainIntent = "Collection" - KillChainIntentCommandAndControl KillChainIntent = "CommandAndControl" - KillChainIntentCredentialAccess KillChainIntent = "CredentialAccess" - KillChainIntentDefenseEvasion KillChainIntent = "DefenseEvasion" - KillChainIntentDiscovery KillChainIntent = "Discovery" - KillChainIntentExecution KillChainIntent = "Execution" - KillChainIntentExfiltration KillChainIntent = "Exfiltration" - KillChainIntentExploitation KillChainIntent = "Exploitation" - KillChainIntentImpact KillChainIntent = "Impact" - KillChainIntentLateralMovement KillChainIntent = "LateralMovement" - KillChainIntentPersistence KillChainIntent = "Persistence" - KillChainIntentPrivilegeEscalation KillChainIntent = "PrivilegeEscalation" - KillChainIntentProbing KillChainIntent = "Probing" - KillChainIntentUnknown KillChainIntent = "Unknown" -) - -func PossibleValuesForKillChainIntent() []string { - return []string{ - string(KillChainIntentCollection), - string(KillChainIntentCommandAndControl), - string(KillChainIntentCredentialAccess), - string(KillChainIntentDefenseEvasion), - string(KillChainIntentDiscovery), - string(KillChainIntentExecution), - string(KillChainIntentExfiltration), - string(KillChainIntentExploitation), - string(KillChainIntentImpact), - string(KillChainIntentLateralMovement), - string(KillChainIntentPersistence), - string(KillChainIntentPrivilegeEscalation), - string(KillChainIntentProbing), - string(KillChainIntentUnknown), - } -} - -func (s *KillChainIntent) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseKillChainIntent(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseKillChainIntent(input string) (*KillChainIntent, error) { - vals := map[string]KillChainIntent{ - "collection": KillChainIntentCollection, - "commandandcontrol": KillChainIntentCommandAndControl, - "credentialaccess": KillChainIntentCredentialAccess, - "defenseevasion": KillChainIntentDefenseEvasion, - "discovery": KillChainIntentDiscovery, - "execution": KillChainIntentExecution, - "exfiltration": KillChainIntentExfiltration, - "exploitation": KillChainIntentExploitation, - "impact": KillChainIntentImpact, - "lateralmovement": KillChainIntentLateralMovement, - "persistence": KillChainIntentPersistence, - "privilegeescalation": KillChainIntentPrivilegeEscalation, - "probing": KillChainIntentProbing, - "unknown": KillChainIntentUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := KillChainIntent(input) - return &out, nil -} - -type OSFamily string - -const ( - OSFamilyAndroid OSFamily = "Android" - OSFamilyIOS OSFamily = "IOS" - OSFamilyLinux OSFamily = "Linux" - OSFamilyUnknown OSFamily = "Unknown" - OSFamilyWindows OSFamily = "Windows" -) - -func PossibleValuesForOSFamily() []string { - return []string{ - string(OSFamilyAndroid), - string(OSFamilyIOS), - string(OSFamilyLinux), - string(OSFamilyUnknown), - string(OSFamilyWindows), - } -} - -func (s *OSFamily) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseOSFamily(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseOSFamily(input string) (*OSFamily, error) { - vals := map[string]OSFamily{ - "android": OSFamilyAndroid, - "ios": OSFamilyIOS, - "linux": OSFamilyLinux, - "unknown": OSFamilyUnknown, - "windows": OSFamilyWindows, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := OSFamily(input) - return &out, nil -} - -type RegistryHive string - -const ( - RegistryHiveHKEYA RegistryHive = "HKEY_A" - RegistryHiveHKEYCLASSESROOT RegistryHive = "HKEY_CLASSES_ROOT" - RegistryHiveHKEYCURRENTCONFIG RegistryHive = "HKEY_CURRENT_CONFIG" - RegistryHiveHKEYCURRENTUSER RegistryHive = "HKEY_CURRENT_USER" - RegistryHiveHKEYCURRENTUSERLOCALSETTINGS RegistryHive = "HKEY_CURRENT_USER_LOCAL_SETTINGS" - RegistryHiveHKEYLOCALMACHINE RegistryHive = "HKEY_LOCAL_MACHINE" - RegistryHiveHKEYPERFORMANCEDATA RegistryHive = "HKEY_PERFORMANCE_DATA" - RegistryHiveHKEYPERFORMANCENLSTEXT RegistryHive = "HKEY_PERFORMANCE_NLSTEXT" - RegistryHiveHKEYPERFORMANCETEXT RegistryHive = "HKEY_PERFORMANCE_TEXT" - RegistryHiveHKEYUSERS RegistryHive = "HKEY_USERS" -) - -func PossibleValuesForRegistryHive() []string { - return []string{ - string(RegistryHiveHKEYA), - string(RegistryHiveHKEYCLASSESROOT), - string(RegistryHiveHKEYCURRENTCONFIG), - string(RegistryHiveHKEYCURRENTUSER), - string(RegistryHiveHKEYCURRENTUSERLOCALSETTINGS), - string(RegistryHiveHKEYLOCALMACHINE), - string(RegistryHiveHKEYPERFORMANCEDATA), - string(RegistryHiveHKEYPERFORMANCENLSTEXT), - string(RegistryHiveHKEYPERFORMANCETEXT), - string(RegistryHiveHKEYUSERS), - } -} - -func (s *RegistryHive) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRegistryHive(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRegistryHive(input string) (*RegistryHive, error) { - vals := map[string]RegistryHive{ - "hkey_a": RegistryHiveHKEYA, - "hkey_classes_root": RegistryHiveHKEYCLASSESROOT, - "hkey_current_config": RegistryHiveHKEYCURRENTCONFIG, - "hkey_current_user": RegistryHiveHKEYCURRENTUSER, - "hkey_current_user_local_settings": RegistryHiveHKEYCURRENTUSERLOCALSETTINGS, - "hkey_local_machine": RegistryHiveHKEYLOCALMACHINE, - "hkey_performance_data": RegistryHiveHKEYPERFORMANCEDATA, - "hkey_performance_nlstext": RegistryHiveHKEYPERFORMANCENLSTEXT, - "hkey_performance_text": RegistryHiveHKEYPERFORMANCETEXT, - "hkey_users": RegistryHiveHKEYUSERS, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RegistryHive(input) - return &out, nil -} - -type RegistryValueKind string - -const ( - RegistryValueKindBinary RegistryValueKind = "Binary" - RegistryValueKindDWord RegistryValueKind = "DWord" - RegistryValueKindExpandString RegistryValueKind = "ExpandString" - RegistryValueKindMultiString RegistryValueKind = "MultiString" - RegistryValueKindNone RegistryValueKind = "None" - RegistryValueKindQWord RegistryValueKind = "QWord" - RegistryValueKindString RegistryValueKind = "String" - RegistryValueKindUnknown RegistryValueKind = "Unknown" -) - -func PossibleValuesForRegistryValueKind() []string { - return []string{ - string(RegistryValueKindBinary), - string(RegistryValueKindDWord), - string(RegistryValueKindExpandString), - string(RegistryValueKindMultiString), - string(RegistryValueKindNone), - string(RegistryValueKindQWord), - string(RegistryValueKindString), - string(RegistryValueKindUnknown), - } -} - -func (s *RegistryValueKind) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRegistryValueKind(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRegistryValueKind(input string) (*RegistryValueKind, error) { - vals := map[string]RegistryValueKind{ - "binary": RegistryValueKindBinary, - "dword": RegistryValueKindDWord, - "expandstring": RegistryValueKindExpandString, - "multistring": RegistryValueKindMultiString, - "none": RegistryValueKindNone, - "qword": RegistryValueKindQWord, - "string": RegistryValueKindString, - "unknown": RegistryValueKindUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RegistryValueKind(input) - return &out, nil -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_accountentity.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_accountentity.go deleted file mode 100644 index 36622cda50b..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_accountentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = AccountEntity{} - -type AccountEntity struct { - Properties *AccountEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = AccountEntity{} - -func (s AccountEntity) MarshalJSON() ([]byte, error) { - type wrapper AccountEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling AccountEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling AccountEntity: %+v", err) - } - decoded["kind"] = "Account" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling AccountEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_accountentityproperties.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_accountentityproperties.go deleted file mode 100644 index d59392c8918..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_accountentityproperties.go +++ /dev/null @@ -1,21 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AccountEntityProperties struct { - AadTenantId *string `json:"aadTenantId,omitempty"` - AadUserId *string `json:"aadUserId,omitempty"` - AccountName *string `json:"accountName,omitempty"` - AdditionalData *interface{} `json:"additionalData,omitempty"` - DisplayName *string `json:"displayName,omitempty"` - DnsDomain *string `json:"dnsDomain,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HostEntityId *string `json:"hostEntityId,omitempty"` - IsDomainJoined *bool `json:"isDomainJoined,omitempty"` - NtDomain *string `json:"ntDomain,omitempty"` - ObjectGuid *string `json:"objectGuid,omitempty"` - Puid *string `json:"puid,omitempty"` - Sid *string `json:"sid,omitempty"` - UpnSuffix *string `json:"upnSuffix,omitempty"` -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_azureresourceentity.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_azureresourceentity.go deleted file mode 100644 index 6947a9b96e5..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_azureresourceentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = AzureResourceEntity{} - -type AzureResourceEntity struct { - Properties *AzureResourceEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = AzureResourceEntity{} - -func (s AzureResourceEntity) MarshalJSON() ([]byte, error) { - type wrapper AzureResourceEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling AzureResourceEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling AzureResourceEntity: %+v", err) - } - decoded["kind"] = "AzureResource" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling AzureResourceEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_azureresourceentityproperties.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_azureresourceentityproperties.go deleted file mode 100644 index 1a5a228d002..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_azureresourceentityproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureResourceEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - ResourceId *string `json:"resourceId,omitempty"` - SubscriptionId *string `json:"subscriptionId,omitempty"` -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_cloudapplicationentity.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_cloudapplicationentity.go deleted file mode 100644 index 73b7fb5b308..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_cloudapplicationentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = CloudApplicationEntity{} - -type CloudApplicationEntity struct { - Properties *CloudApplicationEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = CloudApplicationEntity{} - -func (s CloudApplicationEntity) MarshalJSON() ([]byte, error) { - type wrapper CloudApplicationEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling CloudApplicationEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling CloudApplicationEntity: %+v", err) - } - decoded["kind"] = "CloudApplication" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling CloudApplicationEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_cloudapplicationentityproperties.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_cloudapplicationentityproperties.go deleted file mode 100644 index a2cda4314d2..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_cloudapplicationentityproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CloudApplicationEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - AppId *int64 `json:"appId,omitempty"` - AppName *string `json:"appName,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - InstanceName *string `json:"instanceName,omitempty"` -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_dnsentity.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_dnsentity.go deleted file mode 100644 index 81c3c0dac5b..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_dnsentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = DnsEntity{} - -type DnsEntity struct { - Properties *DnsEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = DnsEntity{} - -func (s DnsEntity) MarshalJSON() ([]byte, error) { - type wrapper DnsEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling DnsEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling DnsEntity: %+v", err) - } - decoded["kind"] = "DnsResolution" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling DnsEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_dnsentityproperties.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_dnsentityproperties.go deleted file mode 100644 index 4d342c95b9f..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_dnsentityproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DnsEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - DnsServerIPEntityId *string `json:"dnsServerIpEntityId,omitempty"` - DomainName *string `json:"domainName,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HostIPAddressEntityId *string `json:"hostIpAddressEntityId,omitempty"` - IPAddressEntityIds *[]string `json:"ipAddressEntityIds,omitempty"` -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_entity.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_entity.go deleted file mode 100644 index e648085f87e..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_entity.go +++ /dev/null @@ -1,213 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Entity interface { -} - -// RawEntityImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawEntityImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalEntityImplementation(input []byte) (Entity, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling Entity into map[string]interface: %+v", err) - } - - value, ok := temp["kind"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "Account") { - var out AccountEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into AccountEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "AzureResource") { - var out AzureResourceEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into AzureResourceEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "CloudApplication") { - var out CloudApplicationEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into CloudApplicationEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "DnsResolution") { - var out DnsEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into DnsEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "File") { - var out FileEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into FileEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "FileHash") { - var out FileHashEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into FileHashEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Host") { - var out HostEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into HostEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Bookmark") { - var out HuntingBookmark - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into HuntingBookmark: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Ip") { - var out IPEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into IPEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "IoTDevice") { - var out IoTDeviceEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into IoTDeviceEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "MailCluster") { - var out MailClusterEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MailClusterEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "MailMessage") { - var out MailMessageEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MailMessageEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Mailbox") { - var out MailboxEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MailboxEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Malware") { - var out MalwareEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MalwareEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Process") { - var out ProcessEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ProcessEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "RegistryKey") { - var out RegistryKeyEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into RegistryKeyEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "RegistryValue") { - var out RegistryValueEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into RegistryValueEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "SecurityAlert") { - var out SecurityAlert - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SecurityAlert: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "SecurityGroup") { - var out SecurityGroupEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SecurityGroupEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "SubmissionMail") { - var out SubmissionMailEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SubmissionMailEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Url") { - var out UrlEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into UrlEntity: %+v", err) - } - return out, nil - } - - out := RawEntityImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_fileentity.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_fileentity.go deleted file mode 100644 index 98411b9b140..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_fileentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = FileEntity{} - -type FileEntity struct { - Properties *FileEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = FileEntity{} - -func (s FileEntity) MarshalJSON() ([]byte, error) { - type wrapper FileEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling FileEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling FileEntity: %+v", err) - } - decoded["kind"] = "File" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling FileEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_fileentityproperties.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_fileentityproperties.go deleted file mode 100644 index 1de5b3a4472..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_fileentityproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FileEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - Directory *string `json:"directory,omitempty"` - FileHashEntityIds *[]string `json:"fileHashEntityIds,omitempty"` - FileName *string `json:"fileName,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HostEntityId *string `json:"hostEntityId,omitempty"` -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_filehashentity.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_filehashentity.go deleted file mode 100644 index bf05183c64b..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_filehashentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = FileHashEntity{} - -type FileHashEntity struct { - Properties *FileHashEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = FileHashEntity{} - -func (s FileHashEntity) MarshalJSON() ([]byte, error) { - type wrapper FileHashEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling FileHashEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling FileHashEntity: %+v", err) - } - decoded["kind"] = "FileHash" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling FileHashEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_filehashentityproperties.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_filehashentityproperties.go deleted file mode 100644 index ae614f05471..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_filehashentityproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FileHashEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - Algorithm *FileHashAlgorithm `json:"algorithm,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HashValue *string `json:"hashValue,omitempty"` -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_geolocation.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_geolocation.go deleted file mode 100644 index 53a44e73dcd..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_geolocation.go +++ /dev/null @@ -1,14 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GeoLocation struct { - Asn *int64 `json:"asn,omitempty"` - City *string `json:"city,omitempty"` - CountryCode *string `json:"countryCode,omitempty"` - CountryName *string `json:"countryName,omitempty"` - Latitude *float64 `json:"latitude,omitempty"` - Longitude *float64 `json:"longitude,omitempty"` - State *string `json:"state,omitempty"` -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_hostentity.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_hostentity.go deleted file mode 100644 index 90b206a2d15..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_hostentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = HostEntity{} - -type HostEntity struct { - Properties *HostEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = HostEntity{} - -func (s HostEntity) MarshalJSON() ([]byte, error) { - type wrapper HostEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling HostEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling HostEntity: %+v", err) - } - decoded["kind"] = "Host" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling HostEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_hostentityproperties.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_hostentityproperties.go deleted file mode 100644 index 225285eedf9..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_hostentityproperties.go +++ /dev/null @@ -1,18 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HostEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - AzureID *string `json:"azureID,omitempty"` - DnsDomain *string `json:"dnsDomain,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HostName *string `json:"hostName,omitempty"` - IsDomainJoined *bool `json:"isDomainJoined,omitempty"` - NetBiosName *string `json:"netBiosName,omitempty"` - NtDomain *string `json:"ntDomain,omitempty"` - OmsAgentID *string `json:"omsAgentID,omitempty"` - OsFamily *OSFamily `json:"osFamily,omitempty"` - OsVersion *string `json:"osVersion,omitempty"` -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_huntingbookmark.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_huntingbookmark.go deleted file mode 100644 index e86ba910de6..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_huntingbookmark.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = HuntingBookmark{} - -type HuntingBookmark struct { - Properties *HuntingBookmarkProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = HuntingBookmark{} - -func (s HuntingBookmark) MarshalJSON() ([]byte, error) { - type wrapper HuntingBookmark - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling HuntingBookmark: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling HuntingBookmark: %+v", err) - } - decoded["kind"] = "Bookmark" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling HuntingBookmark: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_huntingbookmarkproperties.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_huntingbookmarkproperties.go deleted file mode 100644 index 2136725d590..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_huntingbookmarkproperties.go +++ /dev/null @@ -1,62 +0,0 @@ -package entitytypes - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HuntingBookmarkProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - Created *string `json:"created,omitempty"` - CreatedBy *UserInfo `json:"createdBy,omitempty"` - DisplayName string `json:"displayName"` - EventTime *string `json:"eventTime,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - IncidentInfo *IncidentInfo `json:"incidentInfo,omitempty"` - Labels *[]string `json:"labels,omitempty"` - Notes *string `json:"notes,omitempty"` - Query string `json:"query"` - QueryResult *string `json:"queryResult,omitempty"` - Updated *string `json:"updated,omitempty"` - UpdatedBy *UserInfo `json:"updatedBy,omitempty"` -} - -func (o *HuntingBookmarkProperties) GetCreatedAsTime() (*time.Time, error) { - if o.Created == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Created, "2006-01-02T15:04:05Z07:00") -} - -func (o *HuntingBookmarkProperties) SetCreatedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Created = &formatted -} - -func (o *HuntingBookmarkProperties) GetEventTimeAsTime() (*time.Time, error) { - if o.EventTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.EventTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *HuntingBookmarkProperties) SetEventTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.EventTime = &formatted -} - -func (o *HuntingBookmarkProperties) GetUpdatedAsTime() (*time.Time, error) { - if o.Updated == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Updated, "2006-01-02T15:04:05Z07:00") -} - -func (o *HuntingBookmarkProperties) SetUpdatedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Updated = &formatted -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_incidentinfo.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_incidentinfo.go deleted file mode 100644 index 80d014f5289..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_incidentinfo.go +++ /dev/null @@ -1,11 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IncidentInfo struct { - IncidentId *string `json:"incidentId,omitempty"` - RelationName *string `json:"relationName,omitempty"` - Severity *IncidentSeverity `json:"severity,omitempty"` - Title *string `json:"title,omitempty"` -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_iotdeviceentity.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_iotdeviceentity.go deleted file mode 100644 index 3828d0cf7d2..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_iotdeviceentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = IoTDeviceEntity{} - -type IoTDeviceEntity struct { - Properties *IoTDeviceEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = IoTDeviceEntity{} - -func (s IoTDeviceEntity) MarshalJSON() ([]byte, error) { - type wrapper IoTDeviceEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling IoTDeviceEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling IoTDeviceEntity: %+v", err) - } - decoded["kind"] = "IoTDevice" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling IoTDeviceEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_iotdeviceentityproperties.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_iotdeviceentityproperties.go deleted file mode 100644 index 7f41e975a80..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_iotdeviceentityproperties.go +++ /dev/null @@ -1,26 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IoTDeviceEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - DeviceId *string `json:"deviceId,omitempty"` - DeviceName *string `json:"deviceName,omitempty"` - DeviceType *string `json:"deviceType,omitempty"` - EdgeId *string `json:"edgeId,omitempty"` - FirmwareVersion *string `json:"firmwareVersion,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HostEntityId *string `json:"hostEntityId,omitempty"` - IPAddressEntityId *string `json:"ipAddressEntityId,omitempty"` - IotHubEntityId *string `json:"iotHubEntityId,omitempty"` - IotSecurityAgentId *string `json:"iotSecurityAgentId,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - Model *string `json:"model,omitempty"` - OperatingSystem *string `json:"operatingSystem,omitempty"` - Protocols *[]string `json:"protocols,omitempty"` - SerialNumber *string `json:"serialNumber,omitempty"` - Source *string `json:"source,omitempty"` - ThreatIntelligence *[]ThreatIntelligence `json:"threatIntelligence,omitempty"` - Vendor *string `json:"vendor,omitempty"` -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_ipentity.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_ipentity.go deleted file mode 100644 index e062bf2295a..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_ipentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = IPEntity{} - -type IPEntity struct { - Properties *IPEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = IPEntity{} - -func (s IPEntity) MarshalJSON() ([]byte, error) { - type wrapper IPEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling IPEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling IPEntity: %+v", err) - } - decoded["kind"] = "Ip" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling IPEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_ipentityproperties.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_ipentityproperties.go deleted file mode 100644 index f9f2e884298..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_ipentityproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - Address *string `json:"address,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - Location *GeoLocation `json:"location,omitempty"` - ThreatIntelligence *[]ThreatIntelligence `json:"threatIntelligence,omitempty"` -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_mailboxentity.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_mailboxentity.go deleted file mode 100644 index 57dee77697e..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_mailboxentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = MailboxEntity{} - -type MailboxEntity struct { - Properties *MailboxEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = MailboxEntity{} - -func (s MailboxEntity) MarshalJSON() ([]byte, error) { - type wrapper MailboxEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MailboxEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MailboxEntity: %+v", err) - } - decoded["kind"] = "Mailbox" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MailboxEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_mailboxentityproperties.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_mailboxentityproperties.go deleted file mode 100644 index 8f17fb66eed..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_mailboxentityproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MailboxEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - DisplayName *string `json:"displayName,omitempty"` - ExternalDirectoryObjectId *string `json:"externalDirectoryObjectId,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - MailboxPrimaryAddress *string `json:"mailboxPrimaryAddress,omitempty"` - Upn *string `json:"upn,omitempty"` -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_mailclusterentity.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_mailclusterentity.go deleted file mode 100644 index afa0db447b6..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_mailclusterentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = MailClusterEntity{} - -type MailClusterEntity struct { - Properties *MailClusterEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = MailClusterEntity{} - -func (s MailClusterEntity) MarshalJSON() ([]byte, error) { - type wrapper MailClusterEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MailClusterEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MailClusterEntity: %+v", err) - } - decoded["kind"] = "MailCluster" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MailClusterEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_mailclusterentityproperties.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_mailclusterentityproperties.go deleted file mode 100644 index 74591a4d793..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_mailclusterentityproperties.go +++ /dev/null @@ -1,66 +0,0 @@ -package entitytypes - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MailClusterEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - ClusterGroup *string `json:"clusterGroup,omitempty"` - ClusterQueryEndTime *string `json:"clusterQueryEndTime,omitempty"` - ClusterQueryStartTime *string `json:"clusterQueryStartTime,omitempty"` - ClusterSourceIdentifier *string `json:"clusterSourceIdentifier,omitempty"` - ClusterSourceType *string `json:"clusterSourceType,omitempty"` - CountByDeliveryStatus *interface{} `json:"countByDeliveryStatus,omitempty"` - CountByProtectionStatus *interface{} `json:"countByProtectionStatus,omitempty"` - CountByThreatType *interface{} `json:"countByThreatType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - IsVolumeAnomaly *bool `json:"isVolumeAnomaly,omitempty"` - MailCount *int64 `json:"mailCount,omitempty"` - NetworkMessageIds *[]string `json:"networkMessageIds,omitempty"` - Query *string `json:"query,omitempty"` - QueryTime *string `json:"queryTime,omitempty"` - Source *string `json:"source,omitempty"` - Threats *[]string `json:"threats,omitempty"` -} - -func (o *MailClusterEntityProperties) GetClusterQueryEndTimeAsTime() (*time.Time, error) { - if o.ClusterQueryEndTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.ClusterQueryEndTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *MailClusterEntityProperties) SetClusterQueryEndTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.ClusterQueryEndTime = &formatted -} - -func (o *MailClusterEntityProperties) GetClusterQueryStartTimeAsTime() (*time.Time, error) { - if o.ClusterQueryStartTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.ClusterQueryStartTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *MailClusterEntityProperties) SetClusterQueryStartTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.ClusterQueryStartTime = &formatted -} - -func (o *MailClusterEntityProperties) GetQueryTimeAsTime() (*time.Time, error) { - if o.QueryTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.QueryTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *MailClusterEntityProperties) SetQueryTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.QueryTime = &formatted -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_mailmessageentity.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_mailmessageentity.go deleted file mode 100644 index e0fef66bf3b..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_mailmessageentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = MailMessageEntity{} - -type MailMessageEntity struct { - Properties *MailMessageEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = MailMessageEntity{} - -func (s MailMessageEntity) MarshalJSON() ([]byte, error) { - type wrapper MailMessageEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MailMessageEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MailMessageEntity: %+v", err) - } - decoded["kind"] = "MailMessage" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MailMessageEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_mailmessageentityproperties.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_mailmessageentityproperties.go deleted file mode 100644 index bb6d8e5f832..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_mailmessageentityproperties.go +++ /dev/null @@ -1,52 +0,0 @@ -package entitytypes - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MailMessageEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - AntispamDirection *AntispamMailDirection `json:"antispamDirection,omitempty"` - BodyFingerprintBin1 *int64 `json:"bodyFingerprintBin1,omitempty"` - BodyFingerprintBin2 *int64 `json:"bodyFingerprintBin2,omitempty"` - BodyFingerprintBin3 *int64 `json:"bodyFingerprintBin3,omitempty"` - BodyFingerprintBin4 *int64 `json:"bodyFingerprintBin4,omitempty"` - BodyFingerprintBin5 *int64 `json:"bodyFingerprintBin5,omitempty"` - DeliveryAction *DeliveryAction `json:"deliveryAction,omitempty"` - DeliveryLocation *DeliveryLocation `json:"deliveryLocation,omitempty"` - FileEntityIds *[]string `json:"fileEntityIds,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - InternetMessageId *string `json:"internetMessageId,omitempty"` - Language *string `json:"language,omitempty"` - NetworkMessageId *string `json:"networkMessageId,omitempty"` - P1Sender *string `json:"p1Sender,omitempty"` - P1SenderDisplayName *string `json:"p1SenderDisplayName,omitempty"` - P1SenderDomain *string `json:"p1SenderDomain,omitempty"` - P2Sender *string `json:"p2Sender,omitempty"` - P2SenderDisplayName *string `json:"p2SenderDisplayName,omitempty"` - P2SenderDomain *string `json:"p2SenderDomain,omitempty"` - ReceiveDate *string `json:"receiveDate,omitempty"` - Recipient *string `json:"recipient,omitempty"` - SenderIP *string `json:"senderIP,omitempty"` - Subject *string `json:"subject,omitempty"` - ThreatDetectionMethods *[]string `json:"threatDetectionMethods,omitempty"` - Threats *[]string `json:"threats,omitempty"` - Urls *[]string `json:"urls,omitempty"` -} - -func (o *MailMessageEntityProperties) GetReceiveDateAsTime() (*time.Time, error) { - if o.ReceiveDate == nil { - return nil, nil - } - return dates.ParseAsFormat(o.ReceiveDate, "2006-01-02T15:04:05Z07:00") -} - -func (o *MailMessageEntityProperties) SetReceiveDateAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.ReceiveDate = &formatted -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_malwareentity.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_malwareentity.go deleted file mode 100644 index 01b3f9cda92..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_malwareentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = MalwareEntity{} - -type MalwareEntity struct { - Properties *MalwareEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = MalwareEntity{} - -func (s MalwareEntity) MarshalJSON() ([]byte, error) { - type wrapper MalwareEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MalwareEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MalwareEntity: %+v", err) - } - decoded["kind"] = "Malware" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MalwareEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_malwareentityproperties.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_malwareentityproperties.go deleted file mode 100644 index 5ffe2f41d44..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_malwareentityproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MalwareEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - Category *string `json:"category,omitempty"` - FileEntityIds *[]string `json:"fileEntityIds,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - MalwareName *string `json:"malwareName,omitempty"` - ProcessEntityIds *[]string `json:"processEntityIds,omitempty"` -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_processentity.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_processentity.go deleted file mode 100644 index b3d0be74fd8..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_processentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = ProcessEntity{} - -type ProcessEntity struct { - Properties *ProcessEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = ProcessEntity{} - -func (s ProcessEntity) MarshalJSON() ([]byte, error) { - type wrapper ProcessEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ProcessEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ProcessEntity: %+v", err) - } - decoded["kind"] = "Process" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ProcessEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_processentityproperties.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_processentityproperties.go deleted file mode 100644 index 938f21cbd7d..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_processentityproperties.go +++ /dev/null @@ -1,36 +0,0 @@ -package entitytypes - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProcessEntityProperties struct { - AccountEntityId *string `json:"accountEntityId,omitempty"` - AdditionalData *interface{} `json:"additionalData,omitempty"` - CommandLine *string `json:"commandLine,omitempty"` - CreationTimeUtc *string `json:"creationTimeUtc,omitempty"` - ElevationToken *ElevationToken `json:"elevationToken,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HostEntityId *string `json:"hostEntityId,omitempty"` - HostLogonSessionEntityId *string `json:"hostLogonSessionEntityId,omitempty"` - ImageFileEntityId *string `json:"imageFileEntityId,omitempty"` - ParentProcessEntityId *string `json:"parentProcessEntityId,omitempty"` - ProcessId *string `json:"processId,omitempty"` -} - -func (o *ProcessEntityProperties) GetCreationTimeUtcAsTime() (*time.Time, error) { - if o.CreationTimeUtc == nil { - return nil, nil - } - return dates.ParseAsFormat(o.CreationTimeUtc, "2006-01-02T15:04:05Z07:00") -} - -func (o *ProcessEntityProperties) SetCreationTimeUtcAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.CreationTimeUtc = &formatted -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_registrykeyentity.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_registrykeyentity.go deleted file mode 100644 index bef73eb2c5b..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_registrykeyentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = RegistryKeyEntity{} - -type RegistryKeyEntity struct { - Properties *RegistryKeyEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = RegistryKeyEntity{} - -func (s RegistryKeyEntity) MarshalJSON() ([]byte, error) { - type wrapper RegistryKeyEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling RegistryKeyEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling RegistryKeyEntity: %+v", err) - } - decoded["kind"] = "RegistryKey" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling RegistryKeyEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_registrykeyentityproperties.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_registrykeyentityproperties.go deleted file mode 100644 index a8b04e821d5..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_registrykeyentityproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RegistryKeyEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - Hive *RegistryHive `json:"hive,omitempty"` - Key *string `json:"key,omitempty"` -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_registryvalueentity.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_registryvalueentity.go deleted file mode 100644 index 45599924191..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_registryvalueentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = RegistryValueEntity{} - -type RegistryValueEntity struct { - Properties *RegistryValueEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = RegistryValueEntity{} - -func (s RegistryValueEntity) MarshalJSON() ([]byte, error) { - type wrapper RegistryValueEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling RegistryValueEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling RegistryValueEntity: %+v", err) - } - decoded["kind"] = "RegistryValue" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling RegistryValueEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_registryvalueentityproperties.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_registryvalueentityproperties.go deleted file mode 100644 index 6a997b7d386..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_registryvalueentityproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RegistryValueEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - KeyEntityId *string `json:"keyEntityId,omitempty"` - ValueData *string `json:"valueData,omitempty"` - ValueName *string `json:"valueName,omitempty"` - ValueType *RegistryValueKind `json:"valueType,omitempty"` -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_securityalert.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_securityalert.go deleted file mode 100644 index cfda2671eec..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_securityalert.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = SecurityAlert{} - -type SecurityAlert struct { - Properties *SecurityAlertProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = SecurityAlert{} - -func (s SecurityAlert) MarshalJSON() ([]byte, error) { - type wrapper SecurityAlert - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SecurityAlert: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SecurityAlert: %+v", err) - } - decoded["kind"] = "SecurityAlert" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SecurityAlert: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_securityalertproperties.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_securityalertproperties.go deleted file mode 100644 index d596f63c80c..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_securityalertproperties.go +++ /dev/null @@ -1,88 +0,0 @@ -package entitytypes - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityAlertProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - AlertDisplayName *string `json:"alertDisplayName,omitempty"` - AlertLink *string `json:"alertLink,omitempty"` - AlertType *string `json:"alertType,omitempty"` - CompromisedEntity *string `json:"compromisedEntity,omitempty"` - ConfidenceLevel *ConfidenceLevel `json:"confidenceLevel,omitempty"` - ConfidenceReasons *[]SecurityAlertPropertiesConfidenceReasonsInlined `json:"confidenceReasons,omitempty"` - ConfidenceScore *float64 `json:"confidenceScore,omitempty"` - ConfidenceScoreStatus *ConfidenceScoreStatus `json:"confidenceScoreStatus,omitempty"` - Description *string `json:"description,omitempty"` - EndTimeUtc *string `json:"endTimeUtc,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - Intent *KillChainIntent `json:"intent,omitempty"` - ProcessingEndTime *string `json:"processingEndTime,omitempty"` - ProductComponentName *string `json:"productComponentName,omitempty"` - ProductName *string `json:"productName,omitempty"` - ProductVersion *string `json:"productVersion,omitempty"` - ProviderAlertId *string `json:"providerAlertId,omitempty"` - RemediationSteps *[]string `json:"remediationSteps,omitempty"` - ResourceIdentifiers *[]interface{} `json:"resourceIdentifiers,omitempty"` - Severity *AlertSeverity `json:"severity,omitempty"` - StartTimeUtc *string `json:"startTimeUtc,omitempty"` - Status *AlertStatus `json:"status,omitempty"` - SystemAlertId *string `json:"systemAlertId,omitempty"` - Tactics *[]AttackTactic `json:"tactics,omitempty"` - TimeGenerated *string `json:"timeGenerated,omitempty"` - VendorName *string `json:"vendorName,omitempty"` -} - -func (o *SecurityAlertProperties) GetEndTimeUtcAsTime() (*time.Time, error) { - if o.EndTimeUtc == nil { - return nil, nil - } - return dates.ParseAsFormat(o.EndTimeUtc, "2006-01-02T15:04:05Z07:00") -} - -func (o *SecurityAlertProperties) SetEndTimeUtcAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.EndTimeUtc = &formatted -} - -func (o *SecurityAlertProperties) GetProcessingEndTimeAsTime() (*time.Time, error) { - if o.ProcessingEndTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.ProcessingEndTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *SecurityAlertProperties) SetProcessingEndTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.ProcessingEndTime = &formatted -} - -func (o *SecurityAlertProperties) GetStartTimeUtcAsTime() (*time.Time, error) { - if o.StartTimeUtc == nil { - return nil, nil - } - return dates.ParseAsFormat(o.StartTimeUtc, "2006-01-02T15:04:05Z07:00") -} - -func (o *SecurityAlertProperties) SetStartTimeUtcAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.StartTimeUtc = &formatted -} - -func (o *SecurityAlertProperties) GetTimeGeneratedAsTime() (*time.Time, error) { - if o.TimeGenerated == nil { - return nil, nil - } - return dates.ParseAsFormat(o.TimeGenerated, "2006-01-02T15:04:05Z07:00") -} - -func (o *SecurityAlertProperties) SetTimeGeneratedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.TimeGenerated = &formatted -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_securityalertpropertiesconfidencereasonsinlined.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_securityalertpropertiesconfidencereasonsinlined.go deleted file mode 100644 index 1560939747b..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_securityalertpropertiesconfidencereasonsinlined.go +++ /dev/null @@ -1,9 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityAlertPropertiesConfidenceReasonsInlined struct { - Reason *string `json:"reason,omitempty"` - ReasonType *string `json:"reasonType,omitempty"` -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_securitygroupentity.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_securitygroupentity.go deleted file mode 100644 index 71a694b6c72..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_securitygroupentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = SecurityGroupEntity{} - -type SecurityGroupEntity struct { - Properties *SecurityGroupEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = SecurityGroupEntity{} - -func (s SecurityGroupEntity) MarshalJSON() ([]byte, error) { - type wrapper SecurityGroupEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SecurityGroupEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SecurityGroupEntity: %+v", err) - } - decoded["kind"] = "SecurityGroup" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SecurityGroupEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_securitygroupentityproperties.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_securitygroupentityproperties.go deleted file mode 100644 index cc6db78fdc1..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_securitygroupentityproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityGroupEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - DistinguishedName *string `json:"distinguishedName,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - ObjectGuid *string `json:"objectGuid,omitempty"` - Sid *string `json:"sid,omitempty"` -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_submissionmailentity.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_submissionmailentity.go deleted file mode 100644 index ff1c9193b12..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_submissionmailentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = SubmissionMailEntity{} - -type SubmissionMailEntity struct { - Properties *SubmissionMailEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = SubmissionMailEntity{} - -func (s SubmissionMailEntity) MarshalJSON() ([]byte, error) { - type wrapper SubmissionMailEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SubmissionMailEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SubmissionMailEntity: %+v", err) - } - decoded["kind"] = "SubmissionMail" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SubmissionMailEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_submissionmailentityproperties.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_submissionmailentityproperties.go deleted file mode 100644 index 1a340a95a76..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_submissionmailentityproperties.go +++ /dev/null @@ -1,49 +0,0 @@ -package entitytypes - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubmissionMailEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - NetworkMessageId *string `json:"networkMessageId,omitempty"` - Recipient *string `json:"recipient,omitempty"` - ReportType *string `json:"reportType,omitempty"` - Sender *string `json:"sender,omitempty"` - SenderIP *string `json:"senderIp,omitempty"` - Subject *string `json:"subject,omitempty"` - SubmissionDate *string `json:"submissionDate,omitempty"` - SubmissionId *string `json:"submissionId,omitempty"` - Submitter *string `json:"submitter,omitempty"` - Timestamp *string `json:"timestamp,omitempty"` -} - -func (o *SubmissionMailEntityProperties) GetSubmissionDateAsTime() (*time.Time, error) { - if o.SubmissionDate == nil { - return nil, nil - } - return dates.ParseAsFormat(o.SubmissionDate, "2006-01-02T15:04:05Z07:00") -} - -func (o *SubmissionMailEntityProperties) SetSubmissionDateAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.SubmissionDate = &formatted -} - -func (o *SubmissionMailEntityProperties) GetTimestampAsTime() (*time.Time, error) { - if o.Timestamp == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Timestamp, "2006-01-02T15:04:05Z07:00") -} - -func (o *SubmissionMailEntityProperties) SetTimestampAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Timestamp = &formatted -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_systemdata.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_systemdata.go deleted file mode 100644 index 862ee7fdbaf..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_systemdata.go +++ /dev/null @@ -1,43 +0,0 @@ -package entitytypes - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SystemData struct { - CreatedAt *string `json:"createdAt,omitempty"` - CreatedBy *string `json:"createdBy,omitempty"` - CreatedByType *CreatedByType `json:"createdByType,omitempty"` - LastModifiedAt *string `json:"lastModifiedAt,omitempty"` - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` - LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"` -} - -func (o *SystemData) GetCreatedAtAsTime() (*time.Time, error) { - if o.CreatedAt == nil { - return nil, nil - } - return dates.ParseAsFormat(o.CreatedAt, "2006-01-02T15:04:05Z07:00") -} - -func (o *SystemData) SetCreatedAtAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.CreatedAt = &formatted -} - -func (o *SystemData) GetLastModifiedAtAsTime() (*time.Time, error) { - if o.LastModifiedAt == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastModifiedAt, "2006-01-02T15:04:05Z07:00") -} - -func (o *SystemData) SetLastModifiedAtAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastModifiedAt = &formatted -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_threatintelligence.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_threatintelligence.go deleted file mode 100644 index e225a18045c..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_threatintelligence.go +++ /dev/null @@ -1,13 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ThreatIntelligence struct { - Confidence *float64 `json:"confidence,omitempty"` - ProviderName *string `json:"providerName,omitempty"` - ReportLink *string `json:"reportLink,omitempty"` - ThreatDescription *string `json:"threatDescription,omitempty"` - ThreatName *string `json:"threatName,omitempty"` - ThreatType *string `json:"threatType,omitempty"` -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_urlentity.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_urlentity.go deleted file mode 100644 index a6d90352180..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_urlentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = UrlEntity{} - -type UrlEntity struct { - Properties *UrlEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = UrlEntity{} - -func (s UrlEntity) MarshalJSON() ([]byte, error) { - type wrapper UrlEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling UrlEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling UrlEntity: %+v", err) - } - decoded["kind"] = "Url" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling UrlEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_urlentityproperties.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_urlentityproperties.go deleted file mode 100644 index 90cc56169cb..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_urlentityproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UrlEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - Url *string `json:"url,omitempty"` -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/model_userinfo.go b/resource-manager/securityinsights/2023-11-01/entitytypes/model_userinfo.go deleted file mode 100644 index 9b6d8135aea..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/model_userinfo.go +++ /dev/null @@ -1,10 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UserInfo struct { - Email *string `json:"email,omitempty"` - Name *string `json:"name,omitempty"` - ObjectId *string `json:"objectId,omitempty"` -} diff --git a/resource-manager/securityinsights/2023-11-01/entitytypes/version.go b/resource-manager/securityinsights/2023-11-01/entitytypes/version.go deleted file mode 100644 index 215dfec33d0..00000000000 --- a/resource-manager/securityinsights/2023-11-01/entitytypes/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package entitytypes - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2023-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/entitytypes/%s", defaultApiVersion) -} diff --git a/resource-manager/securityinsights/2024-03-01/client.go b/resource-manager/securityinsights/2024-03-01/client.go index 1675187a7ec..ca1d35f3582 100644 --- a/resource-manager/securityinsights/2024-03-01/client.go +++ b/resource-manager/securityinsights/2024-03-01/client.go @@ -16,7 +16,6 @@ import ( "github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2024-03-01/contentproducttemplates" "github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2024-03-01/contenttemplates" "github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2024-03-01/dataconnectors" - "github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2024-03-01/entitytypes" "github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2024-03-01/incidentalerts" "github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2024-03-01/incidentbookmarks" "github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2024-03-01/incidentcomments" @@ -48,7 +47,6 @@ type Client struct { ContentProductTemplates *contentproducttemplates.ContentProductTemplatesClient ContentTemplates *contenttemplates.ContentTemplatesClient DataConnectors *dataconnectors.DataConnectorsClient - EntityTypes *entitytypes.EntityTypesClient IncidentAlerts *incidentalerts.IncidentAlertsClient IncidentBookmarks *incidentbookmarks.IncidentBookmarksClient IncidentComments *incidentcomments.IncidentCommentsClient @@ -128,12 +126,6 @@ func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanag } configureFunc(dataConnectorsClient.Client) - entityTypesClient, err := entitytypes.NewEntityTypesClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building EntityTypes client: %+v", err) - } - configureFunc(entityTypesClient.Client) - incidentAlertsClient, err := incidentalerts.NewIncidentAlertsClientWithBaseURI(sdkApi) if err != nil { return nil, fmt.Errorf("building IncidentAlerts client: %+v", err) @@ -241,7 +233,6 @@ func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanag ContentProductTemplates: contentProductTemplatesClient, ContentTemplates: contentTemplatesClient, DataConnectors: dataConnectorsClient, - EntityTypes: entityTypesClient, IncidentAlerts: incidentAlertsClient, IncidentBookmarks: incidentBookmarksClient, IncidentComments: incidentCommentsClient, diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/README.md b/resource-manager/securityinsights/2024-03-01/entitytypes/README.md deleted file mode 100644 index c9abdcc4a55..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/README.md +++ /dev/null @@ -1,21 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2024-03-01/entitytypes` Documentation - -The `entitytypes` SDK allows for interaction with the Azure Resource Manager Service `securityinsights` (API Version `2024-03-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2024-03-01/entitytypes" -``` - - -### Client Initialization - -```go -client := entitytypes.NewEntityTypesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/client.go b/resource-manager/securityinsights/2024-03-01/entitytypes/client.go deleted file mode 100644 index bcdd09e4029..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package entitytypes - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EntityTypesClient struct { - Client *resourcemanager.Client -} - -func NewEntityTypesClientWithBaseURI(sdkApi sdkEnv.Api) (*EntityTypesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "entitytypes", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating EntityTypesClient: %+v", err) - } - - return &EntityTypesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/constants.go b/resource-manager/securityinsights/2024-03-01/entitytypes/constants.go deleted file mode 100644 index 2f194a6f29d..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/constants.go +++ /dev/null @@ -1,980 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AlertSeverity string - -const ( - AlertSeverityHigh AlertSeverity = "High" - AlertSeverityInformational AlertSeverity = "Informational" - AlertSeverityLow AlertSeverity = "Low" - AlertSeverityMedium AlertSeverity = "Medium" -) - -func PossibleValuesForAlertSeverity() []string { - return []string{ - string(AlertSeverityHigh), - string(AlertSeverityInformational), - string(AlertSeverityLow), - string(AlertSeverityMedium), - } -} - -func (s *AlertSeverity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAlertSeverity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAlertSeverity(input string) (*AlertSeverity, error) { - vals := map[string]AlertSeverity{ - "high": AlertSeverityHigh, - "informational": AlertSeverityInformational, - "low": AlertSeverityLow, - "medium": AlertSeverityMedium, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AlertSeverity(input) - return &out, nil -} - -type AlertStatus string - -const ( - AlertStatusDismissed AlertStatus = "Dismissed" - AlertStatusInProgress AlertStatus = "InProgress" - AlertStatusNew AlertStatus = "New" - AlertStatusResolved AlertStatus = "Resolved" - AlertStatusUnknown AlertStatus = "Unknown" -) - -func PossibleValuesForAlertStatus() []string { - return []string{ - string(AlertStatusDismissed), - string(AlertStatusInProgress), - string(AlertStatusNew), - string(AlertStatusResolved), - string(AlertStatusUnknown), - } -} - -func (s *AlertStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAlertStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAlertStatus(input string) (*AlertStatus, error) { - vals := map[string]AlertStatus{ - "dismissed": AlertStatusDismissed, - "inprogress": AlertStatusInProgress, - "new": AlertStatusNew, - "resolved": AlertStatusResolved, - "unknown": AlertStatusUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AlertStatus(input) - return &out, nil -} - -type AntispamMailDirection string - -const ( - AntispamMailDirectionInbound AntispamMailDirection = "Inbound" - AntispamMailDirectionIntraorg AntispamMailDirection = "Intraorg" - AntispamMailDirectionOutbound AntispamMailDirection = "Outbound" - AntispamMailDirectionUnknown AntispamMailDirection = "Unknown" -) - -func PossibleValuesForAntispamMailDirection() []string { - return []string{ - string(AntispamMailDirectionInbound), - string(AntispamMailDirectionIntraorg), - string(AntispamMailDirectionOutbound), - string(AntispamMailDirectionUnknown), - } -} - -func (s *AntispamMailDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAntispamMailDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAntispamMailDirection(input string) (*AntispamMailDirection, error) { - vals := map[string]AntispamMailDirection{ - "inbound": AntispamMailDirectionInbound, - "intraorg": AntispamMailDirectionIntraorg, - "outbound": AntispamMailDirectionOutbound, - "unknown": AntispamMailDirectionUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AntispamMailDirection(input) - return &out, nil -} - -type AttackTactic string - -const ( - AttackTacticCollection AttackTactic = "Collection" - AttackTacticCommandAndControl AttackTactic = "CommandAndControl" - AttackTacticCredentialAccess AttackTactic = "CredentialAccess" - AttackTacticDefenseEvasion AttackTactic = "DefenseEvasion" - AttackTacticDiscovery AttackTactic = "Discovery" - AttackTacticExecution AttackTactic = "Execution" - AttackTacticExfiltration AttackTactic = "Exfiltration" - AttackTacticImpact AttackTactic = "Impact" - AttackTacticImpairProcessControl AttackTactic = "ImpairProcessControl" - AttackTacticInhibitResponseFunction AttackTactic = "InhibitResponseFunction" - AttackTacticInitialAccess AttackTactic = "InitialAccess" - AttackTacticLateralMovement AttackTactic = "LateralMovement" - AttackTacticPersistence AttackTactic = "Persistence" - AttackTacticPreAttack AttackTactic = "PreAttack" - AttackTacticPrivilegeEscalation AttackTactic = "PrivilegeEscalation" - AttackTacticReconnaissance AttackTactic = "Reconnaissance" - AttackTacticResourceDevelopment AttackTactic = "ResourceDevelopment" -) - -func PossibleValuesForAttackTactic() []string { - return []string{ - string(AttackTacticCollection), - string(AttackTacticCommandAndControl), - string(AttackTacticCredentialAccess), - string(AttackTacticDefenseEvasion), - string(AttackTacticDiscovery), - string(AttackTacticExecution), - string(AttackTacticExfiltration), - string(AttackTacticImpact), - string(AttackTacticImpairProcessControl), - string(AttackTacticInhibitResponseFunction), - string(AttackTacticInitialAccess), - string(AttackTacticLateralMovement), - string(AttackTacticPersistence), - string(AttackTacticPreAttack), - string(AttackTacticPrivilegeEscalation), - string(AttackTacticReconnaissance), - string(AttackTacticResourceDevelopment), - } -} - -func (s *AttackTactic) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAttackTactic(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAttackTactic(input string) (*AttackTactic, error) { - vals := map[string]AttackTactic{ - "collection": AttackTacticCollection, - "commandandcontrol": AttackTacticCommandAndControl, - "credentialaccess": AttackTacticCredentialAccess, - "defenseevasion": AttackTacticDefenseEvasion, - "discovery": AttackTacticDiscovery, - "execution": AttackTacticExecution, - "exfiltration": AttackTacticExfiltration, - "impact": AttackTacticImpact, - "impairprocesscontrol": AttackTacticImpairProcessControl, - "inhibitresponsefunction": AttackTacticInhibitResponseFunction, - "initialaccess": AttackTacticInitialAccess, - "lateralmovement": AttackTacticLateralMovement, - "persistence": AttackTacticPersistence, - "preattack": AttackTacticPreAttack, - "privilegeescalation": AttackTacticPrivilegeEscalation, - "reconnaissance": AttackTacticReconnaissance, - "resourcedevelopment": AttackTacticResourceDevelopment, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AttackTactic(input) - return &out, nil -} - -type ConfidenceLevel string - -const ( - ConfidenceLevelHigh ConfidenceLevel = "High" - ConfidenceLevelLow ConfidenceLevel = "Low" - ConfidenceLevelUnknown ConfidenceLevel = "Unknown" -) - -func PossibleValuesForConfidenceLevel() []string { - return []string{ - string(ConfidenceLevelHigh), - string(ConfidenceLevelLow), - string(ConfidenceLevelUnknown), - } -} - -func (s *ConfidenceLevel) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseConfidenceLevel(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseConfidenceLevel(input string) (*ConfidenceLevel, error) { - vals := map[string]ConfidenceLevel{ - "high": ConfidenceLevelHigh, - "low": ConfidenceLevelLow, - "unknown": ConfidenceLevelUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ConfidenceLevel(input) - return &out, nil -} - -type ConfidenceScoreStatus string - -const ( - ConfidenceScoreStatusFinal ConfidenceScoreStatus = "Final" - ConfidenceScoreStatusInProcess ConfidenceScoreStatus = "InProcess" - ConfidenceScoreStatusNotApplicable ConfidenceScoreStatus = "NotApplicable" - ConfidenceScoreStatusNotFinal ConfidenceScoreStatus = "NotFinal" -) - -func PossibleValuesForConfidenceScoreStatus() []string { - return []string{ - string(ConfidenceScoreStatusFinal), - string(ConfidenceScoreStatusInProcess), - string(ConfidenceScoreStatusNotApplicable), - string(ConfidenceScoreStatusNotFinal), - } -} - -func (s *ConfidenceScoreStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseConfidenceScoreStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseConfidenceScoreStatus(input string) (*ConfidenceScoreStatus, error) { - vals := map[string]ConfidenceScoreStatus{ - "final": ConfidenceScoreStatusFinal, - "inprocess": ConfidenceScoreStatusInProcess, - "notapplicable": ConfidenceScoreStatusNotApplicable, - "notfinal": ConfidenceScoreStatusNotFinal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ConfidenceScoreStatus(input) - return &out, nil -} - -type CreatedByType string - -const ( - CreatedByTypeApplication CreatedByType = "Application" - CreatedByTypeKey CreatedByType = "Key" - CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" - CreatedByTypeUser CreatedByType = "User" -) - -func PossibleValuesForCreatedByType() []string { - return []string{ - string(CreatedByTypeApplication), - string(CreatedByTypeKey), - string(CreatedByTypeManagedIdentity), - string(CreatedByTypeUser), - } -} - -func (s *CreatedByType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseCreatedByType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseCreatedByType(input string) (*CreatedByType, error) { - vals := map[string]CreatedByType{ - "application": CreatedByTypeApplication, - "key": CreatedByTypeKey, - "managedidentity": CreatedByTypeManagedIdentity, - "user": CreatedByTypeUser, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := CreatedByType(input) - return &out, nil -} - -type DeliveryAction string - -const ( - DeliveryActionBlocked DeliveryAction = "Blocked" - DeliveryActionDelivered DeliveryAction = "Delivered" - DeliveryActionDeliveredAsSpam DeliveryAction = "DeliveredAsSpam" - DeliveryActionReplaced DeliveryAction = "Replaced" - DeliveryActionUnknown DeliveryAction = "Unknown" -) - -func PossibleValuesForDeliveryAction() []string { - return []string{ - string(DeliveryActionBlocked), - string(DeliveryActionDelivered), - string(DeliveryActionDeliveredAsSpam), - string(DeliveryActionReplaced), - string(DeliveryActionUnknown), - } -} - -func (s *DeliveryAction) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeliveryAction(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeliveryAction(input string) (*DeliveryAction, error) { - vals := map[string]DeliveryAction{ - "blocked": DeliveryActionBlocked, - "delivered": DeliveryActionDelivered, - "deliveredasspam": DeliveryActionDeliveredAsSpam, - "replaced": DeliveryActionReplaced, - "unknown": DeliveryActionUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeliveryAction(input) - return &out, nil -} - -type DeliveryLocation string - -const ( - DeliveryLocationDeletedFolder DeliveryLocation = "DeletedFolder" - DeliveryLocationDropped DeliveryLocation = "Dropped" - DeliveryLocationExternal DeliveryLocation = "External" - DeliveryLocationFailed DeliveryLocation = "Failed" - DeliveryLocationForwarded DeliveryLocation = "Forwarded" - DeliveryLocationInbox DeliveryLocation = "Inbox" - DeliveryLocationJunkFolder DeliveryLocation = "JunkFolder" - DeliveryLocationQuarantine DeliveryLocation = "Quarantine" - DeliveryLocationUnknown DeliveryLocation = "Unknown" -) - -func PossibleValuesForDeliveryLocation() []string { - return []string{ - string(DeliveryLocationDeletedFolder), - string(DeliveryLocationDropped), - string(DeliveryLocationExternal), - string(DeliveryLocationFailed), - string(DeliveryLocationForwarded), - string(DeliveryLocationInbox), - string(DeliveryLocationJunkFolder), - string(DeliveryLocationQuarantine), - string(DeliveryLocationUnknown), - } -} - -func (s *DeliveryLocation) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeliveryLocation(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeliveryLocation(input string) (*DeliveryLocation, error) { - vals := map[string]DeliveryLocation{ - "deletedfolder": DeliveryLocationDeletedFolder, - "dropped": DeliveryLocationDropped, - "external": DeliveryLocationExternal, - "failed": DeliveryLocationFailed, - "forwarded": DeliveryLocationForwarded, - "inbox": DeliveryLocationInbox, - "junkfolder": DeliveryLocationJunkFolder, - "quarantine": DeliveryLocationQuarantine, - "unknown": DeliveryLocationUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeliveryLocation(input) - return &out, nil -} - -type ElevationToken string - -const ( - ElevationTokenDefault ElevationToken = "Default" - ElevationTokenFull ElevationToken = "Full" - ElevationTokenLimited ElevationToken = "Limited" -) - -func PossibleValuesForElevationToken() []string { - return []string{ - string(ElevationTokenDefault), - string(ElevationTokenFull), - string(ElevationTokenLimited), - } -} - -func (s *ElevationToken) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseElevationToken(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseElevationToken(input string) (*ElevationToken, error) { - vals := map[string]ElevationToken{ - "default": ElevationTokenDefault, - "full": ElevationTokenFull, - "limited": ElevationTokenLimited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ElevationToken(input) - return &out, nil -} - -type EntityKindEnum string - -const ( - EntityKindEnumAccount EntityKindEnum = "Account" - EntityKindEnumAzureResource EntityKindEnum = "AzureResource" - EntityKindEnumBookmark EntityKindEnum = "Bookmark" - EntityKindEnumCloudApplication EntityKindEnum = "CloudApplication" - EntityKindEnumDnsResolution EntityKindEnum = "DnsResolution" - EntityKindEnumFile EntityKindEnum = "File" - EntityKindEnumFileHash EntityKindEnum = "FileHash" - EntityKindEnumHost EntityKindEnum = "Host" - EntityKindEnumIP EntityKindEnum = "Ip" - EntityKindEnumIoTDevice EntityKindEnum = "IoTDevice" - EntityKindEnumMailCluster EntityKindEnum = "MailCluster" - EntityKindEnumMailMessage EntityKindEnum = "MailMessage" - EntityKindEnumMailbox EntityKindEnum = "Mailbox" - EntityKindEnumMalware EntityKindEnum = "Malware" - EntityKindEnumProcess EntityKindEnum = "Process" - EntityKindEnumRegistryKey EntityKindEnum = "RegistryKey" - EntityKindEnumRegistryValue EntityKindEnum = "RegistryValue" - EntityKindEnumSecurityAlert EntityKindEnum = "SecurityAlert" - EntityKindEnumSecurityGroup EntityKindEnum = "SecurityGroup" - EntityKindEnumSubmissionMail EntityKindEnum = "SubmissionMail" - EntityKindEnumUrl EntityKindEnum = "Url" -) - -func PossibleValuesForEntityKindEnum() []string { - return []string{ - string(EntityKindEnumAccount), - string(EntityKindEnumAzureResource), - string(EntityKindEnumBookmark), - string(EntityKindEnumCloudApplication), - string(EntityKindEnumDnsResolution), - string(EntityKindEnumFile), - string(EntityKindEnumFileHash), - string(EntityKindEnumHost), - string(EntityKindEnumIP), - string(EntityKindEnumIoTDevice), - string(EntityKindEnumMailCluster), - string(EntityKindEnumMailMessage), - string(EntityKindEnumMailbox), - string(EntityKindEnumMalware), - string(EntityKindEnumProcess), - string(EntityKindEnumRegistryKey), - string(EntityKindEnumRegistryValue), - string(EntityKindEnumSecurityAlert), - string(EntityKindEnumSecurityGroup), - string(EntityKindEnumSubmissionMail), - string(EntityKindEnumUrl), - } -} - -func (s *EntityKindEnum) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseEntityKindEnum(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseEntityKindEnum(input string) (*EntityKindEnum, error) { - vals := map[string]EntityKindEnum{ - "account": EntityKindEnumAccount, - "azureresource": EntityKindEnumAzureResource, - "bookmark": EntityKindEnumBookmark, - "cloudapplication": EntityKindEnumCloudApplication, - "dnsresolution": EntityKindEnumDnsResolution, - "file": EntityKindEnumFile, - "filehash": EntityKindEnumFileHash, - "host": EntityKindEnumHost, - "ip": EntityKindEnumIP, - "iotdevice": EntityKindEnumIoTDevice, - "mailcluster": EntityKindEnumMailCluster, - "mailmessage": EntityKindEnumMailMessage, - "mailbox": EntityKindEnumMailbox, - "malware": EntityKindEnumMalware, - "process": EntityKindEnumProcess, - "registrykey": EntityKindEnumRegistryKey, - "registryvalue": EntityKindEnumRegistryValue, - "securityalert": EntityKindEnumSecurityAlert, - "securitygroup": EntityKindEnumSecurityGroup, - "submissionmail": EntityKindEnumSubmissionMail, - "url": EntityKindEnumUrl, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := EntityKindEnum(input) - return &out, nil -} - -type FileHashAlgorithm string - -const ( - FileHashAlgorithmMDFive FileHashAlgorithm = "MD5" - FileHashAlgorithmSHAOne FileHashAlgorithm = "SHA1" - FileHashAlgorithmSHATwoFiveSix FileHashAlgorithm = "SHA256" - FileHashAlgorithmSHATwoFiveSixAC FileHashAlgorithm = "SHA256AC" - FileHashAlgorithmUnknown FileHashAlgorithm = "Unknown" -) - -func PossibleValuesForFileHashAlgorithm() []string { - return []string{ - string(FileHashAlgorithmMDFive), - string(FileHashAlgorithmSHAOne), - string(FileHashAlgorithmSHATwoFiveSix), - string(FileHashAlgorithmSHATwoFiveSixAC), - string(FileHashAlgorithmUnknown), - } -} - -func (s *FileHashAlgorithm) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFileHashAlgorithm(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFileHashAlgorithm(input string) (*FileHashAlgorithm, error) { - vals := map[string]FileHashAlgorithm{ - "md5": FileHashAlgorithmMDFive, - "sha1": FileHashAlgorithmSHAOne, - "sha256": FileHashAlgorithmSHATwoFiveSix, - "sha256ac": FileHashAlgorithmSHATwoFiveSixAC, - "unknown": FileHashAlgorithmUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FileHashAlgorithm(input) - return &out, nil -} - -type IncidentSeverity string - -const ( - IncidentSeverityHigh IncidentSeverity = "High" - IncidentSeverityInformational IncidentSeverity = "Informational" - IncidentSeverityLow IncidentSeverity = "Low" - IncidentSeverityMedium IncidentSeverity = "Medium" -) - -func PossibleValuesForIncidentSeverity() []string { - return []string{ - string(IncidentSeverityHigh), - string(IncidentSeverityInformational), - string(IncidentSeverityLow), - string(IncidentSeverityMedium), - } -} - -func (s *IncidentSeverity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIncidentSeverity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIncidentSeverity(input string) (*IncidentSeverity, error) { - vals := map[string]IncidentSeverity{ - "high": IncidentSeverityHigh, - "informational": IncidentSeverityInformational, - "low": IncidentSeverityLow, - "medium": IncidentSeverityMedium, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IncidentSeverity(input) - return &out, nil -} - -type KillChainIntent string - -const ( - KillChainIntentCollection KillChainIntent = "Collection" - KillChainIntentCommandAndControl KillChainIntent = "CommandAndControl" - KillChainIntentCredentialAccess KillChainIntent = "CredentialAccess" - KillChainIntentDefenseEvasion KillChainIntent = "DefenseEvasion" - KillChainIntentDiscovery KillChainIntent = "Discovery" - KillChainIntentExecution KillChainIntent = "Execution" - KillChainIntentExfiltration KillChainIntent = "Exfiltration" - KillChainIntentExploitation KillChainIntent = "Exploitation" - KillChainIntentImpact KillChainIntent = "Impact" - KillChainIntentLateralMovement KillChainIntent = "LateralMovement" - KillChainIntentPersistence KillChainIntent = "Persistence" - KillChainIntentPrivilegeEscalation KillChainIntent = "PrivilegeEscalation" - KillChainIntentProbing KillChainIntent = "Probing" - KillChainIntentUnknown KillChainIntent = "Unknown" -) - -func PossibleValuesForKillChainIntent() []string { - return []string{ - string(KillChainIntentCollection), - string(KillChainIntentCommandAndControl), - string(KillChainIntentCredentialAccess), - string(KillChainIntentDefenseEvasion), - string(KillChainIntentDiscovery), - string(KillChainIntentExecution), - string(KillChainIntentExfiltration), - string(KillChainIntentExploitation), - string(KillChainIntentImpact), - string(KillChainIntentLateralMovement), - string(KillChainIntentPersistence), - string(KillChainIntentPrivilegeEscalation), - string(KillChainIntentProbing), - string(KillChainIntentUnknown), - } -} - -func (s *KillChainIntent) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseKillChainIntent(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseKillChainIntent(input string) (*KillChainIntent, error) { - vals := map[string]KillChainIntent{ - "collection": KillChainIntentCollection, - "commandandcontrol": KillChainIntentCommandAndControl, - "credentialaccess": KillChainIntentCredentialAccess, - "defenseevasion": KillChainIntentDefenseEvasion, - "discovery": KillChainIntentDiscovery, - "execution": KillChainIntentExecution, - "exfiltration": KillChainIntentExfiltration, - "exploitation": KillChainIntentExploitation, - "impact": KillChainIntentImpact, - "lateralmovement": KillChainIntentLateralMovement, - "persistence": KillChainIntentPersistence, - "privilegeescalation": KillChainIntentPrivilegeEscalation, - "probing": KillChainIntentProbing, - "unknown": KillChainIntentUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := KillChainIntent(input) - return &out, nil -} - -type OSFamily string - -const ( - OSFamilyAndroid OSFamily = "Android" - OSFamilyIOS OSFamily = "IOS" - OSFamilyLinux OSFamily = "Linux" - OSFamilyUnknown OSFamily = "Unknown" - OSFamilyWindows OSFamily = "Windows" -) - -func PossibleValuesForOSFamily() []string { - return []string{ - string(OSFamilyAndroid), - string(OSFamilyIOS), - string(OSFamilyLinux), - string(OSFamilyUnknown), - string(OSFamilyWindows), - } -} - -func (s *OSFamily) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseOSFamily(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseOSFamily(input string) (*OSFamily, error) { - vals := map[string]OSFamily{ - "android": OSFamilyAndroid, - "ios": OSFamilyIOS, - "linux": OSFamilyLinux, - "unknown": OSFamilyUnknown, - "windows": OSFamilyWindows, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := OSFamily(input) - return &out, nil -} - -type RegistryHive string - -const ( - RegistryHiveHKEYA RegistryHive = "HKEY_A" - RegistryHiveHKEYCLASSESROOT RegistryHive = "HKEY_CLASSES_ROOT" - RegistryHiveHKEYCURRENTCONFIG RegistryHive = "HKEY_CURRENT_CONFIG" - RegistryHiveHKEYCURRENTUSER RegistryHive = "HKEY_CURRENT_USER" - RegistryHiveHKEYCURRENTUSERLOCALSETTINGS RegistryHive = "HKEY_CURRENT_USER_LOCAL_SETTINGS" - RegistryHiveHKEYLOCALMACHINE RegistryHive = "HKEY_LOCAL_MACHINE" - RegistryHiveHKEYPERFORMANCEDATA RegistryHive = "HKEY_PERFORMANCE_DATA" - RegistryHiveHKEYPERFORMANCENLSTEXT RegistryHive = "HKEY_PERFORMANCE_NLSTEXT" - RegistryHiveHKEYPERFORMANCETEXT RegistryHive = "HKEY_PERFORMANCE_TEXT" - RegistryHiveHKEYUSERS RegistryHive = "HKEY_USERS" -) - -func PossibleValuesForRegistryHive() []string { - return []string{ - string(RegistryHiveHKEYA), - string(RegistryHiveHKEYCLASSESROOT), - string(RegistryHiveHKEYCURRENTCONFIG), - string(RegistryHiveHKEYCURRENTUSER), - string(RegistryHiveHKEYCURRENTUSERLOCALSETTINGS), - string(RegistryHiveHKEYLOCALMACHINE), - string(RegistryHiveHKEYPERFORMANCEDATA), - string(RegistryHiveHKEYPERFORMANCENLSTEXT), - string(RegistryHiveHKEYPERFORMANCETEXT), - string(RegistryHiveHKEYUSERS), - } -} - -func (s *RegistryHive) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRegistryHive(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRegistryHive(input string) (*RegistryHive, error) { - vals := map[string]RegistryHive{ - "hkey_a": RegistryHiveHKEYA, - "hkey_classes_root": RegistryHiveHKEYCLASSESROOT, - "hkey_current_config": RegistryHiveHKEYCURRENTCONFIG, - "hkey_current_user": RegistryHiveHKEYCURRENTUSER, - "hkey_current_user_local_settings": RegistryHiveHKEYCURRENTUSERLOCALSETTINGS, - "hkey_local_machine": RegistryHiveHKEYLOCALMACHINE, - "hkey_performance_data": RegistryHiveHKEYPERFORMANCEDATA, - "hkey_performance_nlstext": RegistryHiveHKEYPERFORMANCENLSTEXT, - "hkey_performance_text": RegistryHiveHKEYPERFORMANCETEXT, - "hkey_users": RegistryHiveHKEYUSERS, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RegistryHive(input) - return &out, nil -} - -type RegistryValueKind string - -const ( - RegistryValueKindBinary RegistryValueKind = "Binary" - RegistryValueKindDWord RegistryValueKind = "DWord" - RegistryValueKindExpandString RegistryValueKind = "ExpandString" - RegistryValueKindMultiString RegistryValueKind = "MultiString" - RegistryValueKindNone RegistryValueKind = "None" - RegistryValueKindQWord RegistryValueKind = "QWord" - RegistryValueKindString RegistryValueKind = "String" - RegistryValueKindUnknown RegistryValueKind = "Unknown" -) - -func PossibleValuesForRegistryValueKind() []string { - return []string{ - string(RegistryValueKindBinary), - string(RegistryValueKindDWord), - string(RegistryValueKindExpandString), - string(RegistryValueKindMultiString), - string(RegistryValueKindNone), - string(RegistryValueKindQWord), - string(RegistryValueKindString), - string(RegistryValueKindUnknown), - } -} - -func (s *RegistryValueKind) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRegistryValueKind(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRegistryValueKind(input string) (*RegistryValueKind, error) { - vals := map[string]RegistryValueKind{ - "binary": RegistryValueKindBinary, - "dword": RegistryValueKindDWord, - "expandstring": RegistryValueKindExpandString, - "multistring": RegistryValueKindMultiString, - "none": RegistryValueKindNone, - "qword": RegistryValueKindQWord, - "string": RegistryValueKindString, - "unknown": RegistryValueKindUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RegistryValueKind(input) - return &out, nil -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_accountentity.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_accountentity.go deleted file mode 100644 index 36622cda50b..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_accountentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = AccountEntity{} - -type AccountEntity struct { - Properties *AccountEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = AccountEntity{} - -func (s AccountEntity) MarshalJSON() ([]byte, error) { - type wrapper AccountEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling AccountEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling AccountEntity: %+v", err) - } - decoded["kind"] = "Account" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling AccountEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_accountentityproperties.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_accountentityproperties.go deleted file mode 100644 index d59392c8918..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_accountentityproperties.go +++ /dev/null @@ -1,21 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AccountEntityProperties struct { - AadTenantId *string `json:"aadTenantId,omitempty"` - AadUserId *string `json:"aadUserId,omitempty"` - AccountName *string `json:"accountName,omitempty"` - AdditionalData *interface{} `json:"additionalData,omitempty"` - DisplayName *string `json:"displayName,omitempty"` - DnsDomain *string `json:"dnsDomain,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HostEntityId *string `json:"hostEntityId,omitempty"` - IsDomainJoined *bool `json:"isDomainJoined,omitempty"` - NtDomain *string `json:"ntDomain,omitempty"` - ObjectGuid *string `json:"objectGuid,omitempty"` - Puid *string `json:"puid,omitempty"` - Sid *string `json:"sid,omitempty"` - UpnSuffix *string `json:"upnSuffix,omitempty"` -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_azureresourceentity.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_azureresourceentity.go deleted file mode 100644 index 6947a9b96e5..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_azureresourceentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = AzureResourceEntity{} - -type AzureResourceEntity struct { - Properties *AzureResourceEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = AzureResourceEntity{} - -func (s AzureResourceEntity) MarshalJSON() ([]byte, error) { - type wrapper AzureResourceEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling AzureResourceEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling AzureResourceEntity: %+v", err) - } - decoded["kind"] = "AzureResource" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling AzureResourceEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_azureresourceentityproperties.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_azureresourceentityproperties.go deleted file mode 100644 index 1a5a228d002..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_azureresourceentityproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureResourceEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - ResourceId *string `json:"resourceId,omitempty"` - SubscriptionId *string `json:"subscriptionId,omitempty"` -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_cloudapplicationentity.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_cloudapplicationentity.go deleted file mode 100644 index 73b7fb5b308..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_cloudapplicationentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = CloudApplicationEntity{} - -type CloudApplicationEntity struct { - Properties *CloudApplicationEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = CloudApplicationEntity{} - -func (s CloudApplicationEntity) MarshalJSON() ([]byte, error) { - type wrapper CloudApplicationEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling CloudApplicationEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling CloudApplicationEntity: %+v", err) - } - decoded["kind"] = "CloudApplication" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling CloudApplicationEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_cloudapplicationentityproperties.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_cloudapplicationentityproperties.go deleted file mode 100644 index a2cda4314d2..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_cloudapplicationentityproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CloudApplicationEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - AppId *int64 `json:"appId,omitempty"` - AppName *string `json:"appName,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - InstanceName *string `json:"instanceName,omitempty"` -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_dnsentity.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_dnsentity.go deleted file mode 100644 index 81c3c0dac5b..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_dnsentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = DnsEntity{} - -type DnsEntity struct { - Properties *DnsEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = DnsEntity{} - -func (s DnsEntity) MarshalJSON() ([]byte, error) { - type wrapper DnsEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling DnsEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling DnsEntity: %+v", err) - } - decoded["kind"] = "DnsResolution" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling DnsEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_dnsentityproperties.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_dnsentityproperties.go deleted file mode 100644 index 4d342c95b9f..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_dnsentityproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DnsEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - DnsServerIPEntityId *string `json:"dnsServerIpEntityId,omitempty"` - DomainName *string `json:"domainName,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HostIPAddressEntityId *string `json:"hostIpAddressEntityId,omitempty"` - IPAddressEntityIds *[]string `json:"ipAddressEntityIds,omitempty"` -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_entity.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_entity.go deleted file mode 100644 index e648085f87e..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_entity.go +++ /dev/null @@ -1,213 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Entity interface { -} - -// RawEntityImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawEntityImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalEntityImplementation(input []byte) (Entity, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling Entity into map[string]interface: %+v", err) - } - - value, ok := temp["kind"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "Account") { - var out AccountEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into AccountEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "AzureResource") { - var out AzureResourceEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into AzureResourceEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "CloudApplication") { - var out CloudApplicationEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into CloudApplicationEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "DnsResolution") { - var out DnsEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into DnsEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "File") { - var out FileEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into FileEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "FileHash") { - var out FileHashEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into FileHashEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Host") { - var out HostEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into HostEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Bookmark") { - var out HuntingBookmark - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into HuntingBookmark: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Ip") { - var out IPEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into IPEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "IoTDevice") { - var out IoTDeviceEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into IoTDeviceEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "MailCluster") { - var out MailClusterEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MailClusterEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "MailMessage") { - var out MailMessageEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MailMessageEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Mailbox") { - var out MailboxEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MailboxEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Malware") { - var out MalwareEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MalwareEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Process") { - var out ProcessEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ProcessEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "RegistryKey") { - var out RegistryKeyEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into RegistryKeyEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "RegistryValue") { - var out RegistryValueEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into RegistryValueEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "SecurityAlert") { - var out SecurityAlert - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SecurityAlert: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "SecurityGroup") { - var out SecurityGroupEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SecurityGroupEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "SubmissionMail") { - var out SubmissionMailEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into SubmissionMailEntity: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Url") { - var out UrlEntity - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into UrlEntity: %+v", err) - } - return out, nil - } - - out := RawEntityImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_fileentity.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_fileentity.go deleted file mode 100644 index 98411b9b140..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_fileentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = FileEntity{} - -type FileEntity struct { - Properties *FileEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = FileEntity{} - -func (s FileEntity) MarshalJSON() ([]byte, error) { - type wrapper FileEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling FileEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling FileEntity: %+v", err) - } - decoded["kind"] = "File" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling FileEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_fileentityproperties.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_fileentityproperties.go deleted file mode 100644 index 1de5b3a4472..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_fileentityproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FileEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - Directory *string `json:"directory,omitempty"` - FileHashEntityIds *[]string `json:"fileHashEntityIds,omitempty"` - FileName *string `json:"fileName,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HostEntityId *string `json:"hostEntityId,omitempty"` -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_filehashentity.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_filehashentity.go deleted file mode 100644 index bf05183c64b..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_filehashentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = FileHashEntity{} - -type FileHashEntity struct { - Properties *FileHashEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = FileHashEntity{} - -func (s FileHashEntity) MarshalJSON() ([]byte, error) { - type wrapper FileHashEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling FileHashEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling FileHashEntity: %+v", err) - } - decoded["kind"] = "FileHash" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling FileHashEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_filehashentityproperties.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_filehashentityproperties.go deleted file mode 100644 index ae614f05471..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_filehashentityproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FileHashEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - Algorithm *FileHashAlgorithm `json:"algorithm,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HashValue *string `json:"hashValue,omitempty"` -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_geolocation.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_geolocation.go deleted file mode 100644 index 53a44e73dcd..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_geolocation.go +++ /dev/null @@ -1,14 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GeoLocation struct { - Asn *int64 `json:"asn,omitempty"` - City *string `json:"city,omitempty"` - CountryCode *string `json:"countryCode,omitempty"` - CountryName *string `json:"countryName,omitempty"` - Latitude *float64 `json:"latitude,omitempty"` - Longitude *float64 `json:"longitude,omitempty"` - State *string `json:"state,omitempty"` -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_hostentity.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_hostentity.go deleted file mode 100644 index 90b206a2d15..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_hostentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = HostEntity{} - -type HostEntity struct { - Properties *HostEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = HostEntity{} - -func (s HostEntity) MarshalJSON() ([]byte, error) { - type wrapper HostEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling HostEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling HostEntity: %+v", err) - } - decoded["kind"] = "Host" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling HostEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_hostentityproperties.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_hostentityproperties.go deleted file mode 100644 index 225285eedf9..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_hostentityproperties.go +++ /dev/null @@ -1,18 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HostEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - AzureID *string `json:"azureID,omitempty"` - DnsDomain *string `json:"dnsDomain,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HostName *string `json:"hostName,omitempty"` - IsDomainJoined *bool `json:"isDomainJoined,omitempty"` - NetBiosName *string `json:"netBiosName,omitempty"` - NtDomain *string `json:"ntDomain,omitempty"` - OmsAgentID *string `json:"omsAgentID,omitempty"` - OsFamily *OSFamily `json:"osFamily,omitempty"` - OsVersion *string `json:"osVersion,omitempty"` -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_huntingbookmark.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_huntingbookmark.go deleted file mode 100644 index e86ba910de6..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_huntingbookmark.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = HuntingBookmark{} - -type HuntingBookmark struct { - Properties *HuntingBookmarkProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = HuntingBookmark{} - -func (s HuntingBookmark) MarshalJSON() ([]byte, error) { - type wrapper HuntingBookmark - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling HuntingBookmark: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling HuntingBookmark: %+v", err) - } - decoded["kind"] = "Bookmark" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling HuntingBookmark: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_huntingbookmarkproperties.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_huntingbookmarkproperties.go deleted file mode 100644 index 2136725d590..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_huntingbookmarkproperties.go +++ /dev/null @@ -1,62 +0,0 @@ -package entitytypes - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HuntingBookmarkProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - Created *string `json:"created,omitempty"` - CreatedBy *UserInfo `json:"createdBy,omitempty"` - DisplayName string `json:"displayName"` - EventTime *string `json:"eventTime,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - IncidentInfo *IncidentInfo `json:"incidentInfo,omitempty"` - Labels *[]string `json:"labels,omitempty"` - Notes *string `json:"notes,omitempty"` - Query string `json:"query"` - QueryResult *string `json:"queryResult,omitempty"` - Updated *string `json:"updated,omitempty"` - UpdatedBy *UserInfo `json:"updatedBy,omitempty"` -} - -func (o *HuntingBookmarkProperties) GetCreatedAsTime() (*time.Time, error) { - if o.Created == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Created, "2006-01-02T15:04:05Z07:00") -} - -func (o *HuntingBookmarkProperties) SetCreatedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Created = &formatted -} - -func (o *HuntingBookmarkProperties) GetEventTimeAsTime() (*time.Time, error) { - if o.EventTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.EventTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *HuntingBookmarkProperties) SetEventTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.EventTime = &formatted -} - -func (o *HuntingBookmarkProperties) GetUpdatedAsTime() (*time.Time, error) { - if o.Updated == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Updated, "2006-01-02T15:04:05Z07:00") -} - -func (o *HuntingBookmarkProperties) SetUpdatedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Updated = &formatted -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_incidentinfo.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_incidentinfo.go deleted file mode 100644 index 80d014f5289..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_incidentinfo.go +++ /dev/null @@ -1,11 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IncidentInfo struct { - IncidentId *string `json:"incidentId,omitempty"` - RelationName *string `json:"relationName,omitempty"` - Severity *IncidentSeverity `json:"severity,omitempty"` - Title *string `json:"title,omitempty"` -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_iotdeviceentity.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_iotdeviceentity.go deleted file mode 100644 index 3828d0cf7d2..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_iotdeviceentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = IoTDeviceEntity{} - -type IoTDeviceEntity struct { - Properties *IoTDeviceEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = IoTDeviceEntity{} - -func (s IoTDeviceEntity) MarshalJSON() ([]byte, error) { - type wrapper IoTDeviceEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling IoTDeviceEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling IoTDeviceEntity: %+v", err) - } - decoded["kind"] = "IoTDevice" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling IoTDeviceEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_iotdeviceentityproperties.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_iotdeviceentityproperties.go deleted file mode 100644 index 7f41e975a80..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_iotdeviceentityproperties.go +++ /dev/null @@ -1,26 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IoTDeviceEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - DeviceId *string `json:"deviceId,omitempty"` - DeviceName *string `json:"deviceName,omitempty"` - DeviceType *string `json:"deviceType,omitempty"` - EdgeId *string `json:"edgeId,omitempty"` - FirmwareVersion *string `json:"firmwareVersion,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HostEntityId *string `json:"hostEntityId,omitempty"` - IPAddressEntityId *string `json:"ipAddressEntityId,omitempty"` - IotHubEntityId *string `json:"iotHubEntityId,omitempty"` - IotSecurityAgentId *string `json:"iotSecurityAgentId,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - Model *string `json:"model,omitempty"` - OperatingSystem *string `json:"operatingSystem,omitempty"` - Protocols *[]string `json:"protocols,omitempty"` - SerialNumber *string `json:"serialNumber,omitempty"` - Source *string `json:"source,omitempty"` - ThreatIntelligence *[]ThreatIntelligence `json:"threatIntelligence,omitempty"` - Vendor *string `json:"vendor,omitempty"` -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_ipentity.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_ipentity.go deleted file mode 100644 index e062bf2295a..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_ipentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = IPEntity{} - -type IPEntity struct { - Properties *IPEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = IPEntity{} - -func (s IPEntity) MarshalJSON() ([]byte, error) { - type wrapper IPEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling IPEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling IPEntity: %+v", err) - } - decoded["kind"] = "Ip" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling IPEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_ipentityproperties.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_ipentityproperties.go deleted file mode 100644 index f9f2e884298..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_ipentityproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - Address *string `json:"address,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - Location *GeoLocation `json:"location,omitempty"` - ThreatIntelligence *[]ThreatIntelligence `json:"threatIntelligence,omitempty"` -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_mailboxentity.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_mailboxentity.go deleted file mode 100644 index 57dee77697e..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_mailboxentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = MailboxEntity{} - -type MailboxEntity struct { - Properties *MailboxEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = MailboxEntity{} - -func (s MailboxEntity) MarshalJSON() ([]byte, error) { - type wrapper MailboxEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MailboxEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MailboxEntity: %+v", err) - } - decoded["kind"] = "Mailbox" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MailboxEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_mailboxentityproperties.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_mailboxentityproperties.go deleted file mode 100644 index 8f17fb66eed..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_mailboxentityproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MailboxEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - DisplayName *string `json:"displayName,omitempty"` - ExternalDirectoryObjectId *string `json:"externalDirectoryObjectId,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - MailboxPrimaryAddress *string `json:"mailboxPrimaryAddress,omitempty"` - Upn *string `json:"upn,omitempty"` -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_mailclusterentity.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_mailclusterentity.go deleted file mode 100644 index afa0db447b6..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_mailclusterentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = MailClusterEntity{} - -type MailClusterEntity struct { - Properties *MailClusterEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = MailClusterEntity{} - -func (s MailClusterEntity) MarshalJSON() ([]byte, error) { - type wrapper MailClusterEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MailClusterEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MailClusterEntity: %+v", err) - } - decoded["kind"] = "MailCluster" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MailClusterEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_mailclusterentityproperties.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_mailclusterentityproperties.go deleted file mode 100644 index 74591a4d793..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_mailclusterentityproperties.go +++ /dev/null @@ -1,66 +0,0 @@ -package entitytypes - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MailClusterEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - ClusterGroup *string `json:"clusterGroup,omitempty"` - ClusterQueryEndTime *string `json:"clusterQueryEndTime,omitempty"` - ClusterQueryStartTime *string `json:"clusterQueryStartTime,omitempty"` - ClusterSourceIdentifier *string `json:"clusterSourceIdentifier,omitempty"` - ClusterSourceType *string `json:"clusterSourceType,omitempty"` - CountByDeliveryStatus *interface{} `json:"countByDeliveryStatus,omitempty"` - CountByProtectionStatus *interface{} `json:"countByProtectionStatus,omitempty"` - CountByThreatType *interface{} `json:"countByThreatType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - IsVolumeAnomaly *bool `json:"isVolumeAnomaly,omitempty"` - MailCount *int64 `json:"mailCount,omitempty"` - NetworkMessageIds *[]string `json:"networkMessageIds,omitempty"` - Query *string `json:"query,omitempty"` - QueryTime *string `json:"queryTime,omitempty"` - Source *string `json:"source,omitempty"` - Threats *[]string `json:"threats,omitempty"` -} - -func (o *MailClusterEntityProperties) GetClusterQueryEndTimeAsTime() (*time.Time, error) { - if o.ClusterQueryEndTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.ClusterQueryEndTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *MailClusterEntityProperties) SetClusterQueryEndTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.ClusterQueryEndTime = &formatted -} - -func (o *MailClusterEntityProperties) GetClusterQueryStartTimeAsTime() (*time.Time, error) { - if o.ClusterQueryStartTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.ClusterQueryStartTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *MailClusterEntityProperties) SetClusterQueryStartTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.ClusterQueryStartTime = &formatted -} - -func (o *MailClusterEntityProperties) GetQueryTimeAsTime() (*time.Time, error) { - if o.QueryTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.QueryTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *MailClusterEntityProperties) SetQueryTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.QueryTime = &formatted -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_mailmessageentity.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_mailmessageentity.go deleted file mode 100644 index e0fef66bf3b..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_mailmessageentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = MailMessageEntity{} - -type MailMessageEntity struct { - Properties *MailMessageEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = MailMessageEntity{} - -func (s MailMessageEntity) MarshalJSON() ([]byte, error) { - type wrapper MailMessageEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MailMessageEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MailMessageEntity: %+v", err) - } - decoded["kind"] = "MailMessage" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MailMessageEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_mailmessageentityproperties.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_mailmessageentityproperties.go deleted file mode 100644 index bb6d8e5f832..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_mailmessageentityproperties.go +++ /dev/null @@ -1,52 +0,0 @@ -package entitytypes - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MailMessageEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - AntispamDirection *AntispamMailDirection `json:"antispamDirection,omitempty"` - BodyFingerprintBin1 *int64 `json:"bodyFingerprintBin1,omitempty"` - BodyFingerprintBin2 *int64 `json:"bodyFingerprintBin2,omitempty"` - BodyFingerprintBin3 *int64 `json:"bodyFingerprintBin3,omitempty"` - BodyFingerprintBin4 *int64 `json:"bodyFingerprintBin4,omitempty"` - BodyFingerprintBin5 *int64 `json:"bodyFingerprintBin5,omitempty"` - DeliveryAction *DeliveryAction `json:"deliveryAction,omitempty"` - DeliveryLocation *DeliveryLocation `json:"deliveryLocation,omitempty"` - FileEntityIds *[]string `json:"fileEntityIds,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - InternetMessageId *string `json:"internetMessageId,omitempty"` - Language *string `json:"language,omitempty"` - NetworkMessageId *string `json:"networkMessageId,omitempty"` - P1Sender *string `json:"p1Sender,omitempty"` - P1SenderDisplayName *string `json:"p1SenderDisplayName,omitempty"` - P1SenderDomain *string `json:"p1SenderDomain,omitempty"` - P2Sender *string `json:"p2Sender,omitempty"` - P2SenderDisplayName *string `json:"p2SenderDisplayName,omitempty"` - P2SenderDomain *string `json:"p2SenderDomain,omitempty"` - ReceiveDate *string `json:"receiveDate,omitempty"` - Recipient *string `json:"recipient,omitempty"` - SenderIP *string `json:"senderIP,omitempty"` - Subject *string `json:"subject,omitempty"` - ThreatDetectionMethods *[]string `json:"threatDetectionMethods,omitempty"` - Threats *[]string `json:"threats,omitempty"` - Urls *[]string `json:"urls,omitempty"` -} - -func (o *MailMessageEntityProperties) GetReceiveDateAsTime() (*time.Time, error) { - if o.ReceiveDate == nil { - return nil, nil - } - return dates.ParseAsFormat(o.ReceiveDate, "2006-01-02T15:04:05Z07:00") -} - -func (o *MailMessageEntityProperties) SetReceiveDateAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.ReceiveDate = &formatted -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_malwareentity.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_malwareentity.go deleted file mode 100644 index 01b3f9cda92..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_malwareentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = MalwareEntity{} - -type MalwareEntity struct { - Properties *MalwareEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = MalwareEntity{} - -func (s MalwareEntity) MarshalJSON() ([]byte, error) { - type wrapper MalwareEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MalwareEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MalwareEntity: %+v", err) - } - decoded["kind"] = "Malware" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MalwareEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_malwareentityproperties.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_malwareentityproperties.go deleted file mode 100644 index 5ffe2f41d44..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_malwareentityproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MalwareEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - Category *string `json:"category,omitempty"` - FileEntityIds *[]string `json:"fileEntityIds,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - MalwareName *string `json:"malwareName,omitempty"` - ProcessEntityIds *[]string `json:"processEntityIds,omitempty"` -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_processentity.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_processentity.go deleted file mode 100644 index b3d0be74fd8..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_processentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = ProcessEntity{} - -type ProcessEntity struct { - Properties *ProcessEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = ProcessEntity{} - -func (s ProcessEntity) MarshalJSON() ([]byte, error) { - type wrapper ProcessEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ProcessEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ProcessEntity: %+v", err) - } - decoded["kind"] = "Process" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ProcessEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_processentityproperties.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_processentityproperties.go deleted file mode 100644 index 938f21cbd7d..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_processentityproperties.go +++ /dev/null @@ -1,36 +0,0 @@ -package entitytypes - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProcessEntityProperties struct { - AccountEntityId *string `json:"accountEntityId,omitempty"` - AdditionalData *interface{} `json:"additionalData,omitempty"` - CommandLine *string `json:"commandLine,omitempty"` - CreationTimeUtc *string `json:"creationTimeUtc,omitempty"` - ElevationToken *ElevationToken `json:"elevationToken,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - HostEntityId *string `json:"hostEntityId,omitempty"` - HostLogonSessionEntityId *string `json:"hostLogonSessionEntityId,omitempty"` - ImageFileEntityId *string `json:"imageFileEntityId,omitempty"` - ParentProcessEntityId *string `json:"parentProcessEntityId,omitempty"` - ProcessId *string `json:"processId,omitempty"` -} - -func (o *ProcessEntityProperties) GetCreationTimeUtcAsTime() (*time.Time, error) { - if o.CreationTimeUtc == nil { - return nil, nil - } - return dates.ParseAsFormat(o.CreationTimeUtc, "2006-01-02T15:04:05Z07:00") -} - -func (o *ProcessEntityProperties) SetCreationTimeUtcAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.CreationTimeUtc = &formatted -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_registrykeyentity.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_registrykeyentity.go deleted file mode 100644 index bef73eb2c5b..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_registrykeyentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = RegistryKeyEntity{} - -type RegistryKeyEntity struct { - Properties *RegistryKeyEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = RegistryKeyEntity{} - -func (s RegistryKeyEntity) MarshalJSON() ([]byte, error) { - type wrapper RegistryKeyEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling RegistryKeyEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling RegistryKeyEntity: %+v", err) - } - decoded["kind"] = "RegistryKey" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling RegistryKeyEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_registrykeyentityproperties.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_registrykeyentityproperties.go deleted file mode 100644 index a8b04e821d5..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_registrykeyentityproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RegistryKeyEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - Hive *RegistryHive `json:"hive,omitempty"` - Key *string `json:"key,omitempty"` -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_registryvalueentity.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_registryvalueentity.go deleted file mode 100644 index 45599924191..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_registryvalueentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = RegistryValueEntity{} - -type RegistryValueEntity struct { - Properties *RegistryValueEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = RegistryValueEntity{} - -func (s RegistryValueEntity) MarshalJSON() ([]byte, error) { - type wrapper RegistryValueEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling RegistryValueEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling RegistryValueEntity: %+v", err) - } - decoded["kind"] = "RegistryValue" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling RegistryValueEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_registryvalueentityproperties.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_registryvalueentityproperties.go deleted file mode 100644 index 6a997b7d386..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_registryvalueentityproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RegistryValueEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - KeyEntityId *string `json:"keyEntityId,omitempty"` - ValueData *string `json:"valueData,omitempty"` - ValueName *string `json:"valueName,omitempty"` - ValueType *RegistryValueKind `json:"valueType,omitempty"` -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_securityalert.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_securityalert.go deleted file mode 100644 index cfda2671eec..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_securityalert.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = SecurityAlert{} - -type SecurityAlert struct { - Properties *SecurityAlertProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = SecurityAlert{} - -func (s SecurityAlert) MarshalJSON() ([]byte, error) { - type wrapper SecurityAlert - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SecurityAlert: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SecurityAlert: %+v", err) - } - decoded["kind"] = "SecurityAlert" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SecurityAlert: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_securityalertproperties.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_securityalertproperties.go deleted file mode 100644 index d596f63c80c..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_securityalertproperties.go +++ /dev/null @@ -1,88 +0,0 @@ -package entitytypes - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityAlertProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - AlertDisplayName *string `json:"alertDisplayName,omitempty"` - AlertLink *string `json:"alertLink,omitempty"` - AlertType *string `json:"alertType,omitempty"` - CompromisedEntity *string `json:"compromisedEntity,omitempty"` - ConfidenceLevel *ConfidenceLevel `json:"confidenceLevel,omitempty"` - ConfidenceReasons *[]SecurityAlertPropertiesConfidenceReasonsInlined `json:"confidenceReasons,omitempty"` - ConfidenceScore *float64 `json:"confidenceScore,omitempty"` - ConfidenceScoreStatus *ConfidenceScoreStatus `json:"confidenceScoreStatus,omitempty"` - Description *string `json:"description,omitempty"` - EndTimeUtc *string `json:"endTimeUtc,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - Intent *KillChainIntent `json:"intent,omitempty"` - ProcessingEndTime *string `json:"processingEndTime,omitempty"` - ProductComponentName *string `json:"productComponentName,omitempty"` - ProductName *string `json:"productName,omitempty"` - ProductVersion *string `json:"productVersion,omitempty"` - ProviderAlertId *string `json:"providerAlertId,omitempty"` - RemediationSteps *[]string `json:"remediationSteps,omitempty"` - ResourceIdentifiers *[]interface{} `json:"resourceIdentifiers,omitempty"` - Severity *AlertSeverity `json:"severity,omitempty"` - StartTimeUtc *string `json:"startTimeUtc,omitempty"` - Status *AlertStatus `json:"status,omitempty"` - SystemAlertId *string `json:"systemAlertId,omitempty"` - Tactics *[]AttackTactic `json:"tactics,omitempty"` - TimeGenerated *string `json:"timeGenerated,omitempty"` - VendorName *string `json:"vendorName,omitempty"` -} - -func (o *SecurityAlertProperties) GetEndTimeUtcAsTime() (*time.Time, error) { - if o.EndTimeUtc == nil { - return nil, nil - } - return dates.ParseAsFormat(o.EndTimeUtc, "2006-01-02T15:04:05Z07:00") -} - -func (o *SecurityAlertProperties) SetEndTimeUtcAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.EndTimeUtc = &formatted -} - -func (o *SecurityAlertProperties) GetProcessingEndTimeAsTime() (*time.Time, error) { - if o.ProcessingEndTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.ProcessingEndTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *SecurityAlertProperties) SetProcessingEndTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.ProcessingEndTime = &formatted -} - -func (o *SecurityAlertProperties) GetStartTimeUtcAsTime() (*time.Time, error) { - if o.StartTimeUtc == nil { - return nil, nil - } - return dates.ParseAsFormat(o.StartTimeUtc, "2006-01-02T15:04:05Z07:00") -} - -func (o *SecurityAlertProperties) SetStartTimeUtcAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.StartTimeUtc = &formatted -} - -func (o *SecurityAlertProperties) GetTimeGeneratedAsTime() (*time.Time, error) { - if o.TimeGenerated == nil { - return nil, nil - } - return dates.ParseAsFormat(o.TimeGenerated, "2006-01-02T15:04:05Z07:00") -} - -func (o *SecurityAlertProperties) SetTimeGeneratedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.TimeGenerated = &formatted -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_securityalertpropertiesconfidencereasonsinlined.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_securityalertpropertiesconfidencereasonsinlined.go deleted file mode 100644 index 1560939747b..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_securityalertpropertiesconfidencereasonsinlined.go +++ /dev/null @@ -1,9 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityAlertPropertiesConfidenceReasonsInlined struct { - Reason *string `json:"reason,omitempty"` - ReasonType *string `json:"reasonType,omitempty"` -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_securitygroupentity.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_securitygroupentity.go deleted file mode 100644 index 71a694b6c72..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_securitygroupentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = SecurityGroupEntity{} - -type SecurityGroupEntity struct { - Properties *SecurityGroupEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = SecurityGroupEntity{} - -func (s SecurityGroupEntity) MarshalJSON() ([]byte, error) { - type wrapper SecurityGroupEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SecurityGroupEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SecurityGroupEntity: %+v", err) - } - decoded["kind"] = "SecurityGroup" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SecurityGroupEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_securitygroupentityproperties.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_securitygroupentityproperties.go deleted file mode 100644 index cc6db78fdc1..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_securitygroupentityproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityGroupEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - DistinguishedName *string `json:"distinguishedName,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - ObjectGuid *string `json:"objectGuid,omitempty"` - Sid *string `json:"sid,omitempty"` -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_submissionmailentity.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_submissionmailentity.go deleted file mode 100644 index ff1c9193b12..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_submissionmailentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = SubmissionMailEntity{} - -type SubmissionMailEntity struct { - Properties *SubmissionMailEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = SubmissionMailEntity{} - -func (s SubmissionMailEntity) MarshalJSON() ([]byte, error) { - type wrapper SubmissionMailEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling SubmissionMailEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling SubmissionMailEntity: %+v", err) - } - decoded["kind"] = "SubmissionMail" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling SubmissionMailEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_submissionmailentityproperties.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_submissionmailentityproperties.go deleted file mode 100644 index 1a340a95a76..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_submissionmailentityproperties.go +++ /dev/null @@ -1,49 +0,0 @@ -package entitytypes - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubmissionMailEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - NetworkMessageId *string `json:"networkMessageId,omitempty"` - Recipient *string `json:"recipient,omitempty"` - ReportType *string `json:"reportType,omitempty"` - Sender *string `json:"sender,omitempty"` - SenderIP *string `json:"senderIp,omitempty"` - Subject *string `json:"subject,omitempty"` - SubmissionDate *string `json:"submissionDate,omitempty"` - SubmissionId *string `json:"submissionId,omitempty"` - Submitter *string `json:"submitter,omitempty"` - Timestamp *string `json:"timestamp,omitempty"` -} - -func (o *SubmissionMailEntityProperties) GetSubmissionDateAsTime() (*time.Time, error) { - if o.SubmissionDate == nil { - return nil, nil - } - return dates.ParseAsFormat(o.SubmissionDate, "2006-01-02T15:04:05Z07:00") -} - -func (o *SubmissionMailEntityProperties) SetSubmissionDateAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.SubmissionDate = &formatted -} - -func (o *SubmissionMailEntityProperties) GetTimestampAsTime() (*time.Time, error) { - if o.Timestamp == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Timestamp, "2006-01-02T15:04:05Z07:00") -} - -func (o *SubmissionMailEntityProperties) SetTimestampAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Timestamp = &formatted -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_systemdata.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_systemdata.go deleted file mode 100644 index 862ee7fdbaf..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_systemdata.go +++ /dev/null @@ -1,43 +0,0 @@ -package entitytypes - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SystemData struct { - CreatedAt *string `json:"createdAt,omitempty"` - CreatedBy *string `json:"createdBy,omitempty"` - CreatedByType *CreatedByType `json:"createdByType,omitempty"` - LastModifiedAt *string `json:"lastModifiedAt,omitempty"` - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` - LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"` -} - -func (o *SystemData) GetCreatedAtAsTime() (*time.Time, error) { - if o.CreatedAt == nil { - return nil, nil - } - return dates.ParseAsFormat(o.CreatedAt, "2006-01-02T15:04:05Z07:00") -} - -func (o *SystemData) SetCreatedAtAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.CreatedAt = &formatted -} - -func (o *SystemData) GetLastModifiedAtAsTime() (*time.Time, error) { - if o.LastModifiedAt == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastModifiedAt, "2006-01-02T15:04:05Z07:00") -} - -func (o *SystemData) SetLastModifiedAtAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastModifiedAt = &formatted -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_threatintelligence.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_threatintelligence.go deleted file mode 100644 index e225a18045c..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_threatintelligence.go +++ /dev/null @@ -1,13 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ThreatIntelligence struct { - Confidence *float64 `json:"confidence,omitempty"` - ProviderName *string `json:"providerName,omitempty"` - ReportLink *string `json:"reportLink,omitempty"` - ThreatDescription *string `json:"threatDescription,omitempty"` - ThreatName *string `json:"threatName,omitempty"` - ThreatType *string `json:"threatType,omitempty"` -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_urlentity.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_urlentity.go deleted file mode 100644 index a6d90352180..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_urlentity.go +++ /dev/null @@ -1,45 +0,0 @@ -package entitytypes - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ Entity = UrlEntity{} - -type UrlEntity struct { - Properties *UrlEntityProperties `json:"properties,omitempty"` - - // Fields inherited from Entity - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = UrlEntity{} - -func (s UrlEntity) MarshalJSON() ([]byte, error) { - type wrapper UrlEntity - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling UrlEntity: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling UrlEntity: %+v", err) - } - decoded["kind"] = "Url" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling UrlEntity: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_urlentityproperties.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_urlentityproperties.go deleted file mode 100644 index 90cc56169cb..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_urlentityproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UrlEntityProperties struct { - AdditionalData *interface{} `json:"additionalData,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - Url *string `json:"url,omitempty"` -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/model_userinfo.go b/resource-manager/securityinsights/2024-03-01/entitytypes/model_userinfo.go deleted file mode 100644 index 9b6d8135aea..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/model_userinfo.go +++ /dev/null @@ -1,10 +0,0 @@ -package entitytypes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UserInfo struct { - Email *string `json:"email,omitempty"` - Name *string `json:"name,omitempty"` - ObjectId *string `json:"objectId,omitempty"` -} diff --git a/resource-manager/securityinsights/2024-03-01/entitytypes/version.go b/resource-manager/securityinsights/2024-03-01/entitytypes/version.go deleted file mode 100644 index 4fa3e4ef44a..00000000000 --- a/resource-manager/securityinsights/2024-03-01/entitytypes/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package entitytypes - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2024-03-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/entitytypes/%s", defaultApiVersion) -}